com.pcbsys.nirvana.nAdminAPI.nNodeUtilities Class Reference

Class that provides some utility functions for nNode operations. More...

Static Public Member Functions

static nRealmNode findParentRealmNode (nNode startNode, boolean includeLinkedNodes, boolean includeSelf)
 Traverses the node tree of the node given by startNode. More...
 
static String findPathFromRealm (nNode startNode, boolean includeLinkedNodes, boolean includeSelf)
 This method will construct a path from the parent Realm Node to the start node. More...
 

Detailed Description

Class that provides some utility functions for nNode operations.

Member Function Documentation

static nRealmNode com.pcbsys.nirvana.nAdminAPI.nNodeUtilities.findParentRealmNode ( nNode  startNode,
boolean  includeLinkedNodes,
boolean  includeSelf 
)
static

Traverses the node tree of the node given by startNode.

Each node in the tree will be tested to see if it is a instance of nRealmNode.

Parameters
startNodeThe node at the bottom of the traversal tree.
includeLinkedNodesIf true, it will include mounted realms in its search for a realm node. Setting this to false will return the base root realm node, ignoring any mount points.
includeSelfIf set to true, it will initially test itself to see if it is a realm node.
Returns
An instance of nRealmNode, representing the parent realm of the start node. If the start node does not have a realm node parent, this will return null.
static String com.pcbsys.nirvana.nAdminAPI.nNodeUtilities.findPathFromRealm ( nNode  startNode,
boolean  includeLinkedNodes,
boolean  includeSelf 
)
static

This method will construct a path from the parent Realm Node to the start node.

Parameters
startNodeThe node to start from.
includeLinkedNodesIf this is set to true, it will stop and return the path constructed when the search hits a mounted realm. Otherwise it will continue until it reaches the base realm node.
includeSelfIf this is set to true, it will include itself in the search. If startNode is a realm node it will return "/"
Returns
Returns the path from the parent realm node to the start node, with each node name separated by a '/'. If the start node does not have a parent realm node, it will return null.