Interface ProgressStage<C extends StageConfig>

Type Parameters:
C - represents the subtype of stage config that the concrete progress stage is expecting
All Known Implementing Classes:
AbstractKbaStage, CaptchaStage, EmailUsernameStage, ParametersStage, ResetStage, RetrieveEmailStage, RetrieveUsernameStage, SecurityAnswerDefinitionStage, SecurityAnswerVerificationStage, UserDetailsStage, UserQueryStage, UserRegistrationStage, ValidateActiveAccountStage, VerifyEmailAccountStage

public interface ProgressStage<C extends StageConfig>
Progress stage represents a single stage within the overall advance flow.

The method gatherInitialRequirements(ProcessContext, StageConfig) is invoke first and provides an opportunity for the stage to return some initial requirements. The method advance(ProcessContext, StageConfig) is repeatedly after for every StageResponse that is returned containing some requirements. Stage tags can be used in the stage response to help track progress in the stage itself. State can also be added to the stage response to pass data throughout the flow.

Since:
0.1.0
  • Method Details

    • gatherInitialRequirements

      JsonValue gatherInitialRequirements(ProcessContext context, C config) throws ResourceException
      Response for defining any initial requirements the stage may have.

      An empty json object implies no initial requirements.

      Parameters:
      context - the current process context
      config - the stage configuration
      Returns:
      json value representing the requirements or empty json object for no requirements
      Throws:
      ResourceException - if some expected state is invalid
    • advance

      StageResponse advance(ProcessContext context, C config) throws ResourceException
      Advance the progress stage.
      Parameters:
      context - the current process context
      config - the stage configuration
      Returns:
      the result of invoking this stage
      Throws:
      ResourceException - if some expected state or input is invalid