Class DefaultUserFacade
java.lang.Object
de.hybris.platform.commercefacades.user.impl.DefaultUserFacade
- All Implemented Interfaces:
UserFacade
- Direct Known Subclasses:
ChineseUserFacade
Default implementation of
UserFacade.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAddress(AddressData addressData) Adds the address for the current uservoideditAddress(AddressData addressData) Updates the address for the current userGet the list of delivery addresses.protected Converter<AddressModel,AddressData> getAddressForCode(String code) Returns the address with matching code for the current userprotected Populator<AddressData,AddressModel> protected Populator<CCPaymentInfoData,CreditCardPaymentInfoModel> protected CartServiceReturns the current user's credit card payment info given it's codegetCCPaymentInfos(boolean saved) Returns the current user's Credit Card Payment Infosprotected CheckoutCustomerStrategyprotected CommerceCommonI18NServiceprotected CommonI18NServiceprotected Converter<CreditCardPaymentInfoModel,CCPaymentInfoData> protected CustomerModelprotected CustomerAccountServiceReturns the default addressprotected ModelServiceprotected Converter<TitleModel,TitleData> Provide all localized titles.protected UserMatchingServiceprotected UserServicegetUserUID(String id) Returns the UID of the found user.booleanDeprecated, for removal: This API element is subject to removal in a future version.Since 6.5.booleanTest if the current user is anonymousbooleanisDefaultAddress(String addressId) Test if the address id matches with the default address idbooleanisUserExisting(String id) Verifies whether the user exists.voidremoveAddress(AddressData addressData) Removes the address for the current uservoidRemoves credit card payment info by idvoidsetAddressConverter(Converter<AddressModel, AddressData> addressConverter) voidsetAddressReversePopulator(Populator<AddressData, AddressModel> addressReversePopulator) voidsetCardPaymentInfoReversePopulator(Populator<CCPaymentInfoData, CreditCardPaymentInfoModel> cardPaymentInfoReversePopulator) voidsetCartService(CartService cartService) voidsetCheckoutCustomerStrategy(CheckoutCustomerStrategy checkoutCustomerStrategy) voidsetCommerceCommonI18NService(CommerceCommonI18NService commerceCommonI18NService) voidsetCommonI18NService(CommonI18NService commonI18NService) voidsetCreditCardPaymentInfoConverter(Converter<CreditCardPaymentInfoModel, CCPaymentInfoData> creditCardPaymentInfoConverter) voidsetCurrentUser(String id) Sets current user explicitly.voidsetCustomerAccountService(CustomerAccountService customerAccountService) voidsetDefaultAddress(AddressData addressData) Sets the default addressvoidsetDefaultPaymentInfo(CCPaymentInfoData paymentInfoData) Sets the default Payment InfovoidsetModelService(ModelService modelService) voidsetTitleConverter(Converter<TitleModel, TitleData> titleConverter) voidsetUserMatchingService(UserMatchingService userMatchingService) voidsetUserService(UserService userService) voidSets users preferred currency to the current session currencyvoidSets users preferred language to the current session languagevoidDeprecated, for removal: This API element is subject to removal in a future version.since 6.7.voidupdateCCPaymentInfo(CCPaymentInfoData paymentInfo) Updates current users' payment infoprotected voidupdateDefaultPaymentInfo(CustomerModel currentCustomer)
-
Constructor Details
-
DefaultUserFacade
public DefaultUserFacade()
-
-
Method Details
-
isAnonymousUser
public boolean isAnonymousUser()Description copied from interface:UserFacadeTest if the current user is anonymous- Specified by:
isAnonymousUserin interfaceUserFacade- Returns:
trueif the current user is anonymous
-
isUserExisting
Description copied from interface:UserFacadeVerifies whether the user exists. The givenidis used to find the user in matching strategies that use one of the unique identifiers to recognize the user.- Specified by:
isUserExistingin interfaceUserFacade- Parameters:
id- - ID used to find the user- Returns:
trueif the user exists- See Also:
-
getUserUID
Description copied from interface:UserFacadeReturns the UID of the found user. The user is searched by a matching strategy that uses one of the unique identifiers to recognize the user.- Specified by:
getUserUIDin interfaceUserFacade- Parameters:
id- one of the unique identifiers used to identify a user- Returns:
- UID of the found user
- See Also:
-
setCurrentUser
Description copied from interface:UserFacadeSets current user explicitly. The givenidis used to find the user in matching strategies that use one of the unique identifiers to recognize the user.- Specified by:
setCurrentUserin interfaceUserFacade- Parameters:
id- - id used to find the user- See Also:
-
getTitles
Description copied from interface:UserFacadeProvide all localized titles.- Specified by:
getTitlesin interfaceUserFacade- Returns:
- List of
TitleDataobjects
-
isAddressBookEmpty
Deprecated, for removal: This API element is subject to removal in a future version.Since 6.5. UseCollectionUtils.isEmpty(Collection)with this.getAddressBook() as paramenter instead.Description copied from interface:UserFacadeTest if the address book is empty.- Specified by:
isAddressBookEmptyin interfaceUserFacade- Returns:
- true if the customer has no addresses
-
getAddressBook
Description copied from interface:UserFacadeGet the list of delivery addresses.- Specified by:
getAddressBookin interfaceUserFacade- Returns:
- the delivery addresses
-
addAddress
Description copied from interface:UserFacadeAdds the address for the current user- Specified by:
addAddressin interfaceUserFacade- Parameters:
addressData- the address to add
-
editAddress
Description copied from interface:UserFacadeUpdates the address for the current user- Specified by:
editAddressin interfaceUserFacade- Parameters:
addressData- the address to update
-
removeAddress
Description copied from interface:UserFacadeRemoves the address for the current user- Specified by:
removeAddressin interfaceUserFacade- Parameters:
addressData- the address to remove
-
getDefaultAddress
Description copied from interface:UserFacadeReturns the default address- Specified by:
getDefaultAddressin interfaceUserFacade- Returns:
- the address
-
setDefaultAddress
Description copied from interface:UserFacadeSets the default address- Specified by:
setDefaultAddressin interfaceUserFacade- Parameters:
addressData- the address to make default
-
getAddressForCode
Description copied from interface:UserFacadeReturns the address with matching code for the current user- Specified by:
getAddressForCodein interfaceUserFacade- Parameters:
code- the address code- Returns:
- the address
-
isDefaultAddress
Description copied from interface:UserFacadeTest if the address id matches with the default address id- Specified by:
isDefaultAddressin interfaceUserFacade- Parameters:
addressId- the address Id- Returns:
- true if address id is the default address id
-
getCCPaymentInfos
Description copied from interface:UserFacadeReturns the current user's Credit Card Payment Infos- Specified by:
getCCPaymentInfosin interfaceUserFacade- Parameters:
saved-trueto retrieve only saved credit card payment infos- Returns:
- list of Credit Card Payment Info Data
-
getCCPaymentInfoForCode
Description copied from interface:UserFacadeReturns the current user's credit card payment info given it's code- Specified by:
getCCPaymentInfoForCodein interfaceUserFacade- Parameters:
code- the code- Returns:
- the Credit Card Payment Info Data
-
setDefaultPaymentInfo
Description copied from interface:UserFacadeSets the default Payment Info- Specified by:
setDefaultPaymentInfoin interfaceUserFacade- Parameters:
paymentInfoData- the paymentInfo to make default
-
removeCCPaymentInfo
Description copied from interface:UserFacadeRemoves credit card payment info by id- Specified by:
removeCCPaymentInfoin interfaceUserFacade- Parameters:
id- the id
-
unlinkCCPaymentInfo
Deprecated, for removal: This API element is subject to removal in a future version.since 6.7. UseUserFacade.removeCCPaymentInfo(String)insteadDescription copied from interface:UserFacadeUnlink the credit card info from the customer by CC id- Specified by:
unlinkCCPaymentInfoin interfaceUserFacade- Parameters:
id- the id
-
updateCCPaymentInfo
Description copied from interface:UserFacadeUpdates current users' payment info- Specified by:
updateCCPaymentInfoin interfaceUserFacade- Parameters:
paymentInfo- - new payment info data
-
syncSessionLanguage
public void syncSessionLanguage()Description copied from interface:UserFacadeSets users preferred language to the current session language- Specified by:
syncSessionLanguagein interfaceUserFacade
-
syncSessionCurrency
public void syncSessionCurrency()Description copied from interface:UserFacadeSets users preferred currency to the current session currency- Specified by:
syncSessionCurrencyin interfaceUserFacade
-
updateDefaultPaymentInfo
-
getCurrentUserForCheckout
-
getCardPaymentInfoReversePopulator
protected Populator<CCPaymentInfoData,CreditCardPaymentInfoModel> getCardPaymentInfoReversePopulator() -
setCardPaymentInfoReversePopulator
public void setCardPaymentInfoReversePopulator(Populator<CCPaymentInfoData, CreditCardPaymentInfoModel> cardPaymentInfoReversePopulator) -
getUserService
-
setUserService
-
getCustomerAccountService
-
setCustomerAccountService
-
getCommerceCommonI18NService
-
setCommerceCommonI18NService
-
getModelService
-
setModelService
-
getCommonI18NService
-
setCommonI18NService
-
getCartService
-
setCartService
-
getAddressReversePopulator
-
setAddressReversePopulator
-
getAddressConverter
-
setAddressConverter
-
getCreditCardPaymentInfoConverter
protected Converter<CreditCardPaymentInfoModel,CCPaymentInfoData> getCreditCardPaymentInfoConverter() -
setCreditCardPaymentInfoConverter
public void setCreditCardPaymentInfoConverter(Converter<CreditCardPaymentInfoModel, CCPaymentInfoData> creditCardPaymentInfoConverter) -
getTitleConverter
-
setTitleConverter
-
getCheckoutCustomerStrategy
-
setCheckoutCustomerStrategy
-
getUserMatchingService
-
setUserMatchingService
-