org.apache.jackrabbit.spi.commons.batch
Class Operations

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.batch.Operations

public final class Operations
extends Object

Factory for creating Operations. The inner classes of this class all implement the Operation interface. They are representatives for the method calls on a Batch. In addition Operations.Empty represents the empty operation which does nothing.


Nested Class Summary
static class Operations.AddNode
          Representative of an add-node Operation which calls Batch.addNode(NodeId, Name, Name, String) when applied to a Batch.
static class Operations.AddProperty
          Representative of an add-property Operation which calls Batch.addProperty(NodeId, Name, QValue) or Batch.addProperty(NodeId, Name, QValue[]) depending on whether the property is multi valued or not when applied to a Batch.
static class Operations.Empty
          Representative of the empty Operation which does nothing when applied to a Batch.
static class Operations.Move
          Representative of a move Operation which calls Batch.move(NodeId, NodeId, Name) when applied to a Batch.
static class Operations.Remove
          Representative of a remove Operation which calls Batch.remove(ItemId) when applied to a Batch.
static class Operations.ReorderNodes
          Representative of a reorder-nodes Operation which calls Batch.reorderNodes(NodeId, NodeId, NodeId) when applied to a Batch.
static class Operations.SetMixins
          Representative of a set-mixin Operation which calls Batch.setMixins(NodeId, Name[]) when applied to a Batch.
static class Operations.SetPrimaryType
          Representative of a set-mixin Operation which calls Batch.setMixins(NodeId, Name[]) when applied to a Batch.
static class Operations.SetValue
          Representative of a set-value Operation which calls Batch.setValue(PropertyId, QValue) or Batch.setValue(PropertyId, QValue[]) depending on whether the property is multi valued or not when applied to a Batch.
 
Method Summary
static Operation addNode(NodeId parentId, Name nodeName, Name nodetypeName, String uuid)
          Factory method for creating an Operations.AddNode operation.
static Operation addProperty(NodeId parentId, Name propertyName, QValue value)
          Factory method for creating an Operations.AddProperty operation.
static Operation addProperty(NodeId parentId, Name propertyName, QValue[] values)
          Factory method for creating an Operations.AddProperty operation.
static Operation empty()
          Factory method for creating an Operations.Empty operation.
protected static boolean equals(Object o1, Object o2)
           
protected static int hashCode(Object o)
           
static Operation move(NodeId srcNodeId, NodeId destParentNodeId, Name destName)
          Factory method for creating a Operations.Move operation.
static Operation remove(ItemId itemId)
          Factory method for creating a Operations.Remove operation.
static Operation reorderNodes(NodeId parentId, NodeId srcNodeId, NodeId beforeNodeId)
          Factory method for creating a reorder-nodes Operation for the given arguments.
static Operation setMixins(NodeId nodeId, Name[] mixinNodeTypeNames)
          Factory method for creating a set-mixin Operation for the given arguments.
static Operation setPrimaryType(NodeId nodeId, Name primaryTypeName)
          Factory method for creating a set-primaryType Operation for the given arguments.
static Operation setValue(PropertyId propertyId, QValue value)
          Factory method for creating set-value Operation for the given arguments.
static Operation setValue(PropertyId propertyId, QValue[] values)
          Factory method for creating a set-value Operation for the given arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

empty

public static Operation empty()
Factory method for creating an Operations.Empty operation.

Returns:

addNode

public static Operation addNode(NodeId parentId,
                                Name nodeName,
                                Name nodetypeName,
                                String uuid)
Factory method for creating an Operations.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 an Operations.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 an Operations.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 a Operations.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 a Operations.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-nodes Operation 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-mixin Operation 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-primaryType Operation 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-value Operation 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-value Operation for the given arguments.

Parameters:
propertyId -
values -
Returns:
See Also:
Batch.setValue(PropertyId, QValue[])

equals

protected static boolean equals(Object o1,
                                Object o2)

hashCode

protected static int hashCode(Object o)


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.