public class ConsolidatingChangeLog extends AbstractChangeLog<ConsolidatingChangeLog.CancelableOperation>
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.| Modifier and Type | Class and Description |
|---|---|
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. |
operations| Constructor and Description |
|---|
ConsolidatingChangeLog()
Create a new instance of a consolidating change log.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(org.apache.jackrabbit.spi.NodeId parentId,
org.apache.jackrabbit.spi.Name nodeName,
org.apache.jackrabbit.spi.Name nodetypeName,
String uuid) |
void |
addOperation(ConsolidatingChangeLog.CancelableOperation 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(org.apache.jackrabbit.spi.NodeId parentId,
org.apache.jackrabbit.spi.Name propertyName,
org.apache.jackrabbit.spi.QValue value) |
void |
addProperty(org.apache.jackrabbit.spi.NodeId parentId,
org.apache.jackrabbit.spi.Name propertyName,
org.apache.jackrabbit.spi.QValue[] values) |
protected static org.apache.jackrabbit.spi.Path |
getPath(org.apache.jackrabbit.spi.ItemId itemId)
Determine the
Path from an ItemId. |
protected static org.apache.jackrabbit.spi.Path |
getPath(org.apache.jackrabbit.spi.NodeId parentId,
org.apache.jackrabbit.spi.Name name)
Create a
Path from the NodeId of a parent and the Name of a
child. |
void |
move(org.apache.jackrabbit.spi.NodeId srcNodeId,
org.apache.jackrabbit.spi.NodeId destParentNodeId,
org.apache.jackrabbit.spi.Name destName) |
void |
remove(org.apache.jackrabbit.spi.ItemId itemId) |
void |
reorderNodes(org.apache.jackrabbit.spi.NodeId parentId,
org.apache.jackrabbit.spi.NodeId srcNodeId,
org.apache.jackrabbit.spi.NodeId beforeNodeId) |
void |
setMixins(org.apache.jackrabbit.spi.NodeId nodeId,
org.apache.jackrabbit.spi.Name[] mixinNodeTypeNames) |
void |
setPrimaryType(org.apache.jackrabbit.spi.NodeId nodeId,
org.apache.jackrabbit.spi.Name primaryNodeTypeName) |
void |
setTree(org.apache.jackrabbit.spi.NodeId parentId,
org.apache.jackrabbit.spi.Tree contentTree) |
void |
setValue(org.apache.jackrabbit.spi.PropertyId propertyId,
org.apache.jackrabbit.spi.QValue value) |
void |
setValue(org.apache.jackrabbit.spi.PropertyId propertyId,
org.apache.jackrabbit.spi.QValue[] values) |
public ConsolidatingChangeLog()
protected static org.apache.jackrabbit.spi.Path getPath(org.apache.jackrabbit.spi.NodeId parentId,
org.apache.jackrabbit.spi.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 childname or null if parentId's
path is not absoluteRepositoryExceptionprotected static org.apache.jackrabbit.spi.Path getPath(org.apache.jackrabbit.spi.ItemId itemId)
Path from an ItemId.itemId - itemId or null if itemId's
path is not absolutepublic void addNode(org.apache.jackrabbit.spi.NodeId parentId,
org.apache.jackrabbit.spi.Name nodeName,
org.apache.jackrabbit.spi.Name nodetypeName,
String uuid)
throws RepositoryException
RepositoryExceptionpublic void addProperty(org.apache.jackrabbit.spi.NodeId parentId,
org.apache.jackrabbit.spi.Name propertyName,
org.apache.jackrabbit.spi.QValue value)
throws RepositoryException
RepositoryExceptionpublic void addProperty(org.apache.jackrabbit.spi.NodeId parentId,
org.apache.jackrabbit.spi.Name propertyName,
org.apache.jackrabbit.spi.QValue[] values)
throws RepositoryException
RepositoryExceptionpublic void move(org.apache.jackrabbit.spi.NodeId srcNodeId,
org.apache.jackrabbit.spi.NodeId destParentNodeId,
org.apache.jackrabbit.spi.Name destName)
throws RepositoryException
RepositoryExceptionpublic void remove(org.apache.jackrabbit.spi.ItemId itemId)
throws RepositoryException
RepositoryExceptionpublic void reorderNodes(org.apache.jackrabbit.spi.NodeId parentId,
org.apache.jackrabbit.spi.NodeId srcNodeId,
org.apache.jackrabbit.spi.NodeId beforeNodeId)
throws RepositoryException
RepositoryExceptionpublic void setMixins(org.apache.jackrabbit.spi.NodeId nodeId,
org.apache.jackrabbit.spi.Name[] mixinNodeTypeNames)
throws RepositoryException
RepositoryExceptionpublic void setPrimaryType(org.apache.jackrabbit.spi.NodeId nodeId,
org.apache.jackrabbit.spi.Name primaryNodeTypeName)
throws RepositoryException
RepositoryExceptionpublic void setValue(org.apache.jackrabbit.spi.PropertyId propertyId,
org.apache.jackrabbit.spi.QValue value)
throws RepositoryException
RepositoryExceptionpublic void setValue(org.apache.jackrabbit.spi.PropertyId propertyId,
org.apache.jackrabbit.spi.QValue[] values)
throws RepositoryException
RepositoryExceptionpublic void setTree(org.apache.jackrabbit.spi.NodeId parentId,
org.apache.jackrabbit.spi.Tree contentTree)
throws RepositoryException
RepositoryExceptionpublic void addOperation(ConsolidatingChangeLog.CancelableOperation op) throws RepositoryException
operations
and the current operation op:
addOperation in class AbstractChangeLog<ConsolidatingChangeLog.CancelableOperation>op - Operation to addRepositoryExceptionCopyright © 2004–2017 The Apache Software Foundation. All rights reserved.