Package org.forgerock.am.trees.api
Interface Tree
public interface Tree
Tree model object.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsNode(UUID nodeId) Check if the tree contains the specified node.Returns the starting node's ID.Returns the IDM identity resource for the tree.getLinks()Retrieves a map of links for this 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.Retrieves a set of node IDs for this tree.Collection<? extends Tree.Node>getNodes()The nodes in the tree.getRealm()Returns the realm for this tree.booleanWhether the tree is an inner tree.booleanWhether the tree is enabled.booleanWhether the tree is a backchannel only tree.booleanmustRun()Whether the tree must run.nodeSupplier(String type, Integer version, UUID nodeId) Returns a supplier of aNodeinstance that matches the given type and node ID.The tree timeout.<R> RvisitNodes(UUID start, NodeVisitor<R> visitor) Visit the nodes in the tree starting at the specified node.<R> RvisitNodes(NodeVisitor<R> visitor) Visit the nodes in the tree starting at the entry node.
-
Method Details
-
getLinks
Retrieves a map of links for this tree. -
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.
-
nodeSupplier
Returns a supplier of aNodeinstance that matches the given type and node ID.- Parameters:
type- The type of the node to supply.version- The version of the node to supply.nodeId- The ID of the node to supply.- Returns:
- Supplier of a node.
- Throws:
NodeProcessException- If the node can't be created for some SMS reason.
-
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.
-
isTransactionalOnly
boolean isTransactionalOnly()Whether the tree is a backchannel only tree.- Returns:
- true if the tree is a backchannel only tree.
-
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
Realmfor this tree.
-
getNodeIds
Retrieves a set of node IDs for this tree.- Returns:
- set of node
UUIDs for this tree
-
getNodes
Collection<? extends Tree.Node> getNodes()The nodes in the tree.- Returns:
- a collection of nodes in the tree.
-