public final class SiteNode extends Object implements Comparable, Cloneable
| Constructor and Description |
|---|
SiteNode()
Construct a new root SiteNode.
|
SiteNode(SiteNode node)
Construct a deep copy of the node.
|
SiteNode(SiteNodeController controller)
Construct a new SiteNode for the controller.
|
SiteNode(String path)
Construct a new site node with the specified path.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addNode(SiteNode node)
Add the node as a child of this node.
|
protected Object |
clone()
Create a deep copy of this node.
|
int |
compareTo(Object o)
Compare this node to another node.
|
SiteNode |
findSiteNode(String path)
Find the site node matching the path.
|
SiteNodeController |
getController()
Get the controller for this node.
|
SiteNodeController |
getController(String path)
Get the controller for the node specified by the path (see
findSiteNode(String) for a description how the path is processed. |
String |
getFullPath()
Get the full path to the node, including the path's of all parents.
|
SiteNode |
getNode(String name)
Get the child site node with the specified name.
|
Collection |
getNodes()
Get the collection of child nodes.
|
SiteNode |
getParent() |
String |
getPath()
Get the path for the node relative to the parenr node.
|
boolean |
hasController()
Check to see if this node has a controller.
|
boolean |
hasParent()
Check to see if this node has a parent.
|
protected void |
mergeNode(SiteNode node)
Merge the values of the specified node with this node.
|
void |
setController(SiteNodeController controller)
Set the controller for this node.
|
void |
setController(String path,
SiteNodeController controller)
Set the controller for the node specified by the path name.
|
void |
setNode(String path,
SiteNode node)
Set the node for the specified path.
|
void |
setNodes(Collection nodes)
Set the child site nodes.
|
void |
setParent(SiteNode parent) |
void |
setPath(String path) |
String |
toString()
Get the string representation of the node.
|
public SiteNode()
public SiteNode(SiteNode node)
node - The node to copy.public SiteNode(SiteNodeController controller)
controller - The controller.public SiteNode(String path)
path - The path.protected void addNode(SiteNode node)
node - The node.protected Object clone()
public int compareTo(Object o)
compareTo in interface Comparableo - The object to compare.public SiteNode findSiteNode(String path)
path - The path.public SiteNodeController getController()
public SiteNodeController getController(String path)
findSiteNode(String) for a description how the path is processed.path - The path.public String getFullPath()
public SiteNode getNode(String name)
findSiteNode(String) to get a child node
using a path.name - The child node name.public Collection getNodes()
public SiteNode getParent()
public String getPath()
public boolean hasController()
public boolean hasParent()
protected void mergeNode(SiteNode node)
node - The node to merge from.public void setController(SiteNodeController controller)
controller - The controller.public void setController(String path, SiteNodeController controller)
setNode(String, SiteNode) for details on how the
controller for the node is set.path - The path.controller - The controller.public void setNode(String path, SiteNode node)
path - The path.node - The node.public void setNodes(Collection nodes)
SiteNode or
SiteNodeController instances. If the node's path contains a '/'
character a node will be created for each element of the path. For
SiteNodeController instances the node from the controller will be
merged with the existing node for the path if a node with that path already
existed.nodes - The site nodespublic void setParent(SiteNode parent)
parent - The parent to set.public void setPath(String path)
path - The path to set.Copyright © 2015 Revolution Systems Inc.. All rights reserved.