Class LockException

  • All Implemented Interfaces:
    java.io.Serializable

    @API(type=EXTENDABLE,
         src=PUBLIC)
    public class LockException
    extends java.lang.Exception
    Thrown when could not lock or unlock properly
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static ro.sync.i18n.MessageBundle messages
      The messages resource bundle.
    • Constructor Summary

      Constructors 
      Constructor Description
      LockException​(java.lang.String message, boolean acquire, java.lang.String detailedMessage)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCauseMessage()  
      java.lang.String getDetailedMessage()  
      java.lang.String getMessage()  
      java.lang.String getOpenErrorMessage​(boolean close)  
      java.lang.String getOwnerName()  
      void setOwnerName​(java.lang.String ownerName)
      Sets the name of the lock owner.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • messages

        protected static final ro.sync.i18n.MessageBundle messages
        The messages resource bundle.
    • Constructor Detail

      • LockException

        public LockException​(java.lang.String message,
                             boolean acquire,
                             java.lang.String detailedMessage)
        Constructor.
        Parameters:
        message - The error message.
        acquire - True if the exception occurred while trying to acquire the lock.
        detailedMessage - The detailed exception message.
    • Method Detail

      • setOwnerName

        public void setOwnerName​(java.lang.String ownerName)
        Sets the name of the lock owner.
        Parameters:
        ownerName - The name of the lock owner to set.
      • getOwnerName

        public java.lang.String getOwnerName()
        Returns:
        Returns the name of the lock owner.
      • getCauseMessage

        public java.lang.String getCauseMessage()
        Returns:
        The main cause for the exception.
      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable
        See Also:
        Throwable.getMessage()
      • getDetailedMessage

        public java.lang.String getDetailedMessage()
        Returns:
        Returns the detailedMessage.
      • getOpenErrorMessage

        public java.lang.String getOpenErrorMessage​(boolean close)
        Parameters:
        close - true if must advise to close the editor. Otherwise will advise to cancel the operation.
        Returns:
        Error message to show to user on open if lock failed.