Package com.skava.service.impl
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<com.skava.core.validation.ValidatorComponent>
This method is used to get the respective validator class for this send 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 - Method fallback.process
(@Valid UserResetRequest request) This service is used to reset the password for the requested user.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
-
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 interfacecom.skava.core.EcommService<UserResetRequest,
UserResetResponse> - Parameters:
request
- HoldsUserResetRequest
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
This method is used to get the respective validator class for this send reset password service.- Specified by:
getValidator
in interfacecom.skava.core.EcommService<UserResetRequest,
UserResetResponse> - 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 - Method fallback.- Parameters:
request
- HoldsUserResetRequest
object.- Returns:
- The
UserResetResponse
object.
-