de.uplanet.lucy.server.menu.rt
Interface IMenuItem

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
de.uplanet.lucy.server.menu.rt.AbstractContainerMenuItem, de.uplanet.lucy.server.menu.rt.AbstractMenuItem, TopLevelGroupMenuItem

public interface IMenuItem
extends java.lang.Cloneable

Version:
$Revision: 70194 $

Method Summary
 IMenuItem[] children()
          Get the children of this menu item.
 int getChildrenCount()
          Get the number of children of this node.
 IMenuItem getDescendantOrSelf(java.lang.String p_strId)
          Get the menu item with the specified unique identifier from this subtree.
 java.lang.String 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.
 java.lang.String getName(java.lang.String p_strLang)
          Get the name of this menu item in the specified language.
 IMenuItem getNextSibling()
          Get the next sibling of this menu item.
 IMenuItem getParent()
          Get the parent of this menu item.
 IMenuItem getPreviousSibling()
          Get the previous sibling of this menu item.
 java.lang.String getProperty(java.lang.String p_strName)
          Get the value of the given property
 boolean hasChildren()
          Check if this menu item has children.
 boolean hasName(java.lang.String p_strLang)
          Test if this menu item has a name in the specified language.
 boolean hasParent()
          Indicates if this menu item has a parent.
 boolean hasProperty(java.lang.String p_strName)
          Test if this menu item has the given property.
 boolean isApplicationMenuItem()
          Indicates if this menu item is an application menu item.
 boolean isContainerMenuItem()
          Indicates if this menu item is a container.
 boolean isFirstChild()
          Check if this menu item is the first child of it's parent.
 boolean isLastChild()
          Check if this menu item is the last child of it's parent.
 boolean isLinkMenuItem()
          Indicates if this menu item is a link menu item.
 boolean isRootMenuItem()
          Indicates if this is the root menu item.
 boolean isSeparatorMenuItem()
          Indicates if this menu item is a separator.
 boolean isTopLevelGroupMenuItem()
          Indicates if this menu item is a top-level group.
 

Method Detail

getGuid

java.lang.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 a RootMenuItem or false otherwise.

isTopLevelGroupMenuItem

boolean isTopLevelGroupMenuItem()
Indicates if this menu item is a top-level group.

Returns:
true if this menu item is a TopLevelGroupMenuItem or false otherwise.

isContainerMenuItem

boolean isContainerMenuItem()
Indicates if this menu item is a container.

Returns:
true if this menu item is a ContainerMenuItem or false otherwise.

isApplicationMenuItem

boolean isApplicationMenuItem()
Indicates if this menu item is an application menu item.

Returns:
true if this menu item is an ApplicationMenuItem, or false otherwise.

isLinkMenuItem

boolean isLinkMenuItem()
Indicates if this menu item is a link menu item.

Returns:
true if this menu item is an ApplicationMenuItem, or false otherwise.

isSeparatorMenuItem

boolean isSeparatorMenuItem()
Indicates if this menu item is a separator.

Returns:
true if this menu item is a SeparatorMenuItem, or false otherwise.

hasChildren

boolean hasChildren()
Check if this menu item has children.

Returns:
true if this menu item has children, or false 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.

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.

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:
true if this menu item has a parent or false 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, or false 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, or false 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

IMenuItem getDescendantOrSelf(java.lang.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 null if the menu item does not exist in this subtree.

hasProperty

boolean hasProperty(java.lang.String p_strName)
Test if this menu item has the given property.

Parameters:
p_strName - The property name.
Returns:
true if this menu item has the property, or false otherwise.

getProperty

java.lang.String getProperty(java.lang.String p_strName)
Get the value of the given property

Parameters:
p_strName - The property name.
Returns:
The value of the property.

hasName

boolean hasName(java.lang.String p_strLang)
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, or false otherwise.

getName

java.lang.String getName(java.lang.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.


Last updated: 2011-01-27
Copyright 2000-2010 United Planet. All Rights Reserved.