Package com.skava.service.impl
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<com.skava.core.validation.ValidatorComponent>
This method is used to get the respective validator class for this get all consent service.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.process
(ConsentRequest request) This method is used to get all consent based on the search criteriasearchConsent
(List<SearchCriteria> params, int offset, int limit, long collectionId) This method is used to search consents.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.skava.core.EcommService
getValidateException, getValidator
-
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 interfacecom.skava.core.EcommService<ConsentRequest,
ConsentResponse> - Parameters:
request
- HoldsConsentRequest
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
- HoldsList
ofSearchCriteria
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
ofConsentEntity
object which returns the searched consents.
-
getValidator
This method is used to get the respective validator class for this get all consent service.- Specified by:
getValidator
in interfacecom.skava.core.EcommService<ConsentRequest,
ConsentResponse> - 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.- Parameters:
request
- HoldsConsentRequest
object.- Returns:
- The
ConsentResponse
object.
-