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 Integercount(IdentityQuestionSearchBean searchBean)Counts number of questions that match search bean criteria.ResponsedeleteAnswer(String answerId)Deletes answer with given ianswerId.ResponsedeleteQuestion(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.IntegergetNumOfCorrectAnswers(String userId, boolean isEnterprise)Retrieves number of correct answers.IntegergetNumOfRequiredQuestions(String userId, boolean isEnterprise)Retrieves number of required questions.IdentityQuestiongetQuestion(String questionId)Retrieves question that matches given idbooleanisQuestionsRequired(String userId)ResponseisResponseCorrect(String userId, List<UserIdentityAnswer> newAnswerList)Determines is the answers that are provided by the user are the same as those stored in the system.booleanisResponseValid(String userId, List<UserIdentityAnswer> newAnswerList)Deprecated.booleanisUserAnsweredSecurityQuestions(String userId)Checks if user answered security questions.ResponseresetQuestionsForUser(String userId)Resets questions for user with given userId.ResponsesaveAnswer(UserIdentityAnswer answer)Saves answer.ResponsesaveAnswers(List<UserIdentityAnswer> answerList)Saves answers.ResponsesaveQuestion(IdentityQuestion question)Saves Identity question.ResponsevalidateAnswers(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:ChallengeResponseWebServiceRetrieves number of required questions.- Specified by:
getNumOfRequiredQuestionsin 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:ChallengeResponseWebServiceRetrieves number of correct answers.- Specified by:
getNumOfCorrectAnswersin interfaceChallengeResponseWebService- Parameters:
userId- User Id.isEnterprise- Is enterprise flag.- Returns:
- Number of correct questions.
-
count
public Integer count(IdentityQuestionSearchBean searchBean)
Description copied from interface:ChallengeResponseWebServiceCounts number of questions that match search bean criteria.- Specified by:
countin interfaceChallengeResponseWebService- Parameters:
searchBean- Search bean.- Returns:
- Number of questions that matched search criteria.
-
getQuestion
public IdentityQuestion getQuestion(String questionId)
Description copied from interface:ChallengeResponseWebServiceRetrieves question that matches given id- Specified by:
getQuestionin interfaceChallengeResponseWebService- Parameters:
questionId- Question id.- Returns:
- Identity question.
-
findQuestionBeans
public List<IdentityQuestion> findQuestionBeans(IdentityQuestionSearchBean searchBean, int from, int size)
Description copied from interface:ChallengeResponseWebServiceRetrieve question beans that match search criteria.- Specified by:
findQuestionBeansin 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:ChallengeResponseWebServiceRetrieves list of UserIdentityAnswer beans that match given search criteria- Specified by:
findAnswerBeansin 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:ChallengeResponseWebServiceSaves Identity question.- Specified by:
saveQuestionin interfaceChallengeResponseWebService- Parameters:
question- Identity question.- Returns:
- Response.
-
deleteQuestion
public Response deleteQuestion(String questionId)
Description copied from interface:ChallengeResponseWebServiceDeletes Identity question with given id.- Specified by:
deleteQuestionin interfaceChallengeResponseWebService- Parameters:
questionId- Identity question id.- Returns:
- Response.
-
saveAnswer
public Response saveAnswer(UserIdentityAnswer answer)
Description copied from interface:ChallengeResponseWebServiceSaves answer.- Specified by:
saveAnswerin interfaceChallengeResponseWebService- Parameters:
answer- Answer.- Returns:
- Response.
-
deleteAnswer
public Response deleteAnswer(String answerId)
Description copied from interface:ChallengeResponseWebServiceDeletes answer with given ianswerId.- Specified by:
deleteAnswerin interfaceChallengeResponseWebService- Parameters:
answerId- Answer Id.- Returns:
- Response.
-
validateAnswers
public Response validateAnswers(List<UserIdentityAnswer> answerList)
Description copied from interface:ChallengeResponseWebServiceValidates list of answers.- Specified by:
validateAnswersin interfaceChallengeResponseWebService- Parameters:
answerList- List of answers.- Returns:
- Response.
-
saveAnswers
public Response saveAnswers(List<UserIdentityAnswer> answerList)
Description copied from interface:ChallengeResponseWebServiceSaves answers.- Specified by:
saveAnswersin 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:ChallengeResponseWebServiceDetermines is the answers that are provided by the user are the same as those stored in the system.- Specified by:
isResponseValidin 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:ChallengeResponseWebServiceDetermines is the answers that are provided by the user are the same as those stored in the system.- Specified by:
isResponseCorrectin 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:ChallengeResponseWebServiceChecks if user answered security questions.- Specified by:
isUserAnsweredSecurityQuestionsin interfaceChallengeResponseWebService- Parameters:
userId- User Id.- Returns:
- True if answered, false otherwise.
- Throws:
Exception
-
resetQuestionsForUser
public Response resetQuestionsForUser(String userId)
Description copied from interface:ChallengeResponseWebServiceResets questions for user with given userId.- Specified by:
resetQuestionsForUserin interfaceChallengeResponseWebService- Parameters:
userId- User Id.- Returns:
- Response.
-
getAllIdentityQuestionGroups
public List<IdentityQuestGroup> getAllIdentityQuestionGroups()
Description copied from interface:ChallengeResponseWebServiceRetrieves all identity question groups.- Specified by:
getAllIdentityQuestionGroupsin interfaceChallengeResponseWebService- Returns:
- List of identity question groups.
-
isQuestionsRequired
public boolean isQuestionsRequired(String userId)
- Specified by:
isQuestionsRequiredin interfaceChallengeResponseWebService
-
-