com.ibm.commerce.pa.widget.beans
Class TreeDataBean

java.lang.Object
  |
  +--com.ibm.commerce.pa.beans.DynamicDataBeanImpl
        |
        +--com.ibm.commerce.pa.widget.beans.TreeDataBean
All Implemented Interfaces:
CommandDataBean, DataBean, DynamicDataBean, InputDataBean, java.io.Serializable
Direct Known Subclasses:
CategoryTreeDataBean, SalesAssistantDataBean

public class TreeDataBean
extends DynamicDataBeanImpl

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
           
protected  int level
           
protected  TreeNodeDataBean root
           
 
Fields inherited from class com.ibm.commerce.pa.beans.DynamicDataBeanImpl
constraintList, defaultWidget, errorCode, errorMessage, interfaceName, metaData, pageName, parent, parentName, requestProperties, scriptName
 
Fields inherited from interface com.ibm.commerce.beans.DataBean
emptyString
 
Constructor Summary
TreeDataBean()
          TreeDataBean constructor comment.
 
Method Summary
 void copy(DynamicDataBean ds)
          Copies a databean into this databean.
 TreeNodeDataBean getChild(TreeNodeDataBean parent, int index)
          This method will return the child node at index given the parent node
 int getChildCount(TreeNodeDataBean parent)
          This method will return the number of children at a given node
 int getIndexOfChild(TreeNodeDataBean parent, TreeNodeDataBean child)
          This method will return the index of a particular child given a parent
 int getLevel()
          This method gets the level in the tree.
 TreeNodeDataBean getRoot()
          This method will return the root node of the tree
 boolean isLeaf(TreeNodeDataBean node)
          This method will determine if a particular node is a leaf node
 void setLevel(int newValue)
          This method sets the level in the tree.
 void setRoot(TreeNodeDataBean root)
          This method will identify a node as the root of the tree
 
Methods inherited from class com.ibm.commerce.pa.beans.DynamicDataBeanImpl
addConstraint, getCommandInterfaceName, getConstraintList, getDefaultWidget, getErrorCode, getErrorMessage, getMetaData, getPageName, getParent, getParentName, getRequestProperties, getScriptName, setCommandInterfaceName, setConstraintList, setDefaultWidget, setErrorCode, setErrorMessage, setMetaData, setPageName, setParent, setParentName, setRequestProperties, setScriptName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT

level

protected int level

root

protected TreeNodeDataBean root
Constructor Detail

TreeDataBean

public TreeDataBean()
TreeDataBean constructor comment.
Method Detail

copy

public void copy(DynamicDataBean ds)
Copies a databean into this databean. The databean must be a TreeDataBean.
Overrides:
copy in class DynamicDataBeanImpl
Parameters:
ds - The databean to copy.

getChild

public TreeNodeDataBean getChild(TreeNodeDataBean parent,
                                 int index)
This method will return the child node at index given the parent node
Parameters:
parent - com.ibm.commerce.beans.TreeNode
index - int
Returns:
com.ibm.commerce.beans.TreeNode

getChildCount

public int getChildCount(TreeNodeDataBean parent)
This method will return the number of children at a given node
Parameters:
parent - com.ibm.commerce.beans.TreeNode
Returns:
int

getIndexOfChild

public int getIndexOfChild(TreeNodeDataBean parent,
                           TreeNodeDataBean child)
This method will return the index of a particular child given a parent
Parameters:
parent - com.ibm.commerce.beans.TreeNode
child - com.ibm.commerce.beans.TreeNode
Returns:
int

getLevel

public int getLevel()
This method gets the level in the tree.
Returns:
int

getRoot

public TreeNodeDataBean getRoot()
This method will return the root node of the tree
Returns:
com.ibm.commerce.beans.TreeNode

isLeaf

public boolean isLeaf(TreeNodeDataBean node)
This method will determine if a particular node is a leaf node
Parameters:
node - com.ibm.commerce.beans.TreeNode
Returns:
boolean

setLevel

public void setLevel(int newValue)
This method sets the level in the tree.
Parameters:
newValue - int

setRoot

public void setRoot(TreeNodeDataBean root)
This method will identify a node as the root of the tree
Parameters:
root - com.ibm.commerce.beans.TreeNode