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 Summary
Modifier and TypeMethodDescriptiondetermineEligibleSubscriptionSelections(TmaProcessType processType) Retrieves all eligible subscription selections for a process, grouped byTmaBillingAgreementModelandTmaBundledProductOfferingModel, for given customer UID.Gets all the ProcessTypes that exist in the system.getCcPaymentInfosForUser(String userId) Retrieves the credit card payment methods for the provided userId.getCreditCardPaymentInfo(String id, String userId) Retrieves the specific credit card payment method for the provided userId.getEligibleSubscriptionData(String subscriberIdentity, String billingSystemId, TmaProcessType processType) Returns theTmaSubscriptionBaseDataif any matching subscription with given details is found through the eligible customer's subscriptions for given process.getMainTariffProductCodesForSubscriptionBases(List<TmaSubscriptionBaseData> subscriptionDatas) Determines the product codes of the main tariffs corresponding to the each of the givenTmaSubscriptionBaseData.getSubscriptionBasesFromString(String subscriberIdentities) Determines theTmaSubscriptionBaseDataDTOs from the given string where subscriber identities and billing account ids are separated by ','.getValidSubscriptionDataForCustomer(List<TmaSubscriptionBaseData> subscriptionBases) Identifies the subscription data from the ones given eligible for the current logged in customer.booleanThis method verifies if the authentication for current context has role providedRetrieves theTmaProcessTypes for which the current customer is eligible.retrieveEligibleProcessTypesByCustomerId(String customerId) Retrieves theTmaProcessTypes for which the given customer is eligible.retrieveEligibleSubscriptions(TmaProcessType processType) Retrieves customer's eligible subscriptions based on givenTmaProcessType.retrieveEligibleSubscriptions(TmaProcessType processType, String userId) Retrieves the provided customer's eligible subscriptions based on givenTmaProcessType.voidupdateEligibilityContexts(boolean forceRefresh) Updates theTmaEligibilityContexts for the current customer.voidUpdates the eligibility context for the provided user.Methods inherited from interface de.hybris.platform.commercefacades.customer.CustomerFacade
changeGuestToCustomer, changePassword, changeUid, closeAccount, createGuestUserForAnonymousCheckout, forgottenPassword, generateGUID, getCurrentCustomer, getCurrentCustomerUid, getUserForUID, loginSuccess, nextDummyCustomerData, publishLoginSuccessEvent, register, rememberMeLoginSuccessWithUrlEncoding, setPassword, updateCartWithGuestForAnonymousCheckout, updateFullProfile, updatePassword, updateProfile
-
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 theTmaSubscriptionBaseDataif any matching subscription with given details is found through the eligible customer's subscriptions for given process.- Parameters:
subscriberIdentity- subscription's identitybillingSystemId- subscription's billing systemprocessType- the flow against which the subscription's eligibility is being checked- Returns:
- the
TmaSubscriptionBaseDataif any matching subscription exists
-
getSubscriptionBasesFromString
Determines theTmaSubscriptionBaseDataDTOs 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 theTmaProcessTypes for which the current customer is eligible.- Returns:
- eligible process types.
-
retrieveEligibleProcessTypesByCustomerId
Retrieves theTmaProcessTypes for which the given customer is eligible. If no input customer id is given it will return theTmaProcessTypefor 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
Retrieves customer's eligible subscriptions based on givenTmaProcessType.- 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 givenTmaProcessType.- Parameters:
processType- the process type for which eligible subscriptions will be determineduserId- 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 byTmaBillingAgreementModelandTmaBundledProductOfferingModel, 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:
MapofTmaSubscriptionSelectionDataincluding 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 givenTmaSubscriptionBaseData.- Parameters:
subscriptionDatas- the list of subscription bases- Returns:
- the set of product codes or empty list if the input data is empty
-
getCcPaymentInfosForUser
Retrieves the credit card payment methods for the provided userId.- Parameters:
userId- Unique identifier of the user- Returns:
- List of
CCPaymentInfoDatacontaining the payment methods for the provided user
-
getCreditCardPaymentInfo
Retrieves the specific credit card payment method for the provided userId.- Parameters:
id- Unique identifier of the payment methoduserId- Unique identifier of the user- Returns:
- A specific
CCPaymentInfoDatacontaining the payment method for the provided user
-
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.
-
hasCurrentAuthenticationRoleProvided
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
Updates the eligibility context for the provided user.- Parameters:
userId- The identifier of the user
-