|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WritablePathWorkspace
Extension of PathWorkspace
for repositories that support modification of nodes as well as access to the nodes.
Method Summary | |
---|---|
PathNode |
copyNode(ExecutionContext context,
PathNode original,
PathWorkspace originalWorkspace,
PathNode newParent,
Name desiredName,
boolean recursive)
Copy the subgraph given by the original node and place the new copy under the supplied new parent. |
PathNode |
createNode(ExecutionContext context,
PathNode parentNode,
Name name,
Map<Name,Property> properties,
NodeConflictBehavior conflictBehavior)
Create a new node with the supplied name, as a child of the supplied parent. |
PathNode |
createNode(ExecutionContext context,
String pathToNewNode,
Map<Name,Property> properties,
NodeConflictBehavior conflictBehavior)
Create a node at the supplied path. |
PathNode |
moveNode(ExecutionContext context,
PathNode node,
Name desiredNewName,
WritablePathWorkspace originalWorkspace,
PathNode newParent,
PathNode beforeNode)
Move the supplied node to the new parent within this workspace. |
boolean |
removeNode(ExecutionContext context,
Path nodePath)
Removes the node at the given path |
PathNode |
removeProperties(ExecutionContext context,
Path nodePath,
Iterable<Name> propertyNames)
Removes the properties with the given names |
PathNode |
setProperties(ExecutionContext context,
Path nodePath,
Map<Name,Property> properties)
Sets the given properties in a single operation, overwriting any previous properties for the same name. |
Methods inherited from interface org.modeshape.graph.connector.path.PathWorkspace |
---|
getLowestExistingPath, getName, getNode, lockNode, query, search, unlockNode |
Method Detail |
---|
PathNode createNode(ExecutionContext context, String pathToNewNode, Map<Name,Property> properties, NodeConflictBehavior conflictBehavior)
context
- the environment; may not be nullpathToNewNode
- the path to the new node; may not be nullproperties
- the properties for the new nodeconflictBehavior
- the expected behavior if an equivalently-named child already exists at the location
PathNode createNode(ExecutionContext context, PathNode parentNode, Name name, Map<Name,Property> properties, NodeConflictBehavior conflictBehavior)
context
- the execution contextparentNode
- the parent node; may not be nullname
- the name; may not be nullproperties
- the properties for the new nodeconflictBehavior
- the expected behavior if an equivalently-named child already exists at the location
PathNode moveNode(ExecutionContext context, PathNode node, Name desiredNewName, WritablePathWorkspace originalWorkspace, PathNode newParent, PathNode beforeNode)
index
to be correct in the new parent.
context
- node
- the node to be moved; may not be the workspace root nodedesiredNewName
- the new name for the node, if it is to be changed; may be nulloriginalWorkspace
- the workspace containing the node to be movednewParent
- the new parent; may not be the workspace root nodebeforeNode
- the node before which this new node should be placed
node
that reflects the new locationPathNode copyNode(ExecutionContext context, PathNode original, PathWorkspace originalWorkspace, PathNode newParent, Name desiredName, boolean recursive)
context
- the context; may not be nulloriginal
- the node to be copied; may not be nulloriginalWorkspace
- the workspace containing the original parent node; may not be nullnewParent
- the parent where the copy is to be placed; may not be nulldesiredName
- the desired name for the node; if null, the name will be obtained from the original noderecursive
- true if the copy should be recursive
boolean removeNode(ExecutionContext context, Path nodePath)
context
- the context; may not be nullnodePath
- the path of the node to be removed
PathNode setProperties(ExecutionContext context, Path nodePath, Map<Name,Property> properties)
context
- the context; may not be nullnodePath
- the path to the node on which the properties should be setproperties
- the properties to set
PathNode removeProperties(ExecutionContext context, Path nodePath, Iterable<Name> propertyNames)
context
- the context; may not be nullnodePath
- the path to the node from which the properties should be removedpropertyNames
- the name of the properties to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |