Class GetAllSecurityQuestionsImpl

java.lang.Object
com.skava.service.impl.GetAllSecurityQuestionsImpl
All Implemented Interfaces:
com.skava.core.EcommService<UserCredentialsRequest,UsersResponse>, GetAllSecurityQuestions

@Service public class GetAllSecurityQuestionsImpl extends Object implements GetAllSecurityQuestions
This service class implements GetAllSecurityQuestions and handles the get all security questions service request, process it and save the details in DB. It also implements business logic required to retrieve all security questions
Author:
Infosys Equinox
  • Constructor Details

    • GetAllSecurityQuestionsImpl

      public GetAllSecurityQuestionsImpl()
      Default Constructor
  • Method Details

    • process

      @SendEvent(eventType="userservice/securityquestions/get", identifier="response_users.id") @HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) public UsersResponse process(UserCredentialsRequest request)
      This service is used to get user security questions without answers. It also fetches the security questions without answers for ACTIVE users only. User can use this call to see the security questions and is used to update the user password by reseting by security questions and answers
      Specified by:
      process in interface com.skava.core.EcommService<UserCredentialsRequest,UsersResponse>
      Parameters:
      request - Holds UserCredentialsRequest object which is used to load all security questions and answers without answers. All the security answers will be null.
      Returns:
      The UsersResponse object which returns the success response code and message on successful fetching of user security questions details and if any validations fails, throws an validate exception.
    • getValidator

      public List<com.skava.core.validation.ValidatorComponent> getValidator()
      This method is used to get the respective validator class for this get all security question service.
      Specified by:
      getValidator in interface com.skava.core.EcommService<UserCredentialsRequest,UsersResponse>
      Returns:
      The list of ValidatorComponent object.
    • methodFallback

      public UsersResponse methodFallback(UserCredentialsRequest input)
      Circuit breaker fall-back method monitors for failures and once failures reach certain threshold, the circuit breaker trips and returns error response accordingly - Method fallback.
      Parameters:
      input - Holds UserCredentialsRequest object.
      Returns:
      The UsersResponse object.