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 ReferentialIntegrityException, InvalidItemStateException, 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 operationReferentialIntegrityException
InvalidItemStateException
RepositoryException
public void undo(ItemState itemState) throws ConstraintViolationException, RepositoryException
state
and descendant
items of state
inside this item state manager.itemState
- the root state of the cancel operation.ConstraintViolationException
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 ConstraintViolationException, RepositoryException
XML import
.refTracker
- ConstraintViolationException
RepositoryException
public void execute(Operation operation) throws RepositoryException
execute
in interface UpdatableItemStateManager
RepositoryException
UpdatableItemStateManager.execute(Operation)
public void execute(ChangeLog changes) throws RepositoryException
execute
in interface UpdatableItemStateManager
RepositoryException
UpdatableItemStateManager.execute(ChangeLog)
public void dispose()
UpdatableItemStateManager
and frees resources.dispose
in interface UpdatableItemStateManager
UpdatableItemStateManager.dispose()
public void visit(AddNode operation) throws LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, NoSuchNodeTypeException, UnsupportedRepositoryOperationException, VersionException, RepositoryException
public void visit(AddProperty operation) throws ValueFormatException, LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, UnsupportedRepositoryOperationException, VersionException, RepositoryException
public void visit(SetTree operation) throws RepositoryException
visit
in interface OperationVisitor
RepositoryException
OperationVisitor.visit(org.apache.jackrabbit.jcr2spi.operation.SetTree)
public void visit(Move operation) throws LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, UnsupportedRepositoryOperationException, VersionException, RepositoryException
visit
in interface OperationVisitor
LockException
ConstraintViolationException
AccessDeniedException
ItemExistsException
UnsupportedRepositoryOperationException
VersionException
RepositoryException
OperationVisitor.visit(Move)
public void visit(Remove operation) throws ConstraintViolationException, AccessDeniedException, UnsupportedRepositoryOperationException, VersionException, RepositoryException
visit
in interface OperationVisitor
ConstraintViolationException
AccessDeniedException
UnsupportedRepositoryOperationException
VersionException
RepositoryException
OperationVisitor.visit(Remove)
public void visit(SetMixin operation) throws ConstraintViolationException, AccessDeniedException, NoSuchNodeTypeException, UnsupportedRepositoryOperationException, VersionException, RepositoryException
visit
in interface OperationVisitor
ConstraintViolationException
AccessDeniedException
NoSuchNodeTypeException
UnsupportedRepositoryOperationException
VersionException
RepositoryException
OperationVisitor.visit(SetMixin)
public void visit(SetPrimaryType operation) throws ConstraintViolationException, RepositoryException
visit
in interface OperationVisitor
ConstraintViolationException
RepositoryException
OperationVisitor.visit(SetPrimaryType)
public void visit(SetPropertyValue operation) throws ValueFormatException, LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, UnsupportedRepositoryOperationException, VersionException, RepositoryException
public void visit(ReorderNodes operation) throws ConstraintViolationException, AccessDeniedException, UnsupportedRepositoryOperationException, VersionException, RepositoryException
visit
in interface OperationVisitor
ConstraintViolationException
AccessDeniedException
UnsupportedRepositoryOperationException
VersionException
RepositoryException
OperationVisitor.visit(ReorderNodes)
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.