Package org.forgerock.selfservice.core
Class ProgressStageBinding<C extends StageConfig>
java.lang.Object
org.forgerock.selfservice.core.ProgressStageBinding<C>
- Type Parameters:
C- type that describes the stage config
Binds together the progress stage with its config. Acts to enforce the generic binding between the two
but also assists in the passing of the config to keep the progress stages from maintaining thread state,
therefore promoting thread safety.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionadvance(ProcessContext context) Advance the progress stage.static <C extends StageConfig>
ProgressStageBinding<C>bind(ProgressStage<C> stage, C config) Create a new binder instance.gatherInitialRequirements(ProcessContext context) Response for defining any initial requirements the bound stage may have.getName()Return the name of the bound stage.
-
Method Details
-
gatherInitialRequirements
Response for defining any initial requirements the bound stage may have.An empty json object implies no initial requirements.
- Parameters:
context- the current process context- Returns:
- json value representing the requirements or empty json object for no requirements
- Throws:
ResourceException- if some expected state is invalid
-
advance
Advance the progress stage.- Parameters:
context- the current process context- Returns:
- the result of invoking this stage
- Throws:
ResourceException- if some expected state or input is invalid
-
getName
Return the name of the bound stage.- Returns:
- the stage name
-
bind
public static <C extends StageConfig> ProgressStageBinding<C> bind(ProgressStage<C> stage, C config) Create a new binder instance.- Type Parameters:
C- the stage config type shared by the progress stage- Parameters:
stage- the progress stageconfig- the stage config- Returns:
- a new binder instance
-