Interface Tree


public interface Tree
Tree model object.
  • Method Details

    • visitNodes

      <R> R visitNodes(NodeVisitor<R> visitor) throws NodeProcessException
      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

      <R> R visitNodes(UUID start, NodeVisitor<R> visitor) throws NodeProcessException
      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

      boolean containsNode(UUID nodeId)
      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

      Optional<Duration> 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

      Tree.Node getNodeForId(UUID id)
      Returns the node for the given id.
      Parameters:
      id - the ID of the node.
      Returns:
      the node with the given ID.
    • getNextNodeId

      UUID 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.
      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.