org.tmatesoft.svn.core
Class SVNLock

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

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
See Also:
Examples

Constructor Summary
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
 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
 

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