|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Customer
A Customer
is someone with an account in the system for making orders
through the Store Front.
Field Summary | |
---|---|
static char |
GENDER_FEMALE
The gender - female. |
static char |
GENDER_MALE
The gender - male. |
static char |
GENDER_NOT_SELECTED
The gender - not-selected. |
static int |
STATUS_ACTIVE
The status - Active. |
static int |
STATUS_DISABLED
The status - Disabled. |
static int |
STATUS_PENDING_APPROVAL
The status - Pending Approval. |
Method Summary | |
---|---|
void |
addAddress(CustomerAddress address)
Adds an CustomerAddress to the list of addresses. |
void |
addCreditCard(CustomerCreditCard creditCard)
Add a credit card to this customer. |
void |
addCustomerGroup(CustomerGroup customerGroup)
Adds a CustomerGroup to the list of customertGroups. |
boolean |
belongsToCustomerGroup(long customerGroupID)
Return a boolean that indicates whether the customer belongs to customerGroup with the given customerGroupID. |
boolean |
belongsToCustomerGroup(java.lang.String groupName)
Return a boolean that indicates whether the customer belongs to customerGroup with the given name. |
CustomerAddress |
getAddressByGuid(java.lang.String addressGuid)
Returns the customer's address with the matching GUID. |
CustomerAddress |
getAddressByUid(long addressUid)
Returns the customer's address with the matching UID. |
java.util.List |
getAddresses()
Gets the CustomerAddress es associated with this Customer . |
java.lang.String |
getClearTextPassword()
Gets the clear-text password (only available at creation time). |
java.lang.String |
getCompany()
Gets the company associated with this Customer . |
java.lang.String |
getConfirmClearTextPassword()
Gets the clear-text confirm password (only available at creation time). |
java.util.Date |
getCreationDate()
Gets the customer creation date. |
CustomerCreditCard |
getCreditCardByUid(long creditCardUid)
Returns the customer's credit card with the matching UID. |
java.util.List |
getCreditCards()
|
CustomerAuthentication |
getCustomerAuthentication()
Get the customer authentication. |
java.util.List |
getCustomerGroups()
Get the CustomerGroup s associatied with this customer. |
CustomerProfile |
getCustomerProfile()
Get the customer profile. |
java.util.Date |
getDateOfBirth()
Gets the customer's date of birth. |
java.lang.String |
getEmail()
Gets the email address of this Customer . |
java.lang.String |
getFirstName()
Gets the Customer 's first name. |
char |
getGender()
Gets the gender of this Customer . |
java.util.Date |
getLastEditDate()
Gets the customer last edit date. |
java.lang.String |
getLastName()
Gets the Customer 's last name. |
java.lang.String |
getPassword()
Gets the encrypted password. |
java.lang.String |
getPhoneNumber()
Gets the phone number associated with this Customer . |
CustomerAddress |
getPreferredBillingAddress()
Get the preferred billing address. |
java.util.Currency |
getPreferredCurrency()
Get the preferred currency of the customer corresponding to the shopping cart. |
java.util.Locale |
getPreferredLocale()
Get the preferred locale of the customer corresponding to the shopping cart. |
CustomerAddress |
getPreferredShippingAddress()
Get the preferred shipping address. |
int |
getStatus()
Gets the status of this Customer . |
java.lang.String |
getUserId()
Gets the user identifier for this Customer . |
boolean |
isAnonymous()
Gets the flag indicating whether this customer is anonymous or not. |
boolean |
isRegistered()
Gets the flag indicating whether this customer is a 'real' registered customer or not. |
boolean |
isToBeNotified()
Indicates whether the user wishes to be notified of news. |
void |
removeAddress(CustomerAddress address)
Removes an CustomerAddress from the list of addresses. |
void |
removeCreditCard(CustomerCreditCard creditCard)
Removes an CustomerCreditCard from the list of credit cards. |
void |
removeCustomerGroup(CustomerGroup customerGroup)
Removes an CustomerGroup from the list of customerGroups. |
java.lang.String |
resetPassword()
Reset the customer's password. |
void |
setAddresses(java.util.List addresses)
Sets the CustomerAddress es associated with this Customer . |
void |
setAnonymous(boolean anonymous)
Sets the anonymous status of the customer. |
void |
setClearTextPassword(java.lang.String clearTextPassword)
Sets the clear-text password. |
void |
setCompany(java.lang.String company)
Sets the company associated with this Customer . |
void |
setConfirmClearTextPassword(java.lang.String confirmClearTextPassword)
Sets the confirm clear-text password. |
void |
setCreationDate(java.util.Date creationDate)
Sets the customer creation date. |
void |
setCreditCards(java.util.List creditCards)
|
void |
setCustomerAuthentication(CustomerAuthentication customerAuthentication)
Set the customer authentication. |
void |
setCustomerGroups(java.util.List customerGroups)
Sets the CustomerGroup s associated with this Customer . |
void |
setCustomerProfile(CustomerProfile customerProfile)
Set the customer profile. |
void |
setDateOfBirth(java.util.Date dateOfBirth)
Sets the customer's date of birth. |
void |
setEmail(java.lang.String email)
Sets the email address of this Customer . |
void |
setFirstName(java.lang.String firstName)
Sets the Customer 's first name. |
void |
setGender(char gender)
Sets the gender of this Customer . |
void |
setLastEditDate(java.util.Date lastEditDate)
Sets the customer last edit date. |
void |
setLastName(java.lang.String lastName)
Sets the Customer 's last name. |
void |
setPassword(java.lang.String password)
Sets the encrypted password. |
void |
setPhoneNumber(java.lang.String phoneNumber)
Sets the phone number associated with this Customer . |
void |
setPreferredBillingAddress(CustomerAddress address)
Set the preferred billing address. |
void |
setPreferredCreditCard(CustomerCreditCard preferredCreditCard)
Sets the customer's default (preferred) credit card. |
void |
setPreferredCurrency(java.util.Currency preferredCurrency)
Set the preferred currency of the customer corresponding to the shopping cart. |
void |
setPreferredLocale(java.util.Locale preferredLocale)
Set the preferred locale of the customer corresponding to the shopping cart. |
void |
setPreferredShippingAddress(CustomerAddress address)
Set the preferred shipping address. |
void |
setStatus(int status)
Sets the status of this Customer . |
void |
setToBeNotified(boolean toBeNotified)
Set whether the user wishes to be notified of news. |
void |
setUserId(java.lang.String userId)
Sets the user identifier for this Customer . |
void |
updateCreditCard(CustomerCreditCard creditCard)
Notifies a Customer that a credit card has been updated
(The credit card default flags will be set accordingly). |
Methods inherited from interface com.elasticpath.domain.Entity |
---|
getGuid, setGuid |
Methods inherited from interface com.elasticpath.domain.Persistence |
---|
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk |
Methods inherited from interface com.elasticpath.domain.EpDomain |
---|
getElasticPath, setElasticPath |
Methods inherited from interface org.acegisecurity.userdetails.UserDetails |
---|
getAuthorities, getUsername, isAccountNonExpired, isAccountNonLocked, isCredentialsNonExpired, isEnabled |
Field Detail |
---|
static final char GENDER_FEMALE
static final char GENDER_MALE
static final char GENDER_NOT_SELECTED
static final int STATUS_ACTIVE
static final int STATUS_DISABLED
static final int STATUS_PENDING_APPROVAL
Method Detail |
---|
void addAddress(CustomerAddress address)
CustomerAddress
to the list of addresses.
address
- the address to add.void addCreditCard(CustomerCreditCard creditCard)
creditCard
- the credit card to addvoid addCustomerGroup(CustomerGroup customerGroup)
CustomerGroup
to the list of customertGroups.
customerGroup
- the customerGroup to add.boolean belongsToCustomerGroup(long customerGroupID)
customerGroupID
- - customerGroup ID.
boolean belongsToCustomerGroup(java.lang.String groupName)
groupName
- - customerGroup name.
CustomerAddress getAddressByGuid(java.lang.String addressGuid)
addressGuid
- the guid of the address to be retrieved
CustomerAddress
or null
if no matching address is foundCustomerAddress getAddressByUid(long addressUid)
addressUid
- the uidPk of the address to be retrieved
CustomerAddress
or null
if no matching address is foundjava.util.List getAddresses()
CustomerAddress
es associated with this Customer
.
java.lang.String getClearTextPassword()
java.lang.String getCompany()
Customer
.
java.lang.String getConfirmClearTextPassword()
java.util.Date getCreationDate()
CustomerCreditCard getCreditCardByUid(long creditCardUid)
creditCardUid
- the uidPk of the credit card to be retrieved
CustomerCreditCard
or null
if no matching credit card is foundjava.util.List getCreditCards()
CustomerAuthentication getCustomerAuthentication()
CustomerAuthentication
java.util.List getCustomerGroups()
CustomerGroup
s associatied with this customer.
CustomerProfile getCustomerProfile()
CustomerProfile
java.util.Date getDateOfBirth()
java.lang.String getEmail()
Customer
.
java.lang.String getFirstName()
Customer
's first name.
char getGender()
Customer
.
java.util.Date getLastEditDate()
java.lang.String getLastName()
Customer
's last name.
java.lang.String getPassword()
getPassword
in interface org.acegisecurity.userdetails.UserDetails
java.lang.String getPhoneNumber()
Customer
.
CustomerAddress getPreferredBillingAddress()
java.util.Currency getPreferredCurrency()
Currency
java.util.Locale getPreferredLocale()
Locale
CustomerAddress getPreferredShippingAddress()
int getStatus()
Customer
.
java.lang.String getUserId()
Customer
.
boolean isAnonymous()
boolean isRegistered()
boolean isToBeNotified()
void removeAddress(CustomerAddress address)
CustomerAddress
from the list of addresses.
address
- the address to remove.void removeCreditCard(CustomerCreditCard creditCard)
CustomerCreditCard
from the list of credit cards.
creditCard
- the credit card to remove.void removeCustomerGroup(CustomerGroup customerGroup)
CustomerGroup
from the list of customerGroups.
customerGroup
- the customerGroup to remove.java.lang.String resetPassword()
void setAddresses(java.util.List addresses)
CustomerAddress
es associated with this Customer
.
addresses
- the new list of addresses.void setAnonymous(boolean anonymous)
anonymous
- - true if the customer is anonymous; otherwise false.void setClearTextPassword(java.lang.String clearTextPassword)
clearTextPassword
- the clear-text password.void setCompany(java.lang.String company)
Customer
.
company
- the new company.void setConfirmClearTextPassword(java.lang.String confirmClearTextPassword)
confirmClearTextPassword
- the user confirmClearTextPassword.void setCreationDate(java.util.Date creationDate)
creationDate
- customer creation date.void setCreditCards(java.util.List creditCards)
creditCards
- the credit cards to setvoid setCustomerAuthentication(CustomerAuthentication customerAuthentication)
customerAuthentication
- the CustomerAuthentication
void setCustomerGroups(java.util.List customerGroups)
CustomerGroup
s associated with this Customer
.
customerGroups
- - the list of customerGroups that the current user is in.void setCustomerProfile(CustomerProfile customerProfile)
customerProfile
- the CustomerProfile
void setDateOfBirth(java.util.Date dateOfBirth)
dateOfBirth
- customer's date of birth.void setEmail(java.lang.String email)
Customer
.
email
- the new email address.void setFirstName(java.lang.String firstName)
Customer
's first name.
firstName
- the new first name.void setGender(char gender)
Customer
.
gender
- the customer's gender ('F' for female, or 'M' for male).void setLastEditDate(java.util.Date lastEditDate)
lastEditDate
- customer last edit date.void setLastName(java.lang.String lastName)
Customer
's last name.
lastName
- the new last name.void setPassword(java.lang.String password)
password
- the encrypted password.void setPhoneNumber(java.lang.String phoneNumber)
Customer
.
phoneNumber
- the new phone number.void setPreferredBillingAddress(CustomerAddress address)
address
- the CustomerAddress
void setPreferredCreditCard(CustomerCreditCard preferredCreditCard)
preferredCreditCard
- the credit card to be used by defaultvoid setPreferredCurrency(java.util.Currency preferredCurrency)
preferredCurrency
- the Currency
void setPreferredLocale(java.util.Locale preferredLocale)
preferredLocale
- the Locale
void setPreferredShippingAddress(CustomerAddress address)
address
- the CustomerAddress
void setStatus(int status)
Customer
.
status
- the custome's status.void setToBeNotified(boolean toBeNotified)
toBeNotified
- set to true to indicate that need to be notified of newsvoid setUserId(java.lang.String userId)
Customer
.
userId
- the new user identifier.void updateCreditCard(CustomerCreditCard creditCard)
Customer
that a credit card has been updated
(The credit card default flags will be set accordingly).
creditCard
- the credit card that was updated
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |