Class DeleteUserConsentServiceImpl

java.lang.Object
com.skava.service.impl.DeleteUserConsentServiceImpl
All Implemented Interfaces:
com.skava.core.EcommService<UserConsentRequest,UserConsentResponse>, DeleteUserConsentService

@Service @Transactional public class DeleteUserConsentServiceImpl extends Object implements DeleteUserConsentService
This service class implements DeleteUserConsentService and handles the delete user consent service request, process it and save the details in DB. It also implements business logic required to delete consent of a user.
Author:
Infosys Equinox
  • Constructor Details

    • DeleteUserConsentServiceImpl

      public DeleteUserConsentServiceImpl()
      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 delete user consent service.
      Specified by:
      getValidator in interface com.skava.core.EcommService<UserConsentRequest,UserConsentResponse>
      Returns:
      The list of Instance of ValidatorComponent.
    • process

      @SendEvent(eventType="userservice/userconsent/delete", identifier="request_id") @HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) public UserConsentResponse process(UserConsentRequest request)
      This service is used to delete a user consent which are 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,UserConsentResponse>
      Parameters:
      request - Holds UserConsentRequest object which is used for deleting an user consent.
      Returns:
      The UserConsentCreateResponse object which returns the success response code and message on successful deletion.
    • methodFallback

      public UserConsentResponse 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 UserConsentResponse object.