Class CustomerContext

java.lang.Object
com.broadleafcommerce.search.api.domain.CustomerContext
All Implemented Interfaces:
Serializable

public class CustomerContext extends Object implements Serializable
DTO for holding customer information for personalizing search for a customer. Currently, this domain is only concerned with a single, logged-in customer's ID and the IDs of the customer segments to which that customer may belong. A "customer" is Broadleaf parlance that may be understood as a singular user of the store. A "customer segment" is just a grouping of related customers by a customer attribute like membership or logged-in status or by a request attribute like the presence of an affiliate tracking code in the URL, a search keyword, or having been sent from a particular device type.
See Also:
  • Field Details

  • Constructor Details

    • CustomerContext

      public CustomerContext()
  • Method Details

    • getCustomerId

      public String getCustomerId()
      The id for the customer that is in the current context.
      Returns:
      The id for the customer that is in the current context.
    • getAccountId

      public String getAccountId()
      The id for the account that is in the current context.
      Returns:
      The id for the account that is in the current context.
    • getCustomerSegmentIds

      public Set<String> getCustomerSegmentIds()
      The list of id's that correspond to customer segments that this customer is a part of.
      Returns:
      The list of id's that correspond to customer segments that this customer is a part of.
    • setCustomerId

      public void setCustomerId(String customerId)
      The id for the customer that is in the current context.
      Parameters:
      customerId - The id for the customer that is in the current context.
    • setAccountId

      public void setAccountId(String accountId)
      The id for the account that is in the current context.
      Parameters:
      accountId - The id for the account that is in the current context.
    • setCustomerSegmentIds

      public void setCustomerSegmentIds(Set<String> customerSegmentIds)
      The list of id's that correspond to customer segments that this customer is a part of.
      Parameters:
      customerSegmentIds - The list of id's that correspond to customer segments that this customer is a part of.
    • 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