|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.dna.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 |
materialize(Node persistentNode,
GraphSession.Node<Payload,PropertyPayload> node)
Update 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 location has 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)
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 |
---|
equals, 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.jboss.dna.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.jboss.dna.graph.Location)
public void preSave(GraphSession.Node<Payload,PropertyPayload> node) throws ValidationException
preSave
in interface GraphSession.Operations<Payload,PropertyPayload>
node
- the node to be validated
ValidationException
- if there is a problem during validationGraphSession.Operations.preSave(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>
ValidationException
org.jboss.dna.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.jboss.dna.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>
ValidationException
org.jboss.dna.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.jboss.dna.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.jboss.dna.graph.session.GraphSession.Node,
org.jboss.dna.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.jboss.dna.graph.session.GraphSession.Node,
org.jboss.dna.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.jboss.dna.graph.session.GraphSession.Node,
org.jboss.dna.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
ValidationException
GraphSession.Operations.postCopy(org.jboss.dna.graph.session.GraphSession.Node,
org.jboss.dna.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.jboss.dna.graph.session.GraphSession.Node,
org.jboss.dna.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.jboss.dna.graph.session.GraphSession.Node,
org.jboss.dna.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.jboss.dna.graph.session.GraphSession.Node,
org.jboss.dna.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.jboss.dna.graph.session.GraphSession.Node,
org.jboss.dna.graph.session.GraphSession.Node)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |