Class AnonymousProcessService

java.lang.Object
org.forgerock.selfservice.core.AnonymousProcessService
All Implemented Interfaces:
RequestHandler

public final class AnonymousProcessService extends Object implements RequestHandler
Anonymous process service progresses a chain of ProgressStage configurations, handling any required client interactions.
Since:
0.1.0
  • Constructor Details

    • AnonymousProcessService

      @Inject public AnonymousProcessService(ProcessInstanceConfig config, ProgressStageProvider progressStageProvider, SnapshotTokenHandlerFactory tokenHandlerFactory, ProcessStore processStore, ClassLoader classLoader)
      Initialises the anonymous process service with the passed config.
      Parameters:
      config - service configuration
      progressStageProvider - progress stage provider
      tokenHandlerFactory - snapshot token handler factory
      processStore - store for locally persisted state
      classLoader - class loader used for dynamic stage class instantiation
  • Method Details

    • handleRead

      public Promise<ResourceResponse,ResourceException> handleRead(Context context, ReadRequest request)
      Description copied from interface: RequestHandler
      Reads a JSON resource, returning a Promise that will be completed when the resource has been read.

      Read expects failure exceptions as follows:

      • ForbiddenException if access to the resource is forbidden.
      • NotSupportedException if the requested functionality is not implemented/supported
      • BadRequestException if the passed identifier or filter is invalid
      • NotFoundException if the specified resource could not be found.
      Specified by:
      handleRead in interface RequestHandler
      Parameters:
      context - The request server context, such as associated principal.
      request - The read request.
      Returns:
      A Promise containing the result of the operation.
    • handleAction

      public Promise<ActionResponse,ResourceException> handleAction(Context context, ActionRequest request)
      Description copied from interface: RequestHandler
      Handles performing an action on a resource, and optionally returns an associated result. The execution of an action is allowed to incur side effects.

      Actions are parametric; a set of named parameters is provided as input to the action. The action result is a JSON object structure composed of basic Java types; its overall structure is defined by a specific implementation.

      On completion, the action result (or null) must be used to complete the returned Promise. On failure, the returned Promise must be completed with the exception.

      Action expects failure exceptions as follows: ForbiddenException if access to the resource is forbidden. NotSupportedException if the requested functionality is not implemented/supported BadRequestException if the passed identifier, parameters or filter is invalid NotFoundException if the specified resource could not be found.

      Specified by:
      handleAction in interface RequestHandler
      Parameters:
      context - The request server context, such as associated principal.
      request - The action request.
      Returns:
      A Promise containing the result of the operation.