Interface UserFacade

All Known Implementing Classes:
ChineseUserFacade, DefaultUserFacade

public interface UserFacade
User facade interface. Deals with methods related to user operations - registering, logging in and other.
  • Method Details

    • getTitles

      List<TitleData> getTitles()
      Provide all localized titles.
      Returns:
      List of TitleData objects
    • isAddressBookEmpty

      @Deprecated(since="6.5", forRemoval=true) boolean isAddressBookEmpty()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 6.5, instead check if getAddressBook() is empty directly
      Test if the address book is empty.
      Returns:
      true if the customer has no addresses
    • getAddressBook

      List<AddressData> getAddressBook()
      Get the list of delivery addresses.
      Returns:
      the delivery addresses
    • addAddress

      void addAddress(AddressData addressData)
      Adds the address for the current user
      Parameters:
      addressData - the address to add
    • removeAddress

      void removeAddress(AddressData addressData)
      Removes the address for the current user
      Parameters:
      addressData - the address to remove
    • editAddress

      void editAddress(AddressData addressData)
      Updates the address for the current user
      Parameters:
      addressData - the address to update
    • getDefaultAddress

      AddressData getDefaultAddress()
      Returns the default address
      Returns:
      the address
    • setDefaultAddress

      void setDefaultAddress(AddressData addressData)
      Sets the default address
      Parameters:
      addressData - the address to make default
    • getAddressForCode

      AddressData getAddressForCode(String code)
      Returns the address with matching code for the current user
      Parameters:
      code - the address code
      Returns:
      the address
    • isDefaultAddress

      boolean isDefaultAddress(String addressId)
      Test if the address id matches with the default address id
      Parameters:
      addressId - the address Id
      Returns:
      true if address id is the default address id
    • getCCPaymentInfos

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

      CCPaymentInfoData getCCPaymentInfoForCode(String code)
      Returns the current user's credit card payment info given it's code
      Parameters:
      code - the code
      Returns:
      the Credit Card Payment Info Data
    • updateCCPaymentInfo

      void updateCCPaymentInfo(CCPaymentInfoData paymentInfo)
      Updates current users' payment info
      Parameters:
      paymentInfo - - new payment info data
    • removeCCPaymentInfo

      void removeCCPaymentInfo(String id)
      Removes credit card payment info by id
      Parameters:
      id - the id
    • unlinkCCPaymentInfo

      @Deprecated(since="6.7", forRemoval=true) void unlinkCCPaymentInfo(String id)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 6.7. Use removeCCPaymentInfo(String) instead
      Unlink the credit card info from the customer by CC id
      Parameters:
      id - the id
    • setDefaultPaymentInfo

      void setDefaultPaymentInfo(CCPaymentInfoData paymentInfo)
      Sets the default Payment Info
      Parameters:
      paymentInfo - the paymentInfo to make default
    • syncSessionLanguage

      void syncSessionLanguage()
      Sets users preferred language to the current session language
    • syncSessionCurrency

      void syncSessionCurrency()
      Sets users preferred currency to the current session currency
    • isAnonymousUser

      boolean isAnonymousUser()
      Test if the current user is anonymous
      Returns:
      true if the current user is anonymous
    • isUserExisting

      boolean isUserExisting(String id)
      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.
      Parameters:
      id - - ID used to find the user
      Returns:
      true if the user exists
      See Also:
    • getUserUID

      String getUserUID(String id)
      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.
      Parameters:
      id - one of the unique identifiers used to identify a user
      Returns:
      UID of the found user
      Throws:
      UnknownIdentifierException - if user doesn't exist
      See Also:
    • setCurrentUser

      void setCurrentUser(String id)
      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.
      Parameters:
      id - - id used to find the user
      Throws:
      UnknownIdentifierException - if user doesn't exist
      See Also: