org.tmatesoft.svn.core.wc

Class SVNEventAction

public class SVNEventAction extends Object

The SVNEventAction class is used to describe an action which generated an SVNEvent object.

Each operation invoked by a do*() method of an SVN*Client class consists of several actions that can be considered as operation steps. For example, an update operation receives changes for files, adds new ones, deletes another ones and so on. And for every such action (for every file updated, deleted, added, etc.) the doUpdate() method generates an SVNEvent objects which contains information on the type of this action that can be retrieved simply calling the SVNEvent's getAction() method:

 import org.tmatesoft.svn.core.wc.SVNEvent;
 import org.tmatesoft.svn.core.wc.SVNEventAction;
 ...
   
   SVNEventAction action = event.getAction();
   //parse the action according to the type of 
   //operation and your needs
   if (action == SVNEventAction.UPDATE_UPDATE){
       ...
   }
   ...

SVNEventAction is just a set of predefined constant fields of the same type. Each constant is applicable only to a certain type of operation - for example those constants that names start with the UPDATE_ prefix are relevant only for update related operations (update, checkout, switch, etc.).

Version: 1.1.1

Author: TMate Software Ltd.

See Also: SVNEvent ISVNEventHandler Examples

Field Summary
static SVNEventActionADD
Denotes that a new item is scheduled for addition.
static SVNEventActionANNOTATE
Denotes that file blaming is started.
static SVNEventActionCOMMIT_ADDED
In a commit operation denotes adding a new item to the repository.
static SVNEventActionCOMMIT_COMPLETED
In a commit operation denotes that the operation itself is completed (for instance, in a console client can be used to print out the commited revsion).
static SVNEventActionCOMMIT_DELETED
In a commit operation denotes deleting the item from the repository.
static SVNEventActionCOMMIT_DELTA_SENT
In a commit operation denotes the final stage of the operation - sending all file data and finalizing the commit.
static SVNEventActionCOMMIT_MODIFIED
In a commit operation denotes sending the item's modifications to the repository.
static SVNEventActionCOMMIT_REPLACED
In a commit operation denotes replacing (one item was deleted while another one with the same name was added) the item in the repository.
static SVNEventActionCOPY
Denotes that the item is copied with history.
static SVNEventActionDELETE
Denotes that the item is scheduled for deletion.
static SVNEventActionFAILED_REVERT
Denotes that a revert operation failed.
static SVNEventActionLOCKED
Denotes that the file item is locked as a result of a locking operation.
static SVNEventActionLOCK_FAILED
Denotes that locking a file item failed.
static SVNEventActionPROGRESS
Reserved for future purposes.
static SVNEventActionRESOLVED
Denotes that the conflict on the item is resolved (the item is marked resolved).
static SVNEventActionRESTORE
Denotes that the deleted item is restored (prior to be updated).
static SVNEventActionREVERT
Denotes that all local changes to the item were reverted.
static SVNEventActionSKIP
Denotes that the operation is skipped due to errors (inability to be performed, etc.).
static SVNEventActionSTATUS_COMPLETED
In a remote status operation denotes that the operation itself is completed - used to get the latest repository revision against which the status was invoked.
static SVNEventActionSTATUS_EXTERNAL
In a status operation denotes that the status is performed on an external item.
static SVNEventActionUNLOCKED
Denotes that the file item is unlocked as a result of an unlocking operation.
static SVNEventActionUNLOCK_FAILED
Denotes that unlocking a file item failed.
static SVNEventActionUPDATE_ADD
In an update operation denotes that the item is added to the Working Copy (as it was added in the repository).
static SVNEventActionUPDATE_COMPLETED
In an update operation denotes that the operation itself is completed (for instance, in a console client can be used to print out the revision updated to).
static SVNEventActionUPDATE_DELETE
In an update operation denotes that the item is deleted from the Working Copy (as it was deleted in the repository).
static SVNEventActionUPDATE_EXTERNAL
In an update operation denotes that the item being updated is external.
static SVNEventActionUPDATE_NONE
In an update operation denotes that the item is not modified, but its children are.
static SVNEventActionUPDATE_UPDATE
In an update operation denotes that the item is modified (there are changes received from the repository).
static SVNEventActionUPGRADE
Denotes that the current format of the working copy administrative area is upgraded to a newer one.
Method Summary
intgetID()
Returns this object's identifier.
StringtoString()
Returns a string representation of this object.

Field Detail

ADD

public static final SVNEventAction ADD
Denotes that a new item is scheduled for addition. Generated by the doAdd() method.

ANNOTATE

public static final SVNEventAction ANNOTATE
Denotes that file blaming is started.

COMMIT_ADDED

public static final SVNEventAction COMMIT_ADDED
In a commit operation denotes adding a new item to the repository.

COMMIT_COMPLETED

public static final SVNEventAction COMMIT_COMPLETED
In a commit operation denotes that the operation itself is completed (for instance, in a console client can be used to print out the commited revsion).

COMMIT_DELETED

public static final SVNEventAction COMMIT_DELETED
In a commit operation denotes deleting the item from the repository.

COMMIT_DELTA_SENT

public static final SVNEventAction COMMIT_DELTA_SENT
In a commit operation denotes the final stage of the operation - sending all file data and finalizing the commit.

COMMIT_MODIFIED

public static final SVNEventAction COMMIT_MODIFIED
In a commit operation denotes sending the item's modifications to the repository.

COMMIT_REPLACED

public static final SVNEventAction COMMIT_REPLACED
In a commit operation denotes replacing (one item was deleted while another one with the same name was added) the item in the repository.

COPY

public static final SVNEventAction COPY
Denotes that the item is copied with history.

See Also: SVNCopyClient

DELETE

public static final SVNEventAction DELETE
Denotes that the item is scheduled for deletion. Generated by the doDelete() method.

FAILED_REVERT

public static final SVNEventAction FAILED_REVERT
Denotes that a revert operation failed. Generated by the SVNWCClient method.

LOCKED

public static final SVNEventAction LOCKED
Denotes that the file item is locked as a result of a locking operation. Generated by a doLock() method of SVNWCClient.

LOCK_FAILED

public static final SVNEventAction LOCK_FAILED
Denotes that locking a file item failed. Generated by a doLock() method of SVNWCClient.

PROGRESS

public static final SVNEventAction PROGRESS
Reserved for future purposes.

RESOLVED

public static final SVNEventAction RESOLVED
Denotes that the conflict on the item is resolved (the item is marked resolved). Such an event is generated by the doResolve() method.

RESTORE

public static final SVNEventAction RESTORE
Denotes that the deleted item is restored (prior to be updated).

REVERT

public static final SVNEventAction REVERT
Denotes that all local changes to the item were reverted. Generated by the SVNWCClient method.

public static final SVNEventAction SKIP
Denotes that the operation is skipped due to errors (inability to be performed, etc.).

STATUS_COMPLETED

public static final SVNEventAction STATUS_COMPLETED
In a remote status operation denotes that the operation itself is completed - used to get the latest repository revision against which the status was invoked.

STATUS_EXTERNAL

public static final SVNEventAction STATUS_EXTERNAL
In a status operation denotes that the status is performed on an external item. To find out the item's current status use getContentsStatus(), getPropertiesStatus(). The STATUS_EXTERNAL constant says only that the item belongs to externals definitions.

UNLOCKED

public static final SVNEventAction UNLOCKED
Denotes that the file item is unlocked as a result of an unlocking operation. Generated by a doUnlock() method of SVNWCClient.

UNLOCK_FAILED

public static final SVNEventAction UNLOCK_FAILED
Denotes that unlocking a file item failed. Generated by a doUnlock() method of SVNWCClient.

UPDATE_ADD

public static final SVNEventAction UPDATE_ADD
In an update operation denotes that the item is added to the Working Copy (as it was added in the repository).

UPDATE_COMPLETED

public static final SVNEventAction UPDATE_COMPLETED
In an update operation denotes that the operation itself is completed (for instance, in a console client can be used to print out the revision updated to).

UPDATE_DELETE

public static final SVNEventAction UPDATE_DELETE
In an update operation denotes that the item is deleted from the Working Copy (as it was deleted in the repository).

UPDATE_EXTERNAL

public static final SVNEventAction UPDATE_EXTERNAL
In an update operation denotes that the item being updated is external.

UPDATE_NONE

public static final SVNEventAction UPDATE_NONE
In an update operation denotes that the item is not modified, but its children are.

UPDATE_UPDATE

public static final SVNEventAction UPDATE_UPDATE
In an update operation denotes that the item is modified (there are changes received from the repository).

UPGRADE

public static final SVNEventAction UPGRADE
Denotes that the current format of the working copy administrative area is upgraded to a newer one.

Method Detail

getID

public int getID()
Returns this object's identifier. Each constant field of the SVNEventAction class is also an SVNEventAction object with its own id.

Returns: id of this object

toString

public String toString()
Returns a string representation of this object. As a matter of fact this is a string representation of this object's id.

Returns: a string representing this object

Copyright © 2004-2007 TMate Software Ltd. All Rights Reserved.