org.apache.jackrabbit.spi.commons
Class SerializableBatch
java.lang.Object
org.apache.jackrabbit.spi.commons.SerializableBatch
- All Implemented Interfaces:
- Serializable, Batch
public class SerializableBatch
- extends Object
- implements Batch, Serializable
SerializableBatch implements a serializable SPI Batch, which
simply records all calls and replays them when asked for. The client of
this batch must ensure that the passed QValue instances are
serializable, otherwise the serializing the Batch will fail!
- See Also:
- Serialized Form
|
Method Summary |
void |
addNode(NodeId parentId,
Name nodeName,
Name nodetypeName,
String uuid)
|
void |
addProperty(NodeId parentId,
Name propertyName,
QValue value)
|
void |
addProperty(NodeId parentId,
Name propertyName,
QValue[] values)
|
ItemId |
getSaveTarget()
|
void |
move(NodeId srcNodeId,
NodeId destParentNodeId,
Name destName)
|
void |
remove(ItemId itemId)
|
void |
reorderNodes(NodeId parentId,
NodeId srcNodeId,
NodeId beforeNodeId)
|
void |
replay(Batch batch)
Replays this batch on the given batch. |
void |
setMixins(NodeId nodeId,
Name[] mixinNodeTypeIds)
|
void |
setPrimaryType(NodeId nodeId,
Name primaryNodeTypeName)
|
void |
setValue(PropertyId propertyId,
QValue value)
|
void |
setValue(PropertyId propertyId,
QValue[] values)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SerializableBatch
public SerializableBatch(ItemId itemId)
- Creates a new
SerializableBatch.
- Parameters:
itemId - the id of the item where save was called. To indicate that
save was called on the session, the id of the root node
must be passed.
getSaveTarget
public ItemId getSaveTarget()
- Returns:
- the item id where save was called for this batch.
replay
public void replay(Batch batch)
throws PathNotFoundException,
ItemNotFoundException,
NoSuchNodeTypeException,
ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
AccessDeniedException,
UnsupportedRepositoryOperationException,
RepositoryException
- Replays this batch on the given
batch. For a description of
the exception see RepositoryService.submit(Batch).
- Parameters:
batch - the target batch.
- Throws:
PathNotFoundException
ItemNotFoundException
NoSuchNodeTypeException
ValueFormatException
VersionException
LockException
ConstraintViolationException
AccessDeniedException
UnsupportedRepositoryOperationException
RepositoryException
addNode
public void addNode(NodeId parentId,
Name nodeName,
Name nodetypeName,
String uuid)
- Specified by:
addNode in interface Batch
addProperty
public void addProperty(NodeId parentId,
Name propertyName,
QValue value)
- Specified by:
addProperty in interface Batch
addProperty
public void addProperty(NodeId parentId,
Name propertyName,
QValue[] values)
- Specified by:
addProperty in interface Batch
setValue
public void setValue(PropertyId propertyId,
QValue value)
- Specified by:
setValue in interface Batch
setValue
public void setValue(PropertyId propertyId,
QValue[] values)
- Specified by:
setValue in interface Batch
remove
public void remove(ItemId itemId)
- Specified by:
remove in interface Batch
reorderNodes
public void reorderNodes(NodeId parentId,
NodeId srcNodeId,
NodeId beforeNodeId)
- Specified by:
reorderNodes in interface Batch
setMixins
public void setMixins(NodeId nodeId,
Name[] mixinNodeTypeIds)
- Specified by:
setMixins in interface Batch
setPrimaryType
public void setPrimaryType(NodeId nodeId,
Name primaryNodeTypeName)
throws RepositoryException
- Specified by:
setPrimaryType in interface Batch
- Throws:
RepositoryException
move
public void move(NodeId srcNodeId,
NodeId destParentNodeId,
Name destName)
- Specified by:
move in interface Batch
Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.