Class 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 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()
        For CustomerSegmentType.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:

        Returns:
        The current processing state of this segment.
        See Also:
        SegmentStatus
      • 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.
        Specified by:
        getContextState in interface com.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)
        For CustomerSegmentType.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:

        See Also:
        SegmentStatus
      • 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.
        Specified by:
        setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
        Parameters:
        contextState - a subset of Tracking information to expose the context state for this object
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object