站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

SessionImpl - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.core.impl.tree
Class SessionImpl

java.lang.Object
  extended byorg.jboss.portal.core.impl.tree.SessionImpl
All Implemented Interfaces:
Session

public class SessionImpl
extends java.lang.Object
implements Session

Implementation of Session.


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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTree

public Tree getTree()
Description copied from interface: Session
Returns the manager this session belongs to.

Specified by:
getTree in interface Session

rollback

public void rollback()
Description copied from interface: Session
Rollback all changes made to the tree.

Specified by:
rollback in interface Session

commit

public void commit()
Description copied from interface: Session
Make all the change to the tree permanent.

Specified by:
commit in interface Session

setProperty

public void setProperty(Node node,
                        java.lang.String key,
                        java.lang.Object value)
Description copied from interface: Session
Set a property on the node.

Specified by:
setProperty in interface Session
Parameters:
node - the target node
key - the property key
value - the new property value

removeProperty

public void removeProperty(Node node,
                           java.lang.String key)
Description copied from interface: Session
Remove a property on the node.

Specified by:
removeProperty in interface Session
Parameters:
node - the target node
key - the property key

addChild

public Node addChild(Node parent,
                     java.lang.String key,
                     java.util.Map properties)
Description copied from interface: Session
Add a child to the current node.

Specified by:
addChild in interface Session
Parameters:
parent - the node that will be the parent of the newly created node
key - the node name for the parent
properties - the initial properties contained in this node
Returns:
the newly created node

createNode

public Node createNode(FQN fqn,
                       java.util.Map properties)
                throws TreeException,
                       java.lang.IllegalArgumentException,
                       java.lang.IllegalStateException
Description copied from interface: Session
Create a node and all its ancestors if they dont previously exist.

Specified by:
createNode in interface Session
Parameters:
fqn -
Returns:
Throws:
TreeException - signals the operation failed
java.lang.IllegalArgumentException - if one of the argument is null
java.lang.IllegalStateException - if the session is already terminated

removeChild

public void removeChild(Node parent,
                        java.lang.String key)
Description copied from interface: Session
Removes a child from a parent node.

Specified by:
removeChild in interface Session
Parameters:
parent - the parent node
key - the child key