Class GetAllUserConsentHistoryServiceImpl

java.lang.Object
com.skava.service.impl.GetAllUserConsentHistoryServiceImpl
All Implemented Interfaces:
com.skava.core.EcommService<UserConsentHistoryRequest,UserConsentHistoryFindAllResponse>, GetAllUserConsentHistoryService

@Service @Transactional public class GetAllUserConsentHistoryServiceImpl extends Object implements GetAllUserConsentHistoryService
This service class implements GetAllUserConsentHistoryServiceImpl and handles loading the user consent history details from DB. It also implements business logic required for loading user consent history for a particular user within a collection.
Author:
Infosys Equinox
  • Constructor Details

    • GetAllUserConsentHistoryServiceImpl

      public GetAllUserConsentHistoryServiceImpl()
      Default Constructor
  • Method Details

    • process

      @HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) public UserConsentHistoryFindAllResponse process(UserConsentHistoryRequest request)
      This method is used to load all consents history 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<UserConsentHistoryRequest,UserConsentHistoryFindAllResponse>
      Parameters:
      request - Holds UserConsentHistoryRequest object which is used for loading all user consents history for a particular user.
      Returns:
      The UserConsentHistoryFindAllResponse object which returns success response code and message on successful fetching of user consents history. 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 history service.
      Specified by:
      getValidator in interface com.skava.core.EcommService<UserConsentHistoryRequest,UserConsentHistoryFindAllResponse>
      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 - Holds NotesRequest object.
      Returns:
      The List of NotesResponse object.