java.lang.Object
com.broadleafcommerce.catalog.domain.product.characteristic.Characteristic
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable

public class Characteristic extends Object implements com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable
Represents a characteristic of a Product.
Since:
Catalog Service 2.2.0, Release Train 2.2.0
See Also:
  • Constructor Details

    • Characteristic

      public Characteristic()
  • Method Details

    • getId

      public String getId()
      Id of the characteristic.
    • getName

      public String getName()
      Name of the characteristic.
    • getFieldName

      public String getFieldName()
      Internal field name of the characteristic.
    • getDescription

      public String getDescription()
      Description for the characteristic.
    • getStartDate

      public Instant getStartDate()
      Start date for the characteristic.
    • getEndDate

      public Instant getEndDate()
      End date for the characteristic.
    • getValueType

      public String getValueType()
      Value type for the characteristic.
    • isConfigurable

      public boolean isConfigurable()
      Determines if the characteristic is configurable.
    • isTargetableInRuleBuilders

      public boolean isTargetableInRuleBuilders()
      Whether this characteristic should be targetable in rule-builders (e.g., by Offers and Content Items).
    • isTargetableForPricing

      public boolean isTargetableForPricing()
      Whether this characteristic should be targetable by pricing, e.g., a product's price should change depending on the value of this characteristic.
    • isUnique

      public boolean isUnique()
      Determines if the characteristic's value must be unique.
    • getMinCardinality

      public int getMinCardinality()
      Minimum cardinality for the characteristic.
    • getMaxCardinality

      public int getMaxCardinality()
      Maximum cardinality for the characteristic.
    • isExtensible

      public boolean isExtensible()
      Determines if the characteristic is extensible.
    • getValue

      public List<CharacteristicValue> getValue()
      List of values for the characteristic.
    • isShared

      public boolean isShared()
      Determines if the characteristic is shared between Specifications.
    • getDisplayOrder

      public Integer getDisplayOrder()
      Display order for the characteristic.
    • getValidationType

      public String getValidationType()
      The type of validation to apply to the characteristic's value.
    • getValidationRule

      public String getValidationRule()
      The validation rule to apply to the characteristic's value.
    • getErrorMessage

      public String getErrorMessage()
      The error message to display if the validation rule fails.
    • isTranslatable

      public boolean isTranslatable()
      Whether the values for this characteristic are translatable in the Admin UI.
    • 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)
      Id of the characteristic.
    • setName

      public void setName(String name)
      Name of the characteristic.
    • setFieldName

      public void setFieldName(String fieldName)
      Internal field name of the characteristic.
    • setDescription

      public void setDescription(String description)
      Description for the characteristic.
    • setStartDate

      public void setStartDate(Instant startDate)
      Start date for the characteristic.
    • setEndDate

      public void setEndDate(Instant endDate)
      End date for the characteristic.
    • setValueType

      public void setValueType(String valueType)
      Value type for the characteristic.
    • setConfigurable

      public void setConfigurable(boolean configurable)
      Determines if the characteristic is configurable.
    • setTargetableInRuleBuilders

      public void setTargetableInRuleBuilders(boolean targetableInRuleBuilders)
      Whether this characteristic should be targetable in rule-builders (e.g., by Offers and Content Items).
    • setTargetableForPricing

      public void setTargetableForPricing(boolean targetableForPricing)
      Whether this characteristic should be targetable by pricing, e.g., a product's price should change depending on the value of this characteristic.
    • setUnique

      public void setUnique(boolean unique)
      Determines if the characteristic's value must be unique.
    • setMinCardinality

      public void setMinCardinality(int minCardinality)
      Minimum cardinality for the characteristic.
    • setMaxCardinality

      public void setMaxCardinality(int maxCardinality)
      Maximum cardinality for the characteristic.
    • setExtensible

      public void setExtensible(boolean extensible)
      Determines if the characteristic is extensible.
    • setValue

      public void setValue(List<CharacteristicValue> value)
      List of values for the characteristic.
    • setShared

      public void setShared(boolean shared)
      Determines if the characteristic is shared between Specifications.
    • setDisplayOrder

      public void setDisplayOrder(Integer displayOrder)
      Display order for the characteristic.
    • setValidationType

      public void setValidationType(String validationType)
      The type of validation to apply to the characteristic's value.
    • setValidationRule

      public void setValidationRule(String validationRule)
      The validation rule to apply to the characteristic's value.
    • setErrorMessage

      public void setErrorMessage(String errorMessage)
      The error message to display if the validation rule fails.
    • setTranslatable

      public void setTranslatable(boolean translatable)
      Whether the values for this characteristic are translatable in the Admin UI.
    • 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
    • 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