public interface ProductData
Modifier and Type | Method and Description |
---|---|
default List<ProductVariant> |
getAllVariants()
Gets all variants in the product including the master variant as first element in the list.
|
Set<Reference<Category>> |
getCategories() |
CategoryOrderHints |
getCategoryOrderHints() |
LocalizedString |
getDescription() |
ProductVariant |
getMasterVariant()
Returns the master variant.
|
LocalizedString |
getMetaDescription() |
LocalizedString |
getMetaKeywords() |
LocalizedString |
getMetaTitle() |
LocalizedString |
getName() |
SearchKeywords |
getSearchKeywords() |
LocalizedString |
getSlug() |
default ProductVariant |
getVariant(int variantId)
Finds a product variant by id.
|
default ProductVariant |
getVariantOrMaster(int variantId)
Finds a product variant by id and returns the master variant if not variant with the id is present.
|
List<ProductVariant> |
getVariants()
Gets the variants which are not identical to the master variant.
|
metaAttributesOf, metaAttributesOf
LocalizedString getName()
@Nullable LocalizedString getDescription()
LocalizedString getSlug()
@Nullable LocalizedString getMetaTitle()
@Nullable LocalizedString getMetaDescription()
@Nullable LocalizedString getMetaKeywords()
ProductVariant getMasterVariant()
getAllVariants()
,
getVariants()
,
ChangeMasterVariant
List<ProductVariant> getVariants()
getMasterVariant()
getAllVariants()
,
getMasterVariant()
default List<ProductVariant> getAllVariants()
getMasterVariant()
,
getVariants()
@Nullable default ProductVariant getVariant(int variantId)
variantId
- the id of the variant to findid
getVariantOrMaster(int)
default ProductVariant getVariantOrMaster(int variantId)
variantId
- the id of the variant to findgetVariant(int)
SearchKeywords getSearchKeywords()
@Nullable CategoryOrderHints getCategoryOrderHints()