Class GetAllConsentServiceImpl

java.lang.Object
com.skava.service.impl.GetAllConsentServiceImpl
All Implemented Interfaces:
com.skava.core.EcommService<ConsentRequest,ConsentResponse>, GetAllConsentService

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

    • GetAllConsentServiceImpl

      public GetAllConsentServiceImpl()
      Default Constructor.
  • Method Details

    • process

      @HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) public ConsentResponse process(ConsentRequest request)
      This method is used to get all consent based on the search criteria
      Specified by:
      process in interface com.skava.core.EcommService<ConsentRequest,ConsentResponse>
      Parameters:
      request - Holds ConsentRequest object which indicates the consent request for getting consent based on search criteria.
      Returns:
      The ConsentResponse object which returns the success response code and response message on successful creation and if any validations fails, throws an validate exception.
    • searchConsent

      public List<ConsentEntity> searchConsent(List<SearchCriteria> params, int offset, int limit, long collectionId)
      This method is used to search consents.
      Parameters:
      params - Holds List of SearchCriteria object which contains the list of search criteria.
      offset - Indicates the offset which is used for displaying the searches consent.
      limit - The limit of searched consent that is displayed based on limit.
      collectionId - Indicates the collectionid which is used for searching the consent within a collection
      Returns:
      The List of ConsentEntity object which returns the searched consents.
    • getValidator

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

      public ConsentResponse methodFallback(ConsentRequest 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 ConsentRequest object.
      Returns:
      The ConsentResponse object.