Package com.skava.service.impl
Class DeleteConsentServiceImpl
java.lang.Object
com.skava.service.impl.DeleteConsentServiceImpl
- All Implemented Interfaces:
com.skava.core.EcommService<ConsentRequest,
,ConsentResponse> DeleteConsentService
@Service
@Transactional(propagation=REQUIRED,
readOnly=false,
noRollbackFor=java.lang.Exception.class)
public class DeleteConsentServiceImpl
extends Object
implements DeleteConsentService
This service class implements DeleteConsentService and handles the delete consent service request, process it
and save the details in DB. It also implements business logic required to delete consent.
- 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 delete consent service.methodFallback
(ConsentRequest 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.process
(ConsentRequest request) This method is used to delete the specific consent by consent id that is given from request.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
-
DeleteConsentServiceImpl
public DeleteConsentServiceImpl()Default Constructor
-
-
Method Details
-
getValidator
This method is used to get the respective validator class for this delete consent service.- Specified by:
getValidator
in interfacecom.skava.core.EcommService<ConsentRequest,
ConsentResponse> - Returns:
- The list of
ValidatorComponent
object.
-
process
@SendEvent(eventType="userservice/consent/delete", identifier="request_id") @HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) public ConsentResponse process(ConsentRequest request) This method is used to delete the specific consent by consent id that is given from request. Consent is similar to user preferences, where user can opt in or opt out of certain things like ,Opt in for monthly news letter.- Specified by:
process
in interfacecom.skava.core.EcommService<ConsentRequest,
ConsentResponse> - Parameters:
request
- HoldsConsentRequest
object for deleting the specified consent.- 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.
-
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:
input
- HoldsConsentRequest
object.- Returns:
- The
ConsentResponse
object.
-