org.benow.web.menu
Interface MenuItem

All Known Implementing Classes:
MenuItemImpl, PageMenuItem

public interface MenuItem


Method Summary
 void addChild(MenuItem item)
           
 MenuItem addChild(java.lang.String name, java.lang.String desc, java.lang.String href)
           
 boolean enabled()
           
 java.lang.String getAbsolutePath()
           
 MenuItem getChildByName(java.lang.String name)
           
 MenuItem getChildByPath(java.lang.String absolutePath)
          gets child by given path, digs into children if neeeded
 MenuItem getChildByPos(int i)
           
 java.util.List<MenuItem> getChildren()
           
 java.lang.String getDescription()
           
 java.lang.String getHotkey()
          Get hotkey to trigger this item.
 java.lang.String getHREF()
           
 java.lang.String getName()
           
 java.lang.String getOnClick()
           
 MenuItem getParent()
           
 java.lang.String getPermission()
           
 int getPosition()
           
 void moveDown()
          increases position among siblings
 void moveUp()
          decreases position among siblings
 void removeChild(MenuItem item)
           
 void removeSelf()
          remove this item
 MenuItem resolve()
          Creates a copy of this menu item (recursively) and resolves all plugin items and selected state according to the request
 void select()
          Flag this node as selected.
 

Method Detail

getName

java.lang.String getName()

getDescription

java.lang.String getDescription()

getHREF

java.lang.String getHREF()

getAbsolutePath

java.lang.String getAbsolutePath()

getOnClick

java.lang.String getOnClick()

getParent

MenuItem getParent()

getChildren

java.util.List<MenuItem> getChildren()

removeChild

void removeChild(MenuItem item)

getChildByPos

MenuItem getChildByPos(int i)

getChildByPath

MenuItem getChildByPath(java.lang.String absolutePath)
                        throws org.benow.repository.NoSuchObjectException
gets child by given path, digs into children if neeeded

Throws:
org.benow.repository.NoSuchObjectException

getChildByName

MenuItem getChildByName(java.lang.String name)
                        throws org.benow.repository.NoSuchObjectException
Throws:
org.benow.repository.NoSuchObjectException

addChild

void addChild(MenuItem item)

addChild

MenuItem addChild(java.lang.String name,
                  java.lang.String desc,
                  java.lang.String href)

getPosition

int getPosition()
Returns:
the position of this item among its siblings (if first child is 0, etc)

moveUp

void moveUp()
decreases position among siblings


moveDown

void moveDown()
increases position among siblings


getPermission

java.lang.String getPermission()

enabled

boolean enabled()
Returns:
true if item is enabled.

removeSelf

void removeSelf()
remove this item


resolve

MenuItem resolve()
Creates a copy of this menu item (recursively) and resolves all plugin items and selected state according to the request

Returns:

getHotkey

java.lang.String getHotkey()
Get hotkey to trigger this item. A solo character, or a key press combination, such as

Returns:

select

void select()
Flag this node as selected.