Class Operations
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.batch.Operations
-
public final class Operations extends java.lang.Object
Factory for creatingOperation
s. The inner classes of this class all implement theOperation
interface. They are representatives for the method calls on aBatch
. In additionOperations.Empty
represents the empty operation which does nothing.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Operations.AddNode
Representative of an add-nodeOperation
which callsBatch.addNode(NodeId, Name, Name, String)
when applied to aBatch
.static class
Operations.AddProperty
Representative of an add-propertyOperation
which callsBatch.addProperty(NodeId, Name, QValue)
orBatch.addProperty(NodeId, Name, QValue[])
depending on whether the property is multi valued or not when applied to aBatch
.static class
Operations.Empty
static class
Operations.Move
Representative of a moveOperation
which callsBatch.move(NodeId, NodeId, Name)
when applied to aBatch
.static class
Operations.Remove
static class
Operations.ReorderNodes
Representative of a reorder-nodesOperation
which callsBatch.reorderNodes(NodeId, NodeId, NodeId)
when applied to aBatch
.static class
Operations.SetMixins
Representative of a set-mixinOperation
which callsBatch.setMixins(NodeId, Name[])
when applied to aBatch
.static class
Operations.SetPrimaryType
Representative of a set-mixinOperation
which callsBatch.setMixins(NodeId, Name[])
when applied to aBatch
.static class
Operations.SetTree
static class
Operations.SetValue
Representative of a set-valueOperation
which callsBatch.setValue(PropertyId, QValue)
orBatch.setValue(PropertyId, QValue[])
depending on whether the property is multi valued or not when applied to aBatch
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Operation
addNode(NodeId parentId, Name nodeName, Name nodetypeName, java.lang.String uuid)
Factory method for creating anOperations.AddNode
operation.static Operation
addProperty(NodeId parentId, Name propertyName, QValue value)
Factory method for creating anOperations.AddProperty
operation.static Operation
addProperty(NodeId parentId, Name propertyName, QValue[] values)
Factory method for creating anOperations.AddProperty
operation.static Operation
empty()
Factory method for creating anOperations.Empty
operation.static Operation
move(NodeId srcNodeId, NodeId destParentNodeId, Name destName)
Factory method for creating aOperations.Move
operation.static Operation
remove(ItemId itemId)
Factory method for creating aOperations.Remove
operation.static Operation
reorderNodes(NodeId parentId, NodeId srcNodeId, NodeId beforeNodeId)
Factory method for creating a reorder-nodesOperation
for the given arguments.static Operation
setMixins(NodeId nodeId, Name[] mixinNodeTypeNames)
Factory method for creating a set-mixinOperation
for the given arguments.static Operation
setPrimaryType(NodeId nodeId, Name primaryTypeName)
Factory method for creating a set-primaryTypeOperation
for the given arguments.static Operation
setTree(NodeId parentId, Tree contentTree)
Factory method for creating anOperations.SetTree
operation.static Operation
setValue(PropertyId propertyId, QValue value)
Factory method for creating set-valueOperation
for the given arguments.static Operation
setValue(PropertyId propertyId, QValue[] values)
Factory method for creating a set-valueOperation
for the given arguments.
-
-
-
Method Detail
-
empty
public static Operation empty()
Factory method for creating anOperations.Empty
operation.- Returns:
-
addNode
public static Operation addNode(NodeId parentId, Name nodeName, Name nodetypeName, java.lang.String uuid)
Factory method for creating anOperations.AddNode
operation.- Parameters:
parentId
-nodeName
-nodetypeName
-uuid
-- Returns:
- See Also:
Batch.addNode(NodeId, Name, Name, String)
-
addProperty
public static Operation addProperty(NodeId parentId, Name propertyName, QValue value)
Factory method for creating anOperations.AddProperty
operation.- Parameters:
parentId
-propertyName
-value
-- Returns:
- See Also:
Batch.addProperty(NodeId, Name, QValue)
-
addProperty
public static Operation addProperty(NodeId parentId, Name propertyName, QValue[] values)
Factory method for creating anOperations.AddProperty
operation.- Parameters:
parentId
-propertyName
-values
-- Returns:
- See Also:
Batch.addProperty(NodeId, Name, QValue[])
-
move
public static Operation move(NodeId srcNodeId, NodeId destParentNodeId, Name destName)
Factory method for creating aOperations.Move
operation.- Parameters:
srcNodeId
-destParentNodeId
-destName
-- Returns:
- See Also:
Batch.move(NodeId, NodeId, Name)
-
remove
public static Operation remove(ItemId itemId)
Factory method for creating aOperations.Remove
operation.- Parameters:
itemId
-- Returns:
- See Also:
Batch.move(NodeId, NodeId, Name)
-
reorderNodes
public static Operation reorderNodes(NodeId parentId, NodeId srcNodeId, NodeId beforeNodeId)
Factory method for creating a reorder-nodesOperation
for the given arguments.- Parameters:
parentId
-srcNodeId
-beforeNodeId
-- Returns:
- See Also:
Batch.reorderNodes(NodeId, NodeId, NodeId)
-
setMixins
public static Operation setMixins(NodeId nodeId, Name[] mixinNodeTypeNames)
Factory method for creating a set-mixinOperation
for the given arguments.- Parameters:
nodeId
-mixinNodeTypeNames
-- Returns:
- See Also:
Batch.setMixins(NodeId, Name[])
-
setPrimaryType
public static Operation setPrimaryType(NodeId nodeId, Name primaryTypeName)
Factory method for creating a set-primaryTypeOperation
for the given arguments.- Parameters:
nodeId
-primaryTypeName
-- Returns:
- See Also:
Batch.setPrimaryType(NodeId, Name)
-
setValue
public static Operation setValue(PropertyId propertyId, QValue value)
Factory method for creating set-valueOperation
for the given arguments.- Parameters:
propertyId
-value
-- Returns:
- See Also:
Batch.setValue(PropertyId, QValue)
-
setValue
public static Operation setValue(PropertyId propertyId, QValue[] values)
Factory method for creating a set-valueOperation
for the given arguments.- Parameters:
propertyId
-values
-- Returns:
- See Also:
Batch.setValue(PropertyId, QValue[])
-
setTree
public static Operation setTree(NodeId parentId, Tree contentTree)
Factory method for creating anOperations.SetTree
operation.
-
-