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 theBreadcrumb
andNavigation
models.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default List<NavigationItem>
getChildren()
Returns the children of thisNavigationItem
, if any.default int
getLevel()
Returns the depth level of thisNavigationItem
.default Page
getPage()
Deprecated.since 12.1.0 asNavigationItem
relies onListItem
default boolean
isActive()
Returnstrue
if the page contained by this navigation item is active.default boolean
isCurrent()
Returnstrue
if the page contained by this navigation item is the current page.-
Methods inherited from interface com.adobe.cq.wcm.core.components.models.Component
getAppliedCssClasses, getData, getExportedType, getId
-
Methods inherited from interface com.adobe.cq.wcm.core.components.models.ListItem
getDescription, getLastModified, getLink, getName, getPath, getTeaserResource, getTitle, getURL
-
-
-
-
Method Detail
-
getPage
@Deprecated default Page getPage()
Deprecated.since 12.1.0 asNavigationItem
relies onListItem
Returns thePage
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()
Returnstrue
if the page contained by this navigation item is active.- Returns:
true
if it is the current page or one of its ancestors, otherwisefalse
- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
default
in 12.1.0
-
isCurrent
default boolean isCurrent()
Returnstrue
if the page contained by this navigation item is the current page.- Returns:
true
if it is the current page, otherwisefalse
- Since:
- com.adobe.cq.wcm.core.components.models 12.20.0
-
getChildren
default List<NavigationItem> getChildren()
Returns the children of thisNavigationItem
, if any.- Returns:
- the children of this
NavigationItem
; if thisNavigationItem
doesn't have any children, the returnedList
will be empty - Since:
- com.adobe.cq.wcm.core.components.models 12.2.0
-
getLevel
default int getLevel()
Returns the depth level of thisNavigationItem
.- Returns:
- the depth level
- Since:
- com.adobe.cq.wcm.core.components.models 12.2.0
-
-