Class Status
java.lang.Object
org.apache.subversion.javahl.types.Status
- All Implemented Interfaces:
java.io.Serializable
public class Status
extends java.lang.Object
implements java.io.Serializable
Subversion status API.
This describes the status of one subversion item (file or directory) in
the working copy. Will be returned by SVNClient.status or
SVNClient.singleStatus
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
class for kind status of the item or its properties the constants are defined in the interface StatusKind for building reasons -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate java.lang.String
Set to the changelist of the item, ornull
if not under version control.private boolean
has this item be copied from another itemprivate boolean
has the item is a file externalprivate boolean
is this item in a conflicted stateprivate long
the last date the item was changed before base (represented in microseconds since the epoch)private long
the last revision the item was changed before baseprivate java.lang.String
the last author of the last change before baseprivate Lock
the current lockprivate boolean
flag is this item is locked locally by subversion (running or aborted operation)private java.lang.String
private java.lang.String
private NodeKind
kind of the item (file, directory or unknonw)private java.lang.String
the path in the working copyprivate Status.Kind
the status of the properties (See StatusKind)private Status.Kind
the status of the properties base (See StatusKind)private Status.Kind
the file or directory status of base (See StatusKind)private NodeKind
Set to the node kind of the youngest commit, orNodeKind.none
if not out of date.private java.lang.String
Set to the user name of the youngest commit, ornull
if not out of date.private long
Set to the most recent commit date, or 0 if not out of date.private long
Set to the youngest committed revision, orRevision.SVN_INVALID_REVNUM
if not out of date.private Lock
the lock in the repositoryprivate long
the base revision of the working copyprivate static final long
private boolean
has the url of the item be switchprivate Status.Kind
the file or directory status (See StatusKind)private java.lang.String
the url for accessing the item -
Constructor Summary
ConstructorsConstructorDescriptionStatus
(java.lang.String path, java.lang.String url, NodeKind nodeKind, long revision, long lastChangedRevision, long lastChangedDate, java.lang.String lastCommitAuthor, Status.Kind textStatus, Status.Kind propStatus, Status.Kind repositoryTextStatus, Status.Kind repositoryPropStatus, boolean locked, boolean copied, boolean isConflicted, boolean switched, boolean fileExternal, Lock localLock, Lock reposLock, long reposLastCmtRevision, long reposLastCmtDate, NodeKind reposKind, java.lang.String reposLastCmtAuthor, java.lang.String changelist, java.lang.String movedFromAbspath, java.lang.String movedToAbspath) this constructor should only called from JNI code -
Method Summary
Modifier and TypeMethodDescriptionjava.lang.String
java.util.Date
Returns the last date the item was changed or nulllong
Returns the last date the item was changed measured in the number of microseconds since 00:00:00 January 1, 1970 UTC.Returns the last revision the file was changed as a Revision objectlong
Returns the last revision the file was changed as a long integerjava.lang.String
Returns the author of the last changed or nullReturns the local lockjava.lang.String
java.lang.String
Returns the kind of the node (file, directory or unknown, see NodeKind)java.lang.String
getPath()
Returns the file system path of the itemReturns the status of the properties (See Status Kind)java.lang.String
Returns the status of the properties as textReturns test status of the properties in the repository (See StatusKind)Returns the status of the item in the repository (See StatusKind)java.lang.String
java.util.Date
long
Return the last committed date measured in the number of microseconds since 00:00:00 January 1, 1970 UTC.long
Returns the lock as in the repositoryReturns the revision as a Revision objectlong
Returns the revision as a long integerReturns the status of the item (See StatusKind)java.lang.String
Returns the status of the item as text.java.lang.String
getUrl()
Returns the URI to where the item might exist in the repository.boolean
Returns if the resource has a remote counter-partboolean
isAdded()
Returns if the resource just has been addedboolean
boolean
isCopied()
Returns if the item has been copiedboolean
Returns if the resource is schedules for deleteboolean
Returns if the item is a file externalboolean
Returns if the resource is ignored by svn (only returned if noIgnore is set on SVNClient.list)boolean
isLocked()
Returns if the item is locked (running or aborted subversion operation)boolean
Returns if is managed by svn (added, normal, modified ...)boolean
isMerged()
Returns if the resource has been mergedboolean
Returns if the resource itself is modifiedboolean
Returns if the repository url has been switchedprivate static java.util.Date
microsecondsToDate
(long micros) Converts microseconds since the epoch to a Date object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
url
private java.lang.String urlthe url for accessing the item -
path
private java.lang.String paththe path in the working copy -
nodeKind
kind of the item (file, directory or unknonw) -
revision
private long revisionthe base revision of the working copy -
lastChangedRevision
private long lastChangedRevisionthe last revision the item was changed before base -
lastChangedDate
private long lastChangedDatethe last date the item was changed before base (represented in microseconds since the epoch) -
lastCommitAuthor
private java.lang.String lastCommitAuthorthe last author of the last change before base -
textStatus
the file or directory status (See StatusKind) -
propStatus
the status of the properties (See StatusKind) -
locked
private boolean lockedflag is this item is locked locally by subversion (running or aborted operation) -
copied
private boolean copiedhas this item be copied from another item -
switched
private boolean switchedhas the url of the item be switch -
fileExternal
private boolean fileExternalhas the item is a file external -
isConflicted
private boolean isConflictedis this item in a conflicted state -
repositoryTextStatus
the file or directory status of base (See StatusKind) -
repositoryPropStatus
the status of the properties base (See StatusKind) -
localLock
the current lock -
reposLock
the lock in the repository -
reposLastCmtRevision
private long reposLastCmtRevisionSet to the youngest committed revision, orRevision.SVN_INVALID_REVNUM
if not out of date. -
reposLastCmtDate
private long reposLastCmtDateSet to the most recent commit date, or 0 if not out of date. -
reposKind
Set to the node kind of the youngest commit, orNodeKind.none
if not out of date. -
reposLastCmtAuthor
private java.lang.String reposLastCmtAuthorSet to the user name of the youngest commit, ornull
if not out of date. -
changelist
private java.lang.String changelistSet to the changelist of the item, ornull
if not under version control. -
movedFromAbspath
private java.lang.String movedFromAbspath -
movedToAbspath
private java.lang.String movedToAbspath
-
-
Constructor Details
-
Status
public Status(java.lang.String path, java.lang.String url, NodeKind nodeKind, long revision, long lastChangedRevision, long lastChangedDate, java.lang.String lastCommitAuthor, Status.Kind textStatus, Status.Kind propStatus, Status.Kind repositoryTextStatus, Status.Kind repositoryPropStatus, boolean locked, boolean copied, boolean isConflicted, boolean switched, boolean fileExternal, Lock localLock, Lock reposLock, long reposLastCmtRevision, long reposLastCmtDate, NodeKind reposKind, java.lang.String reposLastCmtAuthor, java.lang.String changelist, java.lang.String movedFromAbspath, java.lang.String movedToAbspath) this constructor should only called from JNI code- Parameters:
path
- the file system path of itemurl
- the url of the itemnodeKind
- kind of item (directory, file or unknownrevision
- the revision number of the baselastChangedRevision
- the last revision this item was changedlastChangedDate
- the last date this item was changedlastCommitAuthor
- the author of the last changetextStatus
- the file or directory status (See StatusKind)propStatus
- the property status (See StatusKind)repositoryTextStatus
- the file or directory status of the baserepositoryPropStatus
- the property status of the baselocked
- if the item is locked (running or aborted operation)copied
- if the item is copyisConflicted
- if the item is part of a conflictconflictDescriptor
- the description of the tree conflictconflictOld
- in case of conflict, the file name of the the common base versionconflictNew
- in case of conflict, the file name of new repository versionconflictWorking
- in case of conflict, the file name of the former working copy versionswitched
- flag if the node has been switched in the pathfileExternal
- flag if the node is a file externallocalLock
- the current lockreposLock
- the lock as stored in the repository if anyreposLastCmtRevision
- the youngest revision, if out of datereposLastCmtDate
- the last commit date, if out of datereposKind
- the kind of the youngest revision, if out of datereposLastCmtAuthor
- the author of the last commit, if out of datechangelist
- the changelist the item is a member ofmovedFromAbspath
- path moved frommovedToAbspath
- path moved from
-
-
Method Details
-
getPath
public java.lang.String getPath()Returns the file system path of the item- Returns:
- path of status entry
-
getRevision
Returns the revision as a Revision object- Returns:
- revision if versioned, otherwise SVN_INVALID_REVNUM
-
getRevisionNumber
public long getRevisionNumber()Returns the revision as a long integer- Returns:
- revision if versioned, otherwise SVN_INVALID_REVNUM
-
getLastChangedDate
public java.util.Date getLastChangedDate()Returns the last date the item was changed or null- Returns:
- the last time the item was changed or null if not available
-
getLastChangedDateMicros
public long getLastChangedDateMicros()Returns the last date the item was changed measured in the number of microseconds since 00:00:00 January 1, 1970 UTC.- Returns:
- the last time the item was changed.
-
getLastCommitAuthor
public java.lang.String getLastCommitAuthor()Returns the author of the last changed or null- Returns:
- name of author if versioned, null otherwise
-
getTextStatus
Returns the status of the item (See StatusKind)- Returns:
- file status property enum of the "textual" component.
-
getTextStatusDescription
public java.lang.String getTextStatusDescription()Returns the status of the item as text.- Returns:
- english text
-
getPropStatus
Returns the status of the properties (See Status Kind)- Returns:
- file status property enum of the "property" component.
-
getPropStatusDescription
public java.lang.String getPropStatusDescription()Returns the status of the properties as text- Returns:
- english text
-
getRepositoryTextStatus
Returns the status of the item in the repository (See StatusKind)- Returns:
- file status property enum of the "textual" component in the repository.
-
getRepositoryPropStatus
Returns test status of the properties in the repository (See StatusKind)- Returns:
- file status property enum of the "property" component im the repository.
-
isLocked
public boolean isLocked()Returns if the item is locked (running or aborted subversion operation)- Returns:
- true if locked
-
isCopied
public boolean isCopied()Returns if the item has been copied- Returns:
- true if copied
-
getUrl
public java.lang.String getUrl()Returns the URI to where the item might exist in the repository. We say "might" because the item might exist in your working copy, but have been deleted from the repository. Or it might exist in the repository, but your working copy might not yet contain it (because the WC is not up to date).- Returns:
- URI in repository, or
null
if the item exists in neither the repository nor the WC.
-
getLastChangedRevision
Returns the last revision the file was changed as a Revision object- Returns:
- last changed revision
-
getLastChangedRevisionNumber
public long getLastChangedRevisionNumber()Returns the last revision the file was changed as a long integer- Returns:
- last changed revision
-
getNodeKind
Returns the kind of the node (file, directory or unknown, see NodeKind)- Returns:
- the node kind
-
isSwitched
public boolean isSwitched()Returns if the repository url has been switched- Returns:
- is the item has been switched
-
isFileExternal
public boolean isFileExternal()Returns if the item is a file external- Returns:
- is the item is a file external
-
isManaged
public boolean isManaged()Returns if is managed by svn (added, normal, modified ...)- Returns:
- if managed by svn
-
hasRemote
public boolean hasRemote()Returns if the resource has a remote counter-part- Returns:
- has version in repository
-
isAdded
public boolean isAdded()Returns if the resource just has been added- Returns:
- if added
-
isDeleted
public boolean isDeleted()Returns if the resource is schedules for delete- Returns:
- if deleted
-
isMerged
public boolean isMerged()Returns if the resource has been merged- Returns:
- if merged
-
isIgnored
public boolean isIgnored()Returns if the resource is ignored by svn (only returned if noIgnore is set on SVNClient.list)- Returns:
- if ignore
-
isModified
public boolean isModified()Returns if the resource itself is modified- Returns:
- if modified
-
getLocalLock
Returns the local lock- Returns:
- the local lock
-
getReposLock
Returns the lock as in the repository- Returns:
- the lock as in the repository
-
getReposLastCmtRevision
- Returns:
- The last committed revision, or
Revision.SVN_INVALID_REVNUM
if up to date.
-
getReposLastCmtRevisionNumber
public long getReposLastCmtRevisionNumber()- Returns:
- The last committed revision as a long integer, or
-1
if up to date.
-
getReposLastCmtDate
public java.util.Date getReposLastCmtDate()- Returns:
- The last committed date, or
null
if up to date.
-
getReposLastCmtDateMicros
public long getReposLastCmtDateMicros()Return the last committed date measured in the number of microseconds since 00:00:00 January 1, 1970 UTC.- Returns:
- the last committed date
-
getReposKind
- Returns:
- The node kind (e.g. file, directory, etc.), or
null
if up to date.
-
getReposLastCmtAuthor
public java.lang.String getReposLastCmtAuthor()- Returns:
- The author of the last commit, or
null
if up to date.
-
getChangelist
public java.lang.String getChangelist()- Returns:
- the changelist name
-
isConflicted
public boolean isConflicted()- Returns:
- the conflicted state
-
getMovedFromAbspath
public java.lang.String getMovedFromAbspath() -
getMovedToAbspath
public java.lang.String getMovedToAbspath() -
microsecondsToDate
private static java.util.Date microsecondsToDate(long micros) Converts microseconds since the epoch to a Date object.- Parameters:
micros
- Microseconds since the epoch.- Returns:
- A Date object, or
null
ifmicros
was zero.
-