| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.graph.session.GraphSession.NodeOperations<Payload,PropertyPayload>
Payload - the type of node payload objectPropertyPayload - the type of property payload object@ThreadSafe public static class GraphSession.NodeOperations<Payload,PropertyPayload>

A default implementation of GraphSession.Operations that provides all the basic functionality required by a graph
 session. In this implementation, only the materialize(...) method does something.
| Constructor Summary | |
|---|---|
| GraphSession.NodeOperations() | |
| Method Summary | |
|---|---|
|  void | compute(Graph.Batch batch,
        GraphSession.Node<Payload,PropertyPayload> node)Update any computed fields based on the given node | 
|  void | materialize(Node persistentNode,
            GraphSession.Node<Payload,PropertyPayload> node)Update the children and properties for the node with the information from the persistent store. | 
|  void | materializeProperties(Node persistentNode,
                      GraphSession.Node<Payload,PropertyPayload> node)Update the properties ONLY for the node with the information from the persistent store. | 
|  void | postCopy(GraphSession.Node<Payload,PropertyPayload> original,
         GraphSession.Node<Payload,PropertyPayload> copy)Notify that an existing child will be copied with the new copy being placed under the supplied parent. | 
|  void | postCreateChild(GraphSession.Node<Payload,PropertyPayload> parent,
                GraphSession.Node<Payload,PropertyPayload> childChild,
                Map<Name,GraphSession.PropertyInfo<PropertyPayload>> properties)Notify that a new child has been added to the supplied parent node. | 
|  void | postMove(GraphSession.Node<Payload,PropertyPayload> movedNode,
         GraphSession.Node<Payload,PropertyPayload> oldParent)Notify that an existing child has been moved from the supplied previous parent into its new location. | 
|  void | postRemoveChild(GraphSession.Node<Payload,PropertyPayload> parent,
                GraphSession.Node<Payload,PropertyPayload> oldChild)Notify that an existing child has been removed from the supplied parent. | 
|  void | postRemoveProperty(GraphSession.Node<Payload,PropertyPayload> node,
                   Name propertyName,
                   GraphSession.PropertyInfo<PropertyPayload> oldProperty) | 
|  void | postSetProperty(GraphSession.Node<Payload,PropertyPayload> node,
                Name propertyName,
                GraphSession.PropertyInfo<PropertyPayload> oldProperty) | 
|  void | postUpdateLocation(GraphSession.Node<Payload,PropertyPayload> node,
                   Location oldLocation)Signal that the node's locationhas been changed | 
|  void | preCopy(GraphSession.Node<Payload,PropertyPayload> original,
        GraphSession.Node<Payload,PropertyPayload> newParent)Notify that an existing child will be copied with the new copy being placed under the supplied parent. | 
|  void | preCreateChild(GraphSession.Node<Payload,PropertyPayload> parent,
               Path.Segment newChild,
               Map<Name,GraphSession.PropertyInfo<PropertyPayload>> properties)Notify that a new child with the supplied path segment is about to be created. | 
|  void | preMove(GraphSession.Node<Payload,PropertyPayload> nodeToBeMoved,
        GraphSession.Node<Payload,PropertyPayload> newParent)Notify that an existing child will be moved from its current parent and placed under the supplied parent. | 
|  void | preRemoveChild(GraphSession.Node<Payload,PropertyPayload> parent,
               GraphSession.Node<Payload,PropertyPayload> newChild)Notify that an existing child will be removed from the supplied parent. | 
|  void | preRemoveProperty(GraphSession.Node<Payload,PropertyPayload> node,
                  Name propertyName) | 
|  void | preSave(GraphSession.Node<Payload,PropertyPayload> node,
        DateTime saveTime)Validate a node for consistency and well-formedness. | 
|  void | preSetProperty(GraphSession.Node<Payload,PropertyPayload> node,
               Name propertyName,
               GraphSession.PropertyInfo<PropertyPayload> newProperty) | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public GraphSession.NodeOperations()
| Method Detail | 
|---|
public void materialize(Node persistentNode,
                        GraphSession.Node<Payload,PropertyPayload> node)
materialize in interface GraphSession.Operations<Payload,PropertyPayload>persistentNode - the persistent node that should be converted into a node info; never nullnode - the session's node representation that is to be updated; never nullGraphSession.Operations.materialize(org.modeshape.graph.Node, GraphSession.Node)
public void materializeProperties(Node persistentNode,
                                  GraphSession.Node<Payload,PropertyPayload> node)
materializeProperties in interface GraphSession.Operations<Payload,PropertyPayload>persistentNode - the persistent node that should be converted into a node info; never nullnode - the session's node representation that is to be updated; never nullGraphSession.Operations.materializeProperties(org.modeshape.graph.Node, GraphSession.Node)
public void postUpdateLocation(GraphSession.Node<Payload,PropertyPayload> node,
                               Location oldLocation)
location has been changed
postUpdateLocation in interface GraphSession.Operations<Payload,PropertyPayload>node - the node with the new locationoldLocation - the old location of the nodeGraphSession.Operations.postUpdateLocation(GraphSession.Node, org.modeshape.graph.Location)
public void preSave(GraphSession.Node<Payload,PropertyPayload> node,
                    DateTime saveTime)
             throws ValidationException
preSave in interface GraphSession.Operations<Payload,PropertyPayload>node - the node to be validatedsaveTime - the time at which the save operation is occurring; never null
ValidationException - if there is a problem during validationGraphSession.Operations.preSave(GraphSession.Node,DateTime)
public void compute(Graph.Batch batch,
                    GraphSession.Node<Payload,PropertyPayload> node)
compute in interface GraphSession.Operations<Payload,PropertyPayload>batch - the workspace graph batch in which computed fields should be creatednode - the node form which computed fields will be derivedGraphSession.Operations.compute(Graph.Batch, GraphSession.Node)
public void preSetProperty(GraphSession.Node<Payload,PropertyPayload> node,
                           Name propertyName,
                           GraphSession.PropertyInfo<PropertyPayload> newProperty)
                    throws ValidationException
preSetProperty in interface GraphSession.Operations<Payload,PropertyPayload>ValidationExceptionorg.modeshape.graph.session.GraphSession.Operations#preSetProperty(Node, Name, PropertyInfo)
public void postSetProperty(GraphSession.Node<Payload,PropertyPayload> node,
                            Name propertyName,
                            GraphSession.PropertyInfo<PropertyPayload> oldProperty)
postSetProperty in interface GraphSession.Operations<Payload,PropertyPayload>org.modeshape.graph.session.GraphSession.Operations#postSetProperty(Node, Name, PropertyInfo)
public void preRemoveProperty(GraphSession.Node<Payload,PropertyPayload> node,
                              Name propertyName)
                       throws ValidationException
preRemoveProperty in interface GraphSession.Operations<Payload,PropertyPayload>ValidationExceptionorg.modeshape.graph.session.GraphSession.Operations#preRemoveProperty(Node, Name)
public void postRemoveProperty(GraphSession.Node<Payload,PropertyPayload> node,
                               Name propertyName,
                               GraphSession.PropertyInfo<PropertyPayload> oldProperty)
postRemoveProperty in interface GraphSession.Operations<Payload,PropertyPayload>org.modeshape.graph.session.GraphSession.Operations#postRemoveProperty(Node, Name, PropertyInfo)
public void preCreateChild(GraphSession.Node<Payload,PropertyPayload> parent,
                           Path.Segment newChild,
                           Map<Name,GraphSession.PropertyInfo<PropertyPayload>> properties)
                    throws ValidationException
preCreateChild in interface GraphSession.Operations<Payload,PropertyPayload>parent - the parent node; never nullnewChild - the path segment for the new child; never nullproperties - the initial properties for the new child, which can be manipulated directly; never null
ValidationException - if the parent may not have a child with the supplied name and the creation of the new node
         should be abortedGraphSession.Operations.preCreateChild(org.modeshape.graph.session.GraphSession.Node,
      org.modeshape.graph.property.Path.Segment, java.util.Map)
public void postCreateChild(GraphSession.Node<Payload,PropertyPayload> parent,
                            GraphSession.Node<Payload,PropertyPayload> childChild,
                            Map<Name,GraphSession.PropertyInfo<PropertyPayload>> properties)
                     throws ValidationException
payload.
postCreateChild in interface GraphSession.Operations<Payload,PropertyPayload>parent - the parent node; never nullchildChild - the child that was just added to the parent node; never nullproperties - the properties of the child, which can be manipulated directly; never null
ValidationException - if the parent and child are not valid and the creation of the new node should be abortedGraphSession.Operations.postCreateChild(org.modeshape.graph.session.GraphSession.Node,
      org.modeshape.graph.session.GraphSession.Node, java.util.Map)
public void preCopy(GraphSession.Node<Payload,PropertyPayload> original,
                    GraphSession.Node<Payload,PropertyPayload> newParent)
             throws ValidationException
preCopy in interface GraphSession.Operations<Payload,PropertyPayload>original - the existing node that is to be copied; never nullnewParent - the parent node where the copy is to be placed; never null
ValidationException - if the copy is not validGraphSession.Operations.preCopy(org.modeshape.graph.session.GraphSession.Node,
      org.modeshape.graph.session.GraphSession.Node)
public void postCopy(GraphSession.Node<Payload,PropertyPayload> original,
                     GraphSession.Node<Payload,PropertyPayload> copy)
              throws ValidationException
postCopy in interface GraphSession.Operations<Payload,PropertyPayload>original - the original node that was copied; never nullcopy - the new copy that was made; never null
ValidationExceptionGraphSession.Operations.postCopy(org.modeshape.graph.session.GraphSession.Node,
      org.modeshape.graph.session.GraphSession.Node)
public void preMove(GraphSession.Node<Payload,PropertyPayload> nodeToBeMoved,
                    GraphSession.Node<Payload,PropertyPayload> newParent)
             throws ValidationException
preMove in interface GraphSession.Operations<Payload,PropertyPayload>nodeToBeMoved - the existing node that is to be moved from its current parent to the supplied parent; never nullnewParent - the new parent node; never null
ValidationException - if the child should not be movedGraphSession.Operations.preMove(org.modeshape.graph.session.GraphSession.Node,
      org.modeshape.graph.session.GraphSession.Node)
public void postMove(GraphSession.Node<Payload,PropertyPayload> movedNode,
                     GraphSession.Node<Payload,PropertyPayload> oldParent)
postMove in interface GraphSession.Operations<Payload,PropertyPayload>movedNode - the existing node that is was moved; never nulloldParent - the old parent node; never nullGraphSession.Operations.postMove(org.modeshape.graph.session.GraphSession.Node,
      org.modeshape.graph.session.GraphSession.Node)
public void preRemoveChild(GraphSession.Node<Payload,PropertyPayload> parent,
                           GraphSession.Node<Payload,PropertyPayload> newChild)
                    throws ValidationException
preRemoveChild in interface GraphSession.Operations<Payload,PropertyPayload>parent - the parent node; never nullnewChild - the child that is to be removed from the parent node; never null
ValidationException - if the child should not be removed from the parent nodeGraphSession.Operations.preRemoveChild(org.modeshape.graph.session.GraphSession.Node,
      org.modeshape.graph.session.GraphSession.Node)
public void postRemoveChild(GraphSession.Node<Payload,PropertyPayload> parent,
                            GraphSession.Node<Payload,PropertyPayload> oldChild)
stale.
postRemoveChild in interface GraphSession.Operations<Payload,PropertyPayload>parent - the parent node; never nulloldChild - the child that is to be removed from the parent node; never nullGraphSession.Operations.postRemoveChild(org.modeshape.graph.session.GraphSession.Node,
      org.modeshape.graph.session.GraphSession.Node)| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||