|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The tree session is used to group modifications made to the tree.
Method Summary | |
Node |
addChild(Node parent,
java.lang.String key,
java.util.Map properties)
Add a child to the current node. |
void |
commit()
Make all the change to the tree permanent. |
Node |
createNode(FQN fqn,
java.util.Map properties)
Create a node and all its ancestors if they dont previously exist. |
Tree |
getTree()
Returns the manager this session belongs to. |
void |
removeChild(Node parent,
java.lang.String key)
Removes a child from a parent node. |
void |
removeProperty(Node node,
java.lang.String key)
Remove a property on the node. |
void |
rollback()
Rollback all changes made to the tree. |
void |
setProperty(Node node,
java.lang.String key,
java.lang.Object value)
Set a property on the node. |
Method Detail |
public Tree getTree()
public void rollback() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if the session is already terminatedpublic void commit() throws TreeException, java.lang.IllegalStateException
TreeException
- signals the operation failed
java.lang.IllegalStateException
- if the session is already terminatedpublic void setProperty(Node node, java.lang.String key, java.lang.Object value) throws TreeException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
node
- the target nodekey
- the property keyvalue
- the new property value
TreeException
- signals the operation failed
java.lang.IllegalArgumentException
- if one of the argument is null
java.lang.IllegalStateException
- if the session is already terminatedpublic void removeProperty(Node node, java.lang.String key) throws TreeException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
node
- the target nodekey
- the property key
TreeException
- signals the operation failed
java.lang.IllegalArgumentException
- if one of the argument is null
java.lang.IllegalStateException
- if the session is already terminatedpublic Node addChild(Node parent, java.lang.String key, java.util.Map properties) throws TreeException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
parent
- the node that will be the parent of the newly created nodekey
- the node name for the parentproperties
- the initial properties contained in this node
TreeException
- signals the operation failed
java.lang.IllegalArgumentException
- if one of the argument is null
java.lang.IllegalStateException
- if the session is already terminatedpublic void removeChild(Node parent, java.lang.String key) throws TreeException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
parent
- the parent nodekey
- the child key
TreeException
- signals the operation failed
java.lang.IllegalArgumentException
- if one of the argument is null
java.lang.IllegalStateException
- if the session is already terminatedpublic Node createNode(FQN fqn, java.util.Map properties) throws TreeException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
fqn
-
TreeException
- signals the operation failed
java.lang.IllegalArgumentException
- if one of the argument is null
java.lang.IllegalStateException
- if the session is already terminated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |