Package org.forgerock.am.trees.api
Interface TreeBuilder
public interface TreeBuilder
A Tree builder. Gathers required config, such as nodes and connections between nodes and builds the Tree.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The connections json attribute.static final String
The description of the tree.static final String
The displayName json attribute.static final String
The entryNodeId json attribute.static final String
The nodeType json attribute.static final String
The nodes json attribute.static final String
The id json attribute.static final String
The x position json attribute.static final String
The y position json attribute. -
Method Summary
Modifier and TypeMethodDescriptionadd
(NodeBuilder nodeBuilder) Adds a Node to the tree.add
(NodeBuilder... nodeBuilders) Adds nodes to the tree.void
Adds node config, using the node name and attributes for that node.void
build()
Builds the tree using the config set.connect
(NodeBuilder nodeBuilder, String outcome, UUID destination) Connects a specific outcome of a Node to a destination.connect
(NodeBuilder nodeBuilder, String outcome, NodeBuilder destination) Connects a specific outcome of a Node to a destination Node.connect
(NodeBuilder nodeBuilder, UUID destination) Connects the single outcome of a Node to a destination.connect
(NodeBuilder nodeBuilder, NodeBuilder destination) Connects the single outcome of a Node to a destination Node.description
(String description) Sets the description of the tree.entryNode
(NodeBuilder entryNode) Sets the entry node.getNodeServiceName
(Class<? extends Node> clazz) Returns the name of the service of the supplied node class.getNodeVersion
(Class<? extends Node> clazz) Returns the version of the node class.Sets the name of the tree.
-
Field Details
-
X_POSITION_ID
The x position json attribute.- See Also:
-
Y_POSITION_ID
The y position json attribute.- See Also:
-
DISPLAY_NAME
The displayName json attribute.- See Also:
-
VERSION
The id json attribute.- See Also:
-
NODE_TYPE
The nodeType json attribute.- See Also:
-
NODES
The nodes json attribute.- See Also:
-
ENTRY_NODE_ID
The entryNodeId json attribute.- See Also:
-
CONNECTIONS
The connections json attribute.- See Also:
-
DESCRIPTION
The description of the tree.- See Also:
-
-
Method Details
-
name
Sets the name of the tree.- Parameters:
name
- the name.- Returns:
- this builder.
-
entryNode
Sets the entry node.- Parameters:
entryNode
- the entry node.- Returns:
- this builder.
-
description
Sets the description of the tree.- Parameters:
description
- the description.- Returns:
- this builder.
-
build
Builds the tree using the config set.- Throws:
SMSException
- if there is a SMSException.SSOException
- if there is a SSOException.IOException
- if there is an IOException.
-
add
Adds a Node to the tree.- Parameters:
nodeBuilder
- a builder representing the Node.- Returns:
- this builder.
-
add
Adds nodes to the tree.- Parameters:
nodeBuilders
- the builder of each of the nodes.- Returns:
- this builder.
-
connect
Connects the single outcome of a Node to a destination.- Parameters:
nodeBuilder
- the builder representing a Node.destination
- the destination, usually a Node ID.- Returns:
- this builder.
-
connect
Connects the single outcome of a Node to a destination Node.- Parameters:
nodeBuilder
- the builder representing a Node.destination
- the builder representing a destination Node.- Returns:
- this builder.
-
connect
Connects a specific outcome of a Node to a destination.- Parameters:
nodeBuilder
- the builder representing a Node.outcome
- the outcome of the Node.destination
- the destination, usually a Node ID.- Returns:
- this builder.
-
connect
Connects a specific outcome of a Node to a destination Node.- Parameters:
nodeBuilder
- the builder representing a Node.outcome
- the outcome.destination
- the destination Node.- Returns:
- this builder.
-
addNodeConfig
Adds node config, using the node name and attributes for that node.- Parameters:
name
- the nodes name.attributes
- the attributes for that node.
-
getNodeServiceName
Returns the name of the service of the supplied node class.- Parameters:
clazz
- the node class.- Returns:
- the name of the service.
-
getNodeVersion
Returns the version of the node class.- Parameters:
clazz
- the node class.- Returns:
- the version.
-