Package com.skava.service.impl
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 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 user consent history service.methodFallback
(UserConsentHistoryRequest request) 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
(UserConsentHistoryRequest request) This method is used to load all consents history captured for a user.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
-
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 interfacecom.skava.core.EcommService<UserConsentHistoryRequest,
UserConsentHistoryFindAllResponse> - Parameters:
request
- HoldsUserConsentHistoryRequest
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
This method is used to get the respective validator class for this get all user consent history service.- Specified by:
getValidator
in interfacecom.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
- HoldsNotesRequest
object.- Returns:
- The
List
ofNotesResponse
object.
-