Class GetAllUserConsentServiceImpl

java.lang.Object
com.skava.service.impl.GetAllUserConsentServiceImpl
All Implemented Interfaces:
com.skava.core.EcommService<UserConsentRequest,UserConsentFindAllResponse>, GetAllUserConsentService

@Service @Transactional public class GetAllUserConsentServiceImpl extends Object implements GetAllUserConsentService
This service class implements GetAllUserConsentService and handles the get all user consent service request, process it and save the details in DB. It also implements business logic required to retrieve all user consents.
Author:
Infosys Equinox
  • Constructor Details

    • GetAllUserConsentServiceImpl

      public GetAllUserConsentServiceImpl()
      Default Constructor
  • Method Details

    • process

      @HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) public UserConsentFindAllResponse process(UserConsentRequest request)
      This method is used to load all consents captured for a user. Consent is similar to user preferences, where user can opt in or opt out of certain things like , Opt in for monthly news letter, News subscription,etc. User Consent will have the consent information and the user identifier who have captured that consent
      Specified by:
      process in interface com.skava.core.EcommService<UserConsentRequest,UserConsentFindAllResponse>
      Parameters:
      request - Holds UserConsentRequest object which is used for loading all user consents.
      Returns:
      The UserConsentFindAllResponse object which returns success response code and message on successful fetching of user consents. If any validations fails, throws validate exception.
    • getValidator

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

      public UserConsentFindAllResponse methodFallback(UserConsentRequest input)
      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:
      input - Holds UserConsentRequest object.
      Returns:
      The UserConsentFindAllResponse object.