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 Details

    • UserAuthSendNotificationServiceImpl

      public UserAuthSendNotificationServiceImpl()
      Default Constructor
  • Method Details

    • getValidator

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

      public UsersResponse 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.
      Parameters:
      request - Holds UserNotificationRequest
      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 interface com.skava.core.EcommService<UserNotificationRequest,UsersResponse>
      Parameters:
      request - Holds UserNotificationRequest 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.