Interface Asset

All Superinterfaces:
Customizable<Asset>, WithKey

public interface Asset extends Customizable<Asset>, WithKey
Asset
Example to create an instance using the builder pattern

     Asset asset = Asset.builder()
             .id("{id}")
             .plusSources(sourcesBuilder -> sourcesBuilder)
             .name(nameBuilder -> nameBuilder)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the Asset.

      Returns:
      id
    • getSources

      @NotNull @Valid @NotNull @Valid List<AssetSource> getSources()
      Returns:
      sources
    • getName

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

      Name of the Asset.

      Returns:
      name
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Description of the Asset.

      Returns:
      description
    • getTags

      List<String> getTags()

      Keywords for categorizing and organizing Assets.

      Returns:
      tags
    • getCustom

      @Valid @Valid CustomFields getCustom()

      Custom Fields defined for the Asset.

      Specified by:
      getCustom in interface Customizable<Asset>
      Returns:
      custom
    • getKey

      String getKey()

      User-defined identifier of the Asset. It is unique per Category or ProductVariant.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • setId

      void setId(String id)

      Unique identifier of the Asset.

      Parameters:
      id - value to be set
    • setSources

      void setSources(AssetSource... sources)
      set sources
      Parameters:
      sources - values to be set
    • setSources

      void setSources(List<AssetSource> sources)
      set sources
      Parameters:
      sources - values to be set
    • setName

      void setName(LocalizedString name)

      Name of the Asset.

      Parameters:
      name - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Description of the Asset.

      Parameters:
      description - value to be set
    • setTags

      void setTags(String... tags)

      Keywords for categorizing and organizing Assets.

      Parameters:
      tags - values to be set
    • setTags

      void setTags(List<String> tags)

      Keywords for categorizing and organizing Assets.

      Parameters:
      tags - values to be set
    • setCustom

      void setCustom(CustomFields custom)

      Custom Fields defined for the Asset.

      Specified by:
      setCustom in interface Customizable<Asset>
      Parameters:
      custom - value to be set
    • setKey

      void setKey(String key)

      User-defined identifier of the Asset. It is unique per Category or ProductVariant.

      Parameters:
      key - value to be set
    • of

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

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

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

      static AssetBuilder builder()
      builder factory method for Asset
      Returns:
      builder
    • builder

      static AssetBuilder builder(Asset template)
      create builder for Asset instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withAsset

      default <T> T withAsset(Function<Asset,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<Asset> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference