Class AbstractOperation
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.operation.AbstractOperation
-
- All Implemented Interfaces:
Operation
- Direct Known Subclasses:
AbstractCopy,AbstractRemove,AddLabel,Checkin,Checkout,Checkpoint,CreateActivity,CreateConfiguration,LockOperation,LockRefresh,LockRelease,Merge,RemoveLabel,ResolveMergeConflict,Restore,TransientOperation,Update,WorkspaceImport
public abstract class AbstractOperation extends Object implements Operation
AbstractOperation...
-
-
Field Summary
Fields Modifier and Type Field Description protected intstatus-
Fields inherited from interface org.apache.jackrabbit.jcr2spi.operation.Operation
STATUS_PENDING, STATUS_PERSISTED, STATUS_UNDO
-
-
Constructor Summary
Constructors Constructor Description AbstractOperation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAffectedItemState(ItemState affectedState)Adds an affectedItemState.protected static voidassertChildNodeEntries(NodeState parentState)Asserts that the NodeEntry of the given parent state has it's child node entries loaded.Collection<ItemState>getAffectedItemStates()A collection ofItemStates that are affected by this operation.StringgetName()Returns the name of the classprotected static NodeStategetNodeState(Path nodePath, HierarchyManager hierMgr)intgetStatus()Returns the status of this operation.voidundo()Revert changes made by this operation.
-
-
-
Method Detail
-
getName
public String getName()
Returns the name of the class- Specified by:
getNamein interfaceOperation- Returns:
- the class name
- See Also:
Object.getClass()
-
getAffectedItemStates
public Collection<ItemState> getAffectedItemStates()
Description copied from interface:OperationA collection ofItemStates that are affected by this operation.- Specified by:
getAffectedItemStatesin interfaceOperation- Returns:
- collection of affected
ItemStates.
-
undo
public void undo() throws RepositoryExceptionDescription copied from interface:OperationRevert changes made by this operation.- Specified by:
undoin interfaceOperation- Throws:
RepositoryException
-
getStatus
public int getStatus()
Description copied from interface:OperationReturns the status of this operation.
-
addAffectedItemState
protected void addAffectedItemState(ItemState affectedState)
Adds an affectedItemState.- Parameters:
affectedState- theItemStates of the affected item.
-
getNodeState
protected static NodeState getNodeState(Path nodePath, HierarchyManager hierMgr) throws PathNotFoundException, RepositoryException
- Parameters:
nodePath-hierMgr-- Returns:
- Throws:
PathNotFoundExceptionRepositoryException
-
assertChildNodeEntries
protected static void assertChildNodeEntries(NodeState parentState) throws RepositoryException
Asserts that the NodeEntry of the given parent state has it's child node entries loaded.- Parameters:
parentState-- Throws:
RepositoryException
-
-