Class Customer
java.lang.Object
com.broadleafcommerce.auth.user.listener.domain.Customer
A subset of customer information that we're concerned with from Customer Service.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAn attribute we expect to be present inattributesfor existing users. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdditionalAttribute(String name, Object value) Takes in any additional attributes passed in the request not matching any defined properties.protected booleanbooleanReturn any additional attributes passed in the request not matching any defined properties.Map holding any additional attributes passed in the request not matching any defined properties.<T> TgetAttributeValue(String key) Convenience method to retrieve customer attributes, as they are a complex object.getEmail()booleanhasAttribute(String key) Check if a customer has a particular attribute.inthashCode()booleanisActive()booleanbooleanisLocked()voidvoidsetAdditionalAttributes(Map<String, Object> additionalAttributes) Map holding any additional attributes passed in the request not matching any defined properties.voidsetArchived(boolean archived) voidsetAttributes(Map<String, Object> attributes) voidsetContextId(String contextId) voidsetCustomerContextId(String customerContextId) voidsetDefaultAccountId(String defaultAccountId) voidvoidsetFirstName(String firstName) voidsetFullName(String fullName) voidsetLastName(String lastName) voidsetLocked(boolean locked) voidsetMiddleName(String middleName) voidsetTenantId(String tenantId) voidsetUsername(String username) toString()
-
Field Details
-
USER_ID_ATTRIBUTE
An attribute we expect to be present inattributesfor existing users. This will contain the value of the local auth-serviceUser.idfor the customer.- See Also:
-
-
Constructor Details
-
Customer
public Customer()
-
-
Method Details
-
getAttributeValue
Convenience method to retrieve customer attributes, as they are a complex object.- Type Parameters:
T- The type- Parameters:
key- The attribute key.- Returns:
- The attribute value, or null if it does not exist.
-
hasAttribute
Check if a customer has a particular attribute.- Parameters:
key- The attribute key- Returns:
- true if customer has the attribute, else false.
-
isActive
public boolean isActive() -
addAdditionalAttribute
Takes in any additional attributes passed in the request not matching any defined properties.- Parameters:
name- Name of the additional attributevalue- Value of the additional attribute
-
getAdditionalAttribute
Return any additional attributes passed in the request not matching any defined properties.- Returns:
- any additional attributes passed in the request not matching any defined properties.
-
getContextId
-
getFirstName
-
getMiddleName
-
getLastName
-
getFullName
-
getEmail
-
getUsername
-
getCustomerContextId
-
getTenantId
-
getActive
-
isArchived
public boolean isArchived() -
isLocked
public boolean isLocked() -
getDefaultAccountId
-
getAttributes
-
getAdditionalAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
setContextId
-
setFirstName
-
setMiddleName
-
setLastName
-
setFullName
-
setEmail
-
setUsername
-
setCustomerContextId
-
setTenantId
-
setActive
-
setArchived
public void setArchived(boolean archived) -
setLocked
public void setLocked(boolean locked) -
setDefaultAccountId
-
setAttributes
-
setAdditionalAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-