|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.jcr2spi.state.ChangeLog
public class ChangeLog
Registers changes made to states and references and consolidates empty changes.
Method Summary | |
---|---|
void |
added(ItemState state)
A state has been added |
Iterator |
addedStates()
Return an iterator over all added states. |
void |
addOperation(Operation operation)
Add the given operation to the list of operations to be recorded within the current update cycle of this ChangeLog. |
void |
checkIsSelfContained()
Make sure that this ChangeLog is totally 'self-contained' and independant; items within the scope of this update operation must not have 'external' dependencies; (e.g. |
void |
collectOperations(Iterator operations)
Populates this ChangeLog with operations that are within the
scope of this change set. |
boolean |
containsDeletedState(ItemState state)
Returns true, if this change log contains the given ItemState
in the set of transiently removed states. |
void |
deleted(ItemState state)
A state has been deleted. |
Iterator |
deletedStates()
Return an iterator over all deleted states. |
Iterator |
getOperations()
|
ItemState |
getTarget()
|
boolean |
isEmpty()
|
void |
modified(ItemState state)
A state has been modified. |
Iterator |
modifiedStates()
Return an iterator over all modified states. |
void |
persisted()
Call this method when this change log has been sucessfully persisted. |
void |
removeAll(ChangeLog subChangeLog)
Removes the subset of this changelog represented by the given ChangeLog from this changelog. |
void |
reset()
Reset this change log, removing all members inside the maps we built. |
void |
statusChanged(ItemState state,
int previousStatus)
Adjust this ChangeLog according to the status change with the given ItemState: Remove all entries and operation related to the given ItemState, that are not used any more (respecting the status change). |
String |
toString()
Returns a string representation of this change log for diagnostic purposes. |
void |
undo()
Revert the changes listed within this changelog |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void addOperation(Operation operation)
operation
- public void added(ItemState state)
state
- state that has been addedpublic void modified(ItemState state)
state
- state that has been modifiedpublic void deleted(ItemState state)
state
- state that has been deletedpublic void persisted()
ItemState.refresh(this)
on the target item of this change log.
public void undo() throws RepositoryException
RepositoryException
public ItemState getTarget()
public boolean isEmpty()
public Iterator getOperations()
public Iterator addedStates()
public Iterator modifiedStates()
public Iterator deletedStates()
public boolean containsDeletedState(ItemState state)
ItemState
in the set of transiently removed states.
state
-
public void removeAll(ChangeLog subChangeLog)
ChangeLog
from this changelog.
subChangeLog
- remove all entries (states, operations) present in
the given changelog from this changelog.public void statusChanged(ItemState state, int previousStatus)
state
- public void checkIsSelfContained() throws ConstraintViolationException
ConstraintViolationException
public void collectOperations(Iterator operations)
ChangeLog
with operations that are within the
scope of this change set.
operations
- an Iterator of Operation
s which are the
candidates to be included in this ChangeLog
.public void reset()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |