Interface CategoryImport

All Superinterfaces:
ImportResource

public interface CategoryImport extends ImportResource

The data representation for a Category to be imported that is persisted as a Category in the Project.


Example to create an instance using the builder pattern

     CategoryImport categoryImport = CategoryImport.builder()
             .key("{key}")
             .name(nameBuilder -> nameBuilder)
             .slug(slugBuilder -> slugBuilder)
             .build()
 
  • Method Details

    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier. If a Category with this key exists, it will be updated with the imported data.

      Specified by:
      getKey in interface ImportResource
      Returns:
      key
    • getName

      @NotNull @Valid @NotNull @Valid LocalizedString getName()

      Maps to Category.name.

      Returns:
      name
    • getSlug

      @NotNull @Valid @NotNull @Valid LocalizedString getSlug()

      Maps to Category.slug. Must match the pattern [-a-zA-Z0-9_]{2,256}.

      Returns:
      slug
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Maps to Category.description.

      Returns:
      description
    • getParent

      @Valid @Valid CategoryKeyReference getParent()

      Maps to Category.parent. The Reference to the parent Category with which the Category is associated. If referenced Category does not exist, the state of the ImportOperation will be set to unresolved until the necessary Category is created.

      Returns:
      parent
    • getOrderHint

      String getOrderHint()

      Maps to Category.orderHint.

      Returns:
      orderHint
    • getExternalId

      String getExternalId()

      Maps to Category.externalId.

      Returns:
      externalId
    • getMetaTitle

      @Valid @Valid LocalizedString getMetaTitle()

      Maps to Category.metaTitle.

      Returns:
      metaTitle
    • getMetaDescription

      @Valid @Valid LocalizedString getMetaDescription()

      Maps to Category.metaDescription.

      Returns:
      metaDescription
    • getMetaKeywords

      @Valid @Valid LocalizedString getMetaKeywords()

      Maps to Category.metaKeywords.

      Returns:
      metaKeywords
    • getAssets

      @Valid @Valid List<Asset> getAssets()
      Returns:
      assets
    • getCustom

      @Valid @Valid Custom getCustom()

      The custom fields for this Category.

      Returns:
      custom
    • setKey

      void setKey(String key)

      User-defined unique identifier. If a Category with this key exists, it will be updated with the imported data.

      Specified by:
      setKey in interface ImportResource
      Parameters:
      key - value to be set
    • setName

      void setName(LocalizedString name)

      Maps to Category.name.

      Parameters:
      name - value to be set
    • setSlug

      void setSlug(LocalizedString slug)

      Maps to Category.slug. Must match the pattern [-a-zA-Z0-9_]{2,256}.

      Parameters:
      slug - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Maps to Category.description.

      Parameters:
      description - value to be set
    • setParent

      void setParent(CategoryKeyReference parent)

      Maps to Category.parent. The Reference to the parent Category with which the Category is associated. If referenced Category does not exist, the state of the ImportOperation will be set to unresolved until the necessary Category is created.

      Parameters:
      parent - value to be set
    • setOrderHint

      void setOrderHint(String orderHint)

      Maps to Category.orderHint.

      Parameters:
      orderHint - value to be set
    • setExternalId

      void setExternalId(String externalId)

      Maps to Category.externalId.

      Parameters:
      externalId - value to be set
    • setMetaTitle

      void setMetaTitle(LocalizedString metaTitle)

      Maps to Category.metaTitle.

      Parameters:
      metaTitle - value to be set
    • setMetaDescription

      void setMetaDescription(LocalizedString metaDescription)

      Maps to Category.metaDescription.

      Parameters:
      metaDescription - value to be set
    • setMetaKeywords

      void setMetaKeywords(LocalizedString metaKeywords)

      Maps to Category.metaKeywords.

      Parameters:
      metaKeywords - value to be set
    • setAssets

      void setAssets(Asset... assets)
      set assets
      Parameters:
      assets - values to be set
    • setAssets

      void setAssets(List<Asset> assets)
      set assets
      Parameters:
      assets - values to be set
    • setCustom

      void setCustom(Custom custom)

      The custom fields for this Category.

      Parameters:
      custom - value to be set
    • of

      static CategoryImport of()
      factory method
      Returns:
      instance of CategoryImport
    • of

      static CategoryImport of(CategoryImport template)
      factory method to create a shallow copy CategoryImport
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static CategoryImport deepCopy(@Nullable CategoryImport template)
      factory method to create a deep copy of CategoryImport
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static CategoryImportBuilder builder()
      builder factory method for CategoryImport
      Returns:
      builder
    • builder

      static CategoryImportBuilder builder(CategoryImport template)
      create builder for CategoryImport instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCategoryImport

      default <T> T withCategoryImport(Function<CategoryImport,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<CategoryImport> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference