|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.tmatesoft.svn.core.SVNDirEntry
public class SVNDirEntry
The SVNDirEntry class is a representation of a versioned directory entry.
SVNDirEntry keeps an entry name, entry kind (is it a file or directory), file size (in case an entry is a file), the last changed revision, the date when the entry was last changed, the name of the author who last changed the entry, the commit log message for the last changed revision. SVNDirEntry also knows if the entry has any properties.
ISVNDirEntryHandler
Field Summary | |
---|---|
static int |
DIRENT_ALL
Represents a combination of all the entry fields. |
static int |
DIRENT_COMMIT_MESSAGE
Represents commit log message for the last changed revision. |
static int |
DIRENT_CREATED_REVISION
Represents the last revision when the entry was changed. |
static int |
DIRENT_HAS_PROPERTIES
Contains the information whether the entry has any properties. |
static int |
DIRENT_KIND
Represents entry kind (if it is a file or a directory). |
static int |
DIRENT_LAST_AUTHOR
Represents the author of the last changed revision. |
static int |
DIRENT_SIZE
Represents file size (if the entry is a file). |
static int |
DIRENT_TIME
Represents the time of the last changed revision. |
Constructor Summary | |
---|---|
SVNDirEntry(SVNURL url,
SVNURL repositoryRoot,
java.lang.String name,
SVNNodeKind kind,
long size,
boolean hasProperties,
long revision,
java.util.Date createdDate,
java.lang.String lastAuthor)
Constructs an instance of SVNDirEntry. |
|
SVNDirEntry(SVNURL url,
SVNURL repositoryRoot,
java.lang.String name,
SVNNodeKind kind,
long size,
boolean hasProperties,
long revision,
java.util.Date createdDate,
java.lang.String lastAuthor,
java.lang.String commitMessage)
Constructs an instance of SVNDirEntry. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Compares this object with another one. |
java.lang.String |
getAuthor()
Retrieves the name of the author who last changed this entry. |
java.lang.String |
getCommitMessage()
Returns the commit log message for the revision of this entry. |
java.util.Date |
getDate()
Returns the date the entry was last changed. |
SVNNodeKind |
getKind()
Returns the entry node kind. |
SVNLock |
getLock()
Gets the lock object for this entry (if it's locked). |
java.lang.String |
getName()
Gets the the directory entry name |
java.lang.String |
getPath()
Deprecated. use getRelativePath() instead. |
java.lang.String |
getRelativePath()
Returns the entry's path relative to the target directory. |
SVNURL |
getRepositoryRoot()
Returns the entry's repository root URL. |
long |
getRevision()
Gets the last changed revision of this entry. |
long |
getSize()
Returns the file size in bytes (if this entry is a file). |
SVNURL |
getURL()
Returns the entry's URL. |
boolean |
hasProperties()
Tells if the entry has any properties. |
void |
setCommitMessage(java.lang.String message)
This method is used by SVNKit internals and not intended for users (from an API point of view). |
void |
setLock(SVNLock lock)
Sets the lock object for this entry (if it's locked). |
void |
setRelativePath(java.lang.String path)
This method is used by SVNKit internals and not intended for users (from an API point of view). |
long |
size()
Deprecated. use getSize() instead |
java.lang.String |
toString()
Retirns 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 |
---|
public static final int DIRENT_KIND
public static final int DIRENT_SIZE
public static final int DIRENT_HAS_PROPERTIES
public static final int DIRENT_CREATED_REVISION
public static final int DIRENT_TIME
public static final int DIRENT_LAST_AUTHOR
public static final int DIRENT_COMMIT_MESSAGE
public static final int DIRENT_ALL
Constructor Detail |
---|
public SVNDirEntry(SVNURL url, SVNURL repositoryRoot, java.lang.String name, SVNNodeKind kind, long size, boolean hasProperties, long revision, java.util.Date createdDate, java.lang.String lastAuthor)
url
- a url of this entryrepositoryRoot
- a url of the root of repository this entry belongs toname
- an entry namekind
- the node kind for the entrysize
- the entry size in byteshasProperties
- true if the
entry has properties, otherwise falserevision
- the last changed revision of the entrycreatedDate
- the date the entry was last changedlastAuthor
- the person who last changed the entrypublic SVNDirEntry(SVNURL url, SVNURL repositoryRoot, java.lang.String name, SVNNodeKind kind, long size, boolean hasProperties, long revision, java.util.Date createdDate, java.lang.String lastAuthor, java.lang.String commitMessage)
url
- a url of this entryrepositoryRoot
- a url of the root of repository this entry belongs toname
- an entry namekind
- the node kind for the entrysize
- the entry size in byteshasProperties
- true if the
entry has properties, otherwise falserevision
- the last changed revision of the entrycreatedDate
- the date the entry was last changedlastAuthor
- the person who last changed the entrycommitMessage
- the log message of the last change commitMethod Detail |
---|
public SVNURL getURL()
public SVNURL getRepositoryRoot()
public java.lang.String getName()
public long getSize()
public long size()
getSize()
instead
public boolean hasProperties()
public SVNNodeKind getKind()
SVNNodeKind
public java.util.Date getDate()
public long getRevision()
public java.lang.String getAuthor()
public java.lang.String getRelativePath()
This method is guaranteed to return a non-null path only
for list
operations. It always returns a path relative to the target location which a list
operation is launched on. When listing a directory the relative path for the target
directory itself is ""
, for its children - just their names, for deeper
directories (when listing recursively) - paths relative to the target directory path.
public java.lang.String getPath()
getRelativePath()
instead.
public java.lang.String getCommitMessage()
SVNRepository.getDir(String, long, boolean, java.util.Collection)
method.
public SVNLock getLock()
public void setRelativePath(java.lang.String path)
path
- this entry's pathpublic void setCommitMessage(java.lang.String message)
message
- a commit messagepublic void setLock(SVNLock lock)
lock
- a lock objectpublic java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- an object to compare with
o
is either null,
or is not an instance of SVNDirEntry, or this entry's URL is lexicographically
less than the name of o
;
o
;
o
has got the same URL as this one has
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |