Class SVNLock

java.lang.Object
org.tmatesoft.svn.core.SVNLock
Direct Known Subclasses:
FSLock

public class SVNLock extends java.lang.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
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private java.lang.String
     
    private java.util.Date
     
    private java.util.Date
     
    private java.lang.String
     
    private java.lang.String
     
    private java.lang.String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SVNLock(java.lang.String path, java.lang.String id, java.lang.String owner, java.lang.String comment, java.util.Date created, java.util.Date expires)
    Constructs an SVNLock object.
  • Method Summary

    Modifier and Type
    Method
    Description
    java.lang.String
    Gets the lock comment.
    java.util.Date
    Gets the creation datestamp of this lock.
    java.util.Date
    Gets the expiration datestamp of this lock.
    java.lang.String
    Gets the lock token.
    java.lang.String
    Gets the lock owner.
    java.lang.String
    Gets the path of the file for which this lock was created.
    java.lang.String
    Returns a string representation of this object.

    Methods inherited from class java.lang.Object

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

    • myPath

      private java.lang.String myPath
    • myID

      private java.lang.String myID
    • myOwner

      private java.lang.String myOwner
    • myComment

      private java.lang.String myComment
    • myCreationDate

      private java.util.Date myCreationDate
    • myExpirationDate

      private java.util.Date myExpirationDate
  • Constructor Details

    • SVNLock

      public SVNLock(java.lang.String path, java.lang.String id, java.lang.String owner, java.lang.String comment, java.util.Date created, java.util.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 java.lang.String getComment()
      Gets the lock comment.
      Returns:
      a lock comment message
    • getCreationDate

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

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

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

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

      public java.lang.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 java.lang.String toString()
      Returns a string representation of this object.
      Overrides:
      toString in class java.lang.Object
      Returns:
      a string representation of this lock object