All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class uhr.core.cell.NodeCreator

java.lang.Object
   |
   +----uhr.core.cell.NodeCreator

public class NodeCreator
extends Object
implements ServiceHost, UF_StringArray
This class creates new System Tree container nodes. The cases of root nodes and "subnodes" are handled, plus convenience methods for the system startup Use Case.

Currently this only creates container nodes. Leaf nodes are created elsewhere. It's conceivable that responsiblity will move to this class.

Later we can make this ParamDriven.


Constructor Index

 o NodeCreator()

Method Index

 o createAndStartSystem(String)
Creates and starts a system using the rootDK_URL.
 o createRootNode()
Creates a root cell node with no parent node.
 o createSubcellNode(Container, String)
Creates a subcell node as a child of the parentNode, which must be a cell node itself.
 o createSystem(String)
Creates a system using the rootDK_URL.
 o get()
This uniface returns the command line args or null if none.
 o getServiceHostAide()
Returns the aide handling the ServiceHost's attractor work.
 o setCommandLineArgs(String[])
Sets the command line args for this system.

Constructors

 o NodeCreator
 public NodeCreator()

Methods

 o getServiceHostAide
 public ServiceHostAide getServiceHostAide()
Returns the aide handling the ServiceHost's attractor work. My ServiceItems are:
   Type:      uhr.uniface.UF_StringArray
   ServiceID: uhr.core.GetCommandLineArgs
 

Returns:
the aide.
 o get
 public String[] get()
This uniface returns the command line args or null if none.

Returns:
the command line args in a String array, or null if none.
 o createAndStartSystem
 public Container createAndStartSystem(String rootDK_URL)
Creates and starts a system using the rootDK_URL. This is intended to be the one line of code that's used to start the average system.

Parameters:
rootDK_URL - the dk url defining the root cell's domain parts. If null then the system contains no domain parts.
Returns:
the root node of the started system, named "Root".
 o createSystem
 public Container createSystem(String rootDK_URL)
Creates a system using the rootDK_URL. This is intended to be used by tools

Parameters:
rootDK_URL - the dk url defining the root cell's domain parts. If null then the system contains no domain parts.
Returns:
the root node of the system, named "Root".
 o createRootNode
 public Container createRootNode()
Creates a root cell node with no parent node.

Self-referential systems have serious design issues involving the root node and cell, because they have no parent to handle certain responsibilities. This means that root nodes and cells are treated differently from nodes and cells with parents. To avoid this differential behavior from destroying the integrity of a system design, some such differential work is done here. Ideally all of it would be here, but that design eludes us.

Parameters:
parentNode - the parent node of the cell node to be created or null if no parent.
Returns:
the new cell node. If a subcell, no name. If a root then the default name "Root" is set.
 o createSubcellNode
 public Container createSubcellNode(Container parentNode,
                                    String partName)
Creates a subcell node as a child of the parentNode, which must be a cell node itself. A cell node with a parent is called a subcell node.

Parameters:
parentNode - the parent node of the node to be created.
partName - the name of the new node.
Returns:
the new cell node.
 o setCommandLineArgs
 public void setCommandLineArgs(String args[])
Sets the command line args for this system. The purpose is to make them available for system parts. If there are none, then this method need not be called, or null can be used for args.

Parameters:
args - the command line args.

All Packages  Class Hierarchy  This Package  Previous  Next  Index