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 int
status
-
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 void
addAffectedItemState(ItemState affectedState)
Adds an affectedItemState
.protected static void
assertChildNodeEntries(NodeState parentState)
Asserts that the NodeEntry of the given parent state has it's child node entries loaded.Collection<ItemState>
getAffectedItemStates()
A collection ofItemState
s that are affected by this operation.String
getName()
Returns the name of the classprotected static NodeState
getNodeState(Path nodePath, HierarchyManager hierMgr)
int
getStatus()
Returns the status of this operation.void
undo()
Revert changes made by this operation.
-
-
-
Method Detail
-
getName
public String getName()
Returns the name of the class- Specified by:
getName
in interfaceOperation
- Returns:
- the class name
- See Also:
Object.getClass()
-
getAffectedItemStates
public Collection<ItemState> getAffectedItemStates()
Description copied from interface:Operation
A collection ofItemState
s that are affected by this operation.- Specified by:
getAffectedItemStates
in interfaceOperation
- Returns:
- collection of affected
ItemState
s.
-
undo
public void undo() throws RepositoryException
Description copied from interface:Operation
Revert changes made by this operation.- Specified by:
undo
in interfaceOperation
- Throws:
RepositoryException
-
getStatus
public int getStatus()
Description copied from interface:Operation
Returns the status of this operation.
-
addAffectedItemState
protected void addAffectedItemState(ItemState affectedState)
Adds an affectedItemState
.- Parameters:
affectedState
- theItemState
s of the affected item.
-
getNodeState
protected static NodeState getNodeState(Path nodePath, HierarchyManager hierMgr) throws PathNotFoundException, RepositoryException
- Parameters:
nodePath
-hierMgr
-- Returns:
- Throws:
PathNotFoundException
RepositoryException
-
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
-
-