Package org.openiam.srvc.user
Class ChallengeResponseWebServiceImpl
- java.lang.Object
-
- org.openiam.srvc.AbstractApiService
-
- org.openiam.srvc.user.ChallengeResponseWebServiceImpl
-
- All Implemented Interfaces:
ChallengeResponseWebService
@Service("challengeResponse") public class ChallengeResponseWebServiceImpl extends AbstractApiService implements ChallengeResponseWebService
-
-
Field Summary
-
Fields inherited from class org.openiam.srvc.AbstractApiService
applicationContext, rabbitMQSender
-
-
Constructor Summary
Constructors Constructor Description ChallengeResponseWebServiceImpl(ChallengeResponseQueue queue)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Integer
count(IdentityQuestionSearchBean searchBean)
Counts number of questions that match search bean criteria.Response
deleteAnswer(String answerId)
Deletes answer with given ianswerId.Response
deleteQuestion(String questionId)
Deletes Identity question with given id.List<UserIdentityAnswer>
findAnswerBeans(IdentityAnswerSearchBean searchBean, int from, int size)
Retrieves list of UserIdentityAnswer beans that match given search criteriaList<IdentityQuestion>
findQuestionBeans(IdentityQuestionSearchBean searchBean, int from, int size)
Retrieve question beans that match search criteria.List<IdentityQuestGroup>
getAllIdentityQuestionGroups()
Retrieves all identity question groups.Integer
getNumOfCorrectAnswers(String userId, boolean isEnterprise)
Retrieves number of correct answers.Integer
getNumOfRequiredQuestions(String userId, boolean isEnterprise)
Retrieves number of required questions.IdentityQuestion
getQuestion(String questionId)
Retrieves question that matches given idboolean
isQuestionsRequired(String userId)
Response
isResponseCorrect(String userId, List<UserIdentityAnswer> newAnswerList)
Determines is the answers that are provided by the user are the same as those stored in the system.boolean
isResponseValid(String userId, List<UserIdentityAnswer> newAnswerList)
Deprecated.boolean
isUserAnsweredSecurityQuestions(String userId)
Checks if user answered security questions.Response
resetQuestionsForUser(String userId)
Resets questions for user with given userId.Response
saveAnswer(UserIdentityAnswer answer)
Saves answer.Response
saveAnswers(List<UserIdentityAnswer> answerList)
Saves answers.Response
saveQuestion(IdentityQuestion question)
Saves Identity question.Response
validateAnswers(List<UserIdentityAnswer> answerList)
Validates list of answers.-
Methods inherited from class org.openiam.srvc.AbstractApiService
broadcast, crudRequest, getBooleanValue, getIntValue, getIntValue, getRabbitMqQueue, getResponse, getResponse, getValue, getValue, getValueList, getValueList, idRequest, manageApiRequest, manageApiRequest, manageCrudApiRequest, manageCrudApiRequest, manageCrudApiRequest, manageCrudApiRequest, membershipRequestProcessing, membershipRequestProcessing, publish, publish, sendAsync, sendAsync
-
-
-
-
Constructor Detail
-
ChallengeResponseWebServiceImpl
@Autowired public ChallengeResponseWebServiceImpl(ChallengeResponseQueue queue)
-
-
Method Detail
-
getNumOfRequiredQuestions
public Integer getNumOfRequiredQuestions(String userId, boolean isEnterprise)
Description copied from interface:ChallengeResponseWebService
Retrieves number of required questions.- Specified by:
getNumOfRequiredQuestions
in interfaceChallengeResponseWebService
- Parameters:
userId
- User Id.isEnterprise
- Is enterprise flag.- Returns:
- Number of required questions.
-
getNumOfCorrectAnswers
public Integer getNumOfCorrectAnswers(String userId, boolean isEnterprise)
Description copied from interface:ChallengeResponseWebService
Retrieves number of correct answers.- Specified by:
getNumOfCorrectAnswers
in interfaceChallengeResponseWebService
- Parameters:
userId
- User Id.isEnterprise
- Is enterprise flag.- Returns:
- Number of correct questions.
-
count
public Integer count(IdentityQuestionSearchBean searchBean)
Description copied from interface:ChallengeResponseWebService
Counts number of questions that match search bean criteria.- Specified by:
count
in interfaceChallengeResponseWebService
- Parameters:
searchBean
- Search bean.- Returns:
- Number of questions that matched search criteria.
-
getQuestion
public IdentityQuestion getQuestion(String questionId)
Description copied from interface:ChallengeResponseWebService
Retrieves question that matches given id- Specified by:
getQuestion
in interfaceChallengeResponseWebService
- Parameters:
questionId
- Question id.- Returns:
- Identity question.
-
findQuestionBeans
public List<IdentityQuestion> findQuestionBeans(IdentityQuestionSearchBean searchBean, int from, int size)
Description copied from interface:ChallengeResponseWebService
Retrieve question beans that match search criteria.- Specified by:
findQuestionBeans
in interfaceChallengeResponseWebService
- Parameters:
searchBean
- Search bean.from
- From index.size
- Max number of beans to retrieve.- Returns:
- Beans that match search criteria.
-
findAnswerBeans
public List<UserIdentityAnswer> findAnswerBeans(IdentityAnswerSearchBean searchBean, int from, int size)
Description copied from interface:ChallengeResponseWebService
Retrieves list of UserIdentityAnswer beans that match given search criteria- Specified by:
findAnswerBeans
in interfaceChallengeResponseWebService
- Parameters:
searchBean
- Search bean used for criteria.from
- From index.size
- Max number of beans to retrieve.- Returns:
- List of UserIdentityAnswer beans.
-
saveQuestion
public Response saveQuestion(IdentityQuestion question)
Description copied from interface:ChallengeResponseWebService
Saves Identity question.- Specified by:
saveQuestion
in interfaceChallengeResponseWebService
- Parameters:
question
- Identity question.- Returns:
- Response.
-
deleteQuestion
public Response deleteQuestion(String questionId)
Description copied from interface:ChallengeResponseWebService
Deletes Identity question with given id.- Specified by:
deleteQuestion
in interfaceChallengeResponseWebService
- Parameters:
questionId
- Identity question id.- Returns:
- Response.
-
saveAnswer
public Response saveAnswer(UserIdentityAnswer answer)
Description copied from interface:ChallengeResponseWebService
Saves answer.- Specified by:
saveAnswer
in interfaceChallengeResponseWebService
- Parameters:
answer
- Answer.- Returns:
- Response.
-
deleteAnswer
public Response deleteAnswer(String answerId)
Description copied from interface:ChallengeResponseWebService
Deletes answer with given ianswerId.- Specified by:
deleteAnswer
in interfaceChallengeResponseWebService
- Parameters:
answerId
- Answer Id.- Returns:
- Response.
-
validateAnswers
public Response validateAnswers(List<UserIdentityAnswer> answerList)
Description copied from interface:ChallengeResponseWebService
Validates list of answers.- Specified by:
validateAnswers
in interfaceChallengeResponseWebService
- Parameters:
answerList
- List of answers.- Returns:
- Response.
-
saveAnswers
public Response saveAnswers(List<UserIdentityAnswer> answerList)
Description copied from interface:ChallengeResponseWebService
Saves answers.- Specified by:
saveAnswers
in interfaceChallengeResponseWebService
- Parameters:
answerList
- List of answers for saving.- Returns:
- Response.
-
isResponseValid
@Deprecated public boolean isResponseValid(String userId, List<UserIdentityAnswer> newAnswerList) throws Exception
Deprecated.Description copied from interface:ChallengeResponseWebService
Determines is the answers that are provided by the user are the same as those stored in the system.- Specified by:
isResponseValid
in interfaceChallengeResponseWebService
- Parameters:
userId
- User Id.newAnswerList
- - List of QuestionValue objects- Returns:
- True if response is valid, otherwise false.
- Throws:
Exception
-
isResponseCorrect
public Response isResponseCorrect(String userId, List<UserIdentityAnswer> newAnswerList) throws Exception
Description copied from interface:ChallengeResponseWebService
Determines is the answers that are provided by the user are the same as those stored in the system.- Specified by:
isResponseCorrect
in interfaceChallengeResponseWebService
- Parameters:
userId
- User Id.newAnswerList
- - List of QuestionValue objects- Returns:
- Response with value true if response is valid, otherwise false.
- Throws:
Exception
-
isUserAnsweredSecurityQuestions
public boolean isUserAnsweredSecurityQuestions(String userId) throws Exception
Description copied from interface:ChallengeResponseWebService
Checks if user answered security questions.- Specified by:
isUserAnsweredSecurityQuestions
in interfaceChallengeResponseWebService
- Parameters:
userId
- User Id.- Returns:
- True if answered, false otherwise.
- Throws:
Exception
-
resetQuestionsForUser
public Response resetQuestionsForUser(String userId)
Description copied from interface:ChallengeResponseWebService
Resets questions for user with given userId.- Specified by:
resetQuestionsForUser
in interfaceChallengeResponseWebService
- Parameters:
userId
- User Id.- Returns:
- Response.
-
getAllIdentityQuestionGroups
public List<IdentityQuestGroup> getAllIdentityQuestionGroups()
Description copied from interface:ChallengeResponseWebService
Retrieves all identity question groups.- Specified by:
getAllIdentityQuestionGroups
in interfaceChallengeResponseWebService
- Returns:
- List of identity question groups.
-
isQuestionsRequired
public boolean isQuestionsRequired(String userId)
- Specified by:
isQuestionsRequired
in interfaceChallengeResponseWebService
-
-