Stellent
HowToComponents
JavaDoc

intradoc.shared
Class SecuredTreeNode

java.lang.Object
  |
  +--intradoc.shared.SecuredTreeNode

public class SecuredTreeNode
extends java.lang.Object

Used to construct a tree of nodes, with each being a secured Intra.doc! entity. This is for functionality where parts of the tree are visible only to those with sufficient privilege. The primary implementation is in the management of pages in the PageHandler class. Note1: This class was designed to optimized the computations involved in maanaging secured trees. In particular, it centralizes a lot of information that might normally be in different data structures. Note2: Subtrees are constructed by cloning the nodes and constructing new trees.


Field Summary
 int m_accessAllowed
          Access level allowed.
 java.lang.String m_accessCode
          Access code.
 java.lang.String m_account
          Account for this node.
 SecuredTreeNode m_children
          Children of node.
 java.lang.Object m_data
          Associated data with this node.
 int m_dataIndex
          Index into an external collection that holds data for this node.
 java.lang.String m_group
          Security group on this node.
 boolean m_isDeleted
          Used to mark nodes that are deleted but still reference by other nodes.
 java.lang.String m_lastModified
          Last modified marker for this node.
 java.lang.String m_name
          Unique identifier of this node.
 SecuredTreeNode m_next
          Next sibling.
 SecuredTreeNode m_parent
          Parent node.
 SecuredTreeNode m_prev
          Previous sibling.
 java.lang.String m_type
          Data or entity type.
static int MAX_CHILDREN
           
static int MAX_NESTING
           
 
Constructor Summary
SecuredTreeNode(java.lang.String name, java.lang.String type, java.lang.String group, java.lang.String account)
          Creates and initializes an instance of this class.
 
Method Summary
 void appendChild(SecuredTreeNode child)
          Append parentless node as a child.
 SecuredTreeNode createSubTreeClone()
          Creates clone to be used in creating a subtree.
 void detachFromParent()
          Detaches node from parent.
 SecuredTreeNode getRootParent()
          Gets root parent for current node.
 void replaceInTree(SecuredTreeNode newNode)
          Replaces this node with the passed node in the tree and detaches the current node from the tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_NESTING

public static final int MAX_NESTING
See Also:
Constant Field Values

MAX_CHILDREN

public static final int MAX_CHILDREN
See Also:
Constant Field Values

m_name

public java.lang.String m_name
Unique identifier of this node.


m_type

public java.lang.String m_type
Data or entity type. Used to drive application behavior. Some types of nodes require greater privileges to access or edit.


m_data

public java.lang.Object m_data
Associated data with this node. Can be null.


m_dataIndex

public int m_dataIndex
Index into an external collection that holds data for this node. This can be used as an alternative to m_data when a more indirect reference is better.


m_group

public java.lang.String m_group
Security group on this node.


m_account

public java.lang.String m_account
Account for this node.


m_accessAllowed

public int m_accessAllowed
Access level allowed. Level of privilege granted by m_group and m_account.


m_accessCode

public java.lang.String m_accessCode
Access code. This is used by application to control user interface for node. Computed by using m_accessAllowed of this node and accessAllowed levels of parents and children.


m_lastModified

public java.lang.String m_lastModified
Last modified marker for this node. Used to control when contents of node need to be refreshed.


m_isDeleted

public boolean m_isDeleted
Used to mark nodes that are deleted but still reference by other nodes. If the node is recreated at some point, a proper place for it in the tree can be found.


m_parent

public SecuredTreeNode m_parent
Parent node. Null if no parent.


m_children

public SecuredTreeNode m_children
Children of node. Children are kept in linked list so that they can be quickly added or removed.


m_prev

public SecuredTreeNode m_prev
Previous sibling. Used for linked list of siblings.


m_next

public SecuredTreeNode m_next
Next sibling. Used for linked list of siblings.

Constructor Detail

SecuredTreeNode

public SecuredTreeNode(java.lang.String name,
                       java.lang.String type,
                       java.lang.String group,
                       java.lang.String account)
Creates and initializes an instance of this class.

Method Detail

createSubTreeClone

public SecuredTreeNode createSubTreeClone()
Creates clone to be used in creating a subtree.


getRootParent

public SecuredTreeNode getRootParent()
Gets root parent for current node.


appendChild

public void appendChild(SecuredTreeNode child)
Append parentless node as a child.


detachFromParent

public void detachFromParent()
Detaches node from parent.


replaceInTree

public void replaceInTree(SecuredTreeNode newNode)
Replaces this node with the passed node in the tree and detaches the current node from the tree.



(c) 1996-2005  All rights reserved.  Stellent, Inc.