Class AttributeDefinitionImpl

java.lang.Object
com.commercetools.history.models.common.AttributeDefinitionImpl
All Implemented Interfaces:
AttributeDefinition, io.vrap.rmf.base.client.ModelBase

public class AttributeDefinitionImpl extends Object implements AttributeDefinition, io.vrap.rmf.base.client.ModelBase
AttributeDefinition
  • Constructor Details

  • Method Details

    • getType

      Specified by:
      getType in interface AttributeDefinition
      Returns:
      type
    • getName

      public String 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 same name for 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 an enum or lenum type and sets thereof.

      Specified by:
      getName in interface AttributeDefinition
      Returns:
      name
    • getLabel

      Specified by:
      getLabel in interface AttributeDefinition
      Returns:
      label
    • getIsRequired

      Whether the attribute is required to have a value.

      Specified by:
      getIsRequired in interface AttributeDefinition
      Returns:
      isRequired
    • getAttributeConstraint

      Specified by:
      getAttributeConstraint in interface AttributeDefinition
      Returns:
      attributeConstraint
    • getInputTip

      Specified by:
      getInputTip in interface AttributeDefinition
      Returns:
      inputTip
    • getInputHint

      Specified by:
      getInputHint in interface AttributeDefinition
      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:
      getIsSearchable in interface AttributeDefinition
      Returns:
      isSearchable
    • setType

      public void setType(AttributeType type)
      Description copied from interface: AttributeDefinition
      set type
      Specified by:
      setType in interface AttributeDefinition
      Parameters:
      type - value to be set
    • setName

      public void setName(String name)
      Description copied from interface: AttributeDefinition

      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 same name for 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 an enum or lenum type and sets thereof.

      Specified by:
      setName in interface AttributeDefinition
      Parameters:
      name - value to be set
    • setLabel

      public void setLabel(LocalizedString label)
      Description copied from interface: AttributeDefinition
      set label
      Specified by:
      setLabel in interface AttributeDefinition
      Parameters:
      label - value to be set
    • setIsRequired

      public void setIsRequired(Boolean isRequired)
      Description copied from interface: AttributeDefinition

      Whether the attribute is required to have a value.

      Specified by:
      setIsRequired in interface AttributeDefinition
      Parameters:
      isRequired - value to be set
    • setAttributeConstraint

      public void setAttributeConstraint(AttributeConstraintEnum attributeConstraint)
      Description copied from interface: AttributeDefinition
      set attributeConstraint
      Specified by:
      setAttributeConstraint in interface AttributeDefinition
      Parameters:
      attributeConstraint - value to be set
    • setInputTip

      public void setInputTip(LocalizedString inputTip)
      Description copied from interface: AttributeDefinition
      set inputTip
      Specified by:
      setInputTip in interface AttributeDefinition
      Parameters:
      inputTip - value to be set
    • setInputHint

      public void setInputHint(TextInputHint inputHint)
      Description copied from interface: AttributeDefinition
      set inputHint
      Specified by:
      setInputHint in interface AttributeDefinition
      Parameters:
      inputHint - value to be set
    • setIsSearchable

      public void setIsSearchable(Boolean isSearchable)
      Description copied from interface: AttributeDefinition

      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:
      setIsSearchable in interface AttributeDefinition
      Parameters:
      isSearchable - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object