1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.portalsite;
18
19 /***
20 * This interface describes the portal-site menu option
21 * elements constructed and returned to decorators.
22 *
23 * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
24 * @version $Id: MenuOption.java 537314 2007-05-11 23:08:36Z taylor $
25 */
26 public interface MenuOption extends MenuElement
27 {
28 /***
29 * FOLDER_OPTION_TYPE - type of folder menu option
30 */
31 String FOLDER_OPTION_TYPE = "folder";
32
33 /***
34 * PAGE_OPTION_TYPE - type of page menu option
35 */
36 String PAGE_OPTION_TYPE = "page";
37
38 /***
39 * LINK_OPTION_TYPE - type of link menu option
40 */
41 String LINK_OPTION_TYPE = "link";
42
43 /***
44 * getType - get type of menu option
45 *
46 * @return FOLDER_OPTION_TYPE, PAGE_OPTION_TYPE, or
47 * LINK_OPTION_TYPE
48 */
49 String getType();
50
51 /***
52 * getUrl - get url of menu option
53 *
54 * @return folder, page, or link url
55 */
56 String getUrl();
57
58 /***
59 * getTarget - get target for url of menu option
60 *
61 * @return url target
62 */
63 String getTarget();
64
65 /***
66 * getDefaultPage - get target for url of menu option
67 *
68 * @return url target
69 */
70 String getDefaultPage();
71
72 /***
73 * isHidden - get hidden state of menu option
74 *
75 * @return hidden state
76 */
77 boolean isHidden();
78
79 /***
80 * isSelected - return true if menu option is selected in
81 * the specified request context
82 *
83 * @param context request context
84 * @return selected state
85 */
86 boolean isSelected(PortalSiteRequestContext context);
87 }