Class CMSNavigationItem
- All Implemented Interfaces:
Serializable
,Comparable<CMSNavigationItem>
- Direct Known Subclasses:
SelectableNavigationItem
CMSNavigationItem class.
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionEmpty constructor.CMSNavigationItem
(CMSNavigationItem original) Created a copy of the passed item ignoring all data concerning the item hierarchy (order, child and parent items)CMSNavigationItem
(CMSPage cmsPage) Constructor for CMSNavigationItem.CMSNavigationItem
(String targetUrl, String label) Constructor for CMSNavigationItem. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChildItem
(CMSNavigationItem child) addChildItem.int
boolean
Getter for the fieldassociatedTheme
.Getter for the fieldchildItems
.Getter for the fieldcmsPage
.Getter for the fielddisplayRule
.getId()
Getter for the fieldid
.Getter for the fielditemLabel
.int
getLevel()
Returns the hierarchy level of this item, i.e. the number of ancestor itemsgetMeWithDescendants.getNavigationUrl.getOrder()
Getter for the fieldorder
.Getter for the fieldpageUrl
.Getter for the fieldparentItem
.Getter for the fieldsortingListId
.boolean
hasCmsPage.boolean
hasDeletedCmsPage.int
hashCode()
boolean
hasUnpublishedCmsPage.boolean
isAbsoluteLink.boolean
boolean
isDisplayForAdminsOnly.boolean
isDisplayForUsersOnly.boolean
Deprecated.boolean
isOpenInNewWindow.boolean
isShouldDisplay.boolean
isValid()
isValid.boolean
isVisible.boolean
matchesLabel
(String currentPage) Check to highlight this item as 'currentPage'.boolean
matchesPage
(String page) void
removeChildItem
(CMSNavigationItem child) removeChildItem.void
setAbsoluteLink
(boolean absoluteLink) Setter for the fieldabsoluteLink
.void
setAssociatedTheme
(String associatedTheme) Sets theassociatedTheme
to the given theme, or to null if the given theme is empty or blankvoid
setChildItems
(List<CMSNavigationItem> childItems) Setter for the fieldchildItems
.void
setCmsPage
(CMSPage cmsPage) Setter for the fieldcmsPage
.void
setDisplayForAdminsOnly
(boolean display) setDisplayForAdminsOnly.void
setDisplayForUsersOnly
(boolean display) setDisplayForUsersOnly.void
Setter for the fielddisplayRule
.void
Setter for the fieldid
.void
setItemLabel
(String itemLabel) Setter for the fielditemLabel
.void
setOpenInNewWindow
(boolean openInNewWindow) Setter for the fieldopenInNewWindow
.void
Setter for the fieldorder
.void
setPageUrl
(String pageUrl) Setter for the fieldpageUrl
.void
setParentItem
(CMSNavigationItem parentItem) Setter for the fieldparentItem
.void
setSortingListId
(Integer sortingListId) Setter for the fieldsortingListId
.toString()
-
Constructor Details
-
Method Details
-
hashCode
public int hashCode() -
equals
-
getId
Getter for the field
id
.- Returns:
- a
Long
object.
-
setId
Setter for the field
id
.- Parameters:
id
- aLong
object.
-
getItemLabel
Getter for the field
itemLabel
.- Returns:
- a
String
object.
-
setItemLabel
Setter for the field
itemLabel
.- Parameters:
itemLabel
- aString
object.
-
getOrder
Getter for the field
order
.- Returns:
- the order
-
setOrder
Setter for the field
order
.- Parameters:
order
- the order to set
-
getParentItem
Getter for the field
parentItem
.- Returns:
- the parentItem
-
getChildItems
Getter for the field
childItems
.- Returns:
- a
List
object.
-
setChildItems
Setter for the field
childItems
.- Parameters:
childItems
- aList
object.
-
getActiveChildItems
-
getCmsPage
Getter for the field
cmsPage
.- Returns:
- a
CMSPage
object.
-
setCmsPage
Setter for the field
cmsPage
.- Parameters:
cmsPage
- aCMSPage
object.
-
getPageUrl
Getter for the field
pageUrl
.- Returns:
- a
String
object.
-
setPageUrl
Setter for the field
pageUrl
.- Parameters:
pageUrl
- aString
object.
-
hasUnpublishedCmsPage
public boolean hasUnpublishedCmsPage()hasUnpublishedCmsPage.
- Returns:
- true if this item has an associated cmsPage and this page's status is unpublished
-
isValid
public boolean isValid()isValid.
- Returns:
- a boolean.
-
isShouldDisplay
public boolean isShouldDisplay()isShouldDisplay.
- Returns:
- a boolean.
-
hasDeletedCmsPage
public boolean hasDeletedCmsPage()hasDeletedCmsPage.
- Returns:
- true if this item has no associated cmsPage, but the url is that of a cms page or is empty
-
hasCmsPage
public boolean hasCmsPage()hasCmsPage.
- Returns:
- a boolean.
-
matchesLabel
Check to highlight this item as 'currentPage'. Checks both the items label and all child labels whether they equal currentPage- Parameters:
currentPage
- aString
object.- Returns:
- a boolean.
-
getLevel
public int getLevel()Returns the hierarchy level of this item, i.e. the number of ancestor items- Returns:
- a int.
-
getSortingListId
Getter for the field
sortingListId
.- Returns:
- the sortingListId
-
setSortingListId
Setter for the field
sortingListId
.- Parameters:
sortingListId
- the sortingListId to set
-
isAbsoluteLink
public boolean isAbsoluteLink()isAbsoluteLink.
- Returns:
- a boolean.
-
setAbsoluteLink
public void setAbsoluteLink(boolean absoluteLink) Setter for the field
absoluteLink
.- Parameters:
absoluteLink
- a boolean.
-
isVisible
public boolean isVisible()isVisible.
- Returns:
- a boolean.
-
toString
-
getDisplayRule
Getter for the field
displayRule
.- Returns:
- a
CMSNavigationItem.DisplayRule
object.
-
setDisplayForUsersOnly
public void setDisplayForUsersOnly(boolean display) setDisplayForUsersOnly.
- Parameters:
display
- a boolean.
-
isDisplayForUsersOnly
public boolean isDisplayForUsersOnly()isDisplayForUsersOnly.
- Returns:
- a boolean.
-
setDisplayForAdminsOnly
public void setDisplayForAdminsOnly(boolean display) setDisplayForAdminsOnly.
- Parameters:
display
- a boolean.
-
isDisplayForAdminsOnly
public boolean isDisplayForAdminsOnly()isDisplayForAdminsOnly.
- Returns:
- a boolean.
-
setAssociatedTheme
Sets theassociatedTheme
to the given theme, or to null if the given theme is empty or blank- Parameters:
associatedTheme
- the associatedTheme to set
-
getAssociatedTheme
Getter for the field
associatedTheme
.- Returns:
- the associatedTheme; null if no associated theme exists
-
setOpenInNewWindow
public void setOpenInNewWindow(boolean openInNewWindow) Setter for the field
openInNewWindow
.- Parameters:
openInNewWindow
- if the link should open in a new tab/window
-
isOpenInNewWindow
public boolean isOpenInNewWindow()isOpenInNewWindow.
- Returns:
- if the link should open in a new tab/window
-
getMeWithDescendants
getMeWithDescendants.
- Returns:
- a
List
object.
-
isAssociatedWithSubtheme
public boolean isAssociatedWithSubtheme()- Returns:
- true if the item links to a cmsPage and that page has a subtheme associated with it.
-
getAssociatedSubtheme
-
matchesPage
-
isEnabled
Deprecated.
-