Interface TmaCustomerFacade

All Superinterfaces:
de.hybris.platform.commercefacades.customer.CustomerFacade
All Known Implementing Classes:
TmaDefaultCustomerFacade

public interface TmaCustomerFacade extends de.hybris.platform.commercefacades.customer.CustomerFacade
Facade gathering TmaSubscriptionBaseData related operations.
Since:
6.7
  • Method Details

    • getValidSubscriptionDataForCustomer

      List<TmaSubscriptionBaseData> getValidSubscriptionDataForCustomer(List<TmaSubscriptionBaseData> subscriptionBases)
      Identifies the subscription data from the ones given eligible for the current logged in customer.
      Parameters:
      subscriptionBases - the list of subscriber identities
      Returns:
      the list of eligible subscription bases
    • getEligibleSubscriptionData

      Optional<TmaSubscriptionBaseData> getEligibleSubscriptionData(String subscriberIdentity, String billingSystemId, TmaProcessType processType)
      Returns the TmaSubscriptionBaseData if any matching subscription with given details is found through the eligible customer's subscriptions for given process.
      Parameters:
      subscriberIdentity - subscription's identity
      billingSystemId - subscription's billing system
      processType - the flow against which the subscription's eligibility is being checked
      Returns:
      the TmaSubscriptionBaseData if any matching subscription exists
    • getSubscriptionBasesFromString

      List<TmaSubscriptionBaseData> getSubscriptionBasesFromString(String subscriberIdentities)
      Determines the TmaSubscriptionBaseData DTOs from the given string where subscriber identities and billing account ids are separated by ','.
      Parameters:
      subscriberIdentities - the string value containing multiple subscriber identities and billing system ids
      Returns:
      the list of subscription base entities
    • retrieveEligibleProcessTypes

      Set<TmaProcessType> retrieveEligibleProcessTypes()
      Retrieves the TmaProcessTypes for which the current customer is eligible.
      Returns:
      eligible process types.
    • retrieveEligibleProcessTypesByCustomerId

      Set<TmaProcessType> retrieveEligibleProcessTypesByCustomerId(String customerId)
      Retrieves the TmaProcessTypes for which the given customer is eligible. If no input customer id is given it will return the TmaProcessType for the current user on the session.
      Parameters:
      customerId - The id of the customer
      Returns:
      eligible process flows for the given customer; if customerId is empty return the processes for the current user.
    • retrieveEligibleSubscriptions

      Set<TmaSubscriptionBaseData> retrieveEligibleSubscriptions(TmaProcessType processType)
      Retrieves customer's eligible subscriptions based on given TmaProcessType.
      Parameters:
      processType - the process type for which eligible subscriptions will be determined
      Returns:
      the eligible TmaSubscriptionBaseData
    • retrieveEligibleSubscriptions

      Set<TmaSubscriptionBaseData> retrieveEligibleSubscriptions(TmaProcessType processType, String userId)
      Retrieves the provided customer's eligible subscriptions based on given TmaProcessType.
      Parameters:
      processType - the process type for which eligible subscriptions will be determined
      userId - the identifier of the customer
      Returns:
      the eligible TmaSubscriptionBaseData
    • determineEligibleSubscriptionSelections

      Map<String,List<TmaSubscriptionSelectionData>> determineEligibleSubscriptionSelections(TmaProcessType processType)
      Retrieves all eligible subscription selections for a process, grouped by TmaBillingAgreementModel and TmaBundledProductOfferingModel, for given customer UID. Each billing agreement may generate 1 or more subscription selection groups, depending on the number of different BPOs assigned to the subscription bases part of the billing agreement. All subscriptions part of the same billing agreement and with same BPO will form a selection group. If no subscription available for given customer an empty map will be returned.
      Parameters:
      processType - the process for which eligible subscriptions are retrieved
      Returns:
      Map of TmaSubscriptionSelectionData including some information from subscription base and billing agreement
    • getMainTariffProductCodesForSubscriptionBases

      Set<String> getMainTariffProductCodesForSubscriptionBases(List<TmaSubscriptionBaseData> subscriptionDatas)
      Determines the product codes of the main tariffs corresponding to the each of the given TmaSubscriptionBaseData.
      Parameters:
      subscriptionDatas - the list of subscription bases
      Returns:
      the set of product codes or empty list if the input data is empty
    • getCcPaymentInfosForUser

      List<CCPaymentInfoData> getCcPaymentInfosForUser(String userId)
      Retrieves the credit card payment methods for the provided userId.
      Parameters:
      userId - Unique identifier of the user
      Returns:
      List of CCPaymentInfoData containing the payment methods for the provided user
    • getCreditCardPaymentInfo

      CCPaymentInfoData getCreditCardPaymentInfo(String id, String userId)
      Retrieves the specific credit card payment method for the provided userId.
      Parameters:
      id - Unique identifier of the payment method
      userId - Unique identifier of the user
      Returns:
      A specific CCPaymentInfoData containing the payment method for the provided user
    • 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.
    • hasCurrentAuthenticationRoleProvided

      boolean hasCurrentAuthenticationRoleProvided(String role)
      This method verifies if the authentication for current context has role provided
      Parameters:
      role - The input role.
      Returns:
      True if current client has the input role, otherwise false.
    • getAllProcessTypes

      Set<TmaProcessType> getAllProcessTypes()
      Gets all the ProcessTypes that exist in the system.
      Returns:
      A list of processTypes.
    • updateEligibilityContextsByCustomer

      void updateEligibilityContextsByCustomer(String userId)
      Updates the eligibility context for the provided user.
      Parameters:
      userId - The identifier of the user