Class TreeResult

java.lang.Object
org.forgerock.am.trees.model.TreeResult

public final class TreeResult extends Object
Immutable container for the result of processing an authentication tree.
Since:
AM 5.5.0
  • Field Details

    • treeState

      public final TreeState treeState
      The state of the tree after processing.
    • outcome

      public final Outcome outcome
      The outcome of the tree processing.
    • returnProperties

      public final Map<String,Object> returnProperties
      Properties to return to the client.
    • callbacks

      public final List<Callback> callbacks
      Callbacks requested by a node when the Outcome is Outcome.NEED_INPUT. May be null.
    • suspensionHandler

      public final SuspensionHandler suspensionHandler
      The suspension handler to be called on the tree being suspended. May be null.
    • suspensionDuration

      public final Duration suspensionDuration
      The optional duration for which the tree is suspended. May be null.
    • cause

      public final NodeProcessException cause
      The cause of the exception if the outcome is Outcome.EXCEPTION. May be null.
  • Constructor Details

    • TreeResult

      public TreeResult(TreeState treeState, Outcome outcome)
      Constructs a new TreeResult.
      Parameters:
      treeState - The state of the tree after processing.
      outcome - The outcome of the tree processing.
    • TreeResult

      public TreeResult(TreeState treeState, Outcome outcome, Map<String,Object> returnProperties, List<Callback> callbacks)
      Constructs a new TreeResult.
      Parameters:
      treeState - The state of the tree after processing.
      outcome - The outcome of the tree processing.
      returnProperties - Properties to return to the client.
      callbacks - Callbacks requested by a node when the Outcome is Outcome.NEED_INPUT. May be null.
    • TreeResult

      public TreeResult(TreeState treeState, Outcome outcome, Map<String,Object> returnProperties, List<Callback> callbacks, SuspensionHandler suspensionHandler, Duration suspensionDuration, NodeProcessException cause)
      Constructs a new TreeResult.
      Parameters:
      treeState - The state of the tree after processing.
      outcome - The outcome of the tree processing.
      returnProperties - Properties to return to the client.
      callbacks - Callbacks requested by a node when the Outcome is Outcome.NEED_INPUT. May be null.
      suspensionHandler - handler to be invoked on suspended the tree
      suspensionDuration - duration for which the tree is suspended
      cause - the cause of the exception if the outcome is Outcome.EXCEPTION. May be null.
  • Method Details

    • getHeader

      public String getHeader()
      Return the header string attached to this TreeResult, if any.
      Returns:
      the header string
    • getDescription

      public String getDescription()
      Return the description attached to this TreeResult, if any.
      Returns:
      the description
    • getStage

      public String getStage()
      Return the stage attached to this TreeResult, if any.
      Returns:
      the stage