View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    * 
9    *      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.om.folder;
18  
19  import java.util.List;
20  import java.util.Locale;
21  
22  import org.apache.jetspeed.om.common.GenericMetadata;
23  
24  /***
25   * This interface describes the object used to define
26   * portal site menus comprised of nested menus, options,
27   * and separators.
28   * 
29   * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
30   * @version $Id: MenuDefinition.java 516448 2007-03-09 16:25:47Z ate $
31   */
32  public interface MenuDefinition
33  {
34      /***
35       * ANY_PROFILE_LOCATOR - wildcard value for profile locator names
36       */
37      String ANY_PROFILE_LOCATOR = MenuOptionsDefinition.ANY_PROFILE_LOCATOR;
38  
39      /***
40       * getName - get menu name
41       *
42       * @return menu name
43       */
44      String getName();
45  
46      /***
47       * setName - set menu name
48       *
49       * @param name menu name
50       */
51      void setName(String name);
52  
53      /***
54       * getOptions - get comma separated menu options if not specified as elements
55       *
56       * @return option paths specification
57       */
58      String getOptions();
59  
60      /***
61       * setOptions - set comma separated menu options if not specified as elements
62       *
63       * @param option option paths specification
64       */
65      void setOptions(String options);
66  
67      /***
68       * getDepth - get depth of inclusion for folder menu options
69       *
70       * @return inclusion depth
71       */
72      int getDepth();
73  
74      /***
75       * setDepth - set depth of inclusion for folder menu options
76       *
77       * @param depth inclusion depth
78       */
79      void setDepth(int depth);
80  
81      /***
82       * isPaths - get generate ordered path options for specified options
83       *
84       * @return paths options flag
85       */
86      boolean isPaths();
87      
88      /***
89       * setPaths - set generate ordered path options for specified options
90       *
91       * @param paths paths options flag
92       */
93      void setPaths(boolean paths);
94      
95      /***
96       * isRegexp - get regexp flag for interpreting specified options
97       *
98       * @return regexp flag
99       */
100     boolean isRegexp();
101 
102     /***
103      * setRegexp - set regexp flag for interpreting specified options
104      *
105      * @param regexp regexp flag
106      */
107     void setRegexp(boolean regexp);
108 
109     /***
110      * getProfile - get profile locator used to filter specified options
111      *
112      * @return profile locator name
113      */
114     String getProfile();
115 
116     /***
117      * setProfile - set profile locator used to filter specified options
118      *
119      * @param locatorName profile locator name
120      */
121     void setProfile(String locatorName);
122 
123     /***
124      * getOrder - get comma separated regexp ordering patterns for options
125      *
126      * @return ordering patterns list
127      */
128     String getOrder();
129 
130     /***
131      * setOrder - set comma separated regexp ordering patterns for options
132      *
133      * @param order ordering patterns list
134      */
135     void setOrder(String order);
136 
137     /***
138      * getSkin - get skin name for menu
139      *
140      * @return skin name
141      */
142     String getSkin();
143 
144     /***
145      * setSkin - set skin name for menu
146      *
147      * @param name skin name
148      */
149     void setSkin(String name);
150 
151     /***
152      * getTitle - get default title for menu
153      *
154      * @return title text
155      */
156     String getTitle();
157 
158     /***
159      * setTitle - set default title for menu
160      *
161      * @param title title text
162      */
163     void setTitle(String title);
164 
165     /***
166      * getShortTitle - get default short title for menu
167      *
168      * @return short title text
169      */
170     String getShortTitle();
171 
172     /***
173      * setShortTitle - set default short title for menu
174      *
175      * @param title short title text
176      */
177     void setShortTitle(String title);
178 
179     /***
180      * getTitle - get locale specific title for menu from metadata
181      *
182      * @param locale preferred locale
183      * @return title text
184      */
185     String getTitle(Locale locale);
186 
187     /***
188      * getShortTitle - get locale specific short title for menu from metadata
189      *
190      * @param locale preferred locale
191      * @return short title text
192      */
193     String getShortTitle(Locale locale);
194 
195     /***
196      * getMetadata - get generic metadata instance for menu
197      *
198      * @return metadata instance
199      */
200     GenericMetadata getMetadata();
201 
202     /***
203      * getMenuElements - get ordered list of menu options,
204      *                   nested menus, separators, included
205      *                   menu, and excluded menu elements
206      *
207      * @return element list
208      */
209     List getMenuElements();
210 
211     /***
212      * setMenuElements - set ordered list of menu options
213      *
214      * @param elements element list
215      */
216     void setMenuElements(List elements);
217 }