Class CategoryDraftImpl

java.lang.Object
com.commercetools.api.models.category.CategoryDraftImpl
All Implemented Interfaces:
CategoryDraft, CustomizableDraft<CategoryDraft>, WithKey, io.vrap.rmf.base.client.Draft<CategoryDraft>, io.vrap.rmf.base.client.ModelBase

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

    • CategoryDraftImpl

      public CategoryDraftImpl()
      create empty instance
  • Method Details

    • getName

      public LocalizedString getName()

      Name of the Category.

      Specified by:
      getName in interface CategoryDraft
      Returns:
      name
    • getSlug

      public LocalizedString getSlug()

      User-defined identifier used as a deep-link URL to the related Category. A Category can have the same slug for different Locales, but it must be unique across the Project. Valid slugs must match the pattern ^[A-Za-z0-9_-]{2,256}+$.

      Specified by:
      getSlug in interface CategoryDraft
      Returns:
      slug
    • getDescription

      public LocalizedString getDescription()

      Description of the Category.

      Specified by:
      getDescription in interface CategoryDraft
      Returns:
      description
    • getParent

      public CategoryResourceIdentifier getParent()

      Parent Category of the Category. The parent can be set by its id or key.

      Specified by:
      getParent in interface CategoryDraft
      Returns:
      parent
    • getOrderHint

      public String getOrderHint()

      Decimal value between 0 and 1 used to order Categories that are on the same level in the Category tree. If not set, a random value will be assigned.

      Specified by:
      getOrderHint in interface CategoryDraft
      Returns:
      orderHint
    • getExternalId

      public String getExternalId()

      Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).

      Specified by:
      getExternalId in interface CategoryDraft
      Returns:
      externalId
    • getMetaTitle

      public LocalizedString getMetaTitle()

      Name of the Category used by external search engines for improved search engine performance.

      Specified by:
      getMetaTitle in interface CategoryDraft
      Returns:
      metaTitle
    • getMetaDescription

      public LocalizedString getMetaDescription()

      Description of the Category used by external search engines for improved search engine performance.

      Specified by:
      getMetaDescription in interface CategoryDraft
      Returns:
      metaDescription
    • getMetaKeywords

      public LocalizedString getMetaKeywords()

      Keywords related to the Category for improved search engine performance.

      Specified by:
      getMetaKeywords in interface CategoryDraft
      Returns:
      metaKeywords
    • getCustom

      public CustomFieldsDraft getCustom()

      Custom Fields for the Category.

      Specified by:
      getCustom in interface CategoryDraft
      Specified by:
      getCustom in interface CustomizableDraft<CategoryDraft>
      Returns:
      custom
    • getAssets

      public List<AssetDraft> getAssets()

      Media related to the Category.

      Specified by:
      getAssets in interface CategoryDraft
      Returns:
      assets
    • getKey

      public String getKey()

      User-defined unique identifier for the Category.

      Specified by:
      getKey in interface CategoryDraft
      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • setName

      public void setName(LocalizedString name)
      Description copied from interface: CategoryDraft

      Name of the Category.

      Specified by:
      setName in interface CategoryDraft
      Parameters:
      name - value to be set
    • setSlug

      public void setSlug(LocalizedString slug)
      Description copied from interface: CategoryDraft

      User-defined identifier used as a deep-link URL to the related Category. A Category can have the same slug for different Locales, but it must be unique across the Project. Valid slugs must match the pattern ^[A-Za-z0-9_-]{2,256}+$.

      Specified by:
      setSlug in interface CategoryDraft
      Parameters:
      slug - value to be set
    • setDescription

      public void setDescription(LocalizedString description)
      Description copied from interface: CategoryDraft

      Description of the Category.

      Specified by:
      setDescription in interface CategoryDraft
      Parameters:
      description - value to be set
    • setParent

      public void setParent(CategoryResourceIdentifier parent)
      Description copied from interface: CategoryDraft

      Parent Category of the Category. The parent can be set by its id or key.

      Specified by:
      setParent in interface CategoryDraft
      Parameters:
      parent - value to be set
    • setOrderHint

      public void setOrderHint(String orderHint)
      Description copied from interface: CategoryDraft

      Decimal value between 0 and 1 used to order Categories that are on the same level in the Category tree. If not set, a random value will be assigned.

      Specified by:
      setOrderHint in interface CategoryDraft
      Parameters:
      orderHint - value to be set
    • setExternalId

      public void setExternalId(String externalId)
      Description copied from interface: CategoryDraft

      Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).

      Specified by:
      setExternalId in interface CategoryDraft
      Parameters:
      externalId - value to be set
    • setMetaTitle

      public void setMetaTitle(LocalizedString metaTitle)
      Description copied from interface: CategoryDraft

      Name of the Category used by external search engines for improved search engine performance.

      Specified by:
      setMetaTitle in interface CategoryDraft
      Parameters:
      metaTitle - value to be set
    • setMetaDescription

      public void setMetaDescription(LocalizedString metaDescription)
      Description copied from interface: CategoryDraft

      Description of the Category used by external search engines for improved search engine performance.

      Specified by:
      setMetaDescription in interface CategoryDraft
      Parameters:
      metaDescription - value to be set
    • setMetaKeywords

      public void setMetaKeywords(LocalizedString metaKeywords)
      Description copied from interface: CategoryDraft

      Keywords related to the Category for improved search engine performance.

      Specified by:
      setMetaKeywords in interface CategoryDraft
      Parameters:
      metaKeywords - value to be set
    • setCustom

      public void setCustom(CustomFieldsDraft custom)
      Description copied from interface: CategoryDraft

      Custom Fields for the Category.

      Specified by:
      setCustom in interface CategoryDraft
      Specified by:
      setCustom in interface CustomizableDraft<CategoryDraft>
      Parameters:
      custom - value to be set
    • setAssets

      public void setAssets(AssetDraft... assets)
      Description copied from interface: CategoryDraft

      Media related to the Category.

      Specified by:
      setAssets in interface CategoryDraft
      Parameters:
      assets - values to be set
    • setAssets

      public void setAssets(List<AssetDraft> assets)
      Description copied from interface: CategoryDraft

      Media related to the Category.

      Specified by:
      setAssets in interface CategoryDraft
      Parameters:
      assets - values to be set
    • setKey

      public void setKey(String key)
      Description copied from interface: CategoryDraft

      User-defined unique identifier for the Category.

      Specified by:
      setKey in interface CategoryDraft
      Parameters:
      key - value to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object