Interface ProductCatalogData
- All Superinterfaces:
ProductCatalogDataMixin
Contains the current
and staged
ProductData.
Example to create an instance using the builder pattern
ProductCatalogData productCatalogData = ProductCatalogData.builder()
.published(true)
.current(currentBuilder -> currentBuilder)
.staged(stagedBuilder -> stagedBuilder)
.hasStagedChanges(true)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductCatalogDataBuilder
builder()
builder factory method for ProductCatalogDatastatic ProductCatalogDataBuilder
builder
(ProductCatalogData template) create builder for ProductCatalogData instancestatic ProductCatalogData
deepCopy
(ProductCatalogData template) factory method to create a deep copy of ProductCatalogData@NotNull @Valid ProductData
Current (published) data of the Product.@NotNull Boolean
true
if thestaged
data is different from thecurrent
data.@NotNull Boolean
true
if the Product is published.@NotNull @Valid ProductData
Staged (unpublished) data of the Product.static ProductCatalogData
of()
factory methodstatic ProductCatalogData
of
(ProductCatalogData template) factory method to create a shallow copy ProductCatalogDatavoid
setCurrent
(ProductData current) Current (published) data of the Product.void
setHasStagedChanges
(Boolean hasStagedChanges) true
if thestaged
data is different from thecurrent
data.void
setPublished
(Boolean published) true
if the Product is published.void
setStaged
(ProductData staged) Staged (unpublished) data of the Product.static com.fasterxml.jackson.core.type.TypeReference<ProductCatalogData>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withProductCatalogData
(Function<ProductCatalogData, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.product.ProductCatalogDataMixin
get
-
Method Details
-
getPublished
true
if the Product is published.- Returns:
- published
-
getCurrent
Current (published) data of the Product.
- Specified by:
getCurrent
in interfaceProductCatalogDataMixin
- Returns:
- current
-
getStaged
Staged (unpublished) data of the Product.
- Specified by:
getStaged
in interfaceProductCatalogDataMixin
- Returns:
- staged
-
getHasStagedChanges
true
if thestaged
data is different from thecurrent
data.- Returns:
- hasStagedChanges
-
setPublished
true
if the Product is published.- Parameters:
published
- value to be set
-
setCurrent
Current (published) data of the Product.
- Parameters:
current
- value to be set
-
setStaged
Staged (unpublished) data of the Product.
- Parameters:
staged
- value to be set
-
setHasStagedChanges
true
if thestaged
data is different from thecurrent
data.- Parameters:
hasStagedChanges
- value to be set
-
of
factory method- Returns:
- instance of ProductCatalogData
-
of
factory method to create a shallow copy ProductCatalogData- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ProductCatalogData- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductCatalogData- Returns:
- builder
-
builder
create builder for ProductCatalogData instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductCatalogData
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
-