Package org.forgerock.am.trees.api
Interface Tree
public interface Tree
Tree model object.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsNode
(UUID nodeId) Check if the tree contains the specified node.Returns the starting node's ID.Returns the IDM identity resource for the tree.getName()
Returns the name of the tree.getNextNodeId
(UUID id, String outcome) Returns the ID of the next node to process given the ID and outcome of a node in the tree.getNodeForId
(UUID id) Returns the node for the given id.Collection<? extends Tree.Node>
getNodes()
The nodes in the tree.getRealm()
Returns the realm for this tree.boolean
Whether the tree is an inner tree.boolean
Whether the tree is enabled.boolean
mustRun()
Whether the tree must run.The tree timeout.<R> R
visitNodes
(UUID start, NodeVisitor<R> visitor) Visit the nodes in the tree starting at the specified node.<R> R
visitNodes
(NodeVisitor<R> visitor) Visit the nodes in the tree starting at the entry node.
-
Method Details
-
visitNodes
Visit the nodes in the tree starting at the entry node. Each node will be visited only once, so a node will not be revisited if an outcome path goes back to a previous node.- Type Parameters:
R
- The type of the return object.- Parameters:
visitor
- The node visitor.- Returns:
- The result of the visiting.
- Throws:
NodeProcessException
- If the visiting results in an exception.
-
visitNodes
Visit the nodes in the tree starting at the specified node. Each node will be visited only once, so a node will not be revisited if an outcome path goes back to a previous node.- Type Parameters:
R
- The type of the return object.- Parameters:
start
- The node to start from.visitor
- The node visitor.- Returns:
- The result of the visiting.
- Throws:
NodeProcessException
- If the visiting results in an exception.
-
getName
String getName()Returns the name of the tree.- Returns:
- tree name.
-
getIdentityResource
String getIdentityResource()Returns the IDM identity resource for the tree.- Returns:
- IDM identity resource.
-
isEnabled
boolean isEnabled()Whether the tree is enabled.- Returns:
- enabled flag.
-
containsNode
Check if the tree contains the specified node.- Parameters:
nodeId
- The node to check for.- Returns:
- Whether the node is contained in the tree.
-
innerTreeOnly
boolean innerTreeOnly()Whether the tree is an inner tree.- Returns:
- isInnerTree flag.
-
mustRun
boolean mustRun()Whether the tree must run.- Returns:
- mustRun flag.
-
treeTimeout
The tree timeout.- Returns:
- treeTimeout value in minutes.
-
getEntryNodeId
UUID getEntryNodeId()Returns the starting node's ID.- Returns:
- the ID of the entry node.
-
getNodeForId
Returns the node for the given id.- Parameters:
id
- the ID of the node.- Returns:
- the node with the given ID.
-
getNextNodeId
Returns the ID of the next node to process given the ID and outcome of a node in the tree.- Parameters:
id
- the ID of the current node.outcome
- the outcome of the current node.- Returns:
- the ID of the next node.
-
getRealm
Realm getRealm()Returns the realm for this tree.- Returns:
- The
Realm
for this tree.
-
getNodes
Collection<? extends Tree.Node> getNodes()The nodes in the tree.- Returns:
- a collection of nodes in the tree.
-