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
Modifier and TypeFieldDescriptionstatic final String
An attribute we expect to be present inattributes
for existing users. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
<T> T
getAttributeValue
(String key) Convenience method to retrieve customer attributes, as they are a complex object.getEmail()
boolean
hasAttribute
(String key) Check if a customer has a particular attribute.int
hashCode()
boolean
isActive()
boolean
isLocked()
void
void
setAttributes
(Map<String, Object> attributes) void
setContextId
(String contextId) void
setCustomerContextId
(String customerContextId) void
setDefaultAccountId
(String defaultAccountId) void
void
setFirstName
(String firstName) void
setFullName
(String fullName) void
setLastName
(String lastName) void
setLocked
(boolean locked) void
setMiddleName
(String middleName) void
setTenantId
(String tenantId) void
setUsername
(String username) toString()
-
Field Details
-
USER_ID_ATTRIBUTE
An attribute we expect to be present inattributes
for existing users. This will contain the value of the local auth-serviceUser.id
for 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() -
getContextId
-
getFirstName
-
getMiddleName
-
getLastName
-
getFullName
-
getEmail
-
getUsername
-
getCustomerContextId
-
getTenantId
-
getActive
-
isLocked
public boolean isLocked() -
getDefaultAccountId
-
getAttributes
-
setContextId
-
setFirstName
-
setMiddleName
-
setLastName
-
setFullName
-
setEmail
-
setUsername
-
setCustomerContextId
-
setTenantId
-
setActive
-
setLocked
public void setLocked(boolean locked) -
setDefaultAccountId
-
setAttributes
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-