Package de.uplanet.lucy.server.menu.rt
Interface IMenuItem
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
AbstractContainerMenuItem
,AbstractMenuItem
,ApplicationMenuItem
,CmsMenuItem
,ContainerMenuItem
,LinkMenuItem
,RootMenuItem
,SeparatorMenuItem
,TopLevelGroupMenuItem
-
Method Summary
Modifier and TypeMethodDescriptionchildren()
Get the children of this menu item.int
Get the number of children of this node.getDescendantOrSelf
(String p_strId) Get the menu item with the specified unique identifier from this subtree.getGuid()
Get the menu item's unique identifier.int
getLevel()
Get the level of this menu item.int
getLevelRelative
(IMenuItem p_menuItem) Get the level of this menu item relative to the given menu item.Get the name of this menu item in the specified language.getNames()
Get the menu item's language dependent names.Get the next sibling of this menu item.Get the parent of this menu item.Get the previous sibling of this menu item.Get the menu item's properties.getProperty
(String p_strName) Get the value of the given propertyboolean
Check if this menu item has children.boolean
Test if this menu item has a name in the specified language.boolean
Indicates if this menu item has a parent.boolean
hasProperty
(String p_strName) Test if this menu item has the given property.boolean
Indicates if this menu item is an application menu item.boolean
Indicates if this menu item is a CMS menu item.boolean
Indicates if this menu item is a container.boolean
Check if this menu item is the first child of it's parent.boolean
Check if this menu item is the last child of it's parent.boolean
Indicates if this menu item is a link menu item.boolean
Indicates if this is the root menu item.boolean
Indicates if this menu item is a separator.boolean
Indicates if this menu item is a top-level group.
-
Method Details
-
getGuid
String getGuid()Get the menu item's unique identifier.- Returns:
- The menu item's unique identifier.
-
isRootMenuItem
boolean isRootMenuItem()Indicates if this is the root menu item.- Returns:
true
if this menu item is aRootMenuItem
orfalse
otherwise.
-
isTopLevelGroupMenuItem
boolean isTopLevelGroupMenuItem()Indicates if this menu item is a top-level group.- Returns:
true
if this menu item is aTopLevelGroupMenuItem
orfalse
otherwise.
-
isContainerMenuItem
boolean isContainerMenuItem()Indicates if this menu item is a container.- Returns:
true
if this menu item is aContainerMenuItem
orfalse
otherwise.
-
isApplicationMenuItem
boolean isApplicationMenuItem()Indicates if this menu item is an application menu item.- Returns:
true
if this menu item is anApplicationMenuItem
, orfalse
otherwise.
-
isLinkMenuItem
boolean isLinkMenuItem()Indicates if this menu item is a link menu item.- Returns:
true
if this menu item is anLinkMenuItem
, orfalse
otherwise.
-
isCmsMenuItem
boolean isCmsMenuItem()Indicates if this menu item is a CMS menu item.- Returns:
true
if this menu item is anCmsMenuItem
, orfalse
otherwise.
-
isSeparatorMenuItem
boolean isSeparatorMenuItem()Indicates if this menu item is a separator.- Returns:
true
if this menu item is aSeparatorMenuItem
, orfalse
otherwise.
-
hasChildren
boolean hasChildren()Check if this menu item has children.- Returns:
true
if this menu item has children, orfalse
otherwise.
-
getChildrenCount
int getChildrenCount()Get the number of children of this node.- Returns:
- The number of children.
-
children
IMenuItem[] children()Get the children of this menu item. If the menu item has no children, an empty array is returned.- Returns:
- The children of this menu item (never
null
).
-
getLevel
int getLevel()Get the level of this menu item.0
for menu items that do not have a parent.- Returns:
- The level of this menu item.
-
hasParent
boolean hasParent()Indicates if this menu item has a parent.- Returns:
true
if this menu item has a parent orfalse
otherwise.
-
getParent
IMenuItem getParent()Get the parent of this menu item.- Returns:
- The parent of this menu item, or
null
if this menu item has no parent.
-
isFirstChild
boolean isFirstChild()Check if this menu item is the first child of it's parent.- Returns:
true
if this menu item has a parent and is the first child of this parent, orfalse
otherwise.
-
isLastChild
boolean isLastChild()Check if this menu item is the last child of it's parent.- Returns:
true
if this menu item has a parent and is the last child of this parent, orfalse
otherwise.
-
getPreviousSibling
IMenuItem getPreviousSibling()Get the previous sibling of this menu item.- Returns:
- If this menu item has a parent and this menu item is not the
first child of this parent, the previous sibling of this menu item
is returned. In all other cases the return value is
null
.
-
getNextSibling
IMenuItem getNextSibling()Get the next sibling of this menu item.- Returns:
- If this menu item has a parent and this menu item is not the
last child of this parent, the next sibling of this menu item
is returned. In all other cases the return value is
null
.
-
getDescendantOrSelf
Get the menu item with the specified unique identifier from this subtree.- Parameters:
p_strId
- The menu item's unique identifier.- Returns:
- The menu item with the given unique identifier, or
null
if the menu item does not exist in this subtree.
-
hasProperty
Test if this menu item has the given property.- Parameters:
p_strName
- The property name.- Returns:
true
if this menu item has the property, orfalse
otherwise.
-
getProperty
Get the value of the given property- Parameters:
p_strName
- The property name.- Returns:
- The value of the property.
-
getProperties
Get the menu item's properties.- Returns:
- An immutable map of the menu item's properties,
never
null
.
-
hasName
Test if this menu item has a name in the specified language.- Parameters:
p_strLang
- The language.- Returns:
true
if this menu item has a name in the given language, orfalse
otherwise.
-
getName
Get the name of this menu item in the specified language.- Parameters:
p_strLang
- The language.- Returns:
- The name of the menu item in the given language.
-
getNames
Get the menu item's language dependent names.- Returns:
- An immutable map of the menu item's names,
never
null
.
-