org.benow.web.menu
Interface MenuService

All Superinterfaces:
org.benow.java.spec.Markup, org.benow.service.Service
All Known Implementing Classes:
MenuServiceImpl

public interface MenuService
extends org.benow.service.Service


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.benow.java.spec.Markup
org.benow.java.spec.Markup.ParamName, org.benow.java.spec.Markup.ReturnDescription
 
Method Summary
 MenuItem addChild(java.lang.String path, MenuItem item)
           
 void deleteItem(java.lang.Object key)
           
 MenuItem getCurrentMenu(java.lang.String selectedPath)
          gets the menu for the currently rendered page, including selection of current items.
 java.util.List<ImportableMenu> getImportableMenus()
           
 MenuItem getMenu()
           
 MenuItemBundle getMenuItemBundle(java.lang.Object key)
           
 MenuItem getMenuItemByPath(java.lang.String path)
           
 ResultWriter getMenuXML()
           
 void importItem(java.lang.String res, java.lang.String path)
           
 void loadMenu(java.io.InputStream menuStream)
           
 void moveDown(java.lang.Object key)
          decrease the position of this item in the child list of it's parent
 void moveUp(java.lang.Object key)
          increase the position of this item in the child list of it's parent
 MenuItemBundle prepMenuItem()
           
 void setEnabled(java.lang.Object key, boolean enabled)
           
 void update(MenuItem item)
           
 

Method Detail

getMenu

MenuItem getMenu()

getMenuXML

ResultWriter getMenuXML()
                        throws javax.xml.transform.TransformerException
Throws:
javax.xml.transform.TransformerException

getCurrentMenu

MenuItem getCurrentMenu(java.lang.String selectedPath)
gets the menu for the currently rendered page, including selection of current items.

Parameters:
selectedPath - optional path to menu item to select (ie /menuitem/submenuitem), if not given, current request url will be used to determine path
Returns:

addChild

MenuItem addChild(java.lang.String path,
                  MenuItem item)

deleteItem

void deleteItem(java.lang.Object key)

update

void update(MenuItem item)

prepMenuItem

MenuItemBundle prepMenuItem()

getMenuItemBundle

MenuItemBundle getMenuItemBundle(java.lang.Object key)
                                 throws org.benow.repository.NoSuchObjectException
Throws:
org.benow.repository.NoSuchObjectException

getMenuItemByPath

MenuItem getMenuItemByPath(java.lang.String path)
                           throws org.benow.repository.NoSuchObjectException
Throws:
org.benow.repository.NoSuchObjectException

moveUp

void moveUp(java.lang.Object key)
increase the position of this item in the child list of it's parent

Parameters:
key -

moveDown

void moveDown(java.lang.Object key)
decrease the position of this item in the child list of it's parent

Parameters:
key -

loadMenu

void loadMenu(java.io.InputStream menuStream)
              throws javax.xml.transform.TransformerException
Throws:
javax.xml.transform.TransformerException

setEnabled

void setEnabled(java.lang.Object key,
                boolean enabled)
                throws org.benow.repository.NoSuchObjectException
Throws:
org.benow.repository.NoSuchObjectException

getImportableMenus

java.util.List<ImportableMenu> getImportableMenus()
                                                  throws java.io.IOException
Throws:
java.io.IOException

importItem

void importItem(java.lang.String res,
                java.lang.String path)
                throws org.benow.xml.io.TransformerError,
                       java.io.IOException,
                       org.benow.repository.NoSuchObjectException
Throws:
org.benow.xml.io.TransformerError
java.io.IOException
org.benow.repository.NoSuchObjectException