Interface VariantData
public interface VariantData
Contains the actual data for a Variant in either current (published) or staged (draft) state.
Example to create an instance using the builder pattern
VariantData variantData = VariantData.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic VariantDataBuilderbuilder()builder factory method for VariantDatastatic VariantDataBuilderbuilder(VariantData template) create builder for VariantData instancecopyDeep()static VariantDatadeepCopy(VariantData template) factory method to create a deep copy of VariantDataMedia assets of the Variant.Attributes of the Variant according to the respective AttributeDefinition.Images of the Variant.getSku()User-defined unique SKU of the Variant.static VariantDataof()factory methodstatic VariantDataof(VariantData template) factory method to create a shallow copy VariantDatavoidMedia assets of the Variant.voidMedia assets of the Variant.voidsetAttributes(Attribute... attributes) Attributes of the Variant according to the respective AttributeDefinition.voidsetAttributes(List<Attribute> attributes) Attributes of the Variant according to the respective AttributeDefinition.voidImages of the Variant.voidImages of the Variant.voidUser-defined unique SKU of the Variant.static tools.jackson.core.type.TypeReference<VariantData>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithVariantData(Function<VariantData, T> helper) accessor map function
-
Method Details
-
getSku
String getSku()User-defined unique SKU of the Variant.
- Returns:
- sku
-
getImages
Images of the Variant.
- Returns:
- images
-
getAttributes
Attributes of the Variant according to the respective AttributeDefinition.
- Returns:
- attributes
-
getAssets
Media assets of the Variant.
- Returns:
- assets
-
setSku
User-defined unique SKU of the Variant.
- Parameters:
sku- value to be set
-
setImages
Images of the Variant.
- Parameters:
images- values to be set
-
setImages
Images of the Variant.
- Parameters:
images- values to be set
-
setAttributes
Attributes of the Variant according to the respective AttributeDefinition.
- Parameters:
attributes- values to be set
-
setAttributes
Attributes of the Variant according to the respective AttributeDefinition.
- Parameters:
attributes- values to be set
-
setAssets
Media assets of the Variant.
- Parameters:
assets- values to be set
-
setAssets
Media assets of the Variant.
- Parameters:
assets- values to be set
-
of
factory method- Returns:
- instance of VariantData
-
of
factory method to create a shallow copy VariantData- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
VariantData copyDeep() -
deepCopy
factory method to create a deep copy of VariantData- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for VariantData- Returns:
- builder
-
builder
create builder for VariantData instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withVariantData
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
-