Class Characteristic
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,Serializable
- Since:
- Catalog Service 2.2.0, Release Train 2.2.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanAdditional custom attributes associated with extensions and complex value types, e.g., enum, variant option.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.Description for the characteristic.Display order for the characteristic.The name of the custom component that renders this 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.The type of inheritance that the characteristic falls under.intMaximum cardinality for the characteristic.intMinimum cardinality for the characteristic.getName()Name of the characteristic.SinceBusinessTypes can inherit characteristics from their parent/ancestor business types, there is a possibility for inherited characteristics to be edited and overridden.Start date for the characteristic.Augmentation target keys.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.inthashCode()booleanDetermines if the characteristic is configurable.booleanDetermines if the characteristic is extensible.booleanDetermines if the characteristic's values should narrow as products are managed in child catalogsbooleanWhether this characteristic is allowed to have no values set.booleanisShared()Determines if the characteristic is shared between Specifications.booleanWhether this characteristic should be targetable by pricing, e.g., a product's price should change depending on the value of this characteristic.booleanWhether this characteristic should be targetable in rule-builders (e.g., by Offers and Content Items).booleanWhether the values for this characteristic are translatable in the Admin UI.booleanisUnique()Determines if the characteristic's value must be unique.voidsetAttributes(Map<String, Object> attributes) Additional custom attributes associated with extensions and complex value types, e.g., enum, variant option.voidsetConfigurable(boolean configurable) Determines if the characteristic is configurable.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetDescription(String description) Description for the characteristic.voidsetDisplayOrder(Integer displayOrder) Display order for the characteristic.voidsetDisplayWidget(String displayWidget) The name of the custom component that renders this characteristic.voidsetEndDate(Instant endDate) End date for the characteristic.voidsetErrorMessage(String errorMessage) The error message to display if the validation rule fails.voidsetExtensible(boolean extensible) Determines if the characteristic is extensible.voidsetFieldName(String fieldName) Internal field name of the characteristic.voidId of the characteristic.voidsetInheritanceType(String inheritanceType) The type of inheritance that the characteristic falls under.voidsetMaxCardinality(int maxCardinality) Maximum cardinality for the characteristic.voidsetMinCardinality(int minCardinality) Minimum cardinality for the characteristic.voidName of the characteristic.voidsetNarrowingEnabled(boolean narrowingEnabled) Determines if the characteristic's values should narrow as products are managed in child catalogsvoidsetParentCharacteristicId(String parentCharacteristicId) SinceBusinessTypes can inherit characteristics from their parent/ancestor business types, there is a possibility for inherited characteristics to be edited and overridden.voidsetPlaceholder(boolean placeholder) Whether this characteristic is allowed to have no values set.voidsetShared(boolean shared) Determines if the characteristic is shared between Specifications.voidsetStartDate(Instant startDate) Start date for the characteristic.voidsetTargetableForPricing(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.voidsetTargetableInRuleBuilders(boolean targetableInRuleBuilders) Whether this characteristic should be targetable in rule-builders (e.g., by Offers and Content Items).voidsetTargetKey(Map<String, String> targetKey) Augmentation target keys.voidsetTranslatable(boolean translatable) Whether the values for this characteristic are translatable in the Admin UI.voidsetUnique(boolean unique) Determines if the characteristic's value must be unique.voidsetValidationRule(String validationRule) The validation rule to apply to the characteristic's value.voidsetValidationType(String validationType) The type of validation to apply to the characteristic's value.voidsetValue(List<CharacteristicValue> value) List of values for the characteristic.voidsetValueType(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. -
getDisplayWidget
The name of the custom component that renders this characteristic.- Since:
- Catalog Service 2.2.1, Release Train 2.2.1
-
getTargetKey
Augmentation target keys.- Since:
- Catalog Service 2.2.1, Release Train 2.2.1
-
getParentCharacteristicId
SinceBusinessTypes can inherit characteristics from their parent/ancestor business types, there is a possibility for inherited characteristics to be edited and overridden.The ID of the parent characteristic that this characteristic is overriding. Only expected to be populated when
inheritanceTypeisDefaultCharacteristicInheritanceType.OVERRIDDEN.- Since:
- Catalog Services 2.3.0, Release Train 2.3.0
-
getInheritanceType
The type of inheritance that the characteristic falls under.- Since:
- Catalog Services 2.3.0, Release Train 2.3.0
- See Also:
-
isNarrowingEnabled
public boolean isNarrowingEnabled()Determines if the characteristic's values should narrow as products are managed in child catalogsThis functionality relies on
ProductCharacteristicValue.isActiveto determine if a characteristic value is active or inactive. If a characteristic value is active, it will be included in the narrowing process. If it is inactive, it will be excluded.- Since:
- Catalog Services 2.3.0, Release Train 2.3.0
-
isPlaceholder
public boolean isPlaceholder()Whether this characteristic is allowed to have no values set. If false, at least one value must be specified.This is primarily used in advanced scenarios where a characteristic is being used as a placeholder for values that will be defined later, e.g., by an external system.
- Since:
- Catalog Services 2.3.0, Release Train 2.3.0
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
getAttributes
Additional custom attributes associated with extensions and complex value types, e.g., enum, variant option.- Since:
- Catalog Service 2.2.1, Release Train 2.2.1
-
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. -
setDisplayWidget
The name of the custom component that renders this characteristic.- Since:
- Catalog Service 2.2.1, Release Train 2.2.1
-
setTargetKey
Augmentation target keys.- Since:
- Catalog Service 2.2.1, Release Train 2.2.1
-
setParentCharacteristicId
SinceBusinessTypes can inherit characteristics from their parent/ancestor business types, there is a possibility for inherited characteristics to be edited and overridden.The ID of the parent characteristic that this characteristic is overriding. Only expected to be populated when
inheritanceTypeisDefaultCharacteristicInheritanceType.OVERRIDDEN.- Since:
- Catalog Services 2.3.0, Release Train 2.3.0
-
setInheritanceType
The type of inheritance that the characteristic falls under.- Since:
- Catalog Services 2.3.0, Release Train 2.3.0
- See Also:
-
setNarrowingEnabled
public void setNarrowingEnabled(boolean narrowingEnabled) Determines if the characteristic's values should narrow as products are managed in child catalogsThis functionality relies on
ProductCharacteristicValue.isActiveto determine if a characteristic value is active or inactive. If a characteristic value is active, it will be included in the narrowing process. If it is inactive, it will be excluded.- Since:
- Catalog Services 2.3.0, Release Train 2.3.0
-
setPlaceholder
public void setPlaceholder(boolean placeholder) Whether this characteristic is allowed to have no values set. If false, at least one value must be specified.This is primarily used in advanced scenarios where a characteristic is being used as a placeholder for values that will be defined later, e.g., by an external system.
- Since:
- Catalog Services 2.3.0, Release Train 2.3.0
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
setAttributes
Additional custom attributes associated with extensions and complex value types, e.g., enum, variant option.- Since:
- Catalog Service 2.2.1, Release Train 2.2.1
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-