|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectconsciouscode.seedling.Nodes
public class Nodes
Utility methods for working with nodes in a Seedling container.
Constructor Summary | |
---|---|
Nodes()
|
Method Summary | ||
---|---|---|
static
|
availableChild(BranchNode branch,
String name)
|
|
static
|
availablePath(BranchNode branch,
NodePath path)
|
|
static
|
availablePath(BranchNode branch,
String path)
|
|
static void |
installChild(BranchNode branch,
String name,
Object node)
Attempts to install a child into a given branch by downcasting it to GrowingBranch . |
|
static
|
installedChild(BranchNode branch,
String name)
|
|
static
|
installedPath(BranchNode branch,
NodePath path)
|
|
static
|
installedPath(BranchNode branch,
String path)
|
|
static void |
installNode(NodeReference reference,
Object node)
Installs a node at a given reference. |
|
static void |
installPath(BranchNode branch,
NodePath nodePath,
Object node)
Installs a node at a given location. |
|
static void |
installPath(BranchNode branch,
String path,
Object node)
Installs a node at a given location. |
|
static
|
requiredChild(BranchNode branch,
String name)
|
|
static BranchNode |
requiredChildBranch(BranchNode branch,
String name)
Provisions and installs a child branch. |
|
static
|
requiredPath(BranchNode branch,
NodePath path)
|
|
static
|
requiredPath(BranchNode branch,
String path)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Nodes()
Method Detail |
---|
public static <T> T availableChild(BranchNode branch, String name) throws NoSuchNodeException, NodeProvisioningException
NoSuchNodeException
NodeProvisioningException
public static <T> T availablePath(BranchNode branch, String path) throws NoSuchNodeException, NodeProvisioningException
NoSuchNodeException
NodeProvisioningException
public static <T> T availablePath(BranchNode branch, NodePath path) throws NoSuchNodeException, NodeProvisioningException
NoSuchNodeException
NodeProvisioningException
public static <T> T installedChild(BranchNode branch, String name)
public static <T> T installedPath(BranchNode branch, String path)
public static <T> T installedPath(BranchNode branch, NodePath path)
public static <T> T requiredChild(BranchNode branch, String name) throws NoSuchNodeException, NodeProvisioningException
NoSuchNodeException
NodeProvisioningException
public static <T> T requiredPath(BranchNode branch, String path) throws NoSuchNodeException, NodeProvisioningException
NoSuchNodeException
NodeProvisioningException
public static <T> T requiredPath(BranchNode branch, NodePath path) throws NoSuchNodeException, NodeProvisioningException
NoSuchNodeException
NodeProvisioningException
public static void installChild(BranchNode branch, String name, Object node) throws NoSuchNodeException, ChildExistsException, ServiceException
GrowingBranch
.
branch
- must not be null.name
- must not be null or empty.
It must not match the name of an existing child node.node
- must not be null.
NoSuchNodeException
- if the branch
doesn't support
installation of children by implementing GrowingBranch
.
ChildExistsException
- if a node is already installed at the
given name
. (The node will not have
been installed in this case.)
ServiceException
- if node
implements
ServiceNode
and could not be started. (The node will not have
been installed in this case.)GrowingBranch.installChild(String, Object)
public static void installNode(NodeReference reference, Object node) throws ChildExistsException, WrongNodeTypeException, NodeProvisioningException
ChildExistsException
- if a node is already installed at the
requested location.
WrongNodeTypeException
- if an intermediate node isn't a
BranchNode
.
NoSuchNodeException
- if an intermediate node doesn't exist and
can't be provisioned.
NodeProvisioningException
- if an intermediate branch failed
to be provisioned.
NullPointerException
- if any parameter is null
.public static void installPath(BranchNode branch, String path, Object node) throws ChildExistsException, WrongNodeTypeException, NodeProvisioningException
ChildExistsException
- if a node is already installed at the
requested location.
WrongNodeTypeException
- if an intermediate node isn't a
BranchNode
.
NoSuchNodeException
- if an intermediate node doesn't exist and
can't be provisioned.
NodeProvisioningException
- if an intermediate branch failed
to be provisioned.
NullPointerException
- if any parameter is null
.public static void installPath(BranchNode branch, NodePath nodePath, Object node) throws ChildExistsException, WrongNodeTypeException, NodeProvisioningException
ChildExistsException
- if a node is already installed at the
requested location.
WrongNodeTypeException
- if an intermediate node isn't a
BranchNode
.
NoSuchNodeException
- if an intermediate node doesn't exist and
can't be provisioned.
NodeProvisioningException
- if an intermediate branch failed
to be provisioned.
NullPointerException
- if any parameter is null
.public static BranchNode requiredChildBranch(BranchNode branch, String name) throws WrongNodeTypeException, NoSuchNodeException, NodeProvisioningException, ServiceException
BranchingBranch
, then
a new child branch will be
provisioned
and installed.
branch
- must not be null.name
- must not be null or empty.
WrongNodeTypeException
- if the branch
already has a node
installed at the given childName
, but it's not a
BranchNode
.
NoSuchNodeException
- if the branch
doesn't support
provisioning of child branches by implementing BranchingBranch
.
NodeProvisioningException
- if there's a problem provisioning
the requested node.
ServiceException
- if the branch couldn't be started.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |