Class ValidateResetPasswordServiceImpl

java.lang.Object
com.skava.service.impl.ValidateResetPasswordServiceImpl
All Implemented Interfaces:
com.skava.core.EcommService<UserResetRequest,UsersResponse>, ValidateResetPasswordService

@Service @Transactional(noRollbackFor=java.lang.Exception.class) public class ValidateResetPasswordServiceImpl extends Object implements ValidateResetPasswordService
This service class implements ValidateResetPasswordService and handles the validate reset password service request, process it and save the details in DB. It also implements business logic required for validating reset password request.
Author:
Infosys Equinox
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<com.skava.core.validation.ValidatorComponent>
    This method is used to get the respective validator class for this validate reset password service.
    Circuit breaker fall-back method monitors for failures and once failures reach certain threshold, the circuit breaker trips and returns error response accordingly.
    process(@Valid UserResetRequest request)
    This method is used to validate the reset param received from email/sms and update new password for the requested user by validating the reset param from the request with the database

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.skava.core.EcommService

    getValidateException, getValidator
  • Constructor Details

    • ValidateResetPasswordServiceImpl

      public ValidateResetPasswordServiceImpl()
      Default Constructor.
  • Method Details

    • process

      @SendEvent(eventType="userservice/credential/patch", identifier="response_users.id") @HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions={com.skava.core.validation.ValidateException.class,java.lang.IllegalArgumentException.class,java.lang.IllegalStateException.class}) public UsersResponse process(@Valid @Valid UserResetRequest request)
      This method is used to validate the reset param received from email/sms and update new password for the requested user by validating the reset param from the request with the database
      Specified by:
      process in interface com.skava.core.EcommService<UserResetRequest,UsersResponse>
      Parameters:
      request - Holds UserResetRequest which is used to reset the user password by validating the reset param from the request and the database.
      Returns:
      The UsersResponse object which returns the success response code and message on successful validation of reset param 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 validate reset password service.
      Specified by:
      getValidator in interface com.skava.core.EcommService<UserResetRequest,UsersResponse>
      Returns:
      The list of ValidatorComponent object.
    • methodFallback

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