Class BreadcrumbImpl
- java.lang.Object
-
- com.adobe.cq.commerce.core.components.internal.datalayer.DataLayerComponent
-
- com.adobe.cq.commerce.core.components.internal.models.v1.breadcrumb.BreadcrumbImpl
-
- All Implemented Interfaces:
Breadcrumb
,com.adobe.cq.export.json.ComponentExporter
,com.adobe.cq.wcm.core.components.models.Breadcrumb
,com.adobe.cq.wcm.core.components.models.Component
@Model(adaptables=org.apache.sling.api.SlingHttpServletRequest.class, adapters=com.adobe.cq.wcm.core.components.models.Breadcrumb.class, resourceType="core/cif/components/structure/breadcrumb/v1/breadcrumb") public class BreadcrumbImpl extends DataLayerComponent implements Breadcrumb
-
-
Field Summary
Fields Modifier and Type Field Description 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 BreadcrumbImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Comparator<com.adobe.cq.commerce.magento.graphql.CategoryInterface>
getCategoryInterfaceComparator()
When a product is in multiple categories, the comparator returned by this method is used to sort and select the "primary" catagory used for the breadcrumb.Collection<com.adobe.cq.wcm.core.components.models.NavigationItem>
getItems()
-
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
-
-
Method Detail
-
getItems
public Collection<com.adobe.cq.wcm.core.components.models.NavigationItem> getItems()
- Specified by:
getItems
in interfacecom.adobe.cq.wcm.core.components.models.Breadcrumb
-
getCategoryInterfaceComparator
public Comparator<com.adobe.cq.commerce.magento.graphql.CategoryInterface> getCategoryInterfaceComparator()
Description copied from interface:Breadcrumb
When a product is in multiple categories, the comparator returned by this method is used to sort and select the "primary" catagory used for the breadcrumb. The default comparator uses the following rules to sort the categories:
- if the
structureDepth
property is set on the breadcrumb component resource, categories with a depth smaller or equal than the property value are chosen first - the categories with deepest depth are then chosen first
- the category with smaller id is then chosen
- Specified by:
getCategoryInterfaceComparator
in interfaceBreadcrumb
- Returns:
- The comparator.
- if the
-
-