Package de.uplanet.lucy.server.menu.rt
Class AbstractMenuItem
java.lang.Object
de.uplanet.lucy.server.menu.rt.AbstractMenuItem
- Direct Known Subclasses:
AbstractContainerMenuItem
,ApplicationMenuItem
,LinkMenuItem
,SeparatorMenuItem
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract AbstractMenuItem
clone()
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
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_strLang) 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.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.uplanet.lucy.server.menu.rt.IMenuItem
children, getChildrenCount, getDescendantOrSelf, hasChildren
-
Constructor Details
-
AbstractMenuItem
-
-
Method Details
-
clone
-
getGuid
Description copied from interface:IMenuItem
Get the menu item's unique identifier. -
isRootMenuItem
public boolean isRootMenuItem()Description copied from interface:IMenuItem
Indicates if this is the root menu item.- Specified by:
isRootMenuItem
in interfaceIMenuItem
- Returns:
- Always
false
.
-
isApplicationMenuItem
public boolean isApplicationMenuItem()Description copied from interface:IMenuItem
Indicates if this menu item is an application menu item.- Specified by:
isApplicationMenuItem
in interfaceIMenuItem
- Returns:
- Always
false
.
-
isLinkMenuItem
public boolean isLinkMenuItem()Description copied from interface:IMenuItem
Indicates if this menu item is a link menu item.- Specified by:
isLinkMenuItem
in interfaceIMenuItem
- Returns:
- Always
false
.
-
isCmsMenuItem
public boolean isCmsMenuItem()Description copied from interface:IMenuItem
Indicates if this menu item is a CMS menu item.- Specified by:
isCmsMenuItem
in interfaceIMenuItem
- Returns:
- Always
false
.
-
isSeparatorMenuItem
public boolean isSeparatorMenuItem()Description copied from interface:IMenuItem
Indicates if this menu item is a separator.- Specified by:
isSeparatorMenuItem
in interfaceIMenuItem
- Returns:
- Always
false
.
-
isContainerMenuItem
public boolean isContainerMenuItem()Description copied from interface:IMenuItem
Indicates if this menu item is a container.- Specified by:
isContainerMenuItem
in interfaceIMenuItem
- Returns:
- Always
false
.
-
isTopLevelGroupMenuItem
public boolean isTopLevelGroupMenuItem()Description copied from interface:IMenuItem
Indicates if this menu item is a top-level group.- Specified by:
isTopLevelGroupMenuItem
in interfaceIMenuItem
- Returns:
- Always
false
.
-
getLevel
public int getLevel()Description copied from interface:IMenuItem
Get the level of this menu item.0
for menu items that do not have a parent. -
hasParent
public boolean hasParent()Description copied from interface:IMenuItem
Indicates if this menu item has a parent. -
getParent
Description copied from interface:IMenuItem
Get the parent of this menu item. -
isFirstChild
public boolean isFirstChild()Description copied from interface:IMenuItem
Check if this menu item is the first child of it's parent.- Specified by:
isFirstChild
in interfaceIMenuItem
- Returns:
true
if this menu item has a parent and is the first child of this parent, orfalse
otherwise.
-
isLastChild
public boolean isLastChild()Description copied from interface:IMenuItem
Check if this menu item is the last child of it's parent.- Specified by:
isLastChild
in interfaceIMenuItem
- Returns:
true
if this menu item has a parent and is the last child of this parent, orfalse
otherwise.
-
getPreviousSibling
Description copied from interface:IMenuItem
Get the previous sibling of this menu item.- Specified by:
getPreviousSibling
in interfaceIMenuItem
- 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
Description copied from interface:IMenuItem
Get the next sibling of this menu item.- Specified by:
getNextSibling
in interfaceIMenuItem
- 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
.
-
hasProperty
Description copied from interface:IMenuItem
Test if this menu item has the given property.- Specified by:
hasProperty
in interfaceIMenuItem
- Parameters:
p_strLang
- The property name.- Returns:
true
if this menu item has the property, orfalse
otherwise.
-
getProperty
Description copied from interface:IMenuItem
Get the value of the given property- Specified by:
getProperty
in interfaceIMenuItem
- Parameters:
p_strName
- The property name.- Returns:
- The value of the property.
-
getProperties
Description copied from interface:IMenuItem
Get the menu item's properties.- Specified by:
getProperties
in interfaceIMenuItem
- Returns:
- An immutable map of the menu item's properties,
never
null
.
-
hasName
Description copied from interface:IMenuItem
Test if this menu item has a name in the specified language. -
getName
Description copied from interface:IMenuItem
Get the name of this menu item in the specified language. -
getNames
Description copied from interface:IMenuItem
Get the menu item's language dependent names.
-