Interface TmaEligibilityContextService
- All Known Implementing Classes:
DefaultTmaEligibilityContextUpdateService
public interface TmaEligibilityContextService
Service responsible for updating
TmaEligibilityContexts for the current customer.- Since:
- 1810
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves current's customer eligibility contextsextractEligibilityContextByCustomer(String customerUid) Retrieves current's customer eligibility contextsbooleanVerifies if the eligibility context and eligibility rules should be applied.voidupdateApplyEligibilityFlag(boolean applyEligibilityFlag) Updates the flag used to decide if the eligibility should be applied or not.voidupdateEligibilityContexts(boolean forceRefresh) Updates theTmaEligibilityContexts for the current customer.voidupdateEligibilityContextsByCustomer(boolean forceRefresh, CustomerModel customer) Updates theTmaEligibilityContexts for the current customer.
-
Method Details
-
updateEligibilityContexts
void updateEligibilityContexts(boolean forceRefresh) Updates theTmaEligibilityContexts for the current customer.- Parameters:
forceRefresh- flag which indicates whether the eligibility contexts should be recreated before updating.
-
updateEligibilityContextsByCustomer
Updates theTmaEligibilityContexts for the current customer.- Parameters:
customer- Indicating the customer for whom eligibility context needs refreshforceRefresh- indicates whether to delete the old eligibility context or not
-
shouldApplyEligibility
boolean shouldApplyEligibility()Verifies if the eligibility context and eligibility rules should be applied.- Returns:
- true if eligibility should be applied, false otherwise
-
updateApplyEligibilityFlag
void updateApplyEligibilityFlag(boolean applyEligibilityFlag) Updates the flag used to decide if the eligibility should be applied or not.- Parameters:
applyEligibilityFlag- the new value to be used for update
-
extractEligibilityContext
Set<TmaEligibilityContextModel> extractEligibilityContext()Retrieves current's customer eligibility contexts- Returns:
- applicable eligibility contexts for the customer
-
extractEligibilityContextByCustomer
Retrieves current's customer eligibility contexts- Parameters:
customerUid- identifies the customer- Returns:
- applicable eligibility contexts for the customer
-