Interface Asset
Example to create an instance using the builder pattern
Asset asset = Asset.builder()
.key("{key}")
.plusSources(sourcesBuilder -> sourcesBuilder)
.name(nameBuilder -> nameBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic AssetBuilder
builder()
builder factory method for Assetstatic AssetBuilder
create builder for Asset instancestatic Asset
factory method to create a deep copy of Asset@Valid Custom
The representation to be sent to the server when creating a resource with custom fields.@Valid LocalizedString
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.@NotNull String
getKey()
User-defined identifier for the asset.@NotNull @Valid LocalizedString
getName()
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.@NotNull @Valid List<AssetSource>
getTags()
static Asset
of()
factory methodstatic Asset
factory method to create a shallow copy Assetvoid
The representation to be sent to the server when creating a resource with custom fields.void
setDescription
(LocalizedString description) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.void
User-defined identifier for the asset.void
setName
(LocalizedString name) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.void
setSources
(AssetSource... sources) set sourcesvoid
setSources
(List<AssetSource> sources) set sourcesvoid
set tagsvoid
set tagsstatic com.fasterxml.jackson.core.type.TypeReference<Asset>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map function
-
Method Details
-
getKey
User-defined identifier for the asset. Asset keys are unique inside their container (a product variant or a category).
- Returns:
- key
-
getSources
- Returns:
- sources
-
getName
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Returns:
- name
-
getDescription
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Returns:
- description
-
getTags
- Returns:
- tags
-
getCustom
The representation to be sent to the server when creating a resource with custom fields.
- Returns:
- custom
-
setKey
User-defined identifier for the asset. Asset keys are unique inside their container (a product variant or a category).
- Parameters:
key
- value to be set
-
setSources
set sources- Parameters:
sources
- values to be set
-
setSources
set sources- Parameters:
sources
- values to be set
-
setName
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
name
- value to be set
-
setDescription
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
description
- value to be set
-
setTags
set tags- Parameters:
tags
- values to be set
-
setTags
set tags- Parameters:
tags
- values to be set
-
setCustom
The representation to be sent to the server when creating a resource with custom fields.
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of Asset
-
of
factory method to create a shallow copy Asset- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of Asset- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Asset- Returns:
- builder
-
builder
create builder for Asset instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withAsset
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-