Class AttributeDefinitionDraftImpl
- All Implemented Interfaces:
AttributeDefinitionDraft
,io.vrap.rmf.base.client.Draft<AttributeDefinitionDraft>
,io.vrap.rmf.base.client.ModelBase
Specify the Attribute to be created with the ProductTypeDraft.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Specifies how an Attribute or a combination of Attributes should be 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 information about the Attribute that aids content managers when setting Product details.Set totrue
if the Attribute is required to have a value on a ProductVariant.Set totrue
if the Attribute's values should be available in the Product Projections Search API and can be used 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 with the Project.getType()
Describes the Type of the Attribute.int
hashCode()
void
setAttributeConstraint
(AttributeConstraintEnum attributeConstraint) Specifies how an Attribute or a combination of Attributes should be 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 information about the Attribute that aids content managers when setting Product details.void
setIsRequired
(Boolean isRequired) Set totrue
if the Attribute is required to have a value on a ProductVariant.void
setIsSearchable
(Boolean isSearchable) Set totrue
if the Attribute's values should be available in the Product Projections Search API and can be used 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 with the Project.void
setType
(AttributeType type) Describes the Type of the Attribute.toString()
Methods inherited from interface com.commercetools.api.models.product_type.AttributeDefinitionDraft
withAttributeDefinitionDraft
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
AttributeDefinitionDraftImpl
public AttributeDefinitionDraftImpl()create empty instance
-
-
Method Details
-
getType
Describes the Type of the Attribute.
When the
type
is different for an AttributeDefinition using the same name in multiple ProductTypes, an AttributeDefinitionTypeConflict error is returned.- Specified by:
getType
in interfaceAttributeDefinitionDraft
- Returns:
- type
-
getName
User-defined name of the Attribute that is unique with the Project.
When using the same
name
for an Attribute in multiple ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes, else an AttributeDefinitionAlreadyExists error is returned. An exception to this are the values of anenum
orlenum
Type and sets thereof.- Specified by:
getName
in interfaceAttributeDefinitionDraft
- Returns:
- name
-
getLabel
Human-readable label for the Attribute.
- Specified by:
getLabel
in interfaceAttributeDefinitionDraft
- Returns:
- label
-
getIsRequired
Set to
true
if the Attribute is required to have a value on a ProductVariant.- Specified by:
getIsRequired
in interfaceAttributeDefinitionDraft
- Returns:
- isRequired
-
getAttributeConstraint
Specifies how an Attribute or a combination of Attributes should be validated across all variants of a Product.
- Specified by:
getAttributeConstraint
in interfaceAttributeDefinitionDraft
- Returns:
- attributeConstraint
-
getInputTip
Provides additional information about the Attribute that aids content managers when setting Product details.
- Specified by:
getInputTip
in interfaceAttributeDefinitionDraft
- Returns:
- inputTip
-
getInputHint
Provides a visual representation directive for values of this Attribute (only relevant for AttributeTextType and AttributeLocalizableTextType).
- Specified by:
getInputHint
in interfaceAttributeDefinitionDraft
- Returns:
- inputHint
-
getIsSearchable
Set to
true
if the Attribute's values should be available in the Product Projections Search API and can be used 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 interfaceAttributeDefinitionDraft
- Returns:
- isSearchable
-
setType
Description copied from interface:AttributeDefinitionDraft
Describes the Type of the Attribute.
When the
type
is different for an AttributeDefinition using the same name in multiple ProductTypes, an AttributeDefinitionTypeConflict error is returned.- Specified by:
setType
in interfaceAttributeDefinitionDraft
- Parameters:
type
- value to be set
-
setName
Description copied from interface:AttributeDefinitionDraft
User-defined name of the Attribute that is unique with the Project.
When using the same
name
for an Attribute in multiple ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes, else an AttributeDefinitionAlreadyExists error is returned. An exception to this are the values of anenum
orlenum
Type and sets thereof.- Specified by:
setName
in interfaceAttributeDefinitionDraft
- Parameters:
name
- value to be set
-
setLabel
Description copied from interface:AttributeDefinitionDraft
Human-readable label for the Attribute.
- Specified by:
setLabel
in interfaceAttributeDefinitionDraft
- Parameters:
label
- value to be set
-
setIsRequired
Description copied from interface:AttributeDefinitionDraft
Set to
true
if the Attribute is required to have a value on a ProductVariant.- Specified by:
setIsRequired
in interfaceAttributeDefinitionDraft
- Parameters:
isRequired
- value to be set
-
setAttributeConstraint
Description copied from interface:AttributeDefinitionDraft
Specifies how an Attribute or a combination of Attributes should be validated across all variants of a Product.
- Specified by:
setAttributeConstraint
in interfaceAttributeDefinitionDraft
- Parameters:
attributeConstraint
- value to be set
-
setInputTip
Description copied from interface:AttributeDefinitionDraft
Provides additional information about the Attribute that aids content managers when setting Product details.
- Specified by:
setInputTip
in interfaceAttributeDefinitionDraft
- Parameters:
inputTip
- value to be set
-
setInputHint
Description copied from interface:AttributeDefinitionDraft
Provides a visual representation directive for values of this Attribute (only relevant for AttributeTextType and AttributeLocalizableTextType).
- Specified by:
setInputHint
in interfaceAttributeDefinitionDraft
- Parameters:
inputHint
- value to be set
-
setIsSearchable
Description copied from interface:AttributeDefinitionDraft
Set to
true
if the Attribute's values should be available in the Product Projections Search API and can be used 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 interfaceAttributeDefinitionDraft
- Parameters:
isSearchable
- value to be set
-
equals
-
hashCode
public int hashCode() -
toString
-