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
public interface IMenuItem extends Cloneable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IMenuItem[]children()Get the children of this menu item.intgetChildrenCount()Get the number of children of this node.IMenuItemgetDescendantOrSelf(String p_strId)Get the menu item with the specified unique identifier from this subtree.StringgetGuid()Get the menu item's unique identifier.intgetLevel()Get the level of this menu item.intgetLevelRelative(IMenuItem p_menuItem)Get the level of this menu item relative to the given menu item.StringgetName(String p_strLang)Get the name of this menu item in the specified language.SortedMap<String,String>getNames()Get the menu item's language dependent names.IMenuItemgetNextSibling()Get the next sibling of this menu item.IMenuItemgetParent()Get the parent of this menu item.IMenuItemgetPreviousSibling()Get the previous sibling of this menu item.SortedMap<String,String>getProperties()Get the menu item's properties.StringgetProperty(String p_strName)Get the value of the given propertybooleanhasChildren()Check if this menu item has children.booleanhasName(String p_strLang)Test if this menu item has a name in the specified language.booleanhasParent()Indicates if this menu item has a parent.booleanhasProperty(String p_strName)Test if this menu item has the given property.booleanisApplicationMenuItem()Indicates if this menu item is an application menu item.booleanisCmsMenuItem()Indicates if this menu item is a CMS menu item.booleanisContainerMenuItem()Indicates if this menu item is a container.booleanisFirstChild()Check if this menu item is the first child of it's parent.booleanisLastChild()Check if this menu item is the last child of it's parent.booleanisLinkMenuItem()Indicates if this menu item is a link menu item.booleanisRootMenuItem()Indicates if this is the root menu item.booleanisSeparatorMenuItem()Indicates if this menu item is a separator.booleanisTopLevelGroupMenuItem()Indicates if this menu item is a top-level group.
-
-
-
Method Detail
-
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:
trueif this menu item is aRootMenuItemorfalseotherwise.
-
isTopLevelGroupMenuItem
boolean isTopLevelGroupMenuItem()
Indicates if this menu item is a top-level group.- Returns:
trueif this menu item is aTopLevelGroupMenuItemorfalseotherwise.
-
isContainerMenuItem
boolean isContainerMenuItem()
Indicates if this menu item is a container.- Returns:
trueif this menu item is aContainerMenuItemorfalseotherwise.
-
isApplicationMenuItem
boolean isApplicationMenuItem()
Indicates if this menu item is an application menu item.- Returns:
trueif this menu item is anApplicationMenuItem, orfalseotherwise.
-
isLinkMenuItem
boolean isLinkMenuItem()
Indicates if this menu item is a link menu item.- Returns:
trueif this menu item is anLinkMenuItem, orfalseotherwise.
-
isCmsMenuItem
boolean isCmsMenuItem()
Indicates if this menu item is a CMS menu item.- Returns:
trueif this menu item is anCmsMenuItem, orfalseotherwise.
-
isSeparatorMenuItem
boolean isSeparatorMenuItem()
Indicates if this menu item is a separator.- Returns:
trueif this menu item is aSeparatorMenuItem, orfalseotherwise.
-
hasChildren
boolean hasChildren()
Check if this menu item has children.- Returns:
trueif this menu item has children, orfalseotherwise.
-
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.0for menu items that do not have a parent.- Returns:
- The level of this menu item.
-
getLevelRelative
int getLevelRelative(IMenuItem p_menuItem)
Get the level of this menu item relative to the given menu item.- Returns:
- The relative level of this menu item.
-
hasParent
boolean hasParent()
Indicates if this menu item has a parent.- Returns:
trueif this menu item has a parent orfalseotherwise.
-
getParent
IMenuItem getParent()
Get the parent of this menu item.- Returns:
- The parent of this menu item, or
nullif this menu item has no parent.
-
isFirstChild
boolean isFirstChild()
Check if this menu item is the first child of it's parent.- Returns:
trueif this menu item has a parent and is the first child of this parent, orfalseotherwise.
-
isLastChild
boolean isLastChild()
Check if this menu item is the last child of it's parent.- Returns:
trueif this menu item has a parent and is the last child of this parent, orfalseotherwise.
-
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
IMenuItem getDescendantOrSelf(String p_strId)
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
nullif the menu item does not exist in this subtree.
-
hasProperty
boolean hasProperty(String p_strName)
Test if this menu item has the given property.- Parameters:
p_strName- The property name.- Returns:
trueif this menu item has the property, orfalseotherwise.
-
getProperty
String getProperty(String p_strName)
Get the value of the given property- Parameters:
p_strName- The property name.- Returns:
- The value of the property.
-
getProperties
SortedMap<String,String> getProperties()
Get the menu item's properties.- Returns:
- An immutable map of the menu item's properties,
never
null.
-
hasName
boolean hasName(String p_strLang)
Test if this menu item has a name in the specified language.- Parameters:
p_strLang- The language.- Returns:
trueif this menu item has a name in the given language, orfalseotherwise.
-
getName
String getName(String p_strLang)
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.
-
-