public class DefaultUserFacade extends java.lang.Object implements UserFacade
UserFacade.| Constructor and Description |
|---|
DefaultUserFacade() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAddress(AddressData addressData)
Adds the address for the current user
|
void |
editAddress(AddressData addressData)
Updates the address for the current user
|
java.util.List<AddressData> |
getAddressBook()
Get the list of delivery addresses.
|
protected Converter<AddressModel,AddressData> |
getAddressConverter() |
AddressData |
getAddressForCode(java.lang.String code)
Returns the address with matching code for the current user
|
protected Populator<AddressData,AddressModel> |
getAddressReversePopulator() |
protected Populator<CCPaymentInfoData,CreditCardPaymentInfoModel> |
getCardPaymentInfoReversePopulator() |
protected CartService |
getCartService() |
CCPaymentInfoData |
getCCPaymentInfoForCode(java.lang.String code)
Returns the current user's credit card payment info given it's code
|
java.util.List<CCPaymentInfoData> |
getCCPaymentInfos(boolean saved)
Returns the current user's Credit Card Payment Infos
|
protected CheckoutCustomerStrategy |
getCheckoutCustomerStrategy() |
protected CommerceCommonI18NService |
getCommerceCommonI18NService() |
protected CommonI18NService |
getCommonI18NService() |
protected Converter<CreditCardPaymentInfoModel,CCPaymentInfoData> |
getCreditCardPaymentInfoConverter() |
protected CustomerModel |
getCurrentUserForCheckout() |
protected CustomerAccountService |
getCustomerAccountService() |
AddressData |
getDefaultAddress()
Returns the default address
|
protected ModelService |
getModelService() |
protected Converter<TitleModel,TitleData> |
getTitleConverter() |
java.util.List<TitleData> |
getTitles()
Provide all localized titles.
|
protected UserService |
getUserService() |
boolean |
isAddressBookEmpty()
Deprecated.
Since 6.5. Use
org.apache.commons.collections.CollectionUtils#isEmpty(Collection) with
this.getAddressBook() as paramenter instead. |
boolean |
isAnonymousUser()
Test if the current user is anonymous
|
boolean |
isDefaultAddress(java.lang.String addressId)
Test if the address id matches with the default address id
|
void |
removeAddress(AddressData addressData)
Removes the address for the current user
|
void |
removeCCPaymentInfo(java.lang.String id)
Removes credit card payment info by id
|
void |
setAddressConverter(Converter<AddressModel,AddressData> addressConverter) |
void |
setAddressReversePopulator(Populator<AddressData,AddressModel> addressReversePopulator) |
void |
setCardPaymentInfoReversePopulator(Populator<CCPaymentInfoData,CreditCardPaymentInfoModel> cardPaymentInfoReversePopulator) |
void |
setCartService(CartService cartService) |
void |
setCheckoutCustomerStrategy(CheckoutCustomerStrategy checkoutCustomerStrategy) |
void |
setCommerceCommonI18NService(CommerceCommonI18NService commerceCommonI18NService) |
void |
setCommonI18NService(CommonI18NService commonI18NService) |
void |
setCreditCardPaymentInfoConverter(Converter<CreditCardPaymentInfoModel,CCPaymentInfoData> creditCardPaymentInfoConverter) |
void |
setCustomerAccountService(CustomerAccountService customerAccountService) |
void |
setDefaultAddress(AddressData addressData)
Sets the default address
|
void |
setDefaultPaymentInfo(CCPaymentInfoData paymentInfoData)
Sets the default Payment Info
|
void |
setModelService(ModelService modelService) |
void |
setTitleConverter(Converter<TitleModel,TitleData> titleConverter) |
void |
setUserService(UserService userService) |
void |
syncSessionCurrency()
Sets users preferred currency to the current session currency
|
void |
syncSessionLanguage()
Sets users preferred language to the current session language
|
void |
unlinkCCPaymentInfo(java.lang.String id)
Deprecated.
since 6.7. Use
UserFacade.removeCCPaymentInfo(String) instead |
void |
updateCCPaymentInfo(CCPaymentInfoData paymentInfo)
Updates current users' payment info
|
protected void |
updateDefaultPaymentInfo(CustomerModel currentCustomer) |
public boolean isAnonymousUser()
UserFacadeisAnonymousUser in interface UserFacadepublic java.util.List<TitleData> getTitles()
UserFacadegetTitles in interface UserFacadeTitleData objects@Deprecated public boolean isAddressBookEmpty()
org.apache.commons.collections.CollectionUtils#isEmpty(Collection) with
this.getAddressBook() as paramenter instead.UserFacadeisAddressBookEmpty in interface UserFacadepublic java.util.List<AddressData> getAddressBook()
UserFacadegetAddressBook in interface UserFacadepublic void addAddress(AddressData addressData)
UserFacadeaddAddress in interface UserFacadeaddressData - the address to addpublic void editAddress(AddressData addressData)
UserFacadeeditAddress in interface UserFacadeaddressData - the address to updatepublic void removeAddress(AddressData addressData)
UserFacaderemoveAddress in interface UserFacadeaddressData - the address to removepublic void setDefaultAddress(AddressData addressData)
UserFacadesetDefaultAddress in interface UserFacadeaddressData - the address to make defaultpublic AddressData getDefaultAddress()
UserFacadegetDefaultAddress in interface UserFacadepublic AddressData getAddressForCode(java.lang.String code)
UserFacadegetAddressForCode in interface UserFacadecode - the address codepublic boolean isDefaultAddress(java.lang.String addressId)
UserFacadeisDefaultAddress in interface UserFacadeaddressId - the address Idpublic java.util.List<CCPaymentInfoData> getCCPaymentInfos(boolean saved)
UserFacadegetCCPaymentInfos in interface UserFacadesaved - true to retrieve only saved credit card payment infospublic CCPaymentInfoData getCCPaymentInfoForCode(java.lang.String code)
UserFacadegetCCPaymentInfoForCode in interface UserFacadecode - the codepublic void setDefaultPaymentInfo(CCPaymentInfoData paymentInfoData)
UserFacadesetDefaultPaymentInfo in interface UserFacadepaymentInfoData - the paymentInfo to make defaultpublic void removeCCPaymentInfo(java.lang.String id)
UserFacaderemoveCCPaymentInfo in interface UserFacadeid - the id@Deprecated public void unlinkCCPaymentInfo(java.lang.String id)
UserFacade.removeCCPaymentInfo(String) insteadUserFacadeunlinkCCPaymentInfo in interface UserFacadeid - the idpublic void updateCCPaymentInfo(CCPaymentInfoData paymentInfo)
UserFacadeupdateCCPaymentInfo in interface UserFacadepaymentInfo - - new payment info datapublic void syncSessionLanguage()
UserFacadesyncSessionLanguage in interface UserFacadepublic void syncSessionCurrency()
UserFacadesyncSessionCurrency in interface UserFacadeprotected void updateDefaultPaymentInfo(CustomerModel currentCustomer)
protected CustomerModel getCurrentUserForCheckout()
protected Populator<CCPaymentInfoData,CreditCardPaymentInfoModel> getCardPaymentInfoReversePopulator()
protected UserService getUserService()
public void setUserService(UserService userService)
protected CustomerAccountService getCustomerAccountService()
public void setCustomerAccountService(CustomerAccountService customerAccountService)
protected CommerceCommonI18NService getCommerceCommonI18NService()
public void setCommerceCommonI18NService(CommerceCommonI18NService commerceCommonI18NService)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
protected CommonI18NService getCommonI18NService()
public void setCommonI18NService(CommonI18NService commonI18NService)
protected CartService getCartService()
public void setCartService(CartService cartService)
protected Populator<AddressData,AddressModel> getAddressReversePopulator()
public void setAddressReversePopulator(Populator<AddressData,AddressModel> addressReversePopulator)
protected Converter<AddressModel,AddressData> getAddressConverter()
public void setAddressConverter(Converter<AddressModel,AddressData> addressConverter)
protected Converter<CreditCardPaymentInfoModel,CCPaymentInfoData> getCreditCardPaymentInfoConverter()
public void setCreditCardPaymentInfoConverter(Converter<CreditCardPaymentInfoModel,CCPaymentInfoData> creditCardPaymentInfoConverter)
protected Converter<TitleModel,TitleData> getTitleConverter()
public void setTitleConverter(Converter<TitleModel,TitleData> titleConverter)
public void setCardPaymentInfoReversePopulator(Populator<CCPaymentInfoData,CreditCardPaymentInfoModel> cardPaymentInfoReversePopulator)
protected CheckoutCustomerStrategy getCheckoutCustomerStrategy()
public void setCheckoutCustomerStrategy(CheckoutCustomerStrategy checkoutCustomerStrategy)
Copyright © 2018 SAP SE. All Rights Reserved.