Class CustomerSegment
- java.lang.Object
-
- com.broadleafcommerce.customer.domain.CustomerSegment
-
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
,Serializable
public class CustomerSegment extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CustomerSegment()
CustomerSegment(String id, String name, String description, CustomerSegmentType customerSegmentType, Integer priority, String identifierType, String segmentMatchRule, boolean active, String processingState, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
getContextState()
A subset ofTracking
information to expose the context state for this object.CustomerSegmentType
getCustomerSegmentType()
The type of this customer segment.String
getDescription()
The description of this customer segment.String
getId()
String
getIdentifierType()
ForCustomerSegmentType.CUSTOMER_SET
segment types, this represents the method used to associate a customer with this segment.String
getName()
The name of this customer segment.Integer
getPriority()
The priority of this customer segment.String
getProcessingState()
The current processing state of this segment.String
getSegmentMatchRule()
The rule(s) for this customer segment if rule based.int
hashCode()
boolean
isActive()
void
setActive(boolean active)
void
setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
A subset ofTracking
information to expose the context state for this object.void
setCustomerSegmentType(CustomerSegmentType customerSegmentType)
The type of this customer segment.void
setDescription(String description)
The description of this customer segment.void
setId(String id)
void
setIdentifierType(String identifierType)
ForCustomerSegmentType.CUSTOMER_SET
segment types, this represents the method used to associate a customer with this segment.void
setName(String name)
The name of this customer segment.void
setPriority(Integer priority)
The priority of this customer segment.void
setProcessingState(String processingState)
The current processing state of this segment.void
setSegmentMatchRule(String segmentMatchRule)
The rule(s) for this customer segment if rule based.String
toString()
-
-
-
Constructor Detail
-
CustomerSegment
public CustomerSegment()
-
CustomerSegment
public CustomerSegment(String id, String name, String description, CustomerSegmentType customerSegmentType, Integer priority, String identifierType, String segmentMatchRule, boolean active, String processingState, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
-
-
Method Detail
-
getId
public String getId()
-
getName
public String getName()
The name of this customer segment.- Returns:
- The customer segment name.
-
getDescription
public String getDescription()
The description of this customer segment.- Returns:
- The customer segment's description.
-
getCustomerSegmentType
public CustomerSegmentType getCustomerSegmentType()
The type of this customer segment.- Returns:
- The customer segment type
-
getPriority
public Integer getPriority()
The priority of this customer segment. This is to enforce ordering when a customer may belong to multiple segments. A lower value indicates higher priority.- Returns:
- The customer segment priority.
-
getIdentifierType
public String getIdentifierType()
ForCustomerSegmentType.CUSTOMER_SET
segment types, this represents the method used to associate a customer with this segment.Examples include email, customer ID, login username, etc.
- Returns:
- The segment identifier type
-
getSegmentMatchRule
public String getSegmentMatchRule()
The rule(s) for this customer segment if rule based. The default behavior is an RSQL filter, but there is no strict requirement for this to be RSQL based.- Returns:
- The rule(s) that must be fulfilled for a customer to match this segment.
-
isActive
public boolean isActive()
- Returns:
- Is this customer segment active?
-
getProcessingState
public String getProcessingState()
The current processing state of this segment.While this value is set on every segment for simplicity, the default behavior is that this value is only used of on rule based customer segments. This field not applicable for static segments, such as customer sets.
The following describes the default processing states, and how these states are determined:
- New Segment Created:
SegmentStatus.INITIALIZATION_REQUIRED
- Segment currently processing:
SegmentStatus.PROCESSING
- Segment finished processing:
SegmentStatus.READY
- Dirty Segment (Such as an update action on a segment, or a new customer is created but
not immediately processed upon creation):
SegmentStatus.UPDATE_REQUIRED
- Returns:
- The current processing state of this segment.
- See Also:
SegmentStatus
- New Segment Created:
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
A subset ofTracking
information to expose the context state for this object.- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Returns:
- a subset of
Tracking
information to expose the context state for this object
-
setId
public void setId(String id)
-
setName
public void setName(String name)
The name of this customer segment.
-
setDescription
public void setDescription(String description)
The description of this customer segment.
-
setCustomerSegmentType
public void setCustomerSegmentType(CustomerSegmentType customerSegmentType)
The type of this customer segment.
-
setPriority
public void setPriority(Integer priority)
The priority of this customer segment. This is to enforce ordering when a customer may belong to multiple segments. A lower value indicates higher priority.
-
setIdentifierType
public void setIdentifierType(String identifierType)
ForCustomerSegmentType.CUSTOMER_SET
segment types, this represents the method used to associate a customer with this segment.Examples include email, customer ID, login username, etc.
-
setSegmentMatchRule
public void setSegmentMatchRule(String segmentMatchRule)
The rule(s) for this customer segment if rule based. The default behavior is an RSQL filter, but there is no strict requirement for this to be RSQL based.
-
setActive
public void setActive(boolean active)
-
setProcessingState
public void setProcessingState(String processingState)
The current processing state of this segment.While this value is set on every segment for simplicity, the default behavior is that this value is only used of on rule based customer segments. This field not applicable for static segments, such as customer sets.
The following describes the default processing states, and how these states are determined:
- New Segment Created:
SegmentStatus.INITIALIZATION_REQUIRED
- Segment currently processing:
SegmentStatus.PROCESSING
- Segment finished processing:
SegmentStatus.READY
- Dirty Segment (Such as an update action on a segment, or a new customer is created but
not immediately processed upon creation):
SegmentStatus.UPDATE_REQUIRED
- See Also:
SegmentStatus
- New Segment Created:
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
A subset ofTracking
information to expose the context state for this object.- Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
canEqual
protected boolean canEqual(Object other)
-
-