Class 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
    • Constructor Detail

      • BreadcrumbImpl

        public BreadcrumbImpl()
    • Method Detail

      • getItems

        public Collection<com.adobe.cq.wcm.core.components.models.NavigationItem> getItems()
        Specified by:
        getItems in interface com.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 interface Breadcrumb
        Returns:
        The comparator.