com.bea.security.entitlements.admin.rbac
Class TreeNodeWithSelection

java.lang.Object
  extended byorg.apache.myfaces.custom.tree2.TreeNodeBase
      extended bycom.bea.security.entitlements.admin.rbac.TreeNodeWithSelection
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable, org.apache.myfaces.custom.tree2.TreeNode
Direct Known Subclasses:
BaseTreeNode

public class TreeNodeWithSelection
extends org.apache.myfaces.custom.tree2.TreeNodeBase
implements java.io.Serializable, java.lang.Comparable

TreeNode with selection is an extension of the JSF tree that allows for selecting a node on the tree using checkboxes.

See Also:
Serialized Form

Constructor Summary
TreeNodeWithSelection()
          Default constructor
TreeNodeWithSelection(java.lang.String type, java.lang.String description, boolean leaf)
          Constructor to crate node with selection
TreeNodeWithSelection(java.lang.String type, java.lang.String description, java.lang.String identifier, boolean leaf)
          Constructor for a given type and identifier
TreeNodeWithSelection(TreeNodeWithSelection parentNode, java.lang.String type, java.lang.String description, boolean leaf)
          Constructor for a given type and parent
 
Method Summary
 int compareTo(java.lang.Object node)
          Compare this node to another node
 TreeNodeWithSelection getNodeByName(java.lang.String name)
          given a name of the node, recurse and return the tree node instance
 TreeNodeWithSelection getParent()
          Return parent node for this node
 boolean isSelected()
          Returns whether this particular node in the tree has been selected or not.
 void removeNode(TreeNodeWithSelection node)
          Remove given node from the tree
 void setChildrenSelectedRecursively()
          Recursivley go through the tree and mark all children as selected nodes.
 void setNeedUpdateChildren(boolean isNeedUpdate)
          Set the need to update children flag to true
 void setParent(TreeNodeWithSelection parent)
          Set parent node for this node
 void setSelected(boolean selected)
          Sets this node to be a selected node in the tree.
 
Methods inherited from class org.apache.myfaces.custom.tree2.TreeNodeBase
getChildCount, getChildren, getDescription, getIdentifier, getType, isLeaf, setDescription, setIdentifier, setLeaf, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeNodeWithSelection

public TreeNodeWithSelection()
Default constructor


TreeNodeWithSelection

public TreeNodeWithSelection(java.lang.String type,
                             java.lang.String description,
                             boolean leaf)
Constructor to crate node with selection

Parameters:
type - type of the node for example "Role" or "PermossionSet" etc
description - description to use
leaf - true if leaf, false otherwise

TreeNodeWithSelection

public TreeNodeWithSelection(java.lang.String type,
                             java.lang.String description,
                             java.lang.String identifier,
                             boolean leaf)
Constructor for a given type and identifier

Parameters:
type - type of the node for example "Role" or "PermossionSet" etc
description - description to use
identifier - identifier for node
leaf - true if leaf, false otherwise

TreeNodeWithSelection

public TreeNodeWithSelection(TreeNodeWithSelection parentNode,
                             java.lang.String type,
                             java.lang.String description,
                             boolean leaf)
Constructor for a given type and parent

Parameters:
parentNode - parent node to set
type - type of the node for example "Role" or "PermossionSet" etc
description - description to use
leaf - true if leaf, false otherwise
Method Detail

compareTo

public int compareTo(java.lang.Object node)
Compare this node to another node

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
node - other node instance of TreeNodeWithSelection

getNodeByName

public TreeNodeWithSelection getNodeByName(java.lang.String name)
given a name of the node, recurse and return the tree node instance

Parameters:
name - Name to recurse
Returns:
TreeNodeWithSelection if found, null otherwise

getParent

public TreeNodeWithSelection getParent()
Return parent node for this node

Returns:
parent node

isSelected

public boolean isSelected()
Returns whether this particular node in the tree has been selected or not.

Returns:
true if selected, false otherwise

removeNode

public void removeNode(TreeNodeWithSelection node)
Remove given node from the tree

Parameters:
node - Node to remove

setChildrenSelectedRecursively

public void setChildrenSelectedRecursively()
Recursivley go through the tree and mark all children as selected nodes.


setNeedUpdateChildren

public void setNeedUpdateChildren(boolean isNeedUpdate)
Set the need to update children flag to true

Parameters:
isNeedUpdate - true to update, false otherwise

setParent

public void setParent(TreeNodeWithSelection parent)
Set parent node for this node

Parameters:
parent - parent node to set

setSelected

public void setSelected(boolean selected)
Sets this node to be a selected node in the tree.

Parameters:
selected - true if selected, false otherwise


Copyright © 2007 BEA Systems Inc. All Rights Reserved.