|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.spi.commons.batch.ChangeLogImpl
org.apache.jackrabbit.spi.commons.batch.ConsolidatingChangeLog
public class ConsolidatingChangeLog
A ChangeLog implementation which does basic consolidation on its
Operations. That is, cancelling
operations are removed if possible. In general this is not possible across
move operations. The individual
CancelableOperation implementations document their behavior
concerning cancellation.
| Nested Class Summary | |
|---|---|
protected static interface |
ConsolidatingChangeLog.CancelableOperation
This class represent an Operation which can be cancelled by another operation
or which cancels another operation. |
protected static class |
ConsolidatingChangeLog.CancelableOperations
Factory for creating CancelableOperations. |
| Field Summary |
|---|
| Fields inherited from class org.apache.jackrabbit.spi.commons.batch.ChangeLogImpl |
|---|
operations |
| Constructor Summary | |
|---|---|
ConsolidatingChangeLog()
Create a new instance of a consolidating change log. |
|
| Method Summary | |
|---|---|
void |
addNode(NodeId parentId,
Name nodeName,
Name nodetypeName,
String uuid)
|
protected void |
addOperation(Operation op)
Determines the cancellation behavior from the list of operations
and the current operation op:
When the current operation is cancelled by the last operation, the list of operations
is not modified.
When the current operation and the last operation cancel each other, the last operation is
removed from the list of operations.
When the last operation is cancelled by this operation, the last operation is removed from
the list of operations and determination of cancellation starts from scratch.
Otherwise add the current operation to the list of operations.
|
void |
addProperty(NodeId parentId,
Name propertyName,
QValue value)
|
void |
addProperty(NodeId parentId,
Name propertyName,
QValue[] values)
|
protected static Path |
getPath(ItemId itemId)
Determine the Path from an ItemId. |
protected static Path |
getPath(NodeId parentId,
Name name)
Create a Path from the NodeId of a parent and the Name of a
child. |
void |
move(NodeId srcNodeId,
NodeId destParentNodeId,
Name destName)
|
void |
remove(ItemId itemId)
|
void |
reorderNodes(NodeId parentId,
NodeId srcNodeId,
NodeId beforeNodeId)
|
void |
setMixins(NodeId nodeId,
Name[] mixinNodeTypeNames)
|
void |
setValue(PropertyId propertyId,
QValue value)
|
void |
setValue(PropertyId propertyId,
QValue[] values)
|
| Methods inherited from class org.apache.jackrabbit.spi.commons.batch.ChangeLogImpl |
|---|
apply, equals, equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConsolidatingChangeLog()
| Method Detail |
|---|
protected static Path getPath(NodeId parentId,
Name name)
throws RepositoryException
Path from the NodeId of a parent and the Name of a
child.
parentId - node id of the parentname - name of the child
name
RepositoryExceptionprotected static Path getPath(ItemId itemId)
Path from an ItemId.
itemId -
itemId
public void addNode(NodeId parentId,
Name nodeName,
Name nodetypeName,
String uuid)
throws RepositoryException
addNode in interface BatchaddNode in class ChangeLogImplRepositoryException
public void addProperty(NodeId parentId,
Name propertyName,
QValue value)
throws RepositoryException
addProperty in interface BatchaddProperty in class ChangeLogImplRepositoryException
public void addProperty(NodeId parentId,
Name propertyName,
QValue[] values)
throws RepositoryException
addProperty in interface BatchaddProperty in class ChangeLogImplRepositoryException
public void move(NodeId srcNodeId,
NodeId destParentNodeId,
Name destName)
throws RepositoryException
move in interface Batchmove in class ChangeLogImplRepositoryException
public void remove(ItemId itemId)
throws RepositoryException
remove in interface Batchremove in class ChangeLogImplRepositoryException
public void reorderNodes(NodeId parentId,
NodeId srcNodeId,
NodeId beforeNodeId)
throws RepositoryException
reorderNodes in interface BatchreorderNodes in class ChangeLogImplRepositoryException
public void setMixins(NodeId nodeId,
Name[] mixinNodeTypeNames)
throws RepositoryException
setMixins in interface BatchsetMixins in class ChangeLogImplRepositoryException
public void setValue(PropertyId propertyId,
QValue value)
throws RepositoryException
setValue in interface BatchsetValue in class ChangeLogImplRepositoryException
public void setValue(PropertyId propertyId,
QValue[] values)
throws RepositoryException
setValue in interface BatchsetValue in class ChangeLogImplRepositoryException
protected void addOperation(Operation op)
throws RepositoryException
operations
and the current operation op:
addOperation in class ChangeLogImplop - Operation to add
RepositoryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||