org.apache.jackrabbit.jcr2spi.state
Class ChangeLog

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.state.ChangeLog

public class ChangeLog
extends Object

Registers changes made to states and references and consolidates empty changes.


Method Summary
 Set<ItemState> getAffectedStates()
           
 Set<Operation> getOperations()
           
 ItemState getTarget()
           
 boolean isEmpty()
           
 void persisted()
          Call this method when this change log has been successfully persisted.
 void undo()
          Revert the changes listed within this changelog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

persisted

public void persisted()
               throws RepositoryException
Call this method when this change log has been successfully persisted. This implementation will call Operation.persisted() on the individual operations followed by setting all remaining modified states to EXISTING.

Throws:
RepositoryException

undo

public void undo()
          throws RepositoryException
Revert the changes listed within this changelog

Throws:
RepositoryException

getTarget

public ItemState getTarget()
Returns:
the target state

isEmpty

public boolean isEmpty()
Returns:
true if no operations are present.

getOperations

public Set<Operation> getOperations()
Returns:
set of operations.

getAffectedStates

public Set<ItemState> getAffectedStates()
Returns:
set of the affected states.


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