Class CMSNavigationItem
- All Implemented Interfaces:
Serializable,Comparable<CMSNavigationItem>
- Direct Known Subclasses:
SelectableNavigationItem
CMSNavigationItem class.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionEmpty 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 TypeMethodDescriptionvoidaddChildItem(CMSNavigationItem child) addChildItem.booleancheckAccess(jakarta.servlet.http.HttpServletRequest request) intbooleangetActiveChildItems(jakarta.servlet.http.HttpServletRequest request) 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.intgetLevel()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.booleanhasCmsPage.booleanhasDeletedCmsPage.inthashCode()booleanhasUnpublishedCmsPage.booleanisAbsoluteLink.booleanbooleanbooleanisDisplayForAdminsOnly.booleanisDisplayForUsersOnly.booleanDeprecated.booleanisOpenInNewWindow.booleanisShouldDisplay.booleanisValid()isValid.booleanisVisible.booleanmatchesLabel(String currentPage) Check to highlight this item as 'currentPage'.booleanmatchesPage(String page) voidremoveChildItem(CMSNavigationItem child) removeChildItem.voidsetAbsoluteLink(boolean absoluteLink) Setter for the fieldabsoluteLink.voidsetAssociatedTheme(String associatedTheme) Sets theassociatedThemeto the given theme, or to null if the given theme is empty or blankvoidsetChildItems(List<CMSNavigationItem> childItems) Setter for the fieldchildItems.voidsetCmsPage(CMSPage cmsPage) Setter for the fieldcmsPage.voidsetDisplayForAdminsOnly(boolean display) setDisplayForAdminsOnly.voidsetDisplayForUsersOnly(boolean display) setDisplayForUsersOnly.voidSetter for the fielddisplayRule.voidSetter for the fieldid.voidsetItemLabel(String itemLabel) Setter for the fielditemLabel.voidsetOpenInNewWindow(boolean openInNewWindow) Setter for the fieldopenInNewWindow.voidSetter for the fieldorder.voidsetPageUrl(String pageUrl) Setter for the fieldpageUrl.voidsetParentItem(CMSNavigationItem parentItem) Setter for the fieldparentItem.voidsetSortingListId(Integer sortingListId) Setter for the fieldsortingListId.toString()
-
Constructor Details
-
Method Details
-
hashCode
public int hashCode() -
equals
-
getId
Getter for the field
id.- Returns:
- a
Longobject.
-
setId
Setter for the field
id.- Parameters:
id- aLongobject.
-
getItemLabel
Getter for the field
itemLabel.- Returns:
- a
Stringobject.
-
setItemLabel
Setter for the field
itemLabel.- Parameters:
itemLabel- aStringobject.
-
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
Listobject.
-
setChildItems
Setter for the field
childItems.- Parameters:
childItems- aListobject.
-
getActiveChildItems
- Returns:
- Visible child items
-
getActiveChildItems
- Parameters:
request-- Returns:
- Visible child items
-
getCmsPage
Getter for the field
cmsPage.- Returns:
- a
CMSPageobject.
-
setCmsPage
Setter for the field
cmsPage.- Parameters:
cmsPage- aCMSPageobject.
-
getPageUrl
Getter for the field
pageUrl.- Returns:
- a
Stringobject.
-
setPageUrl
Setter for the field
pageUrl.- Parameters:
pageUrl- aStringobject.
-
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- aStringobject.- 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.DisplayRuleobject.
-
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 theassociatedThemeto 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
Listobject.
-
isAssociatedWithSubtheme
public boolean isAssociatedWithSubtheme()- Returns:
- true if the item links to a cmsPage and that page has a subtheme associated with it.
-
getAssociatedSubtheme
-
matchesPage
-
isAccessGranted
public boolean isAccessGranted()- Returns:
- the accessGranted
-
checkAccess
public boolean checkAccess(jakarta.servlet.http.HttpServletRequest request) - Parameters:
request-- Returns:
- true if access granted; false otherwise
-
isEnabled
Deprecated.
-