Package com.skava.service.impl
Class UserAuthSendNotificationServiceImpl
java.lang.Object
com.skava.service.impl.UserAuthSendNotificationServiceImpl
- All Implemented Interfaces:
com.skava.core.EcommService<UserNotificationRequest,
,UsersResponse> UserAuthSendNotificationService
@Service
@Transactional
public class UserAuthSendNotificationServiceImpl
extends Object
implements UserAuthSendNotificationService
This service class implements UserAuthSendNotificationService and handles the login send notification service
request, process it and save the details in DB. It also implements business logic required to send notification.
- 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 user auth send notification service.methodFallback
(UserNotificationRequest 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
(UserNotificationRequest request) This service is used to authenticate an user for certain user actions like Add to cart, Checkout, Update password etc.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
-
UserAuthSendNotificationServiceImpl
public UserAuthSendNotificationServiceImpl()Default Constructor
-
-
Method Details
-
getValidator
This method is used to get the respective validator class for this user auth send notification service.- Specified by:
getValidator
in interfacecom.skava.core.EcommService<UserNotificationRequest,
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
- HoldsUserNotificationRequest
- Returns:
- The
UsersResponse
-
process
@SendEvent(eventType="userservice/usernotification/create", identifier="response_users.id") @HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) public UsersResponse process(UserNotificationRequest request) This service is used to authenticate an user for certain user actions like Add to cart, Checkout, Update password etc. The password will be sent to user via Email / SMS separately. Notification param will be send to a particular user.- Specified by:
process
in interfacecom.skava.core.EcommService<UserNotificationRequest,
UsersResponse> - Parameters:
request
- HoldsUserNotificationRequest
which is used to validate the notification param that is given from DB.- Returns:
- The
UsersResponse
which returns the success response code and message and if any validations fails, throws an validate exception.
-