public class BatchLogger extends AbstractLogger implements Batch
Batch.| Constructor and Description |
|---|
BatchLogger(Batch batch,
LogWriter writer)
Create a new instance for the given
batch which uses
writer for persisting log messages. |
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(NodeId parentId,
Name nodeName,
Name nodetypeName,
java.lang.String uuid)
Add a new node to the persistent layer.
|
void |
addProperty(NodeId parentId,
Name propertyName,
QValue value)
Add a new property to the persistent layer.
|
void |
addProperty(NodeId parentId,
Name propertyName,
QValue[] values)
Add a new multi-valued property to the persistent layer.
|
Batch |
getBatch() |
void |
move(NodeId srcNodeId,
NodeId destParentNodeId,
Name destName)
Move the node identified by the given
srcNodeId to the
new parent identified by destParentNodeId and change its
name to destName. |
void |
remove(ItemId itemId)
Remove an existing item.
|
void |
reorderNodes(NodeId parentId,
NodeId srcNodeId,
NodeId beforeNodeId)
Modify the order of the child nodes identified by the given
NodeIds. |
void |
setMixins(NodeId nodeId,
Name[] mixinNodeTypeNames)
Modify the set of mixin node types present on the node identified by the
given id.
|
void |
setPrimaryType(NodeId nodeId,
Name primaryNodeTypeName)
Change the primary type of the node identified by the given
nodeId. |
void |
setTree(NodeId parentId,
Tree contentTree)
Add a new content tree to the persistent layer.
|
void |
setValue(PropertyId propertyId,
QValue value)
Modify the value of an existing property.
|
void |
setValue(PropertyId propertyId,
QValue[] values)
Modify the value of an existing, multi-valued property.
|
public Batch getBatch()
public void addNode(NodeId parentId, Name nodeName, Name nodetypeName, java.lang.String uuid) throws RepositoryException
BatchaddNode in interface BatchparentId - NodeId identifying the parent node.nodeName - Name of the node to be created.nodetypeName - Primary node type name of the node to be created.uuid - Value for the jcr:uuid property of the node to be created or
null. If due to an import the uuid of the resulting node is
already defined, it must be passed as separate uuid parameter, indicating
a binding value for the server. Otherwise the uuid must be null.ItemExistsExceptionPathNotFoundExceptionVersionExceptionConstraintViolationExceptionNoSuchNodeTypeExceptionLockExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionNode.addNode(String),
Node.addNode(String, String),
Session.importXML(String, java.io.InputStream, int),
Query.storeAsNode(String)public void addProperty(NodeId parentId, Name propertyName, QValue value) throws RepositoryException
BatchNote: this call should succeed in case the property already exists.
addProperty in interface BatchparentId - NodeId identifying the parent node.propertyName - Name of the property to be created.value - The value of the property to be created.ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionPathNotFoundExceptionItemExistsExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionNode.setProperty(String, javax.jcr.Value),
Node.setProperty(String, javax.jcr.Value, int),
Node.setProperty(String, String),
Node.setProperty(String, String, int),
Node.setProperty(String, java.util.Calendar),
Node.setProperty(String, boolean),
Node.setProperty(String, double),
Node.setProperty(String, long),
Node.setProperty(String, javax.jcr.Node),
Session.importXML(String, java.io.InputStream, int),
Query.storeAsNode(String)public void addProperty(NodeId parentId, Name propertyName, QValue[] values) throws RepositoryException
BatchNote: this call should succeed in case the property already exists.
addProperty in interface BatchparentId - NodeId identifying the parent node.propertyName - Name of the property to be created.values - The values of the property to be created.ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionPathNotFoundExceptionItemExistsExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionNode.setProperty(String, javax.jcr.Value[]),
Node.setProperty(String, javax.jcr.Value[], int),
Node.setProperty(String, String[]),
Node.setProperty(String, String[], int),
Session.importXML(String, java.io.InputStream, int)public void setValue(PropertyId propertyId, QValue value) throws RepositoryException
Batchnull value.
Removing a property is achieved by calling Batch.remove(ItemId).setValue in interface BatchpropertyId - PropertyId identifying the property to be modified.value - The new value.ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionProperty.setValue(javax.jcr.Value),
Property.setValue(String),
Property.setValue(long),
Property.setValue(double),
Property.setValue(java.util.Calendar),
Property.setValue(boolean),
Property.setValue(javax.jcr.Node)public void setValue(PropertyId propertyId, QValue[] values) throws RepositoryException
Batchnull
value. Removing a property is achieved by calling Batch.remove(ItemId).setValue in interface BatchpropertyId - PropertyId identifying the property to be modified.values - The new values.ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionProperty.setValue(javax.jcr.Value[]),
Property.setValue(String[])public void remove(ItemId itemId) throws RepositoryException
Batchremove in interface BatchitemId - ItemId identifying the item to be removed.VersionExceptionLockExceptionConstraintViolationExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionItem.remove()public void reorderNodes(NodeId parentId, NodeId srcNodeId, NodeId beforeNodeId) throws RepositoryException
BatchNodeIds.reorderNodes in interface BatchparentId - NodeId identifying the parent node.srcNodeId - NodeId identifying the node to be reordered.beforeNodeId - NodeId identifying the child node, before which the
source node must be placed.UnsupportedRepositoryOperationExceptionVersionExceptionConstraintViolationExceptionItemNotFoundExceptionLockExceptionAccessDeniedExceptionRepositoryExceptionNode.orderBefore(String, String)public void setMixins(NodeId nodeId, Name[] mixinNodeTypeNames) throws RepositoryException
BatchsetMixins in interface BatchnodeId - NodeId identifying the node to be modified.mixinNodeTypeNames - The new set of mixin types. Compared to the
previous values this may result in both adding and/or removing mixin types.NoSuchNodeTypeExceptionVersionExceptionConstraintViolationExceptionLockExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionNode.addMixin(String),
Node.removeMixin(String)public void setPrimaryType(NodeId nodeId, Name primaryNodeTypeName) throws RepositoryException
BatchnodeId.setPrimaryType in interface BatchnodeId - NodeId identifying the node to be modified.RepositoryExceptionNode.setPrimaryType(String)public void move(NodeId srcNodeId, NodeId destParentNodeId, Name destName) throws RepositoryException
BatchsrcNodeId to the
new parent identified by destParentNodeId and change its
name to destName.move in interface BatchsrcNodeId - NodeId identifying the node to be moved.destParentNodeId - NodeId identifying the new parent.destName - The new name of the moved node.ItemExistsExceptionPathNotFoundExceptionVersionExceptionConstraintViolationExceptionLockExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionSession.move(String, String)public void setTree(NodeId parentId, Tree contentTree) throws RepositoryException
BatchsetTree in interface BatchRepositoryExceptionCopyright © 2010 - 2023 Adobe. All Rights Reserved