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 getAffectedStates()
           
 Set getOperations()
           
 ItemState getTarget()
           
 boolean isEmpty()
           
 void persisted()
          Call this method when this change log has been sucessfully 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 sucessfully persisted. This implementation will call {@link 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 getOperations()
Returns:
set of operations.

getAffectedStates

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


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