Package org.forgerock.am.trees.model
Class TreeStateBuilderImpl
java.lang.Object
org.forgerock.am.trees.model.TreeStateBuilderImpl
- All Implemented Interfaces:
TreeStateBuilder
A builder for TreeState objects.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the TreeState object with the provided properties.withCurrentNodeId(UUID currentNodeId) Sets the current node ID.withIdentifiedIdentity(IdentifiedIdentity identifiedIdentity) Sets the identified identity.withIdentifiedIdentityFrom(TreeState previousState, Action action) Sets the identified identity from the provided action if present, or the previous tree state otherwise.withLogoutHooks(List<org.forgerock.openam.auth.logouthook.LogoutHookData> logoutHooks) Sets the logout hooks.withLogoutHooksFrom(TreeState previousState, Action action) Sets the logout hooks from the previous state, followed by those from the provided action.withMaxTreeDuration(Duration maxTreeDuration) Sets the maximum duration of the tree.withMaxTreeDurationFrom(TreeState previousState, Action action) Sets the maximum duration of the tree from the provided action if present, or the previous tree state otherwise.withSecureState(JsonValue secureState) Sets the secure state.withSessionHooks(List<JsonValue> sessionHooks) Sets the session hooks.withSessionHooksFrom(TreeState previousState, Action action) Sets the session hooks from the previous state, followed by those from the provided action.withSessionProperties(SessionProperties sessionProperties) Sets the session properties.withSessionPropertiesFrom(TreeState previousState, Action action) Sets the combined session properties from the provided action and previous state.withSharedState(JsonValue sharedState) Sets the shared state.withSharedStateFrom(TreeState previousState, Action action) Sets the shared state from the provided action if present, or the previous tree state otherwise.withTransientState(JsonValue transientState) Sets the transient state.withTransientStateFrom(TreeState previousState, Action action) Sets the transient state from the provided action if present, or the previous tree state otherwise.withUnencryptedSecureState(JsonValue unencryptedSecureState) Sets the unencrypted secure state.withUniversalId(String universalId) Sets the universal ID.withUniversalIdFrom(TreeState previousState, Action action) Sets the universal ID from the provided action if present, or the previous tree state otherwise.withWebhooks(List<String> webhooks) Sets the webhooks.withWebhooksFrom(TreeState previousState, Action action) Sets the webhooks from the previous state, followed by those from the provided action.
-
Method Details
-
withTransientState
Description copied from interface:TreeStateBuilderSets the transient state.- Specified by:
withTransientStatein interfaceTreeStateBuilder- Parameters:
transientState- the transient state- Returns:
- this builder
-
withTransientStateFrom
Description copied from interface:TreeStateBuilderSets the transient state from the provided action if present, or the previous tree state otherwise.- Specified by:
withTransientStateFromin interfaceTreeStateBuilder- Parameters:
previousState- the previous tree stateaction- the last action- Returns:
- this builder
-
withSecureState
Description copied from interface:TreeStateBuilderSets the secure state.- Specified by:
withSecureStatein interfaceTreeStateBuilder- Parameters:
secureState- the secure state- Returns:
- this builder
-
withUnencryptedSecureState
Description copied from interface:TreeStateBuilderSets the unencrypted secure state.- Specified by:
withUnencryptedSecureStatein interfaceTreeStateBuilder- Parameters:
unencryptedSecureState- the unencrypted secure state- Returns:
- this builder
-
withCurrentNodeId
Description copied from interface:TreeStateBuilderSets the current node ID.- Specified by:
withCurrentNodeIdin interfaceTreeStateBuilder- Parameters:
currentNodeId- the current node ID- Returns:
- this builder
-
withSessionProperties
Description copied from interface:TreeStateBuilderSets the session properties.- Specified by:
withSessionPropertiesin interfaceTreeStateBuilder- Parameters:
sessionProperties- the session properties- Returns:
- this builder
-
withSessionPropertiesFrom
Description copied from interface:TreeStateBuilderSets 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.- Specified by:
withSessionPropertiesFromin interfaceTreeStateBuilder- Parameters:
previousState- the previous tree stateaction- the last action- Returns:
- this builder
-
withSessionHooks
Description copied from interface:TreeStateBuilderSets the session hooks.- Specified by:
withSessionHooksin interfaceTreeStateBuilder- Parameters:
sessionHooks- the session hooks- Returns:
- this builder
-
withSessionHooksFrom
Description copied from interface:TreeStateBuilderSets the session hooks from the previous state, followed by those from the provided action.- Specified by:
withSessionHooksFromin interfaceTreeStateBuilder- Parameters:
previousState- the previous tree stateaction- the last action- Returns:
- this builder
-
withWebhooks
Description copied from interface:TreeStateBuilderSets the webhooks.- Specified by:
withWebhooksin interfaceTreeStateBuilder- Parameters:
webhooks- the webhooks- Returns:
- this builder
-
withWebhooksFrom
Description copied from interface:TreeStateBuilderSets the webhooks from the previous state, followed by those from the provided action.- Specified by:
withWebhooksFromin interfaceTreeStateBuilder- Parameters:
previousState- the previous tree stateaction- the last action- Returns:
- this builder
-
withLogoutHooks
public TreeStateBuilder withLogoutHooks(List<org.forgerock.openam.auth.logouthook.LogoutHookData> logoutHooks) Description copied from interface:TreeStateBuilderSets the logout hooks.- Specified by:
withLogoutHooksin interfaceTreeStateBuilder- Parameters:
logoutHooks- the logout hooks- Returns:
- this builder
-
withLogoutHooksFrom
Description copied from interface:TreeStateBuilderSets the logout hooks from the previous state, followed by those from the provided action.- Specified by:
withLogoutHooksFromin interfaceTreeStateBuilder- Parameters:
previousState- the previous tree stateaction- the last action- Returns:
- this builder
-
withUniversalId
Description copied from interface:TreeStateBuilderSets the universal ID.- Specified by:
withUniversalIdin interfaceTreeStateBuilder- Parameters:
universalId- the universal ID- Returns:
- this builder
-
withUniversalIdFrom
Description copied from interface:TreeStateBuilderSets the universal ID from the provided action if present, or the previous tree state otherwise.- Specified by:
withUniversalIdFromin interfaceTreeStateBuilder- Parameters:
previousState- the previous tree stateaction- the last action- Returns:
- this builder
-
withIdentifiedIdentity
Description copied from interface:TreeStateBuilderSets the identified identity.- Specified by:
withIdentifiedIdentityin interfaceTreeStateBuilder- Parameters:
identifiedIdentity- the identified identity- Returns:
- this builder
-
withIdentifiedIdentityFrom
Description copied from interface:TreeStateBuilderSets the identified identity from the provided action if present, or the previous tree state otherwise. Logs a warning if both are present and different.- Specified by:
withIdentifiedIdentityFromin interfaceTreeStateBuilder- Parameters:
previousState- the previous tree stateaction- the last action- Returns:
- this builder
-
withMaxTreeDuration
Description copied from interface:TreeStateBuilderSets the maximum duration of the tree.- Specified by:
withMaxTreeDurationin interfaceTreeStateBuilder- Parameters:
maxTreeDuration- the maximum duration of the tree- Returns:
- this builder
-
withMaxTreeDurationFrom
Description copied from interface:TreeStateBuilderSets the maximum duration of the tree from the provided action if present, or the previous tree state otherwise.- Specified by:
withMaxTreeDurationFromin interfaceTreeStateBuilder- Parameters:
previousState- the previous tree stateaction- the last action- Returns:
- this builder
-
build
Description copied from interface:TreeStateBuilderBuilds the TreeState object with the provided properties.- Specified by:
buildin interfaceTreeStateBuilder- Returns:
- the TreeState object