Class CustomerContext
java.lang.Object
com.broadleafcommerce.search.api.domain.CustomerContext
- All Implemented Interfaces:
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The id for the account that is in the current context.The id for the customer that is in the current context.The list of id's that correspond to customer segments that this customer is a part of.int
hashCode()
void
setAccountId
(String accountId) The id for the account that is in the current context.void
setCustomerId
(String customerId) The id for the customer that is in the current context.void
setCustomerSegmentIds
(Set<String> customerSegmentIds) The list of id's that correspond to customer segments that this customer is a part of.toString()
-
Field Details
-
CUSTOMER_CONTEXT_HEADER
- See Also:
-
-
Constructor Details
-
CustomerContext
public CustomerContext()
-
-
Method Details
-
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
The id for the account that is in the current context.- Returns:
- The id for the account that is in the current context.
-
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
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
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
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
-
canEqual
-
hashCode
public int hashCode() -
toString
-