Class TmaDefaultCustomerFacade
java.lang.Object
de.hybris.platform.commercefacades.customer.impl.DefaultCustomerFacade
de.hybris.platform.b2ctelcofacades.user.impl.TmaDefaultCustomerFacade
- All Implemented Interfaces:
TmaCustomerFacade,de.hybris.platform.commercefacades.customer.CustomerFacade
public class TmaDefaultCustomerFacade
extends de.hybris.platform.commercefacades.customer.impl.DefaultCustomerFacade
implements TmaCustomerFacade
Tma implementation of customer facade. It implements telco specific operations around customers.
- Since:
- 6.7
-
Constructor Summary
ConstructorsConstructorDescriptionTmaDefaultCustomerFacade(de.hybris.platform.enumeration.EnumerationService enumerationService, TmaIdentificationService tmaIdentificationService, TmaPaymentMethodService tmaPaymentMethodService) -
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 userCode) Retrieves the credit card payment methods for the provided userId.getCreditCardPaymentInfo(String id, String userCode) 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.protected de.hybris.platform.enumeration.EnumerationServicegetMainTariffProductCodesForSubscriptionBases(List<TmaSubscriptionBaseData> subscriptionDatas) Determines the product codes of the main tariffs corresponding to the each of the givenTmaSubscriptionBaseData.protected de.hybris.platform.servicelayer.dto.converter.Converter<UserModel,PrincipalData> getSubscriptionBasesFromString(String subscriberIdentities) Determines theTmaSubscriptionBaseDataDTOs from the given string where subscriber identities and billing account ids are separated by ','.protected TmaCustomerInventoryServiceprotected TmaEligibilityContextServiceprotected TmaIdentificationServiceprotected TmaPaymentMethodServiceprotected TmaSubscriptionAccessFacadeprotected de.hybris.platform.servicelayer.dto.converter.Converter<TmaSubscriptionBaseModel,TmaSubscriptionBaseData> protected TmaSubscriptionBaseServiceprotected de.hybris.platform.servicelayer.dto.converter.Converter<TmaSubscriptionBaseModel,TmaSubscriptionSelectionData> 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 providedvoidRetrieves 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.protected voidsetCommonPropertiesForRegister(RegisterData registerData, CustomerModel customerModel) voidsetPrincipalConverter(de.hybris.platform.servicelayer.dto.converter.Converter<UserModel, PrincipalData> principalConverter) voidsetTmaCustomerInventoryService(TmaCustomerInventoryService tmaCustomerInventoryService) voidsetTmaEligibilityContextService(TmaEligibilityContextService tmaEligibilityContextService) voidsetTmaSubscriptionAccessFacade(TmaSubscriptionAccessFacade tmaSubscriptionAccessFacade) voidsetTmaSubscriptionBaseConverter(de.hybris.platform.servicelayer.dto.converter.Converter<TmaSubscriptionBaseModel, TmaSubscriptionBaseData> tmaSubscriptionBaseConverter) voidsetTmaSubscriptionBaseService(TmaSubscriptionBaseService tmaSubscriptionBaseService) voidsetTmaSubscriptionSelectionConverter(de.hybris.platform.servicelayer.dto.converter.Converter<TmaSubscriptionBaseModel, TmaSubscriptionSelectionData> tmaSubscriptionSelectionConverter) voidupdateEligibilityContexts(boolean forceRefresh) Updates theTmaEligibilityContexts for the current customer.voidUpdates the eligibility context for the provided user.Methods inherited from class de.hybris.platform.commercefacades.customer.impl.DefaultCustomerFacade
changeGuestToCustomer, changePassword, changeUid, closeAccount, createGuestUserForAnonymousCheckout, forgottenPassword, generateGUID, getAddressConverter, getBaseSiteService, getBaseStoreService, getBusinessProcessService, getCartCleanStrategy, getCartService, getCommerceCartService, getCommonI18NService, getCreditCardPaymentInfoConverter, getCurrentCustomer, getCurrentCustomerUid, getCurrentSessionCustomer, getCurrentUser, getCustomerAccountService, getCustomerConverter, getCustomerNameStrategy, getCustomerReversePopulator, getEventService, getModelService, getOrderFacade, getPasswordEncoderService, getSessionService, getStoreSessionFacade, getTitleConverter, getUserFacade, getUserForUID, getUserMatchingService, getUserService, initializeCommerceEvent, nextDummyCustomerData, publishLoginSuccessEvent, register, rememberMeLoginSuccessWithUrlEncoding, setAddressConverter, setAddressReversePopulator, setBaseSiteService, setBaseStoreService, setBusinessProcessService, setCartCleanStrategy, setCartService, setCommerceCartService, setCommonI18NService, setCreditCardPaymentInfoConverter, setCustomerAccountService, setCustomerConverter, setCustomerNameStrategy, setCustomerReversePopulator, setEventService, setModelService, setOrderFacade, setPassword, setPasswordEncoderService, setSessionService, setStoreSessionFacade, setTitleConverter, setTitleForRegister, setUidForRegister, setUserFacade, setUserMatchingService, setUserService, updateCartWithGuestForAnonymousCheckout, updateFullProfile, updatePassword, updateProfile, updateSessionCurrency, updateSessionLanguage, validateDataBeforeUpdateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.commercefacades.customer.CustomerFacade
changeGuestToCustomer, changePassword, changeUid, closeAccount, createGuestUserForAnonymousCheckout, forgottenPassword, generateGUID, getCurrentCustomer, getCurrentCustomerUid, getUserForUID, nextDummyCustomerData, publishLoginSuccessEvent, register, rememberMeLoginSuccessWithUrlEncoding, setPassword, updateCartWithGuestForAnonymousCheckout, updateFullProfile, updatePassword, updateProfile
-
Constructor Details
-
TmaDefaultCustomerFacade
public TmaDefaultCustomerFacade(de.hybris.platform.enumeration.EnumerationService enumerationService, TmaIdentificationService tmaIdentificationService, TmaPaymentMethodService tmaPaymentMethodService)
-
-
Method Details
-
getValidSubscriptionDataForCustomer
public List<TmaSubscriptionBaseData> getValidSubscriptionDataForCustomer(List<TmaSubscriptionBaseData> subscriptionBases) Description copied from interface:TmaCustomerFacadeIdentifies the subscription data from the ones given eligible for the current logged in customer.- Specified by:
getValidSubscriptionDataForCustomerin interfaceTmaCustomerFacade- Parameters:
subscriptionBases- the list of subscriber identities- Returns:
- the list of eligible subscription bases
-
getEligibleSubscriptionData
public Optional<TmaSubscriptionBaseData> getEligibleSubscriptionData(String subscriberIdentity, String billingSystemId, TmaProcessType processType) Description copied from interface:TmaCustomerFacadeReturns theTmaSubscriptionBaseDataif any matching subscription with given details is found through the eligible customer's subscriptions for given process.- Specified by:
getEligibleSubscriptionDatain interfaceTmaCustomerFacade- 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
Description copied from interface:TmaCustomerFacadeDetermines theTmaSubscriptionBaseDataDTOs from the given string where subscriber identities and billing account ids are separated by ','.- Specified by:
getSubscriptionBasesFromStringin interfaceTmaCustomerFacade- Parameters:
subscriberIdentities- the string value containing multiple subscriber identities and billing system ids- Returns:
- the list of subscription base entities
-
retrieveEligibleProcessTypes
Description copied from interface:TmaCustomerFacadeRetrieves theTmaProcessTypes for which the current customer is eligible.- Specified by:
retrieveEligibleProcessTypesin interfaceTmaCustomerFacade- Returns:
- eligible process types.
-
retrieveEligibleProcessTypesByCustomerId
Description copied from interface:TmaCustomerFacadeRetrieves 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.- Specified by:
retrieveEligibleProcessTypesByCustomerIdin interfaceTmaCustomerFacade- 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
Description copied from interface:TmaCustomerFacadeRetrieves customer's eligible subscriptions based on givenTmaProcessType.- Specified by:
retrieveEligibleSubscriptionsin interfaceTmaCustomerFacade- Parameters:
processType- the process type for which eligible subscriptions will be determined- Returns:
- the eligible
TmaSubscriptionBaseData
-
retrieveEligibleSubscriptions
public Set<TmaSubscriptionBaseData> retrieveEligibleSubscriptions(TmaProcessType processType, String userId) Description copied from interface:TmaCustomerFacadeRetrieves the provided customer's eligible subscriptions based on givenTmaProcessType.- Specified by:
retrieveEligibleSubscriptionsin interfaceTmaCustomerFacade- Parameters:
processType- the process type for which eligible subscriptions will be determineduserId- the identifier of the customer- Returns:
- the eligible
TmaSubscriptionBaseData
-
determineEligibleSubscriptionSelections
public Map<String,List<TmaSubscriptionSelectionData>> determineEligibleSubscriptionSelections(TmaProcessType processType) Description copied from interface:TmaCustomerFacadeRetrieves 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.- Specified by:
determineEligibleSubscriptionSelectionsin interfaceTmaCustomerFacade- Parameters:
processType- the process for which eligible subscriptions are retrieved- Returns:
MapofTmaSubscriptionSelectionDataincluding some information from subscription base and billing agreement
-
getMainTariffProductCodesForSubscriptionBases
public Set<String> getMainTariffProductCodesForSubscriptionBases(List<TmaSubscriptionBaseData> subscriptionDatas) Description copied from interface:TmaCustomerFacadeDetermines the product codes of the main tariffs corresponding to the each of the givenTmaSubscriptionBaseData.- Specified by:
getMainTariffProductCodesForSubscriptionBasesin interfaceTmaCustomerFacade- Parameters:
subscriptionDatas- the list of subscription bases- Returns:
- the set of product codes or empty list if the input data is empty
-
getCcPaymentInfosForUser
Description copied from interface:TmaCustomerFacadeRetrieves the credit card payment methods for the provided userId.- Specified by:
getCcPaymentInfosForUserin interfaceTmaCustomerFacade- Parameters:
userCode- Unique identifier of the user- Returns:
- List of
CCPaymentInfoDatacontaining the payment methods for the provided user
-
getCreditCardPaymentInfo
Description copied from interface:TmaCustomerFacadeRetrieves the specific credit card payment method for the provided userId.- Specified by:
getCreditCardPaymentInfoin interfaceTmaCustomerFacade- Parameters:
id- Unique identifier of the payment methoduserCode- Unique identifier of the user- Returns:
- A specific
CCPaymentInfoDatacontaining the payment method for the provided user
-
updateEligibilityContexts
public void updateEligibilityContexts(boolean forceRefresh) Description copied from interface:TmaCustomerFacadeUpdates theTmaEligibilityContexts for the current customer.- Specified by:
updateEligibilityContextsin interfaceTmaCustomerFacade- Parameters:
forceRefresh- flag which indicates whether the eligibility contexts should be recreated before updating.
-
loginSuccess
public void loginSuccess()- Specified by:
loginSuccessin interfacede.hybris.platform.commercefacades.customer.CustomerFacade- Overrides:
loginSuccessin classde.hybris.platform.commercefacades.customer.impl.DefaultCustomerFacade
-
hasCurrentAuthenticationRoleProvided
Description copied from interface:TmaCustomerFacadeThis method verifies if the authentication for current context has role provided- Specified by:
hasCurrentAuthenticationRoleProvidedin interfaceTmaCustomerFacade- Parameters:
role- The input role.- Returns:
- True if current client has the input role, otherwise false.
-
getAllProcessTypes
Description copied from interface:TmaCustomerFacadeGets all the ProcessTypes that exist in the system.- Specified by:
getAllProcessTypesin interfaceTmaCustomerFacade- Returns:
- A list of processTypes.
-
updateEligibilityContextsByCustomer
Description copied from interface:TmaCustomerFacadeUpdates the eligibility context for the provided user.- Specified by:
updateEligibilityContextsByCustomerin interfaceTmaCustomerFacade- Parameters:
userId- The identifier of the user
-
setCommonPropertiesForRegister
protected void setCommonPropertiesForRegister(RegisterData registerData, CustomerModel customerModel) - Overrides:
setCommonPropertiesForRegisterin classde.hybris.platform.commercefacades.customer.impl.DefaultCustomerFacade
-
getTmaSubscriptionAccessFacade
-
setTmaSubscriptionAccessFacade
-
getTmaEligibilityContextService
-
setTmaEligibilityContextService
public void setTmaEligibilityContextService(TmaEligibilityContextService tmaEligibilityContextService) -
getTmaCustomerInventoryService
-
setTmaCustomerInventoryService
-
getTmaSubscriptionBaseService
-
setTmaSubscriptionBaseService
-
getTmaSubscriptionBaseConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<TmaSubscriptionBaseModel,TmaSubscriptionBaseData> getTmaSubscriptionBaseConverter() -
setTmaSubscriptionBaseConverter
public void setTmaSubscriptionBaseConverter(de.hybris.platform.servicelayer.dto.converter.Converter<TmaSubscriptionBaseModel, TmaSubscriptionBaseData> tmaSubscriptionBaseConverter) -
getTmaSubscriptionSelectionConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<TmaSubscriptionBaseModel,TmaSubscriptionSelectionData> getTmaSubscriptionSelectionConverter() -
setTmaSubscriptionSelectionConverter
public void setTmaSubscriptionSelectionConverter(de.hybris.platform.servicelayer.dto.converter.Converter<TmaSubscriptionBaseModel, TmaSubscriptionSelectionData> tmaSubscriptionSelectionConverter) -
getPrincipalConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<UserModel,PrincipalData> getPrincipalConverter() -
setPrincipalConverter
public void setPrincipalConverter(de.hybris.platform.servicelayer.dto.converter.Converter<UserModel, PrincipalData> principalConverter) -
getAddressReversePopulator
- Overrides:
getAddressReversePopulatorin classde.hybris.platform.commercefacades.customer.impl.DefaultCustomerFacade
-
getEnumerationService
protected de.hybris.platform.enumeration.EnumerationService getEnumerationService() -
getTmaIdentificationService
-
getTmaPaymentMethodService
-