Interface NavigationItem

All Superinterfaces:
Component, ComponentExporter, ListItem
All Known Subinterfaces:
LanguageNavigationItem

@ConsumerType public interface NavigationItem extends ListItem
Interface for a single navigation item, used by the Breadcrumb and Navigation models.
Since:
com.adobe.cq.wcm.core.components.models 11.0.0
  • Method Details

    • getPage

      @Deprecated default Page getPage()
      Deprecated.
      since 12.1.0 as NavigationItem relies on ListItem
      Returns the Page contained by this navigation item.
      Returns:
      The Page contained in this navigation item.
      Since:
      com.adobe.cq.wcm.core.components.models 11.0.0; marked default in 12.1.0
    • isActive

      default boolean isActive()
      Returns true if the page contained by this navigation item is active.
      Returns:
      true if it is the current page or one of its ancestors, otherwise false
      Since:
      com.adobe.cq.wcm.core.components.models 11.0.0; marked default in 12.1.0
    • isCurrent

      default boolean isCurrent()
      Returns true if the page contained by this navigation item is the current page.
      Returns:
      true if it is the current page, otherwise false
      Since:
      com.adobe.cq.wcm.core.components.models 12.20.0
    • getChildren

      default List<NavigationItem> getChildren()
      Returns the children of this NavigationItem, if any.
      Returns:
      the children of this NavigationItem; if this NavigationItem doesn't have any children, the returned List will be empty
      Since:
      com.adobe.cq.wcm.core.components.models 12.2.0
    • getLevel

      default int getLevel()
      Returns the depth level of this NavigationItem.
      Returns:
      the depth level
      Since:
      com.adobe.cq.wcm.core.components.models 12.2.0