Interface TreeStateBuilder

All Known Implementing Classes:
TreeStateBuilderImpl

public interface TreeStateBuilder
A builder for TreeState objects.
  • Method Details

    • withSharedState

      TreeStateBuilder withSharedState(JsonValue sharedState)
      Sets the shared state.
      Parameters:
      sharedState - the shared state
      Returns:
      this builder
    • withSharedStateFrom

      TreeStateBuilder withSharedStateFrom(TreeState previousState, Action action)
      Sets the shared state from the provided action if present, or the previous tree state otherwise. Also sets the error message and lockout message if present.
      Parameters:
      previousState - the previous tree state
      action - the last action
      Returns:
      this builder
    • withTransientState

      TreeStateBuilder withTransientState(JsonValue transientState)
      Sets the transient state.
      Parameters:
      transientState - the transient state
      Returns:
      this builder
    • withTransientStateFrom

      TreeStateBuilder withTransientStateFrom(TreeState previousState, Action action)
      Sets the transient state from the provided action if present, or the previous tree state otherwise.
      Parameters:
      previousState - the previous tree state
      action - the last action
      Returns:
      this builder
    • withSecureState

      TreeStateBuilder withSecureState(JsonValue secureState)
      Sets the secure state.
      Parameters:
      secureState - the secure state
      Returns:
      this builder
    • withUnencryptedSecureState

      TreeStateBuilder withUnencryptedSecureState(JsonValue unencryptedSecureState)
      Sets the unencrypted secure state.
      Parameters:
      unencryptedSecureState - the unencrypted secure state
      Returns:
      this builder
    • withCurrentNodeId

      TreeStateBuilder withCurrentNodeId(UUID currentNodeId)
      Sets the current node ID.
      Parameters:
      currentNodeId - the current node ID
      Returns:
      this builder
    • withSessionProperties

      TreeStateBuilder withSessionProperties(SessionProperties sessionProperties)
      Sets the session properties.
      Parameters:
      sessionProperties - the session properties
      Returns:
      this builder
    • withSessionPropertiesFrom

      TreeStateBuilder withSessionPropertiesFrom(TreeState previousState, Action action)
      Sets the combined session properties from the provided action and previous state. Sets the max session time and max idle time from the action if present, or the previous tree state otherwise.
      Parameters:
      previousState - the previous tree state
      action - the last action
      Returns:
      this builder
    • withSessionHooks

      TreeStateBuilder withSessionHooks(List<JsonValue> sessionHooks)
      Sets the session hooks.
      Parameters:
      sessionHooks - the session hooks
      Returns:
      this builder
    • withSessionHooksFrom

      TreeStateBuilder withSessionHooksFrom(TreeState previousState, Action action)
      Sets the session hooks from the previous state, followed by those from the provided action.
      Parameters:
      previousState - the previous tree state
      action - the last action
      Returns:
      this builder
    • withWebhooks

      TreeStateBuilder withWebhooks(List<String> webhooks)
      Sets the webhooks.
      Parameters:
      webhooks - the webhooks
      Returns:
      this builder
    • withWebhooksFrom

      TreeStateBuilder withWebhooksFrom(TreeState previousState, Action action)
      Sets the webhooks from the previous state, followed by those from the provided action.
      Parameters:
      previousState - the previous tree state
      action - the last action
      Returns:
      this builder
    • withLogoutHooks

      TreeStateBuilder withLogoutHooks(List<org.forgerock.openam.auth.logouthook.LogoutHookData> logoutHooks)
      Sets the logout hooks.
      Parameters:
      logoutHooks - the logout hooks
      Returns:
      this builder
    • withLogoutHooksFrom

      TreeStateBuilder withLogoutHooksFrom(TreeState previousState, Action action)
      Sets the logout hooks from the previous state, followed by those from the provided action.
      Parameters:
      previousState - the previous tree state
      action - the last action
      Returns:
      this builder
    • withUniversalId

      TreeStateBuilder withUniversalId(String universalId)
      Sets the universal ID.
      Parameters:
      universalId - the universal ID
      Returns:
      this builder
    • withUniversalIdFrom

      TreeStateBuilder withUniversalIdFrom(TreeState previousState, Action action)
      Sets the universal ID from the provided action if present, or the previous tree state otherwise.
      Parameters:
      previousState - the previous tree state
      action - the last action
      Returns:
      this builder
    • withIdentifiedIdentity

      TreeStateBuilder withIdentifiedIdentity(IdentifiedIdentity identifiedIdentity)
      Sets the identified identity.
      Parameters:
      identifiedIdentity - the identified identity
      Returns:
      this builder
    • withIdentifiedIdentityFrom

      TreeStateBuilder withIdentifiedIdentityFrom(TreeState previousState, Action action)
      Sets the identified identity from the provided action if present, or the previous tree state otherwise. Logs a warning if both are present and different.
      Parameters:
      previousState - the previous tree state
      action - the last action
      Returns:
      this builder
    • withMaxTreeDuration

      TreeStateBuilder withMaxTreeDuration(Duration maxTreeDuration)
      Sets the maximum duration of the tree.
      Parameters:
      maxTreeDuration - the maximum duration of the tree
      Returns:
      this builder
    • withMaxTreeDurationFrom

      TreeStateBuilder withMaxTreeDurationFrom(TreeState previousState, Action action)
      Sets the maximum duration of the tree from the provided action if present, or the previous tree state otherwise.
      Parameters:
      previousState - the previous tree state
      action - the last action
      Returns:
      this builder
    • build

      TreeState build()
      Builds the TreeState object with the provided properties.
      Returns:
      the TreeState object