org.apache.jackrabbit.jcr2spi.operation
Class AbstractOperation

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.operation.AbstractOperation
All Implemented Interfaces:
Operation
Direct Known Subclasses:
AbstractCopy, AddLabel, AddNode, AddProperty, Checkin, Checkout, Checkpoint, CreateActivity, CreateConfiguration, LockOperation, LockRefresh, LockRelease, Merge, Move, Remove, RemoveLabel, ReorderNodes, ResolveMergeConflict, Restore, SetMixin, SetPrimaryType, SetPropertyValue, Update, WorkspaceImport

public abstract class AbstractOperation
extends Object
implements Operation

AbstractOperation...


Field Summary
protected  int status
           
 
Fields inherited from interface org.apache.jackrabbit.jcr2spi.operation.Operation
STATUS_PENDING, STATUS_PERSISTED, STATUS_UNDO
 
Constructor Summary
AbstractOperation()
           
 
Method Summary
protected  void addAffectedItemState(ItemState affectedState)
          Adds an affected ItemState.
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 of ItemStates that are affected by this operation.
 String getName()
          Returns the name of the class
protected static NodeState getNodeState(Path nodePath, HierarchyManager hierMgr)
           
 int getStatus()
          Returns the status of this operation.
 void undo()
          Revert changes made by this operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jackrabbit.jcr2spi.operation.Operation
accept, persisted
 

Field Detail

status

protected int status
Constructor Detail

AbstractOperation

public AbstractOperation()
Method Detail

getName

public String getName()
Returns the name of the class

Specified by:
getName in interface Operation
Returns:
the class name
See Also:
Object.getClass()

getAffectedItemStates

public Collection<ItemState> getAffectedItemStates()
Description copied from interface: Operation
A collection of ItemStates that are affected by this operation.

Specified by:
getAffectedItemStates in interface Operation
Returns:
collection of affected ItemStates.

undo

public void undo()
          throws RepositoryException
Description copied from interface: Operation
Revert changes made by this operation.

Specified by:
undo in interface Operation
Throws:
RepositoryException

getStatus

public int getStatus()
Description copied from interface: Operation
Returns the status of this operation.

Specified by:
getStatus in interface Operation
Returns:
status of this operation.

addAffectedItemState

protected void addAffectedItemState(ItemState affectedState)
Adds an affected ItemState.

Parameters:
affectedState - the ItemStates 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


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.