Package com.skava.service.impl
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 -
Method Summary
Modifier and TypeMethodDescriptionList<com.skava.core.validation.ValidatorComponent>
This method is used to get the respective validator class for this validate reset password service.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.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 databaseMethods 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 interfacecom.skava.core.EcommService<UserResetRequest,
UsersResponse> - Parameters:
request
- HoldsUserResetRequest
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
This method is used to get the respective validator class for this validate reset password service.- Specified by:
getValidator
in interfacecom.skava.core.EcommService<UserResetRequest,
UsersResponse> - Returns:
- The list of
ValidatorComponent
object.
-
methodFallback
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
- HoldsUserResetRequest
object.- Returns:
- The
UsersResponse
object.
-