Package org.tmatesoft.svn.core.wc
Class SVNStatusType
- java.lang.Object
-
- org.tmatesoft.svn.core.wc.SVNStatusType
-
public class SVNStatusType extends java.lang.ObjectSVNStatusType provides information about versioned items' status type. This class contains a set of predefined constants each of that should be compared with a refrence to an SVNStatusType to find out the item's status type. That is done either in event handlers (implementing ISVNEventHandler) registered for SVN*Client objects like this:import org.tmatesoft.svn.core.wc.ISVNEventHandler; import org.tmatesoft.svn.core.wc.SVNStatusType; import org.tmatesoft.svn.core.wc.SVNEventAction; ... public class MyCustomEventHandler implements ISVNEventHandler { public void handleEvent(SVNEvent event, double progress){ ... if(event.getAction() == SVNEventAction.UPDATE_UPDATE){ //get contents status type SVNStatusType contentsStatus = event.getContentsStatus(); //parse it if(contentsStatus != SVNStatusType.INAPPLICABLE){ if(contentsStatus == SVNStatusType.CONFLICTED){ ... } } //get properties status type SVNStatusType propertiesStatus = event.getPropertiesStatus(); //parse it if(propertiesStatus != SVNStatusType.INAPPLICABLE){ if(contentsStatus == SVNStatusType.CONFLICTED){ ... } } } ... } ... }
or in a status handler (implementing ISVNStatusHandler) registered for an SVNStatusClient like this:import org.tmatesoft.svn.core.wc.ISVNStatusHandler; import org.tmatesoft.svn.core.wc.SVNStatus; import org.tmatesoft.svn.core.wc.SVNStatusType; ... public class MyCustomStatusHandler implements ISVNStatusHandler { public void handleStatus(SVNStatus status){ ... //get contents status type SVNStatusType contentsStatus = status.getContentsStatus(); //parse it if(contentsStatus == SVNStatusType.STATUS_MODIFIED){ ... }else if(contentsStatus == SVNStatusType.STATUS_CONFLICTED){ ... } ... //get properties status type SVNStatusType propertiesStatus = status.getPropertiesStatus(); //parse it if(contentsStatus == SVNStatusType.STATUS_MODIFIED){ ... }else if(contentsStatus == SVNStatusType.STATUS_CONFLICTED){ ... } ... } ... }
-
-
Field Summary
Fields Modifier and Type Field Description static SVNStatusTypeCHANGEDDuring an operation (like an update) denotes that the item contents or item properties were changed.static SVNStatusTypeCONFLICTEDDuring an operation (like an update) denotes that the file item contents or file/directory item properties are in conflict with those changes that came from the repository.static SVNStatusTypeCONFLICTED_UNRESOLVEDDenotes that the conflict state on the item is still unresolved.static SVNStatusTypeINAPPLICABLEDuring some operations denotes that status info of item contents or properties is inapplicable.static SVNStatusTypeLOCK_INAPPLICABLEDuring some operations denotes that lock status is inapplicable.static SVNStatusTypeLOCK_LOCKEDDuring an operation denotes that the file item's locked.static SVNStatusTypeLOCK_UNCHANGEDDuring an operation denotes that the lock status wasn't changed.static SVNStatusTypeLOCK_UNKNOWNNo lock information is known.static SVNStatusTypeLOCK_UNLOCKEDDuring an operation (like an update) denotes that the file item's lock was broken in the repositry by some other user.static SVNStatusTypeMERGEDDuring an operation (like an update or merge) denotes that the file item contents or file/directory item properties were merged with changes that came from the repository, so that local modifications and arrived ones do not overlap.static SVNStatusTypeMISSINGDenotes that the item is versioned but missing (deleted from the fylesystem).static SVNStatusTypeNO_MERGEstatic SVNStatusTypeOBSTRUCTEDDenotes that the item has an unexpected kind or somehow damaged or can not be managed by an operation.static SVNStatusTypeSTATUS_ADDEDIn a status operation denotes that the item in the Working Copy being currently processed is scheduled for addition to the repository.static SVNStatusTypeSTATUS_CONFLICTEDIn a status operation denotes that the item in the Working Copy being currently processed is in a conflict state (local changes overlap those that came from the repository).static SVNStatusTypeSTATUS_DELETEDIn a status operation denotes that the item in the Working Copy being currently processed is scheduled for deletion from the repository.static SVNStatusTypeSTATUS_EXTERNALIn a status operation denotes that the item in the Working Copy being currently processed is not under version control but is related to externals definitions.static SVNStatusTypeSTATUS_IGNOREDIn a status operation denotes that the file item in the Working Copy being currently processed was set to be ignored (was added to svn:ignore property).static SVNStatusTypeSTATUS_INCOMPLETEIn a status operation denotes that the item in the Working Copy being currently processed is under version control but is somehow incomplete - for example, it may happen when the previous update was interrupted.static SVNStatusTypeSTATUS_MERGEDDeprecated.this status is never reported by 'status' operation in this version, 'update' and 'merge' usesMERGEDinstead.static SVNStatusTypeSTATUS_MISSINGIn a status operation denotes that the item in the Working Copy being currently processed is under version control but is missing - for example, removed from the filesystem with a non-SVN, non-SVNKit or any other SVN non-compatible delete command).static SVNStatusTypeSTATUS_MODIFIEDIn a status operation denotes that the item in the Working Copy being currently processed has local modifications.static SVNStatusTypeSTATUS_NAME_CONFLICTstatic SVNStatusTypeSTATUS_NONEIn a status operation denotes that no status type information is available.static SVNStatusTypeSTATUS_NORMALIn a status operation (if it's being running with an option to report of all items set to true) denotes that the item in the Working Copy being currently processed has no local changes (in a normal state).static SVNStatusTypeSTATUS_OBSTRUCTEDIn a status operation denotes that the item in the Working Copy being currently processed has a non-expected kind.static SVNStatusTypeSTATUS_REPLACEDIn a status operation denotes that the item in the Working Copy being currently processed was replaced by another item with the same name (within a single revision the item was scheduled for deletion and then a new one with the same name was scheduled for addition).static SVNStatusTypeSTATUS_UNVERSIONEDIn a status operation denotes that the item in the Working Copy being currently processed is not under version control.static SVNStatusTypeUNCHANGEDDuring an operation denotes that file item contents or file/directory item properties are not changed.static SVNStatusTypeUNKNOWNDenotes that the resultant status of the operation is for some reason unknown.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description chargetCode()Returns id of this object.static SVNStatusTypegetEventStatusById(int id)intgetID()Returns this object's identifier as an integer nbumber.java.lang.StringtoString()Returns a string representation of this object.
-
-
-
Field Detail
-
INAPPLICABLE
public static final SVNStatusType INAPPLICABLE
During some operations denotes that status info of item contents or properties is inapplicable. For example, this takes place during a commit operation - if there is anyISVNEventHandlerregistered for anSVNCommitClientthen events that are dispatched to that event handler will have contents and properties status types set to INAPPLICABLE:public class MyCommitEventHandler implements ISVNEventHandler{ ... public void handleEvent(SVNEvent event, double progress){ //both are SVNStatusType.INAPPLICABLE SVNStatusType contentsStatus = event.getContentsStatus(); SVNStatusType propsStatus = event.getPropertiesStatus(); } ... }
-
UNKNOWN
public static final SVNStatusType UNKNOWN
Denotes that the resultant status of the operation is for some reason unknown.
-
UNCHANGED
public static final SVNStatusType UNCHANGED
During an operation denotes that file item contents or file/directory item properties are not changed. For example, in a Working Copy-to-URL copying.
-
MISSING
public static final SVNStatusType MISSING
Denotes that the item is versioned but missing (deleted from the fylesystem).
-
OBSTRUCTED
public static final SVNStatusType OBSTRUCTED
Denotes that the item has an unexpected kind or somehow damaged or can not be managed by an operation.
-
CHANGED
public static final SVNStatusType CHANGED
During an operation (like an update) denotes that the item contents or item properties were changed.
-
MERGED
public static final SVNStatusType MERGED
During an operation (like an update or merge) denotes that the file item contents or file/directory item properties were merged with changes that came from the repository, so that local modifications and arrived ones do not overlap.
-
CONFLICTED
public static final SVNStatusType CONFLICTED
During an operation (like an update) denotes that the file item contents or file/directory item properties are in conflict with those changes that came from the repository.
-
CONFLICTED_UNRESOLVED
public static final SVNStatusType CONFLICTED_UNRESOLVED
Denotes that the conflict state on the item is still unresolved. For example, it can be set when trying to merge into a file that is in conflict with the repository.
-
LOCK_INAPPLICABLE
public static final SVNStatusType LOCK_INAPPLICABLE
During some operations denotes that lock status is inapplicable. For example, this takes place during a commit operation - if there is anyISVNEventHandlerregistered forSVNCommitClientthen events that are dispatched to that event handler will have the lock status type set to LOCK_INAPPLICABLE:public class MyCommitEventHandler implements ISVNEventHandler{ ... public void handleEvent(SVNEvent event, double progress){ //is SVNStatusType.LOCK_INAPPLICABLE SVNStatusType lockStatus = event.getLockStatus(); } ... }
-
LOCK_UNKNOWN
public static final SVNStatusType LOCK_UNKNOWN
No lock information is known.
-
LOCK_UNCHANGED
public static final SVNStatusType LOCK_UNCHANGED
During an operation denotes that the lock status wasn't changed. For example, in a Working Copy-to-URL copying.
-
LOCK_LOCKED
public static final SVNStatusType LOCK_LOCKED
During an operation denotes that the file item's locked.
-
LOCK_UNLOCKED
public static final SVNStatusType LOCK_UNLOCKED
During an operation (like an update) denotes that the file item's lock was broken in the repositry by some other user.
-
STATUS_NONE
public static final SVNStatusType STATUS_NONE
In a status operation denotes that no status type information is available.
-
STATUS_NORMAL
public static final SVNStatusType STATUS_NORMAL
In a status operation (if it's being running with an option to report of all items set to true) denotes that the item in the Working Copy being currently processed has no local changes (in a normal state).
-
STATUS_MODIFIED
public static final SVNStatusType STATUS_MODIFIED
In a status operation denotes that the item in the Working Copy being currently processed has local modifications.
-
STATUS_ADDED
public static final SVNStatusType STATUS_ADDED
In a status operation denotes that the item in the Working Copy being currently processed is scheduled for addition to the repository.
-
STATUS_DELETED
public static final SVNStatusType STATUS_DELETED
In a status operation denotes that the item in the Working Copy being currently processed is scheduled for deletion from the repository.
-
STATUS_UNVERSIONED
public static final SVNStatusType STATUS_UNVERSIONED
In a status operation denotes that the item in the Working Copy being currently processed is not under version control.
-
STATUS_MISSING
public static final SVNStatusType STATUS_MISSING
In a status operation denotes that the item in the Working Copy being currently processed is under version control but is missing - for example, removed from the filesystem with a non-SVN, non-SVNKit or any other SVN non-compatible delete command).
-
STATUS_REPLACED
public static final SVNStatusType STATUS_REPLACED
In a status operation denotes that the item in the Working Copy being currently processed was replaced by another item with the same name (within a single revision the item was scheduled for deletion and then a new one with the same name was scheduled for addition). Though they may have the same name the items have their own distinct histories.
-
STATUS_CONFLICTED
public static final SVNStatusType STATUS_CONFLICTED
In a status operation denotes that the item in the Working Copy being currently processed is in a conflict state (local changes overlap those that came from the repository). The conflicting overlaps need to be manually resolved.
-
STATUS_OBSTRUCTED
public static final SVNStatusType STATUS_OBSTRUCTED
In a status operation denotes that the item in the Working Copy being currently processed has a non-expected kind. For example, a file is considered to be obstructed if it was deleted (with an SVN client non-compatible delete operation) and a directory with the same name as the file had had was added (but again with an SVN client non-compatible operation).
-
STATUS_IGNORED
public static final SVNStatusType STATUS_IGNORED
In a status operation denotes that the file item in the Working Copy being currently processed was set to be ignored (was added to svn:ignore property).
-
STATUS_INCOMPLETE
public static final SVNStatusType STATUS_INCOMPLETE
In a status operation denotes that the item in the Working Copy being currently processed is under version control but is somehow incomplete - for example, it may happen when the previous update was interrupted.
-
STATUS_EXTERNAL
public static final SVNStatusType STATUS_EXTERNAL
In a status operation denotes that the item in the Working Copy being currently processed is not under version control but is related to externals definitions.
-
STATUS_NAME_CONFLICT
public static final SVNStatusType STATUS_NAME_CONFLICT
-
STATUS_MERGED
public static final SVNStatusType STATUS_MERGED
Deprecated.this status is never reported by 'status' operation in this version, 'update' and 'merge' usesMERGEDinstead.In a status operation denotes that the item in the Working Copy being currently processed was merged - that is it was applied the differences (delta) between two sources in a merge operation.
-
NO_MERGE
public static final SVNStatusType NO_MERGE
-
-
Method Detail
-
getEventStatusById
public static SVNStatusType getEventStatusById(int id)
-
getID
public int getID()
Returns this object's identifier as an integer nbumber. Each constant field of the SVNStatusType class is also an SVNStatusType object with its own id.- Returns:
- id of this object
-
getCode
public char getCode()
Returns id of this object.- Returns:
- id code
-
toString
public java.lang.String toString()
Returns a string representation of this object. As a matter of fact this is a string representation of this object's id.- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representing this object
-
-