Class Customer


  • public class Customer
    extends Object
    A subset of customer information that we're concerned with from Customer Service.
    • Field Detail

      • 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:
        Constant Field Values
    • Constructor Detail

      • Customer

        public Customer()
    • 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)
      • setAttributes

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

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object