Class Customer
- java.lang.Object
-
- com.broadleafcommerce.auth.user.listener.domain.Customer
-
public class Customer extends Object
A subset of customer information that we're concerned with from Customer Service.
-
-
Field Summary
Fields Modifier and Type Field Description static String
USER_ID_ATTRIBUTE
An attribute we expect to be present inattributes
for existing users.
-
Constructor Summary
Constructors Constructor Description Customer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
Boolean
getActive()
Map<String,Object>
getAttributes()
<T> T
getAttributeValue(String key)
Convenience method to retrieve customer attributes, as they are a complex object.String
getContextId()
String
getCustomerContextId()
String
getEmail()
String
getFirstName()
String
getFullName()
String
getLastName()
String
getMiddleName()
String
getTenantId()
String
getUsername()
boolean
hasAttribute(String key)
Check if a customer has a particular attribute.int
hashCode()
boolean
isActive()
boolean
isLocked()
void
setActive(Boolean active)
void
setAttributes(Map<String,Object> attributes)
void
setContextId(String contextId)
void
setCustomerContextId(String customerContextId)
void
setEmail(String email)
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)
String
toString()
-
-
-
Field Detail
-
USER_ID_ATTRIBUTE
public static final String 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:
- Constant Field Values
-
-
Method Detail
-
getAttributeValue
public <T> T getAttributeValue(String key)
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
public boolean hasAttribute(String key)
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
public String getContextId()
-
getFirstName
public String getFirstName()
-
getMiddleName
public String getMiddleName()
-
getLastName
public String getLastName()
-
getFullName
public String getFullName()
-
getEmail
public String getEmail()
-
getUsername
public String getUsername()
-
getCustomerContextId
public String getCustomerContextId()
-
getTenantId
public String getTenantId()
-
getActive
public Boolean getActive()
-
isLocked
public boolean isLocked()
-
setContextId
public void setContextId(String contextId)
-
setFirstName
public void setFirstName(String firstName)
-
setMiddleName
public void setMiddleName(String middleName)
-
setLastName
public void setLastName(String lastName)
-
setFullName
public void setFullName(String fullName)
-
setEmail
public void setEmail(String email)
-
setUsername
public void setUsername(String username)
-
setCustomerContextId
public void setCustomerContextId(String customerContextId)
-
setTenantId
public void setTenantId(String tenantId)
-
setActive
public void setActive(Boolean active)
-
setLocked
public void setLocked(boolean locked)
-
canEqual
protected boolean canEqual(Object other)
-
-