Class InitializeProfileRequestContext

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, ProfileAction, Aware, MessageSource, MessageSourceAware, Action

public final class InitializeProfileRequestContext
extends AbstractProfileAction
Action that creates a new ProfileRequestContext and binds it to the current conversation under the ProfileRequestContext.BINDING_KEY key, and sets the profile and logging IDs, if provided.

This is a native SWF action in order to access conversation scope.

Optionally saves off query parameters from request into a ScratchContext.

RequestContext.getConversationScope().get(ProfileRequestContext.BINDING_KEY) != null
  • Field Details

    • profileId

      @Nullable private String profileId
      The profile ID to initialize the context to.
    • loggingId

      @Nullable private String loggingId
      The logging ID to initialize the context to.
    • browserProfile

      private boolean browserProfile
      Whether this is a browser-based profile request.
    • captureQueryParameters

      private boolean captureQueryParameters
      Whether to capture and store off query parameters.
  • Constructor Details

    • InitializeProfileRequestContext

      public InitializeProfileRequestContext()
  • Method Details

    • setProfileId

      public void setProfileId​(@Nullable String id)
      Set the profile ID to populate into the context.
      id - profile ID to populate into the context
    • setLoggingId

      public void setLoggingId​(@Nullable String id)
      Set the logging ID to populate into the context.
      id - logging ID to populate into the context
    • setBrowserProfile

      public void setBrowserProfile​(boolean browser)
      Set whether the request is browser-based, defaults to false.
      browser - flag to set
    • setCaptureQueryParameters

      public void setCaptureQueryParameters​(boolean flag)
      Set whether to capture incoming query parameters in a ScratchContext, defaults to false.
      flag - flag to set
    • execute

      @Nonnull public Event execute​(@Nonnull RequestContext springRequestContext)
      Specified by:
      execute in interface Action
      execute in class AbstractProfileAction