Class ProductCarouselImpl
- java.lang.Object
-
- com.adobe.cq.commerce.core.components.internal.datalayer.DataLayerComponent
-
- com.adobe.cq.commerce.core.components.internal.models.v1.productcarousel.ProductCarouselImpl
-
- All Implemented Interfaces:
ProductCarousel
,com.adobe.cq.export.json.ComponentExporter
,com.adobe.cq.wcm.core.components.models.Component
@Model(adaptables=org.apache.sling.api.SlingHttpServletRequest.class, adapters={ProductCarousel.class,com.adobe.cq.export.json.ComponentExporter.class}, resourceType="core/cif/components/commerce/productcarousel/v1/productcarousel") public class ProductCarouselImpl extends DataLayerComponent implements ProductCarousel
-
-
Field Summary
Fields Modifier and Type Field Description protected com.day.cq.wcm.api.designer.Style
currentStyle
protected static String
RESOURCE_TYPE
-
Fields inherited from class com.adobe.cq.commerce.core.components.internal.datalayer.DataLayerComponent
ID_SEPARATOR, resource
-
-
Constructor Summary
Constructors Constructor Description ProductCarouselImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.adobe.cq.commerce.magento.graphql.SimpleProduct
findVariant(com.adobe.cq.commerce.magento.graphql.ConfigurableProduct configurableProduct, String variantSku)
String
getExportedType()
List<ProductListItem>
getProductIdentifiers()
List<ProductListItem>
getProducts()
Returns the list of products to be displayed in the carousel.AbstractProductsRetriever
getProductsRetriever()
Returns in instance of the products retriever for fetching product data via GraphQL.String
getTitleType()
Should return the HTML tag type for the component title.boolean
isConfigured()
Returns true if the component is correctly configured, false otherwise.-
Methods inherited from class com.adobe.cq.commerce.core.components.internal.datalayer.DataLayerComponent
generateId, getComponentData, getData, getDataLayerAssetResource, getDataLayerAssets, getDataLayerCategories, getDataLayerCurrency, getDataLayerDescription, getDataLayerLanguage, getDataLayerLinkUrl, getDataLayerPrice, getDataLayerShownItems, getDataLayerSKU, getDataLayerTags, getDataLayerTemplatePath, getDataLayerText, getDataLayerTitle, getDataLayerType, getDataLayerUrl, getId
-
-
-
-
Field Detail
-
RESOURCE_TYPE
protected static final String RESOURCE_TYPE
- See Also:
- Constant Field Values
-
currentStyle
protected com.day.cq.wcm.api.designer.Style currentStyle
-
-
Method Detail
-
isConfigured
public boolean isConfigured()
Description copied from interface:ProductCarousel
Returns true if the component is correctly configured, false otherwise.- Specified by:
isConfigured
in interfaceProductCarousel
- Returns:
- true or false
-
getProducts
public List<ProductListItem> getProducts()
Description copied from interface:ProductCarousel
Returns the list of products to be displayed in the carousel.- Specified by:
getProducts
in interfaceProductCarousel
- Returns:
List
ofProductListItem
s
-
getProductsRetriever
public AbstractProductsRetriever getProductsRetriever()
Description copied from interface:ProductCarousel
Returns in instance of the products retriever for fetching product data via GraphQL.- Specified by:
getProductsRetriever
in interfaceProductCarousel
- Returns:
- products retriever instance
-
findVariant
protected com.adobe.cq.commerce.magento.graphql.SimpleProduct findVariant(com.adobe.cq.commerce.magento.graphql.ConfigurableProduct configurableProduct, String variantSku)
-
getTitleType
public String getTitleType()
Description copied from interface:ProductCarousel
Should return the HTML tag type for the component title.- Specified by:
getTitleType
in interfaceProductCarousel
- Returns:
- The HTML tag type that should be used to display the component title.
-
getProductIdentifiers
@Nonnull public List<ProductListItem> getProductIdentifiers()
- Specified by:
getProductIdentifiers
in interfaceProductCarousel
-
getExportedType
public String getExportedType()
- Specified by:
getExportedType
in interfacecom.adobe.cq.wcm.core.components.models.Component
- Specified by:
getExportedType
in interfacecom.adobe.cq.export.json.ComponentExporter
-
-