Package org.tmatesoft.svn.core
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
FieldsModifier and TypeFieldDescriptionprivate 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
ConstructorsConstructorDescriptionSVNLock
(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 TypeMethodDescriptionjava.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
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 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 directoryid
- a string token identifying the lockowner
- the owner of the lockcomment
- a comment message for the lock (optional)created
- a datestamp when the lock was createdexpires
- 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 classjava.lang.Object
- Returns:
- a string representation of this lock object
-