Class FeaturedCategoryListImpl
- java.lang.Object
-
- com.adobe.cq.commerce.core.components.internal.datalayer.DataLayerComponent
-
- com.adobe.cq.commerce.core.components.internal.models.v1.categorylist.FeaturedCategoryListImpl
-
- All Implemented Interfaces:
FeaturedCategoryList
,com.adobe.cq.export.json.ComponentExporter
,com.adobe.cq.wcm.core.components.models.Component
@Model(adaptables=org.apache.sling.api.SlingHttpServletRequest.class, adapters={FeaturedCategoryList.class,com.adobe.cq.export.json.ComponentExporter.class}, resourceType="core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist") public class FeaturedCategoryListImpl extends DataLayerComponent implements FeaturedCategoryList
-
-
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 FeaturedCategoryListImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<com.adobe.cq.commerce.magento.graphql.CategoryTree>
getCategories()
Returns the categories data in a list from Magento depending on configurations.AbstractCategoriesRetriever
getCategoriesRetriever()
Returns in instance of the category retriever for fetching category data via GraphQL.List<FeaturedCategoryListItem>
getCategoryItems()
Returns a list of category identifiers configured for this componentprotected com.adobe.cq.wcm.core.components.models.datalayer.ComponentData
getComponentData()
CategoryData[]
getDataLayerCategories()
String
getExportedType()
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, getData, getDataLayerAssetResource, getDataLayerAssets, 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
-
getCategories
public List<com.adobe.cq.commerce.magento.graphql.CategoryTree> getCategories()
Description copied from interface:FeaturedCategoryList
Returns the categories data in a list from Magento depending on configurations.- Specified by:
getCategories
in interfaceFeaturedCategoryList
- Returns:
List<CategoryInterface>
-
getCategoryItems
public List<FeaturedCategoryListItem> getCategoryItems()
Description copied from interface:FeaturedCategoryList
Returns a list of category identifiers configured for this component- Specified by:
getCategoryItems
in interfaceFeaturedCategoryList
- Returns:
- a
List
ofCategoryListItem
objects or an empty list if no categories are configured
-
isConfigured
public boolean isConfigured()
Description copied from interface:FeaturedCategoryList
Returns true if the component is correctly configured, false otherwise.- Specified by:
isConfigured
in interfaceFeaturedCategoryList
- Returns:
- true or false
-
getCategoriesRetriever
public AbstractCategoriesRetriever getCategoriesRetriever()
Description copied from interface:FeaturedCategoryList
Returns in instance of the category retriever for fetching category data via GraphQL.- Specified by:
getCategoriesRetriever
in interfaceFeaturedCategoryList
- Returns:
- category retriever instance
-
getComponentData
protected com.adobe.cq.wcm.core.components.models.datalayer.ComponentData getComponentData()
- Overrides:
getComponentData
in classDataLayerComponent
-
getDataLayerCategories
public CategoryData[] getDataLayerCategories()
- Overrides:
getDataLayerCategories
in classDataLayerComponent
-
getTitleType
public String getTitleType()
Description copied from interface:FeaturedCategoryList
Should return the HTML tag type for the component title.- Specified by:
getTitleType
in interfaceFeaturedCategoryList
- Returns:
- The HTML tag type that should be used to display the component title.
-
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
-
-