Class LockInfo

java.lang.Object
com.ithit.webdav.server.LockInfo

public final class LockInfo extends Object
Serves for exchanging locking information with WebDAV engine.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initialize LockInfo instance
    LockInfo(boolean shared, boolean deep, String token, long timeout, String owner)
    Initialize LockInfo instance
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves information about the principal taking out a lock.
    long
    Retrieves lock expiration timeout in milliseconds.
    Retrieves lock token associated with a lock.
    boolean
    Indicates whether a lock is enforceable on the subtree.
    boolean
    Determines whether lock is shared.
    void
    setDeep(boolean deep)
    Sets flag which indicates whether the lock is enforceable on the subtree.
    void
    Sets information about the principal taking out a lock.
    void
    setShared(boolean shared)
    Sets shared flag of the lock.
    void
    setTimeout(long timeout)
    Sets lock expirate timeout.
    void
    Sets lock token associated with a lock.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LockInfo

      public LockInfo()
      Initialize LockInfo instance
    • LockInfo

      public LockInfo(boolean shared, boolean deep, String token, long timeout, String owner)
      Initialize LockInfo instance
      Parameters:
      shared - Sets shared flag of the lock.
      deep - Sets flag which indicates whether the lock is enforceable on the subtree.
      token - Sets lock token associated with a lock.
      timeout - Sets lock expiration timeout.
      owner - Sets information about the principal taking out a lock.
  • Method Details

    • getToken

      public String getToken()
      Retrieves lock token associated with a lock.
      Returns:
      Lock token.
    • setToken

      public void setToken(String token)
      Sets lock token associated with a lock.
      Parameters:
      token - Lock token.
    • isShared

      public boolean isShared()
      Determines whether lock is shared.
      Returns:
      Whether lock is shared.
    • setShared

      public void setShared(boolean shared)
      Sets shared flag of the lock.
      Parameters:
      shared - Whether the lock is shared.
    • isDeep

      public boolean isDeep()
      Indicates whether a lock is enforceable on the subtree.
      Returns:
      Whether a lock is enforceable on the subtree.
    • setDeep

      public void setDeep(boolean deep)
      Sets flag which indicates whether the lock is enforceable on the subtree.
      Parameters:
      deep - Whether a lock is enforceable on the subtree.
    • getTimeout

      public long getTimeout()
      Retrieves lock expiration timeout in milliseconds.
      Returns:
      Lock expiration timeout. Negative value means never.
    • setTimeout

      public void setTimeout(long timeout)
      Sets lock expirate timeout.
      Parameters:
      timeout - Timeout value in milliseconds. -1 means never.
    • getOwner

      public String getOwner()
      Retrieves information about the principal taking out a lock.
      Returns:
      Principal.
    • setOwner

      public void setOwner(String owner)
      Sets information about the principal taking out a lock.
      Parameters:
      owner - Principal.