use of org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeSetDTO in project identity-api-server by wso2.
the class ServerChallengeService method getChallengeSetDTO.
private ChallengeSetDTO getChallengeSetDTO(String questionSetId, List<ChallengeQuestion> questions) {
ChallengeSetDTO challenge = new ChallengeSetDTO();
challenge.setQuestionSetId(questionSetId);
List<ChallengeQuestionDTO> questionDTOs = questions.stream().map(new ChallengeQuestionToExternal()).collect(Collectors.toList());
challenge.setQuestions(questionDTOs);
return challenge;
}
use of org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeSetDTO in project identity-api-server by wso2.
the class ServerChallengeService method buildChallengeQuestionSets.
private ChallengeQuestion[] buildChallengeQuestionSets(List<ChallengeSetDTO> challengeSets) {
List<ChallengeQuestion> questions = new ArrayList<>();
for (ChallengeSetDTO challengeSet : challengeSets) {
String setId = challengeSet.getQuestionSetId();
questions = buildChallengeQuestions(challengeSet.getQuestions(), setId);
}
return questions.toArray(new ChallengeQuestion[0]);
}
Aggregations