org.apache.jackrabbit.jcr2spi.operation
Class Restore

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.operation.AbstractOperation
      extended by org.apache.jackrabbit.jcr2spi.operation.Restore
All Implemented Interfaces:
Operation

public class Restore
extends AbstractOperation

Restore...


Method Summary
 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, Path relQPath, NodeState versionState, boolean removeExisting)
           
 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)
 Path getRelativePath()
          Relative qualified path to the non-existing restore target or null if the state returned by #getNodeState() is the target.
 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 decendants.
 boolean removeExisting()
           
 
Methods inherited from class org.apache.jackrabbit.jcr2spi.operation.AbstractOperation
addAffectedItemState, getAffectedItemStates, getName, getNodeState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

accept

public void accept(OperationVisitor visitor)
            throws PathNotFoundException,
                   ItemExistsException,
                   VersionException,
                   ConstraintViolationException,
                   UnsupportedRepositoryOperationException,
                   LockException,
                   InvalidItemStateException,
                   RepositoryException
Description copied from interface: Operation
Calls the appropriate visit method on visitor based on the type of this operation.

Parameters:
visitor - the visitor to call back.
Throws:
PathNotFoundException
ItemExistsException
VersionException
ConstraintViolationException
UnsupportedRepositoryOperationException
LockException
InvalidItemStateException
RepositoryException
See Also:
Operation.accept(OperationVisitor)

persisted

public 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 decendants.

See Also:
Operation.persisted()

getNodeId

public 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)

Returns:

getRelativePath

public Path getRelativePath()
Relative qualified path to the non-existing restore target or null if the state returned by #getNodeState() is the target.

Returns:
See Also:
Node.restore(Version, String, boolean)

getVersionIds

public NodeId[] getVersionIds()

removeExisting

public boolean removeExisting()

create

public static Operation create(NodeState nodeState,
                               Path relQPath,
                               NodeState versionState,
                               boolean removeExisting)
Parameters:
nodeState -
versionState -
Returns:

create

public static Operation create(NodeState[] versionStates,
                               boolean removeExisting)
Parameters:
versionStates -
Returns:


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