Interface ProgressStage<C extends StageConfig>

  • Type Parameters:
    C - represents the subtype of stage config that the concrete progress stage is expecting

    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 Detail

      • gatherInitialRequirements

        org.forgerock.json.JsonValue gatherInitialRequirements​(ProcessContext context,
                                                               C config)
                                                        throws org.forgerock.json.resource.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:
        org.forgerock.json.resource.ResourceException - if some expected state is invalid
      • advance

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