public class Restore extends AbstractOperation
Restore...statusSTATUS_PENDING, STATUS_PERSISTED, STATUS_UNDO| Modifier and Type | Method and Description |
|---|---|
void |
accept(OperationVisitor visitor)
Calls the appropriate
visit method on visitor
based on the type of this operation. |
static Operation |
create(NodeState[] versionStates,
boolean removeExisting) |
static Operation |
create(NodeState nodeState,
org.apache.jackrabbit.spi.Path relQPath,
NodeState versionState,
boolean removeExisting) |
org.apache.jackrabbit.spi.NodeId |
getNodeId()
Returns id of state or the closest existing state of the restore target or
null in case of a Workspace.restore(Version[], boolean) |
org.apache.jackrabbit.spi.Path |
getRelativePath()
Relative path to the non-existing restore target or
null
if the state identified by getNodeId() is the target. |
org.apache.jackrabbit.spi.NodeId[] |
getVersionIds() |
void |
persisted()
In case of a workspace-restore or 'removeExisting' the complete tree gets
invalidated, otherwise the given
NodeState that has been
updated and all its descendants. |
boolean |
removeExisting() |
addAffectedItemState, assertChildNodeEntries, getAffectedItemStates, getName, getNodeState, getStatus, undopublic void accept(OperationVisitor visitor) throws PathNotFoundException, ItemExistsException, VersionException, ConstraintViolationException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException
Operationvisit method on visitor
based on the type of this operation.visitor - the visitor to call back.PathNotFoundExceptionItemExistsExceptionVersionExceptionConstraintViolationExceptionUnsupportedRepositoryOperationExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionOperation.accept(OperationVisitor)public void persisted()
NodeState that has been
updated and all its descendants.Operation.persisted()public org.apache.jackrabbit.spi.NodeId getNodeId()
throws RepositoryException
null in case of a Workspace.restore(Version[], boolean)RepositoryExceptionpublic org.apache.jackrabbit.spi.Path getRelativePath()
null
if the state identified by getNodeId() is the target.Node.restore(Version, String, boolean)public org.apache.jackrabbit.spi.NodeId[] getVersionIds()
throws RepositoryException
RepositoryExceptionpublic boolean removeExisting()
public static Operation create(NodeState nodeState, org.apache.jackrabbit.spi.Path relQPath, NodeState versionState, boolean removeExisting)
nodeState - versionState - Copyright © 2004–2018 The Apache Software Foundation. All rights reserved.