public class SessionItemStateManager extends TransientOperationVisitor implements UpdatableItemStateManager
SessionItemStateManager
...Constructor and Description |
---|
SessionItemStateManager(UpdatableItemStateManager workspaceItemStateMgr,
ItemStateValidator validator,
QValueFactory qValueFactory,
ItemStateFactory isf,
SessionImpl mgrProvider)
Creates a new
SessionItemStateManager instance. |
Modifier and Type | Method and Description |
---|---|
void |
adjustReferences(ReferenceChangeTracker refTracker)
Adjust references at the end of a successful
XML import . |
void |
dispose()
Disposes this
UpdatableItemStateManager and frees resources. |
void |
execute(ChangeLog changes)
Executes the operations passed with the given change log and modifies the
affected item states accordingly.
|
void |
execute(Operation operation)
Executes the given operation and modifies the affected item states accordingly.
|
boolean |
hasPendingChanges() |
void |
save(ItemState state)
This will save
state and all descendants items of
state that are transiently modified in a single step. |
void |
undo(ItemState itemState)
This will undo all changes made to
state and descendant
items of state inside this item state manager. |
void |
visit(AddNode operation) |
void |
visit(AddProperty operation) |
void |
visit(Move operation) |
void |
visit(Remove operation) |
void |
visit(ReorderNodes operation) |
void |
visit(SetMixin operation) |
void |
visit(SetPrimaryType operation) |
void |
visit(SetPropertyValue operation) |
void |
visit(SetTree operation) |
public SessionItemStateManager(UpdatableItemStateManager workspaceItemStateMgr, ItemStateValidator validator, QValueFactory qValueFactory, ItemStateFactory isf, SessionImpl mgrProvider)
SessionItemStateManager
instance.workspaceItemStateMgr
- validator
- qValueFactory
- isf
- mgrProvider
- public boolean hasPendingChanges()
true
if this manager has any transient state;
false
otherwise.public void save(ItemState state) throws javax.jcr.ReferentialIntegrityException, javax.jcr.InvalidItemStateException, javax.jcr.RepositoryException
state
and all descendants items of
state
that are transiently modified in a single step. If
this operation fails, no item will have been saved.state
- the root state of the update operationjavax.jcr.ReferentialIntegrityException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException
public void undo(ItemState itemState) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
state
and descendant
items of state
inside this item state manager.itemState
- the root state of the cancel operation.javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
- if undoing changes made to state
and descendant items is not a closed set of changes. That is, at least
another item needs to be canceled as well in another sub-tree.public void adjustReferences(ReferenceChangeTracker refTracker) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
XML import
.refTracker
- javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public void execute(Operation operation) throws javax.jcr.RepositoryException
execute
in interface UpdatableItemStateManager
javax.jcr.RepositoryException
UpdatableItemStateManager.execute(Operation)
public void execute(ChangeLog changes) throws javax.jcr.RepositoryException
execute
in interface UpdatableItemStateManager
javax.jcr.RepositoryException
UpdatableItemStateManager.execute(ChangeLog)
public void dispose()
UpdatableItemStateManager
and frees resources.dispose
in interface UpdatableItemStateManager
UpdatableItemStateManager.dispose()
public void visit(AddNode operation) throws javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.AccessDeniedException, javax.jcr.ItemExistsException, javax.jcr.nodetype.NoSuchNodeTypeException, javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.version.VersionException, javax.jcr.RepositoryException
visit
in interface OperationVisitor
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.AccessDeniedException
javax.jcr.ItemExistsException
javax.jcr.nodetype.NoSuchNodeTypeException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.RepositoryException
OperationVisitor.visit(AddNode)
public void visit(AddProperty operation) throws javax.jcr.ValueFormatException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.AccessDeniedException, javax.jcr.ItemExistsException, javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.version.VersionException, javax.jcr.RepositoryException
visit
in interface OperationVisitor
javax.jcr.ValueFormatException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.AccessDeniedException
javax.jcr.ItemExistsException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.RepositoryException
OperationVisitor.visit(AddProperty)
public void visit(SetTree operation) throws javax.jcr.RepositoryException
visit
in interface OperationVisitor
javax.jcr.RepositoryException
OperationVisitor.visit(org.apache.jackrabbit.jcr2spi.operation.SetTree)
public void visit(Move operation) throws javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.AccessDeniedException, javax.jcr.ItemExistsException, javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.version.VersionException, javax.jcr.RepositoryException
visit
in interface OperationVisitor
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.AccessDeniedException
javax.jcr.ItemExistsException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.RepositoryException
OperationVisitor.visit(Move)
public void visit(Remove operation) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.AccessDeniedException, javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.version.VersionException, javax.jcr.RepositoryException
visit
in interface OperationVisitor
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.AccessDeniedException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.RepositoryException
OperationVisitor.visit(Remove)
public void visit(SetMixin operation) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.AccessDeniedException, javax.jcr.nodetype.NoSuchNodeTypeException, javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.version.VersionException, javax.jcr.RepositoryException
visit
in interface OperationVisitor
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.AccessDeniedException
javax.jcr.nodetype.NoSuchNodeTypeException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.RepositoryException
OperationVisitor.visit(SetMixin)
public void visit(SetPrimaryType operation) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
visit
in interface OperationVisitor
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
OperationVisitor.visit(SetPrimaryType)
public void visit(SetPropertyValue operation) throws javax.jcr.ValueFormatException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.AccessDeniedException, javax.jcr.ItemExistsException, javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.version.VersionException, javax.jcr.RepositoryException
visit
in interface OperationVisitor
javax.jcr.ValueFormatException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.AccessDeniedException
javax.jcr.ItemExistsException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.RepositoryException
OperationVisitor.visit(SetPropertyValue)
public void visit(ReorderNodes operation) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.AccessDeniedException, javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.version.VersionException, javax.jcr.RepositoryException
visit
in interface OperationVisitor
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.AccessDeniedException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.RepositoryException
OperationVisitor.visit(ReorderNodes)
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.