Class SetTree
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.operation.AbstractOperation
-
- org.apache.jackrabbit.jcr2spi.operation.TransientOperation
-
- org.apache.jackrabbit.jcr2spi.operation.SetTree
-
- All Implemented Interfaces:
Operation
public class SetTree extends TransientOperation
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.jcr2spi.operation.AbstractOperation
status
-
Fields inherited from interface org.apache.jackrabbit.jcr2spi.operation.Operation
STATUS_PENDING, STATUS_PERSISTED, STATUS_UNDO
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(OperationVisitor visitor)Calls the appropriatevisitmethod onvisitorbased on the type of this operation.OperationaddChildNode(NodeState parentState, Name nodeName, Name nodeTypeName, String uuid)Add a child node operation to thissetTreeinstance.OperationaddChildProperty(NodeState parentState, Name propName, int propertyType, QValue[] values, QPropertyDefinition definition)Add a child property operation to thissetTreeinstance.static SetTreecreate(NodeState treeState)static SetTreecreate(UpdatableItemStateManager itemStateMgr, NodeState parent, Name nodeName, Name nodeTypeName, String uuid)NodeIdgetParentId()NodeStategetParentState()NodeStategetTreeState()voidpersisted()Persisting a SetPolicy operation involves persisting each individual operation added by this policy.voidundo()Undoing a SetPolicy operation involves undoing all operations added by the SetPolicy.-
Methods inherited from class org.apache.jackrabbit.jcr2spi.operation.TransientOperation
getOptions
-
Methods inherited from class org.apache.jackrabbit.jcr2spi.operation.AbstractOperation
addAffectedItemState, assertChildNodeEntries, getAffectedItemStates, getName, getNodeState, getStatus
-
-
-
-
Method Detail
-
accept
public void accept(OperationVisitor visitor) throws ValueFormatException, LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, UnsupportedRepositoryOperationException, VersionException, RepositoryException
Description copied from interface:OperationCalls the appropriatevisitmethod onvisitorbased on the type of this operation.
-
persisted
public void persisted() throws RepositoryExceptionPersisting a SetPolicy operation involves persisting each individual operation added by this policy. The concerned operation will assert the status and set it accordingly.- Throws:
RepositoryException- See Also:
Operation.persisted()
-
undo
public void undo() throws RepositoryExceptionUndoing a SetPolicy operation involves undoing all operations added by the SetPolicy.- Specified by:
undoin interfaceOperation- Overrides:
undoin classAbstractOperation- Throws:
RepositoryException- See Also:
Operation.undo()
-
getParentId
public NodeId getParentId() throws RepositoryException
- Throws:
RepositoryException
-
getParentState
public NodeState getParentState() throws RepositoryException
- Throws:
RepositoryException
-
getTreeState
public NodeState getTreeState() throws RepositoryException
- Throws:
RepositoryException
-
addChildNode
public Operation addChildNode(NodeState parentState, Name nodeName, Name nodeTypeName, String uuid) throws RepositoryException
Add a child node operation to thissetTreeinstance.- Parameters:
parentState-nodeName-nodeTypeName-uuid-- Returns:
- Throws:
RepositoryException
-
addChildProperty
public Operation addChildProperty(NodeState parentState, Name propName, int propertyType, QValue[] values, QPropertyDefinition definition) throws RepositoryException
Add a child property operation to thissetTreeinstance.- Parameters:
parentState-propName-propertyType-values-definition-- Returns:
- Throws:
RepositoryException
-
create
public static SetTree create(NodeState treeState) throws RepositoryException
- Throws:
RepositoryException
-
create
public static SetTree create(UpdatableItemStateManager itemStateMgr, NodeState parent, Name nodeName, Name nodeTypeName, String uuid) throws RepositoryException
- Throws:
RepositoryException
-
-