Class UpdateUserPasswordServiceImpl

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

@Service @Transactional(noRollbackFor=java.lang.Exception.class) public class UpdateUserPasswordServiceImpl extends Object implements UpdateUserPasswordService
This service class implements UpdateUserPasswordService and handles the update user password service request, process it and save the details in DB. It also implements business logic required to update user password.
Author:
Infosys Equinox
  • Constructor Details

    • UpdateUserPasswordServiceImpl

      public UpdateUserPasswordServiceImpl()
      Default Constructor.
  • Method Details

    • process

      @SendEvent(eventType="userservice/userpassword/patch", identifier="request_id") @HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) public UsersResponse process(UserCredentialsRequest request)
      This service is used to update password for the requested ACTIVE user. After validating the old password of the requested user from the database with the old password mentioned in the request, the password given in the request will get updated for the requested user. If the old password is not given in the request, without validating the old password the password will get updated.
      Specified by:
      process in interface com.skava.core.EcommService<UserCredentialsRequest,UsersResponse>
      Parameters:
      request - Holds UserCredentialsRequest object which holds user credentials request for updating an user password.
      Returns:
      The UsersResponse object which returns the success response code and message and if any validations fails, throws an validate exception.
    • getValidator

      @ValidatorEvent(serviceName="customer", webhookName="userservice/validator/updatepassword", actionType="update") public List<com.skava.core.validation.ValidatorComponent> getValidator()
      This method is used to get the respective validator class for this update user password service.
      Specified by:
      getValidator in interface com.skava.core.EcommService<UserCredentialsRequest,UsersResponse>
      Returns:
      The list of ValidatorComponent object.
    • 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.
      Parameters:
      request - Holds UserCredentialsRequest object.
      Returns:
      The UsersResponse object.