Class RelatedProductsImpl
- java.lang.Object
-
- com.adobe.cq.commerce.core.components.internal.datalayer.DataLayerComponent
-
- com.adobe.cq.commerce.core.components.internal.models.v1.relatedproducts.RelatedProductsImpl
-
- 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/relatedproducts/v1/relatedproducts") public class RelatedProductsImpl extends DataLayerComponent implements ProductCarousel
-
-
Field Summary
Fields Modifier and Type Field Description protected com.day.cq.wcm.api.designer.Style
currentStyle
protected static String
PN_PRODUCT
protected static String
PN_RELATION_TYPE
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 RelatedProductsImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommerceIdentifier
getCommerceIdentifier()
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.com.adobe.cq.commerce.core.components.internal.models.v1.relatedproducts.RelatedProductsRetriever.RelationType
getRelationType()
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
-
PN_PRODUCT
protected static final String PN_PRODUCT
- See Also:
- Constant Field Values
-
PN_RELATION_TYPE
protected static final String PN_RELATION_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
-
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
-
getRelationType
public com.adobe.cq.commerce.core.components.internal.models.v1.relatedproducts.RelatedProductsRetriever.RelationType getRelationType()
-
getCommerceIdentifier
public CommerceIdentifier getCommerceIdentifier()
-
-