Class 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:
    Examples
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String myComment  
      private java.util.Date myCreationDate  
      private java.util.Date myExpirationDate  
      private java.lang.String myID  
      private java.lang.String myOwner  
      private java.lang.String myPath  
    • 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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getComment()
      Gets the lock comment.
      java.util.Date getCreationDate()
      Gets the creation datestamp of this lock.
      java.util.Date getExpirationDate()
      Gets the expiration datestamp of this lock.
      java.lang.String getID()
      Gets the lock token.
      java.lang.String getOwner()
      Gets the lock owner.
      java.lang.String getPath()
      Gets the path of the file for which this lock was created.
      java.lang.String toString()
      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 Detail

      • 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 Detail

      • 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 Detail

      • 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