Class UserQueryStage
- java.lang.Object
-
- org.forgerock.selfservice.stages.user.UserQueryStage
-
- All Implemented Interfaces:
ProgressStage<UserQueryConfig>
public final class UserQueryStage extends Object implements ProgressStage<UserQueryConfig>
Stage is responsible for querying the underlying service for a user based on the supplied query fields. Once identified, it populates "mail" and "userId" fields in the context.- Since:
- 0.5.0
-
-
Constructor Summary
Constructors Constructor Description UserQueryStage(ConnectionFactory connectionFactory)
Constructs a new user query stage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StageResponse
advance(ProcessContext context, UserQueryConfig config)
Advance the progress stage.JsonValue
gatherInitialRequirements(ProcessContext context, UserQueryConfig config)
Response for defining any initial requirements the stage may have.
-
-
-
Constructor Detail
-
UserQueryStage
@Inject public UserQueryStage(ConnectionFactory connectionFactory)
Constructs a new user query stage.- Parameters:
connectionFactory
- the CREST connection factory
-
-
Method Detail
-
gatherInitialRequirements
public JsonValue gatherInitialRequirements(ProcessContext context, UserQueryConfig config) throws ResourceException
Description copied from interface:ProgressStage
Response for defining any initial requirements the stage may have.An empty json object implies no initial requirements.
- Specified by:
gatherInitialRequirements
in interfaceProgressStage<UserQueryConfig>
- Parameters:
context
- the current process contextconfig
- 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
public StageResponse advance(ProcessContext context, UserQueryConfig config) throws ResourceException
Description copied from interface:ProgressStage
Advance the progress stage.- Specified by:
advance
in interfaceProgressStage<UserQueryConfig>
- Parameters:
context
- the current process contextconfig
- the stage configuration- Returns:
- the result of invoking this stage
- Throws:
ResourceException
- if some expected state or input is invalid
-
-