Class ProductImpl
- java.lang.Object
-
- com.adobe.cq.commerce.core.components.internal.datalayer.DataLayerComponent
-
- com.adobe.cq.commerce.core.components.internal.models.v1.product.ProductImpl
-
- All Implemented Interfaces:
PageMetadata
,Product
,com.adobe.cq.export.json.ComponentExporter
,com.adobe.cq.wcm.core.components.models.Component
@Model(adaptables=org.apache.sling.api.SlingHttpServletRequest.class, adapters=Product.class, resourceType="core/cif/components/commerce/product/v1/product", cache=true) public class ProductImpl extends DataLayerComponent implements Product
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
PLACEHOLDER_DATA
static String
RESOURCE_TYPE
-
Fields inherited from class com.adobe.cq.commerce.core.components.internal.datalayer.DataLayerComponent
ID_SEPARATOR, resource
-
Fields inherited from interface com.adobe.cq.commerce.core.components.models.product.Product
PN_LOAD_CLIENT_PRICE
-
-
Constructor Summary
Constructors Constructor Description ProductImpl()
-
Method Summary
-
Methods inherited from class com.adobe.cq.commerce.core.components.internal.datalayer.DataLayerComponent
getData, getDataLayerAssetResource, getDataLayerLanguage, getDataLayerLinkUrl, getDataLayerShownItems, getDataLayerTags, getDataLayerTemplatePath, getDataLayerText, getDataLayerType, getDataLayerUrl, getId
-
-
-
-
Field Detail
-
RESOURCE_TYPE
public static final String RESOURCE_TYPE
- See Also:
- Constant Field Values
-
PLACEHOLDER_DATA
protected static final String PLACEHOLDER_DATA
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceProduct
-
getCurrency
public String getCurrency()
- Specified by:
getCurrency
in interfaceProduct
- Returns:
- The price currency.
-
getPriceRange
public Price getPriceRange()
- Specified by:
getPriceRange
in interfaceProduct
-
getInStock
public Boolean getInStock()
- Specified by:
getInStock
in interfaceProduct
-
isConfigurable
public Boolean isConfigurable()
- Specified by:
isConfigurable
in interfaceProduct
-
isGroupedProduct
public Boolean isGroupedProduct()
- Specified by:
isGroupedProduct
in interfaceProduct
-
isVirtualProduct
public Boolean isVirtualProduct()
- Specified by:
isVirtualProduct
in interfaceProduct
-
isBundleProduct
public Boolean isBundleProduct()
- Specified by:
isBundleProduct
in interfaceProduct
-
getVariantsJson
public String getVariantsJson()
- Specified by:
getVariantsJson
in interfaceProduct
-
getVariants
public List<Variant> getVariants()
- Specified by:
getVariants
in interfaceProduct
-
getGroupedProductItems
public List<GroupItem> getGroupedProductItems()
- Specified by:
getGroupedProductItems
in interfaceProduct
-
getAssetsJson
public String getAssetsJson()
- Specified by:
getAssetsJson
in interfaceProduct
-
getVariantAttributes
public List<VariantAttribute> getVariantAttributes()
- Specified by:
getVariantAttributes
in interfaceProduct
-
loadClientPrice
public Boolean loadClientPrice()
- Specified by:
loadClientPrice
in interfaceProduct
-
getFormattedPrice
public String getFormattedPrice()
- Specified by:
getFormattedPrice
in interfaceProduct
- Returns:
- The formatted price including the currency.
-
getProductRetriever
public AbstractProductRetriever getProductRetriever()
- Specified by:
getProductRetriever
in interfaceProduct
-
getMetaDescription
public String getMetaDescription()
- Specified by:
getMetaDescription
in interfacePageMetadata
- Returns:
- The content for the meta description tag of the HTML page.
-
getMetaKeywords
public String getMetaKeywords()
- Specified by:
getMetaKeywords
in interfacePageMetadata
- Returns:
- The content for the meta keywords tag of the HTML page.
-
getMetaTitle
public String getMetaTitle()
Description copied from interface:PageMetadata
Although this method refers to "metaTitle", this is used to set the title tag of the HTML page. The method is not calledgetTitle()
to avoid confusion withProductList.getTitle()
- Specified by:
getMetaTitle
in interfacePageMetadata
- Returns:
- The content for the title tag of the HTML page.
-
getCanonicalUrl
public String getCanonicalUrl()
- Specified by:
getCanonicalUrl
in interfacePageMetadata
- Returns:
- The fully-qualified canonical url, to set the canonical link element of the HTML page.
-
getComponentData
public com.adobe.cq.wcm.core.components.models.datalayer.ComponentData getComponentData()
- Overrides:
getComponentData
in classDataLayerComponent
-
generateId
protected String generateId()
- Overrides:
generateId
in classDataLayerComponent
-
getDataLayerTitle
public String getDataLayerTitle()
- Overrides:
getDataLayerTitle
in classDataLayerComponent
-
getDataLayerSKU
public String getDataLayerSKU()
- Overrides:
getDataLayerSKU
in classDataLayerComponent
-
getDataLayerPrice
public Double getDataLayerPrice()
- Overrides:
getDataLayerPrice
in classDataLayerComponent
-
getDataLayerCurrency
public String getDataLayerCurrency()
- Overrides:
getDataLayerCurrency
in classDataLayerComponent
-
getDataLayerDescription
public String getDataLayerDescription()
- Overrides:
getDataLayerDescription
in classDataLayerComponent
-
getDataLayerCategories
public CategoryData[] getDataLayerCategories()
- Overrides:
getDataLayerCategories
in classDataLayerComponent
-
getDataLayerAssets
public com.adobe.cq.wcm.core.components.models.datalayer.AssetData[] getDataLayerAssets()
- Overrides:
getDataLayerAssets
in classDataLayerComponent
-
-