Class AttributeDefinitionImpl
- All Implemented Interfaces:
AttributeDefinition
,io.vrap.rmf.base.client.ModelBase
Describes a Product Attribute and allows you to define meta-information associated with the Attribute (like whether it should be searchable, or its constraints).
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Specifies how Attributes are validated across all variants of a Product.Provides a visual representation directive for values of this Attribute (only relevant for AttributeTextType and AttributeLocalizableTextType).Provides additional Attribute information to aid content managers configure Product details.Iftrue
, the Attribute must have a value on a ProductVariant.Iftrue
, the Attribute's values are available for the Product Projections Search API for use in full-text search queries, filters, and facets.getLabel()
Human-readable label for the Attribute.getName()
User-defined name of the Attribute that is unique within the Project.getType()
Describes the Type of the Attribute.int
hashCode()
void
setAttributeConstraint
(AttributeConstraintEnum attributeConstraint) Specifies how Attributes are validated across all variants of a Product.void
setInputHint
(TextInputHint inputHint) Provides a visual representation directive for values of this Attribute (only relevant for AttributeTextType and AttributeLocalizableTextType).void
setInputTip
(LocalizedString inputTip) Provides additional Attribute information to aid content managers configure Product details.void
setIsRequired
(Boolean isRequired) Iftrue
, the Attribute must have a value on a ProductVariant.void
setIsSearchable
(Boolean isSearchable) Iftrue
, the Attribute's values are available for the Product Projections Search API for use in full-text search queries, filters, and facets.void
setLabel
(LocalizedString label) Human-readable label for the Attribute.void
User-defined name of the Attribute that is unique within the Project.void
setType
(AttributeType type) Describes the Type of the Attribute.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.product_type.AttributeDefinition
withAttributeDefinition
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
AttributeDefinitionImpl
public AttributeDefinitionImpl()create empty instance
-
-
Method Details
-
getType
Describes the Type of the Attribute.
- Specified by:
getType
in interfaceAttributeDefinition
- Returns:
- type
-
getName
User-defined name of the Attribute that is unique within the Project.
- Specified by:
getName
in interfaceAttributeDefinition
- Returns:
- name
-
getLabel
Human-readable label for the Attribute.
- Specified by:
getLabel
in interfaceAttributeDefinition
- Returns:
- label
-
getIsRequired
If
true
, the Attribute must have a value on a ProductVariant.- Specified by:
getIsRequired
in interfaceAttributeDefinition
- Returns:
- isRequired
-
getAttributeConstraint
Specifies how Attributes are validated across all variants of a Product.
- Specified by:
getAttributeConstraint
in interfaceAttributeDefinition
- Returns:
- attributeConstraint
-
getInputTip
Provides additional Attribute information to aid content managers configure Product details.
- Specified by:
getInputTip
in interfaceAttributeDefinition
- Returns:
- inputTip
-
getInputHint
Provides a visual representation directive for values of this Attribute (only relevant for AttributeTextType and AttributeLocalizableTextType).
- Specified by:
getInputHint
in interfaceAttributeDefinition
- Returns:
- inputHint
-
getIsSearchable
If
true
, the Attribute's values are available for the Product Projections Search API for use in full-text search queries, filters, and facets.Which exact features are available with this flag depends on the specific AttributeType. The maximum size of a searchable field is restricted by the Field content size limit. This constraint is enforced at both Product creation and Product update. If the length of the input exceeds the maximum size, an InvalidField error is returned.
- Specified by:
getIsSearchable
in interfaceAttributeDefinition
- Returns:
- isSearchable
-
setType
Description copied from interface:AttributeDefinition
Describes the Type of the Attribute.
- Specified by:
setType
in interfaceAttributeDefinition
- Parameters:
type
- value to be set
-
setName
Description copied from interface:AttributeDefinition
User-defined name of the Attribute that is unique within the Project.
- Specified by:
setName
in interfaceAttributeDefinition
- Parameters:
name
- value to be set
-
setLabel
Description copied from interface:AttributeDefinition
Human-readable label for the Attribute.
- Specified by:
setLabel
in interfaceAttributeDefinition
- Parameters:
label
- value to be set
-
setIsRequired
Description copied from interface:AttributeDefinition
If
true
, the Attribute must have a value on a ProductVariant.- Specified by:
setIsRequired
in interfaceAttributeDefinition
- Parameters:
isRequired
- value to be set
-
setAttributeConstraint
Description copied from interface:AttributeDefinition
Specifies how Attributes are validated across all variants of a Product.
- Specified by:
setAttributeConstraint
in interfaceAttributeDefinition
- Parameters:
attributeConstraint
- value to be set
-
setInputTip
Description copied from interface:AttributeDefinition
Provides additional Attribute information to aid content managers configure Product details.
- Specified by:
setInputTip
in interfaceAttributeDefinition
- Parameters:
inputTip
- value to be set
-
setInputHint
Description copied from interface:AttributeDefinition
Provides a visual representation directive for values of this Attribute (only relevant for AttributeTextType and AttributeLocalizableTextType).
- Specified by:
setInputHint
in interfaceAttributeDefinition
- Parameters:
inputHint
- value to be set
-
setIsSearchable
Description copied from interface:AttributeDefinition
If
true
, the Attribute's values are available for the Product Projections Search API for use in full-text search queries, filters, and facets.Which exact features are available with this flag depends on the specific AttributeType. The maximum size of a searchable field is restricted by the Field content size limit. This constraint is enforced at both Product creation and Product update. If the length of the input exceeds the maximum size, an InvalidField error is returned.
- Specified by:
setIsSearchable
in interfaceAttributeDefinition
- Parameters:
isSearchable
- value to be set
-
equals
-
hashCode
-