Class 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

      Nested Classes 
      Modifier and Type Class Description
      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.SetTree  
      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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Operation addNode​(org.apache.jackrabbit.spi.NodeId parentId, org.apache.jackrabbit.spi.Name nodeName, org.apache.jackrabbit.spi.Name nodetypeName, String uuid)
      Factory method for creating an Operations.AddNode operation.
      static Operation addProperty​(org.apache.jackrabbit.spi.NodeId parentId, org.apache.jackrabbit.spi.Name propertyName, org.apache.jackrabbit.spi.QValue value)
      Factory method for creating an Operations.AddProperty operation.
      static Operation addProperty​(org.apache.jackrabbit.spi.NodeId parentId, org.apache.jackrabbit.spi.Name propertyName, org.apache.jackrabbit.spi.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​(org.apache.jackrabbit.spi.NodeId srcNodeId, org.apache.jackrabbit.spi.NodeId destParentNodeId, org.apache.jackrabbit.spi.Name destName)
      Factory method for creating a Operations.Move operation.
      static Operation remove​(org.apache.jackrabbit.spi.ItemId itemId)
      Factory method for creating a Operations.Remove operation.
      static Operation reorderNodes​(org.apache.jackrabbit.spi.NodeId parentId, org.apache.jackrabbit.spi.NodeId srcNodeId, org.apache.jackrabbit.spi.NodeId beforeNodeId)
      Factory method for creating a reorder-nodes Operation for the given arguments.
      static Operation setMixins​(org.apache.jackrabbit.spi.NodeId nodeId, org.apache.jackrabbit.spi.Name[] mixinNodeTypeNames)
      Factory method for creating a set-mixin Operation for the given arguments.
      static Operation setPrimaryType​(org.apache.jackrabbit.spi.NodeId nodeId, org.apache.jackrabbit.spi.Name primaryTypeName)
      Factory method for creating a set-primaryType Operation for the given arguments.
      static Operation setTree​(org.apache.jackrabbit.spi.NodeId parentId, org.apache.jackrabbit.spi.Tree contentTree)
      Factory method for creating an Operations.SetTree operation.
      static Operation setValue​(org.apache.jackrabbit.spi.PropertyId propertyId, org.apache.jackrabbit.spi.QValue value)
      Factory method for creating set-value Operation for the given arguments.
      static Operation setValue​(org.apache.jackrabbit.spi.PropertyId propertyId, org.apache.jackrabbit.spi.QValue[] values)
      Factory method for creating a set-value Operation for the given arguments.
    • Method Detail

      • addNode

        public static Operation addNode​(org.apache.jackrabbit.spi.NodeId parentId,
                                        org.apache.jackrabbit.spi.Name nodeName,
                                        org.apache.jackrabbit.spi.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​(org.apache.jackrabbit.spi.NodeId parentId,
                                            org.apache.jackrabbit.spi.Name propertyName,
                                            org.apache.jackrabbit.spi.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​(org.apache.jackrabbit.spi.NodeId parentId,
                                            org.apache.jackrabbit.spi.Name propertyName,
                                            org.apache.jackrabbit.spi.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​(org.apache.jackrabbit.spi.NodeId srcNodeId,
                                     org.apache.jackrabbit.spi.NodeId destParentNodeId,
                                     org.apache.jackrabbit.spi.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​(org.apache.jackrabbit.spi.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​(org.apache.jackrabbit.spi.NodeId parentId,
                                             org.apache.jackrabbit.spi.NodeId srcNodeId,
                                             org.apache.jackrabbit.spi.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​(org.apache.jackrabbit.spi.NodeId nodeId,
                                          org.apache.jackrabbit.spi.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​(org.apache.jackrabbit.spi.NodeId nodeId,
                                               org.apache.jackrabbit.spi.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​(org.apache.jackrabbit.spi.PropertyId propertyId,
                                         org.apache.jackrabbit.spi.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​(org.apache.jackrabbit.spi.PropertyId propertyId,
                                         org.apache.jackrabbit.spi.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)
      • setTree

        public static Operation setTree​(org.apache.jackrabbit.spi.NodeId parentId,
                                        org.apache.jackrabbit.spi.Tree contentTree)
        Factory method for creating an Operations.SetTree operation.
        See Also:
        Batch.addNode(NodeId, Name, Name, String)