Class GetSecurityQuestionsImpl

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

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

    • GetSecurityQuestionsImpl

      public GetSecurityQuestionsImpl()
      Default Constructor
  • Method Details

    • getValidator

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

      @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 with answers for the requested user. The security questions with answers will get loaded only for ACTIVE users.
      Specified by:
      process in interface com.skava.core.EcommService<UserCredentialsRequest,UsersResponse>
      Parameters:
      request - Holds UserCredentialsRequest object which is used for loading the user security questions and answers details from database.
      Returns:
      The UsersResponse 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.
    • methodFallback

      public UsersResponse methodFallback(UserCredentialsRequest request)
      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:
      request - Holds UserCredentialsRequest object.
      Returns:
      The UsersResponse object.