| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XMIMenuService
XMIMenuService is a portlet service that allows the creation of a static out-of-the-box portlet menu implementation that greatly facilitates the implementation of the MenuProvider interface. The content of the static tree is based of a custom XMI file. This service creates a menu tree using XMI (EXtended Markup Interface). The tree configuration is completely stored in an XML file which is accessed through an Reader instance. A menu tree instance that is created by the XMIMenuService also exposes the following controller interfaces: MenuTreeInfoCopyCtrl.
The syntax of the XML file is described in the DTD file menu−tree.dtd. Once the portal navigation displayed a static tree on a page, it will not change until either the portlet is deactivated, deleted from the page, or the corresponding portlet application is updated or re-installed.
The following code sample shows how MenuProvider.getMenu(com.ibm.wps.portlet.menu.MenuContext) can be implemented to return a MenuTree using MemoryMenuService.
public MenuTree getMenu(MenuContext menuContext) throws PortletException { // services XMIMenuService service = null; try { service = (XMIMenuService) portletContext.getService(XMIMenuService.class); } catch ( org.apache.jetspeed.portlet.service.PortletServiceUnavailableException e ) { throw new PortletException("XMIMenuTreePortlet: XMI Service is unavailable"); } catch ( org.apache.jetspeed.portlet.service.PortletServiceNotFoundException e ) { throw new PortletException("XMIMenuTreePortlet: XMI Service not found"); } // inputStreamReader reads XML file menuTree = service.getMenuTree(inputStreamReader, menuContext); return(menuTree); }
Method Summary | |
---|---|
MenuTree | java.io.Reader, com.ibm.wps.portlet.menu.MenuContext)">getMenuTree(java.io.Reader menuTreeStream,
MenuContext menuContext)
Deprecated. Creates a static menu tree from an XML file which is accessed through a Reader. |
Method Detail |
---|
MenuTree getMenuTree(java.io.Reader menuTreeStream, MenuContext menuContext)
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |