KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > roller > presentation > tags > menu > Menu


1
2 package org.roller.presentation.tags.menu;
3 import org.roller.RollerException;
4
5 import javax.servlet.http.HttpServletRequest JavaDoc;
6
7 /** An individual menu which contains MenuItems */
8 public interface Menu
9 {
10     /** Name of Menu */
11     public String JavaDoc getName();
12
13     /** Collection of MenuItem objects contained in this menu */
14     public java.util.Vector JavaDoc getMenuItems();
15
16     /** Determine if this menu is selected based on request */
17     public boolean isSelected( HttpServletRequest JavaDoc req ) throws RollerException;
18
19     /** Get currently selected menu item in this menu */
20     public MenuItem getSelectedMenuItem( HttpServletRequest JavaDoc req ) throws RollerException;
21
22     /** Url to be displayed in menu */
23     public String JavaDoc getUrl( javax.servlet.jsp.PageContext JavaDoc pctx );
24     
25     /** Is user principal permitted to use this menu? */
26     public boolean isPermitted( HttpServletRequest JavaDoc req ) throws RollerException;
27     
28     /** Set roles allowed to use this menu (comma separated list). */
29     public void setRoles( String JavaDoc roles );
30
31     /** Name of true/false configuration property that enables this menu */
32     public void setEnabledProperty( String JavaDoc enabledProperty );
33
34     /** Name of true/false configuration property that disables this menu */
35     public void setDisabledProperty( String JavaDoc disabledProperty );
36 }
37
38
Popular Tags