Class Characteristic
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
A subset ofTracking
information to expose the context state for this object.Description for the characteristic.Display order for the characteristic.End date for the characteristic.The error message to display if the validation rule fails.Internal field name of the characteristic.getId()
Id of the characteristic.int
Maximum cardinality for the characteristic.int
Minimum cardinality for the characteristic.getName()
Name of the characteristic.Start date for the characteristic.The validation rule to apply to the characteristic's value.The type of validation to apply to the characteristic's value.getValue()
List of values for the characteristic.Value type for the characteristic.int
hashCode()
boolean
Determines if the characteristic is configurable.boolean
Determines if the characteristic is extensible.boolean
isShared()
Determines if the characteristic is shared between Specifications.boolean
Whether this characteristic should be targetable by pricing, e.g., a product's price should change depending on the value of this characteristic.boolean
Whether this characteristic should be targetable in rule-builders (e.g., by Offers and Content Items).boolean
Whether the values for this characteristic are translatable in the Admin UI.boolean
isUnique()
Determines if the characteristic's value must be unique.void
setConfigurable
(boolean configurable) Determines if the characteristic is configurable.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
setDescription
(String description) Description for the characteristic.void
setDisplayOrder
(Integer displayOrder) Display order for the characteristic.void
setEndDate
(Instant endDate) End date for the characteristic.void
setErrorMessage
(String errorMessage) The error message to display if the validation rule fails.void
setExtensible
(boolean extensible) Determines if the characteristic is extensible.void
setFieldName
(String fieldName) Internal field name of the characteristic.void
Id of the characteristic.void
setMaxCardinality
(int maxCardinality) Maximum cardinality for the characteristic.void
setMinCardinality
(int minCardinality) Minimum cardinality for the characteristic.void
Name of the characteristic.void
setShared
(boolean shared) Determines if the characteristic is shared between Specifications.void
setStartDate
(Instant startDate) Start date for the characteristic.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.void
setTargetableInRuleBuilders
(boolean targetableInRuleBuilders) Whether this characteristic should be targetable in rule-builders (e.g., by Offers and Content Items).void
setTranslatable
(boolean translatable) Whether the values for this characteristic are translatable in the Admin UI.void
setUnique
(boolean unique) Determines if the characteristic's value must be unique.void
setValidationRule
(String validationRule) The validation rule to apply to the characteristic's value.void
setValidationType
(String validationType) The type of validation to apply to the characteristic's value.void
setValue
(List<CharacteristicValue> value) List of values for the characteristic.void
setValueType
(String valueType) Value type for the characteristic.toString()
-
Constructor Details
-
Characteristic
public Characteristic()
-
-
Method Details
-
getId
Id of the characteristic. -
getName
Name of the characteristic. -
getFieldName
Internal field name of the characteristic. -
getDescription
Description for the characteristic. -
getStartDate
Start date for the characteristic. -
getEndDate
End date for the characteristic. -
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
List of values for the characteristic. -
getDisplayOrder
Display order for the characteristic. -
getValidationType
The type of validation to apply to the characteristic's value. -
getValidationRule
The validation rule to apply to the characteristic's value. -
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 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
Id of the characteristic. -
setName
Name of the characteristic. -
setFieldName
Internal field name of the characteristic. -
setDescription
Description for the characteristic. -
setStartDate
Start date for the characteristic. -
setEndDate
End date for the characteristic. -
setValueType
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
List of values for the characteristic. -
setDisplayOrder
Display order for the characteristic. -
setValidationType
The type of validation to apply to the characteristic's value. -
setValidationRule
The validation rule to apply to the characteristic's value. -
setErrorMessage
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 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
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-