01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
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: * FOLDER_OPTION_TYPE - type of folder menu option
29: */
30: String FOLDER_OPTION_TYPE = "folder";
31:
32: /**
33: * PAGE_OPTION_TYPE - type of page menu option
34: */
35: String PAGE_OPTION_TYPE = "page";
36:
37: /**
38: * LINK_OPTION_TYPE - type of link menu option
39: */
40: String LINK_OPTION_TYPE = "link";
41:
42: /**
43: * getType - get type of menu option
44: *
45: * @return FOLDER_OPTION_TYPE, PAGE_OPTION_TYPE, or
46: * LINK_OPTION_TYPE
47: */
48: String getType();
49:
50: /**
51: * getUrl - get url of menu option
52: *
53: * @return folder, page, or link url
54: */
55: String getUrl();
56:
57: /**
58: * getTarget - get target for url of menu option
59: *
60: * @return url target
61: */
62: String getTarget();
63:
64: /**
65: * getDefaultPage - get target for url of menu option
66: *
67: * @return url target
68: */
69: String getDefaultPage();
70:
71: /**
72: * isHidden - get hidden state of menu option
73: *
74: * @return hidden state
75: */
76: boolean isHidden();
77:
78: /**
79: * isSelected - return true if menu option is selected in
80: * the specified request context
81: *
82: * @param context request context
83: * @return selected state
84: */
85: boolean isSelected(PortalSiteRequestContext context);
86: }
|