Search in sources :

Example 1 with ChallengeQuestionToExternal

use of org.wso2.carbon.identity.rest.api.server.challenge.v1.core.functions.ChallengeQuestionToExternal 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;
}
Also used : ChallengeSetDTO(org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeSetDTO) ChallengeQuestionToExternal(org.wso2.carbon.identity.rest.api.server.challenge.v1.core.functions.ChallengeQuestionToExternal) ChallengeQuestionDTO(org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeQuestionDTO)

Aggregations

ChallengeQuestionToExternal (org.wso2.carbon.identity.rest.api.server.challenge.v1.core.functions.ChallengeQuestionToExternal)1 ChallengeQuestionDTO (org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeQuestionDTO)1 ChallengeSetDTO (org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeSetDTO)1