Class SVNLock

java.lang.Object
org.tmatesoft.svn.core.SVNLock

public class SVNLock extends Object
The SVNLock class represents a file lock. It holds information on a lock path, token, owner, comment, creation and expiration dates.
Since:
1.2, SVN 1.2
Version:
1.3
Author:
TMate Software Ltd.
See Also:
  • Constructor Details

    • SVNLock

      public SVNLock(String path, String id, String owner, String comment, Date created, Date expires)

      Constructs an SVNLock object.

      Parameters:
      path - a file path, relative to the repository root directory
      id - a string token identifying the lock
      owner - the owner of the lock
      comment - a comment message for the lock (optional)
      created - a datestamp when the lock was created
      expires - a datestamp when the lock expires, i.e. the file is unlocked (optional)
  • Method Details

    • getComment

      public String getComment()
      Gets the lock comment.
      Returns:
      a lock comment message
    • getCreationDate

      public Date getCreationDate()
      Gets the creation datestamp of this lock.
      Returns:
      a datestamp representing the moment in time when this lock was created
    • getExpirationDate

      public Date getExpirationDate()
      Gets the expiration datestamp of this lock.
      Returns:
      a datestamp representing the moment in time when the this lock expires
    • getID

      public String getID()
      Gets the lock token.
      Returns:
      a unique string identifying this lock
    • getOwner

      public String getOwner()
      Gets the lock owner.
      Returns:
      the owner of this lock
    • getPath

      public String getPath()
      Gets the path of the file for which this lock was created. The path is relative to the repository root directory.
      Returns:
      the path of the locked file
    • toString

      public String toString()
      Returns a string representation of this object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this lock object