org.apache.jackrabbit.spi.commons.batch
Class ChangeLogImpl
java.lang.Object
org.apache.jackrabbit.spi.commons.batch.ChangeLogImpl
- All Implemented Interfaces:
- Batch, ChangeLog
- Direct Known Subclasses:
- ConsolidatingChangeLog
public class ChangeLogImpl
- extends Object
- implements ChangeLog
This ChangeLog implementation simply keeps back all calls to its Batch methods as
a list of operations (with item of type Operation). When applied to a batch, all operations in the list are applied to that
batch.
|
Method Summary |
void |
addNode(NodeId parentId,
Name nodeName,
Name nodetypeName,
String uuid)
|
protected void |
addOperation(Operation op)
This method is called when an operation is added to the list of operations
kept by this change log. |
void |
addProperty(NodeId parentId,
Name propertyName,
QValue value)
|
void |
addProperty(NodeId parentId,
Name propertyName,
QValue[] values)
|
Batch |
apply(Batch batch)
Applies the Operations contained in this change log to
the passed batch. |
boolean |
equals(ChangeLogImpl other)
|
boolean |
equals(Object other)
|
int |
hashCode()
|
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)
|
String |
toString()
|
operations
protected final List operations
Operations kept in this change log.
ChangeLogImpl
public ChangeLogImpl()
addNode
public void addNode(NodeId parentId,
Name nodeName,
Name nodetypeName,
String uuid)
throws RepositoryException
- Specified by:
addNode in interface Batch
- Throws:
RepositoryException
addProperty
public void addProperty(NodeId parentId,
Name propertyName,
QValue value)
throws RepositoryException
- Specified by:
addProperty in interface Batch
- Throws:
RepositoryException
addProperty
public void addProperty(NodeId parentId,
Name propertyName,
QValue[] values)
throws RepositoryException
- Specified by:
addProperty in interface Batch
- Throws:
RepositoryException
move
public void move(NodeId srcNodeId,
NodeId destParentNodeId,
Name destName)
throws RepositoryException
- Specified by:
move in interface Batch
- Throws:
RepositoryException
remove
public void remove(ItemId itemId)
throws RepositoryException
- Specified by:
remove in interface Batch
- Throws:
RepositoryException
reorderNodes
public void reorderNodes(NodeId parentId,
NodeId srcNodeId,
NodeId beforeNodeId)
throws RepositoryException
- Specified by:
reorderNodes in interface Batch
- Throws:
RepositoryException
setMixins
public void setMixins(NodeId nodeId,
Name[] mixinNodeTypeNames)
throws RepositoryException
- Specified by:
setMixins in interface Batch
- Throws:
RepositoryException
setValue
public void setValue(PropertyId propertyId,
QValue value)
throws RepositoryException
- Specified by:
setValue in interface Batch
- Throws:
RepositoryException
setValue
public void setValue(PropertyId propertyId,
QValue[] values)
throws RepositoryException
- Specified by:
setValue in interface Batch
- Throws:
RepositoryException
apply
public Batch apply(Batch batch)
throws RepositoryException
- Description copied from interface:
ChangeLog
- Applies the
Operations contained in this change log to
the passed batch.
- Specified by:
apply in interface ChangeLog
- Returns:
- The
batch passed in as argument with the
operations from this change log applied.
- Throws:
RepositoryException
addOperation
protected void addOperation(Operation op)
throws RepositoryException
- This method is called when an operation is added to the list of
operations
kept by this change log.
- Parameters:
op - Operation to add
- Throws:
RepositoryException
toString
public String toString()
- Overrides:
toString in class Object
equals
public boolean equals(Object other)
- Overrides:
equals in class Object
equals
public boolean equals(ChangeLogImpl other)
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.