Class DefaultUserFacade

java.lang.Object
de.hybris.platform.commercefacades.user.impl.DefaultUserFacade
All Implemented Interfaces:
UserFacade
Direct Known Subclasses:
ChineseUserFacade

public class DefaultUserFacade extends Object implements UserFacade
Default implementation of UserFacade.
  • Constructor Details

    • DefaultUserFacade

      public DefaultUserFacade()
  • Method Details

    • isAnonymousUser

      public boolean isAnonymousUser()
      Description copied from interface: UserFacade
      Test if the current user is anonymous
      Specified by:
      isAnonymousUser in interface UserFacade
      Returns:
      true if the current user is anonymous
    • isUserExisting

      public boolean isUserExisting(String id)
      Description copied from interface: UserFacade
      Verifies whether the user exists. The given id is used to find the user in matching strategies that use one of the unique identifiers to recognize the user.
      Specified by:
      isUserExisting in interface UserFacade
      Parameters:
      id - - ID used to find the user
      Returns:
      true if the user exists
      See Also:
    • getUserUID

      public String getUserUID(String id)
      Description copied from interface: UserFacade
      Returns 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:
      getUserUID in interface UserFacade
      Parameters:
      id - one of the unique identifiers used to identify a user
      Returns:
      UID of the found user
      See Also:
    • setCurrentUser

      public void setCurrentUser(String id)
      Description copied from interface: UserFacade
      Sets current user explicitly. The given id is used to find the user in matching strategies that use one of the unique identifiers to recognize the user.
      Specified by:
      setCurrentUser in interface UserFacade
      Parameters:
      id - - id used to find the user
      See Also:
    • getTitles

      public List<TitleData> getTitles()
      Description copied from interface: UserFacade
      Provide all localized titles.
      Specified by:
      getTitles in interface UserFacade
      Returns:
      List of TitleData objects
    • isAddressBookEmpty

      @Deprecated(since="6.5", forRemoval=true) public boolean isAddressBookEmpty()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 6.5. Use CollectionUtils.isEmpty(Collection) with this.getAddressBook() as paramenter instead.
      Description copied from interface: UserFacade
      Test if the address book is empty.
      Specified by:
      isAddressBookEmpty in interface UserFacade
      Returns:
      true if the customer has no addresses
    • getAddressBook

      public List<AddressData> getAddressBook()
      Description copied from interface: UserFacade
      Get the list of delivery addresses.
      Specified by:
      getAddressBook in interface UserFacade
      Returns:
      the delivery addresses
    • addAddress

      public void addAddress(AddressData addressData)
      Description copied from interface: UserFacade
      Adds the address for the current user
      Specified by:
      addAddress in interface UserFacade
      Parameters:
      addressData - the address to add
    • editAddress

      public void editAddress(AddressData addressData)
      Description copied from interface: UserFacade
      Updates the address for the current user
      Specified by:
      editAddress in interface UserFacade
      Parameters:
      addressData - the address to update
    • removeAddress

      public void removeAddress(AddressData addressData)
      Description copied from interface: UserFacade
      Removes the address for the current user
      Specified by:
      removeAddress in interface UserFacade
      Parameters:
      addressData - the address to remove
    • getDefaultAddress

      public AddressData getDefaultAddress()
      Description copied from interface: UserFacade
      Returns the default address
      Specified by:
      getDefaultAddress in interface UserFacade
      Returns:
      the address
    • setDefaultAddress

      public void setDefaultAddress(AddressData addressData)
      Description copied from interface: UserFacade
      Sets the default address
      Specified by:
      setDefaultAddress in interface UserFacade
      Parameters:
      addressData - the address to make default
    • getAddressForCode

      public AddressData getAddressForCode(String code)
      Description copied from interface: UserFacade
      Returns the address with matching code for the current user
      Specified by:
      getAddressForCode in interface UserFacade
      Parameters:
      code - the address code
      Returns:
      the address
    • isDefaultAddress

      public boolean isDefaultAddress(String addressId)
      Description copied from interface: UserFacade
      Test if the address id matches with the default address id
      Specified by:
      isDefaultAddress in interface UserFacade
      Parameters:
      addressId - the address Id
      Returns:
      true if address id is the default address id
    • getCCPaymentInfos

      public List<CCPaymentInfoData> getCCPaymentInfos(boolean saved)
      Description copied from interface: UserFacade
      Returns the current user's Credit Card Payment Infos
      Specified by:
      getCCPaymentInfos in interface UserFacade
      Parameters:
      saved - true to retrieve only saved credit card payment infos
      Returns:
      list of Credit Card Payment Info Data
    • getCCPaymentInfoForCode

      public CCPaymentInfoData getCCPaymentInfoForCode(String code)
      Description copied from interface: UserFacade
      Returns the current user's credit card payment info given it's code
      Specified by:
      getCCPaymentInfoForCode in interface UserFacade
      Parameters:
      code - the code
      Returns:
      the Credit Card Payment Info Data
    • setDefaultPaymentInfo

      public void setDefaultPaymentInfo(CCPaymentInfoData paymentInfoData)
      Description copied from interface: UserFacade
      Sets the default Payment Info
      Specified by:
      setDefaultPaymentInfo in interface UserFacade
      Parameters:
      paymentInfoData - the paymentInfo to make default
    • removeCCPaymentInfo

      public void removeCCPaymentInfo(String id)
      Description copied from interface: UserFacade
      Removes credit card payment info by id
      Specified by:
      removeCCPaymentInfo in interface UserFacade
      Parameters:
      id - the id
    • unlinkCCPaymentInfo

      @Deprecated(since="6.7", forRemoval=true) public void unlinkCCPaymentInfo(String id)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: UserFacade
      Unlink the credit card info from the customer by CC id
      Specified by:
      unlinkCCPaymentInfo in interface UserFacade
      Parameters:
      id - the id
    • updateCCPaymentInfo

      public void updateCCPaymentInfo(CCPaymentInfoData paymentInfo)
      Description copied from interface: UserFacade
      Updates current users' payment info
      Specified by:
      updateCCPaymentInfo in interface UserFacade
      Parameters:
      paymentInfo - - new payment info data
    • syncSessionLanguage

      public void syncSessionLanguage()
      Description copied from interface: UserFacade
      Sets users preferred language to the current session language
      Specified by:
      syncSessionLanguage in interface UserFacade
    • syncSessionCurrency

      public void syncSessionCurrency()
      Description copied from interface: UserFacade
      Sets users preferred currency to the current session currency
      Specified by:
      syncSessionCurrency in interface UserFacade
    • updateDefaultPaymentInfo

      protected void updateDefaultPaymentInfo(CustomerModel currentCustomer)
    • getCurrentUserForCheckout

      protected CustomerModel getCurrentUserForCheckout()
    • getCardPaymentInfoReversePopulator

      protected Populator<CCPaymentInfoData,CreditCardPaymentInfoModel> getCardPaymentInfoReversePopulator()
    • setCardPaymentInfoReversePopulator

      public void setCardPaymentInfoReversePopulator(Populator<CCPaymentInfoData,CreditCardPaymentInfoModel> cardPaymentInfoReversePopulator)
    • getUserService

      protected UserService getUserService()
    • setUserService

      public void setUserService(UserService userService)
    • getCustomerAccountService

      protected CustomerAccountService getCustomerAccountService()
    • setCustomerAccountService

      public void setCustomerAccountService(CustomerAccountService customerAccountService)
    • getCommerceCommonI18NService

      protected CommerceCommonI18NService getCommerceCommonI18NService()
    • setCommerceCommonI18NService

      public void setCommerceCommonI18NService(CommerceCommonI18NService commerceCommonI18NService)
    • getModelService

      protected ModelService getModelService()
    • setModelService

      public void setModelService(ModelService modelService)
    • getCommonI18NService

      protected CommonI18NService getCommonI18NService()
    • setCommonI18NService

      public void setCommonI18NService(CommonI18NService commonI18NService)
    • getCartService

      protected CartService getCartService()
    • setCartService

      public void setCartService(CartService cartService)
    • getAddressReversePopulator

      protected Populator<AddressData,AddressModel> getAddressReversePopulator()
    • setAddressReversePopulator

      public void setAddressReversePopulator(Populator<AddressData,AddressModel> addressReversePopulator)
    • getAddressConverter

      protected Converter<AddressModel,AddressData> getAddressConverter()
    • setAddressConverter

      public void setAddressConverter(Converter<AddressModel,AddressData> addressConverter)
    • getCreditCardPaymentInfoConverter

      protected Converter<CreditCardPaymentInfoModel,CCPaymentInfoData> getCreditCardPaymentInfoConverter()
    • setCreditCardPaymentInfoConverter

      public void setCreditCardPaymentInfoConverter(Converter<CreditCardPaymentInfoModel,CCPaymentInfoData> creditCardPaymentInfoConverter)
    • getTitleConverter

      protected Converter<TitleModel,TitleData> getTitleConverter()
    • setTitleConverter

      public void setTitleConverter(Converter<TitleModel,TitleData> titleConverter)
    • getCheckoutCustomerStrategy

      protected CheckoutCustomerStrategy getCheckoutCustomerStrategy()
    • setCheckoutCustomerStrategy

      public void setCheckoutCustomerStrategy(CheckoutCustomerStrategy checkoutCustomerStrategy)
    • getUserMatchingService

      protected UserMatchingService getUserMatchingService()
    • setUserMatchingService

      public void setUserMatchingService(UserMatchingService userMatchingService)