java.lang.Object
com.broadleafcommerce.notification.service.provider.external.domain.user.Customer
All Implemented Interfaces:
Serializable

public class Customer extends Object implements Serializable
Represents a customer
Author:
Susana Cruz (susanaccruz)
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    boolean
     
    Additional phone numbers associated with the customer.
    Dynamic attributes that are a part of the customer.
    com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
    A subset of Tracking information to expose the context state for this object.
    The default account for the customer.
    The default communication preference of the customer.
    The email address of the customer.
    The id that associates this user with an external system.
    The first name of the customer, if the fullName is not being used for the customer.
    The full name of the customer, if the component parts firstName, middleName, and lastName are not being used to comprise the full name.
    The context ID of the customer.
    The last name of the customer, if the fullName is not being used for the customer.
    The middle name of the customer, if the fullName is not being used for the customer.
    com.broadleafcommerce.order.common.domain.Phone
    The main phone number of the customer.
    The type of the customer, if it's in a special circumstance.
    The tax id for this customer
    The username of the customer, used to log in.
    Optional VAT registration ID.
    int
     
    boolean
    Is this customer active? Inactive customers can be thought of as "disabled" and will not be able to login.
    boolean
    Is this user locked? A user may be locked due to too many failed login attempts.
    void
    setActive(boolean active)
    Is this customer active? Inactive customers can be thought of as "disabled" and will not be able to login.
    void
    Additional phone numbers associated with the customer.
    void
    Dynamic attributes that are a part of the customer.
    void
    setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
    A subset of Tracking information to expose the context state for this object.
    void
    setDefaultAccountId(String defaultAccountId)
    The default account for the customer.
    void
    setDefaultCommunicationPreference(String defaultCommunicationPreference)
    The default communication preference of the customer.
    void
    The email address of the customer.
    void
    setExternalId(String externalId)
    The id that associates this user with an external system.
    void
    setFirstName(String firstName)
    The first name of the customer, if the fullName is not being used for the customer.
    void
    setFullName(String fullName)
    The full name of the customer, if the component parts firstName, middleName, and lastName are not being used to comprise the full name.
    void
    The context ID of the customer.
    void
    setLastName(String lastName)
    The last name of the customer, if the fullName is not being used for the customer.
    void
    setLocked(boolean locked)
    Is this user locked? A user may be locked due to too many failed login attempts.
    void
    setMiddleName(String middleName)
    The middle name of the customer, if the fullName is not being used for the customer.
    void
    setPhone(com.broadleafcommerce.order.common.domain.Phone phone)
    The main phone number of the customer.
    void
    setSpecialType(String specialType)
    The type of the customer, if it's in a special circumstance.
    void
    The tax id for this customer
    void
    setUsername(String username)
    The username of the customer, used to log in.
    void
    setVatRegistrationId(String vatRegistrationId)
    Optional VAT registration ID.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Customer

      public Customer()
  • Method Details

    • getId

      public String getId()
      The context ID of the customer.
      Returns:
      the context ID of the customer
    • getFirstName

      public String getFirstName()
      The first name of the customer, if the fullName is not being used for the customer.
      Returns:
      the first name of the customer
    • getMiddleName

      public String getMiddleName()
      The middle name of the customer, if the fullName is not being used for the customer.
      Returns:
      the middle name of the customer
    • getLastName

      public String getLastName()
      The last name of the customer, if the fullName is not being used for the customer.
      Returns:
      the last name of the customer
    • getFullName

      public String getFullName()
      The full name of the customer, if the component parts firstName, middleName, and lastName are not being used to comprise the full name.
      Returns:
      the full name of the customer
    • getUsername

      public String getUsername()
      The username of the customer, used to log in.
      Returns:
      the username of the customer
    • getEmail

      public String getEmail()
      The email address of the customer.
      Returns:
      the email address of the customer
    • getExternalId

      public String getExternalId()
      The id that associates this user with an external system.
      Returns:
      The customer's external ID
    • getPhone

      public com.broadleafcommerce.order.common.domain.Phone getPhone()
      The main phone number of the customer.
      Returns:
      the main phone number of the customer
    • getAdditionalPhones

      public List<AdditionalPhone> getAdditionalPhones()
      Additional phone numbers associated with the customer.
      Returns:
      additional phone numbers associated with the customer
    • getDefaultCommunicationPreference

      public String getDefaultCommunicationPreference()
      The default communication preference of the customer.
      Returns:
      the default communication preference of the customer
    • getAttributes

      public Map<String,Object> getAttributes()
      Dynamic attributes that are a part of the customer. This is an admin-entered field.
      Returns:
      dynamic attributes that are a part of the customer
    • getSpecialType

      public String getSpecialType()
      The type of the customer, if it's in a special circumstance.
      Returns:
      The type of the customer, if it's in a special circumstance.
    • isActive

      public boolean isActive()
      Is this customer active? Inactive customers can be thought of as "disabled" and will not be able to login. A customer set to inactive must be manually re-activated.

      Note: If manually setting this to false (e.g. via a direct database update), the auth user record (JpaUser#active in the auth database) must also be set to false.

      See also locked

      Returns:
      Is this customer active?
    • getTaxId

      public String getTaxId()
      The tax id for this customer
    • getVatRegistrationId

      public String getVatRegistrationId()
      Optional VAT registration ID.
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Returns:
      a subset of Tracking information to expose the context state for this object.
    • isLocked

      public boolean isLocked()
      Is this user locked? A user may be locked due to too many failed login attempts. Note that, depending on user lock configuration, this may have no effect. If permanently disabling a customer is desired, the active flag should be used instead.
      Returns:
      is this customer locked?
    • getDefaultAccountId

      public String getDefaultAccountId()
      The default account for the customer. If set, the customer will automatically have this account selected on login.
      Returns:
      The default account id.
    • setId

      public void setId(String id)
      The context ID of the customer.
      Parameters:
      id - the context ID of the customer
    • setFirstName

      public void setFirstName(String firstName)
      The first name of the customer, if the fullName is not being used for the customer.
      Parameters:
      firstName - the first name of the customer
    • setMiddleName

      public void setMiddleName(String middleName)
      The middle name of the customer, if the fullName is not being used for the customer.
      Parameters:
      middleName - the middle name of the customer
    • setLastName

      public void setLastName(String lastName)
      The last name of the customer, if the fullName is not being used for the customer.
      Parameters:
      lastName - the last name of the customer
    • setFullName

      public void setFullName(String fullName)
      The full name of the customer, if the component parts firstName, middleName, and lastName are not being used to comprise the full name.
      Parameters:
      fullName - the full name of the customer
    • setUsername

      public void setUsername(String username)
      The username of the customer, used to log in.
      Parameters:
      username - the username of the customer
    • setEmail

      public void setEmail(String email)
      The email address of the customer.
      Parameters:
      email - the email address of the customer
    • setExternalId

      public void setExternalId(String externalId)
      The id that associates this user with an external system.
      Parameters:
      externalId - The customer's external ID
    • setPhone

      public void setPhone(com.broadleafcommerce.order.common.domain.Phone phone)
      The main phone number of the customer.
      Parameters:
      phone - the main phone number of the customer
    • setAdditionalPhones

      public void setAdditionalPhones(List<AdditionalPhone> additionalPhones)
      Additional phone numbers associated with the customer.
      Parameters:
      additionalPhones - additional phone numbers associated with the customer
    • setDefaultCommunicationPreference

      public void setDefaultCommunicationPreference(String defaultCommunicationPreference)
      The default communication preference of the customer.
      Parameters:
      defaultCommunicationPreference - the default communication preference of the customer
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Dynamic attributes that are a part of the customer. This is an admin-entered field.
      Parameters:
      attributes - dynamic attributes that are a part of the customer
    • setSpecialType

      public void setSpecialType(String specialType)
      The type of the customer, if it's in a special circumstance.
      Parameters:
      type - The type of the customer, if it's in a special circumstance.
    • setActive

      public void setActive(boolean active)
      Is this customer active? Inactive customers can be thought of as "disabled" and will not be able to login. A customer set to inactive must be manually re-activated.

      Note: If manually setting this to false (e.g. via a direct database update), the auth user record (JpaUser#active in the auth database) must also be set to false.

      See also locked

      Parameters:
      active - Is this customer active?
    • setTaxId

      public void setTaxId(String taxId)
      The tax id for this customer
    • setVatRegistrationId

      public void setVatRegistrationId(String vatRegistrationId)
      Optional VAT registration ID.
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • setLocked

      public void setLocked(boolean locked)
      Is this user locked? A user may be locked due to too many failed login attempts. Note that, depending on user lock configuration, this may have no effect. If permanently disabling a customer is desired, the active flag should be used instead.
      Parameters:
      locked - is this customer locked?
    • setDefaultAccountId

      public void setDefaultAccountId(String defaultAccountId)
      The default account for the customer. If set, the customer will automatically have this account selected on login.
      Parameters:
      defaultAccountId - The default account id.
    • 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