Interface TmaEligibilityContextService

All Known Implementing Classes:
DefaultTmaEligibilityContextUpdateService

public interface TmaEligibilityContextService
Service responsible for updating TmaEligibilityContexts for the current customer.
Since:
1810
  • Method Details

    • updateEligibilityContexts

      void updateEligibilityContexts(boolean forceRefresh)
      Updates the TmaEligibilityContexts for the current customer.
      Parameters:
      forceRefresh - flag which indicates whether the eligibility contexts should be recreated before updating.
    • updateEligibilityContextsByCustomer

      void updateEligibilityContextsByCustomer(boolean forceRefresh, CustomerModel customer)
      Updates the TmaEligibilityContexts for the current customer.
      Parameters:
      customer - Indicating the customer for whom eligibility context needs refresh
      forceRefresh - 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

      Set<TmaEligibilityContextModel> extractEligibilityContextByCustomer(String customerUid)
      Retrieves current's customer eligibility contexts
      Parameters:
      customerUid - identifies the customer
      Returns:
      applicable eligibility contexts for the customer