Class AttributeDefinitionImpl
- All Implemented Interfaces:
AttributeDefinition,io.vrap.rmf.base.client.ModelBase
-
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 TypeMethodDescriptionbooleanWhether the attribute is required to have a value.Whether the attribute's values should generally be enabled in product search.getLabel()getName()The unique name of the attribute used in the API.getType()inthashCode()voidsetAttributeConstraint(AttributeConstraintEnum attributeConstraint) set attributeConstraintvoidsetInputHint(TextInputHint inputHint) set inputHintvoidsetInputTip(LocalizedString inputTip) set inputTipvoidsetIsRequired(Boolean isRequired) Whether the attribute is required to have a value.voidsetIsSearchable(Boolean isSearchable) Whether the attribute's values should generally be enabled in product search.voidsetLabel(LocalizedString label) set labelvoidThe unique name of the attribute used in the API.voidsetType(AttributeType type) set typetoString()Methods inherited from interface com.commercetools.history.models.common.AttributeDefinition
withAttributeDefinitionMethods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
AttributeDefinitionImpl
public AttributeDefinitionImpl()create empty instance
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceAttributeDefinition- Returns:
- type
-
getName
The unique name of the attribute used in the API. The name must be between two and 256 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (
_) and the hyphen-minus (-). When using the samenamefor an attribute in two or more product types all fields of the AttributeDefinition of this attribute need to be the same across the product types, otherwise an AttributeDefinitionAlreadyExists error code will be returned. An exception to this are the values of anenumorlenumtype and sets thereof.- Specified by:
getNamein interfaceAttributeDefinition- Returns:
- name
-
getLabel
- Specified by:
getLabelin interfaceAttributeDefinition- Returns:
- label
-
getIsRequired
Whether the attribute is required to have a value.
- Specified by:
getIsRequiredin interfaceAttributeDefinition- Returns:
- isRequired
-
getAttributeConstraint
- Specified by:
getAttributeConstraintin interfaceAttributeDefinition- Returns:
- attributeConstraint
-
getInputTip
- Specified by:
getInputTipin interfaceAttributeDefinition- Returns:
- inputTip
-
getInputHint
- Specified by:
getInputHintin interfaceAttributeDefinition- Returns:
- inputHint
-
getIsSearchable
Whether the attribute's values should generally be enabled in product search. This determines whether the value is stored in products for matching terms in the context of full-text search queries and can be used in facets & filters as part of product search queries. The exact features that are enabled/disabled with this flag depend on the concrete attribute type and are described there. The max size of a searchable field is restricted to 10922 characters. 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:
getIsSearchablein interfaceAttributeDefinition- Returns:
- isSearchable
-
setType
Description copied from interface:AttributeDefinitionset type- Specified by:
setTypein interfaceAttributeDefinition- Parameters:
type- value to be set
-
setName
Description copied from interface:AttributeDefinitionThe unique name of the attribute used in the API. The name must be between two and 256 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (
_) and the hyphen-minus (-). When using the samenamefor an attribute in two or more product types all fields of the AttributeDefinition of this attribute need to be the same across the product types, otherwise an AttributeDefinitionAlreadyExists error code will be returned. An exception to this are the values of anenumorlenumtype and sets thereof.- Specified by:
setNamein interfaceAttributeDefinition- Parameters:
name- value to be set
-
setLabel
Description copied from interface:AttributeDefinitionset label- Specified by:
setLabelin interfaceAttributeDefinition- Parameters:
label- value to be set
-
setIsRequired
Description copied from interface:AttributeDefinitionWhether the attribute is required to have a value.
- Specified by:
setIsRequiredin interfaceAttributeDefinition- Parameters:
isRequired- value to be set
-
setAttributeConstraint
Description copied from interface:AttributeDefinitionset attributeConstraint- Specified by:
setAttributeConstraintin interfaceAttributeDefinition- Parameters:
attributeConstraint- value to be set
-
setInputTip
Description copied from interface:AttributeDefinitionset inputTip- Specified by:
setInputTipin interfaceAttributeDefinition- Parameters:
inputTip- value to be set
-
setInputHint
Description copied from interface:AttributeDefinitionset inputHint- Specified by:
setInputHintin interfaceAttributeDefinition- Parameters:
inputHint- value to be set
-
setIsSearchable
Description copied from interface:AttributeDefinitionWhether the attribute's values should generally be enabled in product search. This determines whether the value is stored in products for matching terms in the context of full-text search queries and can be used in facets & filters as part of product search queries. The exact features that are enabled/disabled with this flag depend on the concrete attribute type and are described there. The max size of a searchable field is restricted to 10922 characters. 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:
setIsSearchablein interfaceAttributeDefinition- Parameters:
isSearchable- value to be set
-
equals
-
hashCode
public int hashCode() -
toString
-