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 void
accept(OperationVisitor visitor)
Calls the appropriatevisit
method onvisitor
based on the type of this operation.Operation
addChildNode(NodeState parentState, Name nodeName, Name nodeTypeName, String uuid)
Add a child node operation to thissetTree
instance.Operation
addChildProperty(NodeState parentState, Name propName, int propertyType, QValue[] values, QPropertyDefinition definition)
Add a child property operation to thissetTree
instance.static SetTree
create(NodeState treeState)
static SetTree
create(UpdatableItemStateManager itemStateMgr, NodeState parent, Name nodeName, Name nodeTypeName, String uuid)
NodeId
getParentId()
NodeState
getParentState()
NodeState
getTreeState()
void
persisted()
Persisting a SetPolicy operation involves persisting each individual operation added by this policy.void
undo()
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:Operation
Calls the appropriatevisit
method onvisitor
based on the type of this operation.
-
persisted
public void persisted() throws RepositoryException
Persisting 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 RepositoryException
Undoing a SetPolicy operation involves undoing all operations added by the SetPolicy.- Specified by:
undo
in interfaceOperation
- Overrides:
undo
in 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 thissetTree
instance.- 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 thissetTree
instance.- 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
-
-