Interface UserFacade
-
- All Known Implementing Classes:
ChineseUserFacade,DefaultUserFacade
public interface UserFacadeUser facade interface. Deals with methods related to user operations - registering, logging in and other.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddAddress(AddressData addressData)Adds the address for the current uservoideditAddress(AddressData addressData)Updates the address for the current userjava.util.List<AddressData>getAddressBook()Get the list of delivery addresses.AddressDatagetAddressForCode(java.lang.String code)Returns the address with matching code for the current userCCPaymentInfoDatagetCCPaymentInfoForCode(java.lang.String code)Returns the current user's credit card payment info given it's codejava.util.List<CCPaymentInfoData>getCCPaymentInfos(boolean saved)Returns the current user's Credit Card Payment InfosAddressDatagetDefaultAddress()Returns the default addressjava.util.List<TitleData>getTitles()Provide all localized titles.java.lang.StringgetUserUID(java.lang.String id)Returns the UID of the found user.booleanisAddressBookEmpty()Deprecated.since 6.5, instead check ifgetAddressBook()is empty directlybooleanisAnonymousUser()Test if the current user is anonymousbooleanisDefaultAddress(java.lang.String addressId)Test if the address id matches with the default address idbooleanisUserExisting(java.lang.String id)Verifies whether the user exists.voidremoveAddress(AddressData addressData)Removes the address for the current uservoidremoveCCPaymentInfo(java.lang.String id)Removes credit card payment info by idvoidsetCurrentUser(java.lang.String id)Sets current user explicitly.voidsetDefaultAddress(AddressData addressData)Sets the default addressvoidsetDefaultPaymentInfo(CCPaymentInfoData paymentInfo)Sets the default Payment InfovoidsyncSessionCurrency()Sets users preferred currency to the current session currencyvoidsyncSessionLanguage()Sets users preferred language to the current session languagevoidunlinkCCPaymentInfo(java.lang.String id)Deprecated.since 6.7.voidupdateCCPaymentInfo(CCPaymentInfoData paymentInfo)Updates current users' payment info
-
-
-
Method Detail
-
getTitles
java.util.List<TitleData> getTitles()
Provide all localized titles.- Returns:
- List of
TitleDataobjects
-
isAddressBookEmpty
@Deprecated(since="6.5") boolean isAddressBookEmpty()
Deprecated.since 6.5, instead check ifgetAddressBook()is empty directlyTest if the address book is empty.- Returns:
- true if the customer has no addresses
-
getAddressBook
java.util.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(java.lang.String code)
Returns the address with matching code for the current user- Parameters:
code- the address code- Returns:
- the address
-
isDefaultAddress
boolean isDefaultAddress(java.lang.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
java.util.List<CCPaymentInfoData> getCCPaymentInfos(boolean saved)
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
CCPaymentInfoData getCCPaymentInfoForCode(java.lang.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(java.lang.String id)
Removes credit card payment info by id- Parameters:
id- the id
-
unlinkCCPaymentInfo
@Deprecated(since="6.7") void unlinkCCPaymentInfo(java.lang.String id)
Deprecated.since 6.7. UseremoveCCPaymentInfo(String)insteadUnlink 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:
trueif the current user is anonymous
-
isUserExisting
boolean isUserExisting(java.lang.String id)
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:
DefaultUserMatchingService
-
getUserUID
java.lang.String getUserUID(java.lang.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:
DefaultUserMatchingService
-
setCurrentUser
void setCurrentUser(java.lang.String id)
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:
DefaultUserMatchingService
-
-