com.ibm.wps.portlet.menu
Interface MenuTreeTopologyCtrl

All Known Subinterfaces:
MemoryMenuTreeTopologyCtrl

Deprecated. since 6.0. Support of the IBM portlet API may be removed in a future release of WebSphere Portal. Use of the Java Portlet API (javax.portlet) is recommended instead.

public interface MenuTreeTopologyCtrl

MenuTree providers choose to implement the MenuTreeTopologyCtrl interface if they support dynamic modification of the tree topology (note that the MenuTree interface only supports read-only access to the topology). In order to support a per-node copy operation, the object returned by MenuProvider.getMenu(com.ibm.wps.portlet.menu.MenuContext) implements the MenuTreeTopologyCtrl interface besides the MenuTree interface.

Since:
5.0
See Also:
MenuTree, MenuNode
Note:
This interface is designed to be implemented by clients.

Method Summary
 MenuNode addNode(java.lang.String id, MenuNode parent)
          Deprecated. Adds a child node to an existing parent node
 void removeNode(MenuNode node)
          Deprecated. Removes a node from an in-memory tree.
 void setScope(MenuNode node, int scope)
          Deprecated. Sets the scope of the node.
 

Method Detail

addNode

MenuNode addNode(java.lang.String id,
                 MenuNode parent)
                 throws MenuTreeException
Deprecated. 
Adds a child node to an existing parent node

Parameters:
id - node ID
parent - parent node
Returns:
child node
Throws:
MenuTreeException - not yet supported
See Also:
removeNode(com.ibm.wps.portlet.menu.MenuNode)

removeNode

void removeNode(MenuNode node)
                throws MenuTreeException
Deprecated. 
Removes a node from an in-memory tree.

Parameters:
node - node to be removed
Throws:
MenuTreeException - not yet supported
See Also:
addNode(java.lang.String, com.ibm.wps.portlet.menu.MenuNode)

setScope

void setScope(MenuNode node,
              int scope)
              throws MenuTreeException
Deprecated. 

Sets the scope of the node.

Scope can be one of the permitted values MenuNode.SCOPE_GLOBAL, MenuNode.SCOPE_SESSION, and MenuNode.SCOPE_REQUEST. If other values are specified, a MenuTreeException is thrown.

At present the scope is set for all nodes of the in-memory tree simultaneously. If MenuNode.SCOPE_REQUEST is specified, the tree is user-specific and changes of the tree are immediately displayed. In case of MenuNode.SCOPE_SESSION the tree is user-specific. However, the tree will not change as long as the user is logged in. The parameter MenuNode.SCOPE_GLOBAL ensures that the tree structure will not change until the portlet is either deactivated, deleted from the page, or the corresponding portlet application is updated or re-installed.

Parameters:
node - menu tree node
scope - scope of the tree node.
Throws:
MenuTreeException - if the scope is invalid
See Also:
MenuNode.getScope()