Class Restore
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.operation.AbstractOperation
-
- org.apache.jackrabbit.jcr2spi.operation.Restore
-
- All Implemented Interfaces:
Operation
public class Restore extends AbstractOperation
Restore...
-
-
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.static Operationcreate(NodeState[] versionStates, boolean removeExisting)static Operationcreate(NodeState nodeState, Path relQPath, NodeState versionState, boolean removeExisting)NodeIdgetNodeId()Returns id of state or the closest existing state of the restore target ornullin case of aWorkspace.restore(Version[], boolean)PathgetRelativePath()Relative path to the non-existing restore target ornullif the state identified bygetNodeId()is the target.NodeId[]getVersionIds()voidpersisted()In case of a workspace-restore or 'removeExisting' the complete tree gets invalidated, otherwise the givenNodeStatethat has been updated and all its descendants.booleanremoveExisting()-
Methods inherited from class org.apache.jackrabbit.jcr2spi.operation.AbstractOperation
addAffectedItemState, assertChildNodeEntries, getAffectedItemStates, getName, getNodeState, getStatus, undo
-
-
-
-
Method Detail
-
accept
public void accept(OperationVisitor visitor) throws PathNotFoundException, ItemExistsException, VersionException, ConstraintViolationException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException
Description copied from interface:OperationCalls the appropriatevisitmethod onvisitorbased on the type of this operation.- Parameters:
visitor- the visitor to call back.- Throws:
PathNotFoundExceptionItemExistsExceptionVersionExceptionConstraintViolationExceptionUnsupportedRepositoryOperationExceptionLockExceptionInvalidItemStateExceptionRepositoryException- See Also:
Operation.accept(OperationVisitor)
-
persisted
public void persisted()
In case of a workspace-restore or 'removeExisting' the complete tree gets invalidated, otherwise the givenNodeStatethat has been updated and all its descendants.- See Also:
Operation.persisted()
-
getNodeId
public NodeId getNodeId() throws RepositoryException
Returns id of state or the closest existing state of the restore target ornullin case of aWorkspace.restore(Version[], boolean)- Returns:
- Throws:
RepositoryException
-
getRelativePath
public Path getRelativePath()
Relative path to the non-existing restore target ornullif the state identified bygetNodeId()is the target.- Returns:
- See Also:
Node.restore(Version, String, boolean)
-
getVersionIds
public NodeId[] getVersionIds() throws RepositoryException
- Throws:
RepositoryException
-
removeExisting
public boolean removeExisting()
-
create
public static Operation create(NodeState nodeState, Path relQPath, NodeState versionState, boolean removeExisting)
- Parameters:
nodeState-versionState-- Returns:
-
-