Class CustomerImpl
- All Implemented Interfaces:
Serializable,AdminMainEntity,MultiTenantCloneable<Customer>,Previewable,Customer,CustomerAdminPresentation
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.broadleafcommerce.profile.core.domain.CustomerAdminPresentation
CustomerAdminPresentation.FieldOrder, CustomerAdminPresentation.GroupName, CustomerAdminPresentation.GroupOrder, CustomerAdminPresentation.TabName, CustomerAdminPresentation.TabOrder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Auditableprotected Stringprotected ChallengeQuestionprotected booleanprotected List<CustomerAddress>protected Map<String,CustomerAttribute> protected Localeprotected List<CustomerPayment>protected List<CustomerPhone>protected Booleanprotected Stringprotected Stringprotected Stringprotected Longprotected Booleanprotected Stringprotected booleanprotected Stringprotected BooleanIf true, this customer must go through a reset password flow.protected PreviewStatusprotected Booleanprotected Booleanprotected Stringprotected Stringprotected Stringprotected StringFields inherited from interface org.broadleafcommerce.common.admin.domain.AdminMainEntity
MAIN_ENTITY_NAME_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends Customer>
CreateResponse<G>booleangetId()The code used by an external system to determine if the user is tax exempt and/or what specific taxes the user is exempt from.This returns a non-null map of transient properties that are not persisted to the database.inthashCode()booleanbooleanbooleanReturns true if this user has been deactivated.booleanbooleanIf true, this customer must go through a reset password flow.booleanbooleanbooleanConvenience method to represent if this customer should be taxed or not when pricing theirOrder.voidsetAnonymous(boolean anonymous) voidsetAuditable(Auditable auditable) voidsetChallengeAnswer(String challengeAnswer) voidsetChallengeQuestion(ChallengeQuestion challengeQuestion) voidsetCookied(boolean cookied) voidsetCustomerAddresses(List<CustomerAddress> customerAddresses) voidsetCustomerAttributes(Map<String, CustomerAttribute> customerAttributes) voidsetCustomerLocale(Locale customerLocale) voidsetCustomerPayments(List<CustomerPayment> customerPayments) voidsetCustomerPhones(List<CustomerPhone> customerPhones) voidsetDeactivated(boolean deactivated) Sets the users deactivated status.voidsetEmailAddress(String emailAddress) voidsetExternalId(String externalId) voidsetFirstName(String firstName) voidvoidsetLastName(String lastName) voidsetLoggedIn(boolean loggedIn) voidsetPassword(String password) voidsetPasswordChangeRequired(boolean passwordChangeRequired) voidsetPreview(Boolean preview) voidsetReceiveEmail(boolean receiveEmail) voidsetRegistered(boolean registered) voidsetTaxExemptionCode(String exemption) Associates a tax exemption code to this user to notate tax exemption status.voidsetUnencodedChallengeAnswer(String unencodedChallengeAnswer) voidsetUnencodedPassword(String unencodedPassword) voidsetUsername(String username)
-
Field Details
-
id
-
auditable
-
previewable
-
username
-
password
-
emailAddress
-
firstName
-
lastName
-
externalId
-
challengeQuestion
-
challengeAnswer
-
passwordChangeRequired
If true, this customer must go through a reset password flow.
During a site conversion or security breach or a matter of routine security policy, it may be necessary to require users to change their password. This property will not allow a user whose credentials are managed within Broadleaf to login until they have reset their password.
Used by blUserDetailsService.
-
receiveEmail
-
registered
-
deactivated
-
customerLocale
-
customerAttributes
-
customerAddresses
-
customerPhones
-
customerPayments
-
isTaxExempt
-
taxExemptionCode
-
unencodedPassword
-
unencodedChallengeAnswer
-
anonymous
protected boolean anonymous -
cookied
protected boolean cookied -
loggedIn
protected boolean loggedIn -
transientProperties
-
-
Constructor Details
-
CustomerImpl
public CustomerImpl()
-
-
Method Details
-
getId
-
setId
-
getUsername
- Specified by:
getUsernamein interfaceCustomer
-
setUsername
- Specified by:
setUsernamein interfaceCustomer
-
getPassword
- Specified by:
getPasswordin interfaceCustomer
-
setPassword
- Specified by:
setPasswordin interfaceCustomer
-
isPasswordChangeRequired
public boolean isPasswordChangeRequired()Description copied from interface:CustomerIf true, this customer must go through a reset password flow.
During a site conversion or security breach or a matter of routine security policy, it may be necessary to require users to change their password. This property will not allow a user whose credentials are managed within Broadleaf to login until they have reset their password.
Used by blUserDetailsService.
- Specified by:
isPasswordChangeRequiredin interfaceCustomer
-
setPasswordChangeRequired
public void setPasswordChangeRequired(boolean passwordChangeRequired) - Specified by:
setPasswordChangeRequiredin interfaceCustomer
-
getFirstName
- Specified by:
getFirstNamein interfaceCustomer
-
setFirstName
- Specified by:
setFirstNamein interfaceCustomer
-
getLastName
- Specified by:
getLastNamein interfaceCustomer
-
setLastName
- Specified by:
setLastNamein interfaceCustomer
-
getEmailAddress
- Specified by:
getEmailAddressin interfaceCustomer
-
setEmailAddress
- Specified by:
setEmailAddressin interfaceCustomer
-
getExternalId
- Specified by:
getExternalIdin interfaceCustomer
-
setExternalId
- Specified by:
setExternalIdin interfaceCustomer
-
getChallengeQuestion
- Specified by:
getChallengeQuestionin interfaceCustomer
-
setChallengeQuestion
- Specified by:
setChallengeQuestionin interfaceCustomer
-
getChallengeAnswer
- Specified by:
getChallengeAnswerin interfaceCustomer
-
setChallengeAnswer
- Specified by:
setChallengeAnswerin interfaceCustomer
-
getUnencodedPassword
- Specified by:
getUnencodedPasswordin interfaceCustomer
-
setUnencodedPassword
- Specified by:
setUnencodedPasswordin interfaceCustomer
-
isReceiveEmail
public boolean isReceiveEmail()- Specified by:
isReceiveEmailin interfaceCustomer
-
setReceiveEmail
public void setReceiveEmail(boolean receiveEmail) - Specified by:
setReceiveEmailin interfaceCustomer
-
isRegistered
public boolean isRegistered()- Specified by:
isRegisteredin interfaceCustomer
-
setRegistered
public void setRegistered(boolean registered) - Specified by:
setRegisteredin interfaceCustomer
-
getUnencodedChallengeAnswer
- Specified by:
getUnencodedChallengeAnswerin interfaceCustomer
-
setUnencodedChallengeAnswer
- Specified by:
setUnencodedChallengeAnswerin interfaceCustomer
-
getAuditable
- Specified by:
getAuditablein interfaceCustomer
-
setAuditable
- Specified by:
setAuditablein interfaceCustomer
-
isAnonymous
public boolean isAnonymous()- Specified by:
isAnonymousin interfaceCustomer
-
setAnonymous
public void setAnonymous(boolean anonymous) - Specified by:
setAnonymousin interfaceCustomer
-
isCookied
public boolean isCookied() -
setCookied
public void setCookied(boolean cookied) - Specified by:
setCookiedin interfaceCustomer
-
isLoggedIn
public boolean isLoggedIn()- Specified by:
isLoggedInin interfaceCustomer
-
setLoggedIn
public void setLoggedIn(boolean loggedIn) - Specified by:
setLoggedInin interfaceCustomer
-
getCustomerLocale
- Specified by:
getCustomerLocalein interfaceCustomer
-
setCustomerLocale
- Specified by:
setCustomerLocalein interfaceCustomer
-
getCustomerAttributes
- Specified by:
getCustomerAttributesin interfaceCustomer
-
setCustomerAttributes
- Specified by:
setCustomerAttributesin interfaceCustomer
-
isDeactivated
public boolean isDeactivated()Description copied from interface:CustomerReturns true if this user has been deactivated. Most implementations will not allow the user to login if they are deactivated.- Specified by:
isDeactivatedin interfaceCustomer- Returns:
-
setDeactivated
public void setDeactivated(boolean deactivated) Description copied from interface:CustomerSets the users deactivated status.- Specified by:
setDeactivatedin interfaceCustomer
-
getCustomerAddresses
- Specified by:
getCustomerAddressesin interfaceCustomer
-
setCustomerAddresses
- Specified by:
setCustomerAddressesin interfaceCustomer
-
getCustomerPhones
- Specified by:
getCustomerPhonesin interfaceCustomer
-
setCustomerPhones
- Specified by:
setCustomerPhonesin interfaceCustomer
-
getCustomerPayments
- Specified by:
getCustomerPaymentsin interfaceCustomer
-
setCustomerPayments
- Specified by:
setCustomerPaymentsin interfaceCustomer
-
getMainEntityName
- Specified by:
getMainEntityNamein interfaceAdminMainEntity
-
getPreview
- Specified by:
getPreviewin interfacePreviewable
-
setPreview
- Specified by:
setPreviewin interfacePreviewable
-
getTransientProperties
Description copied from interface:CustomerThis returns a non-null map of transient properties that are not persisted to the database.- Specified by:
getTransientPropertiesin interfaceCustomer- Returns:
-
equals
-
hashCode
public int hashCode() -
createOrRetrieveCopyInstance
public <G extends Customer> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException - Specified by:
createOrRetrieveCopyInstancein interfaceMultiTenantCloneable<Customer>- Throws:
CloneNotSupportedException
-
getTaxExemptionCode
Description copied from interface:CustomerThe code used by an external system to determine if the user is tax exempt and/or what specific taxes the user is exempt from.- Specified by:
getTaxExemptionCodein interfaceCustomer- Returns:
- the code for this user's tax exemption reason, usually to just be passed to an external system
-
setTaxExemptionCode
Description copied from interface:CustomerAssociates a tax exemption code to this user to notate tax exemption status. Default behavior in theorg.broadleafcommerce.core.pricing.service.tax.provider.SimpleTaxProvideris that if this is set to any value then this customer is tax exempt.- Specified by:
setTaxExemptionCodein interfaceCustomer- Parameters:
exemption- the tax exemption code for the customer
-
isTaxExempt
public boolean isTaxExempt()Description copied from interface:CustomerConvenience method to represent if this customer should be taxed or not when pricing their
Order. Default behavior in theorg.broadleafcommerce.core.pricing.service.tax.provider.SimpleTaxProvideris that if there is anything inCustomer.getTaxExemptionCode()then the customer is exempt.If you assign special meaning to the
Customer.getTaxExemptionCode()then this might be different and you should determine specific tax exemption based onCustomer.getTaxExemptionCode()- Specified by:
isTaxExemptin interfaceCustomer- Returns:
- whether or not this customer is exempt from tax calculations
-