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 Details

    • USER_ID_ATTRIBUTE

      public static final String USER_ID_ATTRIBUTE
      An attribute we expect to be present in attributes for existing users. This will contain the value of the local auth-service User.id for the customer.
      See Also:
  • Constructor Details

    • Customer

      public Customer()
  • Method Details

    • 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()
    • getDefaultAccountId

      public String getDefaultAccountId()
    • getAttributes

      public Map<String,Object> getAttributes()
    • 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)
    • setDefaultAccountId

      public void setDefaultAccountId(String defaultAccountId)
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object