Class SendResetPasswordServiceImpl

java.lang.Object
com.skava.service.impl.SendResetPasswordServiceImpl
All Implemented Interfaces:
com.skava.core.EcommService<UserResetRequest,UserResetResponse>, SendResetPasswordService

@Service @Transactional public class SendResetPasswordServiceImpl extends Object implements SendResetPasswordService
This service class implements SendResetPasswordService and handles the send reset password service request, process it and save the details in DB. It also implements business logic required to send reset password request.
Author:
Infosys Equinox
  • Constructor Details

    • SendResetPasswordServiceImpl

      public SendResetPasswordServiceImpl()
      Default Constructor
  • Method Details

    • process

      @SendEvent(eventType="userservice/credential/create", identifier="request_storeId") @HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) public UserResetResponse process(@Valid @Valid UserResetRequest request)
      This service is used to reset the password for the requested user. The last reset param will get generated as a encrypted value which contains the random generate code appended with requested user id along with current timestamp and that property will get saved to the requested user property.
      Specified by:
      process in interface com.skava.core.EcommService<UserResetRequest,UserResetResponse>
      Parameters:
      request - Holds UserResetRequest object which is used to send reset param to that particular email or phone number.
      Returns:
      The UserResetResponse object which returns success response code and response message on success of reset password call and if any validations fails, throws validate exception.
    • getValidator

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

      public UserResetResponse 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 - Method fallback.
      Parameters:
      request - Holds UserResetRequest object.
      Returns:
      The UserResetResponse object.