Package org.forgerock.selfservice.core
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 methodgatherInitialRequirements(ProcessContext, StageConfig)is invoke first and provides an opportunity for the stage to return some initial requirements. The methodadvance(ProcessContext, StageConfig)is repeatedly after for everyStageResponsethat 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StageResponseadvance(ProcessContext context, C config)Advance the progress stage.org.forgerock.json.JsonValuegatherInitialRequirements(ProcessContext context, C config)Response for defining any initial requirements the stage may have.
-
-
-
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 contextconfig- 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 contextconfig- the stage configuration- Returns:
- the result of invoking this stage
- Throws:
org.forgerock.json.resource.ResourceException- if some expected state or input is invalid
-
-