Class SessionItemStateManager
- java.lang.Object
- 
- org.apache.jackrabbit.jcr2spi.operation.TransientOperationVisitor
- 
- org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager
 
 
- 
- All Implemented Interfaces:
- OperationVisitor,- UpdatableItemStateManager
 
 public class SessionItemStateManager extends TransientOperationVisitor implements UpdatableItemStateManager SessionItemStateManager...
- 
- 
Constructor SummaryConstructors Constructor Description SessionItemStateManager(UpdatableItemStateManager workspaceItemStateMgr, ItemStateValidator validator, QValueFactory qValueFactory, ItemStateFactory isf, SessionImpl mgrProvider)Creates a newSessionItemStateManagerinstance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadjustReferences(ReferenceChangeTracker refTracker)Adjust references at the end of a successfulXML import.voiddispose()Disposes thisUpdatableItemStateManagerand frees resources.voidexecute(Operation operation)Executes the given operation and modifies the affected item states accordingly.voidexecute(ChangeLog changes)Executes the operations passed with the given change log and modifies the affected item states accordingly.booleanhasPendingChanges()voidsave(ItemState state)This will savestateand all descendants items ofstatethat are transiently modified in a single step.voidundo(ItemState itemState)This will undo all changes made tostateand descendant items ofstateinside this item state manager.voidvisit(AddNode operation)voidvisit(AddProperty operation)voidvisit(Move operation)voidvisit(Remove operation)voidvisit(ReorderNodes operation)voidvisit(SetMixin operation)voidvisit(SetPrimaryType operation)voidvisit(SetPropertyValue operation)voidvisit(SetTree operation)
 
- 
- 
- 
Constructor Detail- 
SessionItemStateManagerpublic SessionItemStateManager(UpdatableItemStateManager workspaceItemStateMgr, ItemStateValidator validator, QValueFactory qValueFactory, ItemStateFactory isf, SessionImpl mgrProvider) Creates a newSessionItemStateManagerinstance.- Parameters:
- workspaceItemStateMgr-
- validator-
- qValueFactory-
- isf-
- mgrProvider-
 
 
- 
 - 
Method Detail- 
hasPendingChangespublic boolean hasPendingChanges() - Returns:
- trueif this manager has any transient state;- falseotherwise.
 
 - 
savepublic void save(ItemState state) throws ReferentialIntegrityException, InvalidItemStateException, RepositoryException This will savestateand all descendants items ofstatethat are transiently modified in a single step. If this operation fails, no item will have been saved.- Parameters:
- state- the root state of the update operation
- Throws:
- ReferentialIntegrityException
- InvalidItemStateException
- RepositoryException
 
 - 
undopublic void undo(ItemState itemState) throws ConstraintViolationException, RepositoryException This will undo all changes made tostateand descendant items ofstateinside this item state manager.- Parameters:
- itemState- the root state of the cancel operation.
- Throws:
- ConstraintViolationException
- RepositoryException- if undoing changes made to- stateand 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.
 
 - 
adjustReferencespublic void adjustReferences(ReferenceChangeTracker refTracker) throws ConstraintViolationException, RepositoryException Adjust references at the end of a successfulXML import.- Parameters:
- refTracker-
- Throws:
- ConstraintViolationException
- RepositoryException
 
 - 
executepublic void execute(Operation operation) throws RepositoryException Executes the given operation and modifies the affected item states accordingly.- Specified by:
- executein interface- UpdatableItemStateManager
- Throws:
- RepositoryException
- See Also:
- UpdatableItemStateManager.execute(Operation)
 
 - 
executepublic void execute(ChangeLog changes) throws RepositoryException Executes the operations passed with the given change log and modifies the affected item states accordingly.- Specified by:
- executein interface- UpdatableItemStateManager
- Throws:
- RepositoryException
- See Also:
- UpdatableItemStateManager.execute(ChangeLog)
 
 - 
disposepublic void dispose() Disposes thisUpdatableItemStateManagerand frees resources.- Specified by:
- disposein interface- UpdatableItemStateManager
- See Also:
- UpdatableItemStateManager.dispose()
 
 - 
visitpublic void visit(AddNode operation) throws LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, NoSuchNodeTypeException, UnsupportedRepositoryOperationException, VersionException, RepositoryException 
 - 
visitpublic void visit(AddProperty operation) throws ValueFormatException, LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, UnsupportedRepositoryOperationException, VersionException, RepositoryException 
 - 
visitpublic void visit(SetTree operation) throws RepositoryException - Specified by:
- visitin interface- OperationVisitor
- Throws:
- RepositoryException
- See Also:
- OperationVisitor.visit(org.apache.jackrabbit.jcr2spi.operation.SetTree)
 
 - 
visitpublic void visit(Move operation) throws LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, UnsupportedRepositoryOperationException, VersionException, RepositoryException - Specified by:
- visitin interface- OperationVisitor
- Throws:
- LockException
- ConstraintViolationException
- AccessDeniedException
- ItemExistsException
- UnsupportedRepositoryOperationException
- VersionException
- RepositoryException
- See Also:
- OperationVisitor.visit(Move)
 
 - 
visitpublic void visit(Remove operation) throws ConstraintViolationException, AccessDeniedException, UnsupportedRepositoryOperationException, VersionException, RepositoryException - Specified by:
- visitin interface- OperationVisitor
- Throws:
- ConstraintViolationException
- AccessDeniedException
- UnsupportedRepositoryOperationException
- VersionException
- RepositoryException
- See Also:
- OperationVisitor.visit(Remove)
 
 - 
visitpublic void visit(SetMixin operation) throws ConstraintViolationException, AccessDeniedException, NoSuchNodeTypeException, UnsupportedRepositoryOperationException, VersionException, RepositoryException - Specified by:
- visitin interface- OperationVisitor
- Throws:
- ConstraintViolationException
- AccessDeniedException
- NoSuchNodeTypeException
- UnsupportedRepositoryOperationException
- VersionException
- RepositoryException
- See Also:
- OperationVisitor.visit(SetMixin)
 
 - 
visitpublic void visit(SetPrimaryType operation) throws ConstraintViolationException, RepositoryException - Specified by:
- visitin interface- OperationVisitor
- Throws:
- ConstraintViolationException
- RepositoryException
- See Also:
- OperationVisitor.visit(SetPrimaryType)
 
 - 
visitpublic void visit(SetPropertyValue operation) throws ValueFormatException, LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, UnsupportedRepositoryOperationException, VersionException, RepositoryException 
 - 
visitpublic void visit(ReorderNodes operation) throws ConstraintViolationException, AccessDeniedException, UnsupportedRepositoryOperationException, VersionException, RepositoryException - Specified by:
- visitin interface- OperationVisitor
- Throws:
- ConstraintViolationException
- AccessDeniedException
- UnsupportedRepositoryOperationException
- VersionException
- RepositoryException
- See Also:
- OperationVisitor.visit(ReorderNodes)
 
 
- 
 
-