Package com.day.cq.wcm.foundation
Class Navigation
java.lang.Object
com.day.cq.wcm.foundation.Navigation
- All Implemented Interfaces:
Iterable<Navigation.Element>
Provides a generic utility class that can be used to draw a navigation.
It specifically does this by providing an iterator over navigation elements.
A navigation element reflects a page and can have different
Navigation.Element.Types.
Note that the same page might be returned 4 times for the different element
types. this offers maximal flexibility when drawing the navigation.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionNavigation(Page current, int absParent, PageFilter filter, int depth) Creates a new navigation object. -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Navigation
Creates a new navigation object.- Parameters:
current- the current pageabsParent- the abs level of the navigation rootfilter- a page filter for filtering the navigation pagesdepth- navigation depth.
-
-
Method Details
-
iterator
Returns an iterator over the navigation elements.- Specified by:
iteratorin interfaceIterable<Navigation.Element>- Returns:
- an iterator.
-