com.webmethods.caf.faces.data.csp
Class CSPNode

java.lang.Object
  extended by com.webmethods.caf.faces.data.csp.CSPNode
All Implemented Interfaces:
INode, Serializable

public class CSPNode
extends Object
implements INode, Serializable

All CSPContent in CSP are logically stored in tree-hierarchy.This class is a wrapper of the tree node.

See Also:
Serialized Form

Constructor Summary
CSPNode(int id, String name, CSPNode parent)
           
 
Method Summary
 void addChild(CSPNode child)
           
 CSPAccessRights getAccessRights()
           
 List getChildren()
          List of INode children, in order.
 String getContentDefinition()
          Each Node has its own Content Definition that keeps information about where CSPContent is stored and its meta-data.
 Object getData()
          Row data.
 String getFullPath()
          Returns the fullPath for this CSPNode separated by '/'.
 boolean getHasChildren()
           
 String getId()
          Row id.
 String getName()
           
 CSPNode getParent()
          Node parent, or null for root.
 boolean hasChildren()
           
 void setAccessRights(CSPAccessRights accessRights)
           
 void setContentDefinition(String contentDefinition)
           
 void setId(String id)
           
 void setName(String name)
           
 void setParent(CSPNode parent)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CSPNode

public CSPNode(int id,
               String name,
               CSPNode parent)
Method Detail

setParent

public void setParent(CSPNode parent)

getParent

public CSPNode getParent()
Description copied from interface: INode
Node parent, or null for root.

Specified by:
getParent in interface INode

setName

public void setName(String name)

setAccessRights

public void setAccessRights(CSPAccessRights accessRights)

getName

public String getName()

addChild

public void addChild(CSPNode child)

getChildren

public List getChildren()
Description copied from interface: INode
List of INode children, in order. Empty list (non-null) for leaf nodes.

Specified by:
getChildren in interface INode

hasChildren

public boolean hasChildren()

getHasChildren

public boolean getHasChildren()

toString

public String toString()
Overrides:
toString in class Object

setId

public void setId(String id)

getId

public String getId()
Description copied from interface: INode
Row id.

Specified by:
getId in interface INode
Returns:
The Node id.

getData

public Object getData()
Description copied from interface: INode
Row data.

Specified by:
getData in interface INode

setContentDefinition

public void setContentDefinition(String contentDefinition)

getContentDefinition

public String getContentDefinition()
Each Node has its own Content Definition that keeps information about where CSPContent is stored and its meta-data.

Returns:
Content Definition

getAccessRights

public CSPAccessRights getAccessRights()

getFullPath

public String getFullPath()
Returns the fullPath for this CSPNode separated by '/'. Example: If the following hierarchy is present:
 
        CSPNode with name = rootNode
                CSPNode with name = node1
                        CSPNode with name = node21
 
 
The call to CSPNode.getFullPath() will return - /rootNode/node1/node21

Returns:
The tree hierarchy for this CSPNode separated by '/'