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 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.getAddressForCode(String code) Returns the address with matching code for the current userReturns the current user's credit card payment info given it's codegetCCPaymentInfos(boolean saved) Returns the current user's Credit Card Payment InfosReturns the default addressProvide all localized titles.getUserUID(String id) Returns the UID of the found user.booleanDeprecated, for removal: This API element is subject to removal in a future version.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 idvoidsetCurrentUser(String id) Sets current user explicitly.voidsetDefaultAddress(AddressData addressData) Sets the default addressvoidsetDefaultPaymentInfo(CCPaymentInfoData paymentInfo) Sets the default Payment InfovoidSets 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 info
-
Method Details
-
getTitles
Provide all localized titles.- Returns:
- List of
TitleDataobjects
-
isAddressBookEmpty
Deprecated, for removal: This API element is subject to removal in a future version.since 6.5, instead check ifgetAddressBook()is empty directlyTest 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
Adds the address for the current user- Parameters:
addressData- the address to add
-
removeAddress
Removes the address for the current user- Parameters:
addressData- the address to remove
-
editAddress
Updates the address for the current user- Parameters:
addressData- the address to update
-
getDefaultAddress
AddressData getDefaultAddress()Returns the default address- Returns:
- the address
-
setDefaultAddress
Sets the default address- Parameters:
addressData- the address to make default
-
getAddressForCode
Returns the address with matching code for the current user- Parameters:
code- the address code- Returns:
- the address
-
isDefaultAddress
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
Returns the current user's Credit Card Payment Infos- Parameters:
saved-trueto retrieve only saved credit card payment infos- Returns:
- list of Credit Card Payment Info Data
-
getCCPaymentInfoForCode
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
Updates current users' payment info- Parameters:
paymentInfo- - new payment info data
-
removeCCPaymentInfo
Removes credit card payment info by id- Parameters:
id- the id
-
unlinkCCPaymentInfo
Deprecated, for removal: This API element is subject to removal in a future version.since 6.7. UseremoveCCPaymentInfo(String)insteadUnlink the credit card info from the customer by CC id- Parameters:
id- the id
-
setDefaultPaymentInfo
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:
trueif the current user is anonymous
-
isUserExisting
Verifies 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.- Parameters:
id- - ID used to find the user- Returns:
trueif the user exists- See Also:
-
getUserUID
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
Sets current user explicitly. The givenidis 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:
-
getAddressBook()is empty directly