Package com.day.cq.wcm.foundation
Class Navigation.Element
- java.lang.Object
 - 
- com.day.cq.wcm.foundation.Navigation.Element
 
 
- 
- Enclosing class:
 - Navigation
 
public static class Navigation.Element extends java.lang.ObjectNavigation element. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNavigation.Element.TypeType of the navigation element 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PagegetPage()Returns the underlying page.java.lang.StringgetPath()Returns the escaped path of the underlying page.java.lang.StringgetRawTitle()Returns the unescaped navigation title of the underlying page.java.lang.StringgetTitle()Returns the escaped navigation title of the underlying page.Navigation.Element.TypegetType()Returns the element type.booleanhasChildren()Checks if the this element has children.booleanisCurrent()Checks if this element is the current one.booleanisFirst()Checks if this element is the first of it's siblings.booleanisLast()Checks if this element is the last of it's siblings.booleanisOnTrail()Checks if this element is on the trail. 
 - 
 
- 
- 
Method Detail
- 
getType
public Navigation.Element.Type getType()
Returns the element type.- Returns:
 - the element type.
 
 
- 
getPage
public Page getPage()
Returns the underlying page.- Returns:
 - the underlying page.
 
 
- 
getPath
public java.lang.String getPath()
Returns the escaped path of the underlying page. Node that the path is escaped usingText.escape(String, char, boolean)- Returns:
 - the escaped path.
 
 
- 
getRawTitle
public java.lang.String getRawTitle()
Returns the unescaped navigation title of the underlying page. if the page does not specific a navigation title, the title is used and ultimately it's name.- Returns:
 - the navigation title
 - See Also:
 Page.getNavigationTitle(),Page.getTitle(),Page.getName()
 
- 
getTitle
public java.lang.String getTitle()
Returns the escaped navigation title of the underlying page. if the page does not specific a navigation title, the title is used and ultimately it's name. Note that the title is escaped usingStringEscapeUtils.escapeHtml4(String)- Returns:
 - the navigation title
 - See Also:
 Page.getNavigationTitle(),Page.getTitle(),Page.getName()
 
- 
hasChildren
public boolean hasChildren()
Checks if the this element has children. Note that this is alwaystrueforNavigation.Element.Type.NODE_OPENandNavigation.Element.Type.NODE_CLOSEelements.- Returns:
 trueif the current element has children.
 
- 
isOnTrail
public boolean isOnTrail()
Checks if this element is on the trail. i.e. if the underlying page is the same or an ancestor of any degree of the current page, passed in the constructor of the navigation object.- Returns:
 trueif this element is on the trail.
 
- 
isCurrent
public boolean isCurrent()
Checks if this element is the current one. i.e. if the underlying page is the same as current one, passed in the constructor of the navigation object.- Returns:
 trueif this element is the current one.
 
- 
isFirst
public boolean isFirst()
Checks if this element is the first of it's siblings.- Returns:
 trueif this element is the first of it's siblings.
 
- 
isLast
public boolean isLast()
Checks if this element is the last of it's siblings.- Returns:
 trueif this element is the last of it's siblings.
 
 - 
 
 -