KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > tigris > scarab > util > ScarabConstants


1 package org.tigris.scarab.util;
2
3 /* ================================================================
4  * Copyright (c) 2000-2002 CollabNet. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are
8  * met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in the
15  * documentation and/or other materials provided with the distribution.
16  *
17  * 3. The end-user documentation included with the redistribution, if
18  * any, must include the following acknowlegement: "This product includes
19  * software developed by Collab.Net <http://www.Collab.Net/>."
20  * Alternately, this acknowlegement may appear in the software itself, if
21  * and wherever such third-party acknowlegements normally appear.
22  *
23  * 4. The hosted project names must not be used to endorse or promote
24  * products derived from this software without prior written
25  * permission. For written permission, please contact info@collab.net.
26  *
27  * 5. Products derived from this software may not use the "Tigris" or
28  * "Scarab" names nor may "Tigris" or "Scarab" appear in their names without
29  * prior written permission of Collab.Net.
30  *
31  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
32  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
33  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
34  * IN NO EVENT SHALL COLLAB.NET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
35  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
37  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
38  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
39  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
40  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
41  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42  *
43  * ====================================================================
44  *
45  * This software consists of voluntary contributions made by many
46  * individuals on behalf of Collab.Net.
47  */

48
49 import java.util.Locale JavaDoc;
50 import org.apache.fulcrum.localization.Localization;
51 import org.apache.turbine.Turbine;
52
53 /**
54  * A place to put public final static strings and other constants.
55  *
56  * @author <a HREF="mailto:jon@collab.net">Jon S. Stevens</a>
57  * @version $Id: ScarabConstants.java 9724 2005-06-06 16:50:17Z jorgeuriarte $
58  */

59 public interface ScarabConstants
60 {
61     /**
62      * the registration code uses this in order to store an object
63      * into the data.getUser().getTemp() hashtable. this is the key
64      * value and is used across several classes.
65      */

66     String JavaDoc SESSION_REGISTER = "scarab.newUser";
67
68     /**
69      * This is the key value that stores the name of the template to
70      * execute next.
71      */

72     String JavaDoc NEXT_TEMPLATE = "nextTemplate";
73
74     /**
75      * This is the key value that stores the name of the template to
76      * cancel to.
77      */

78     String JavaDoc CANCEL_TEMPLATE = "cancelTemplate";
79
80     /**
81      * This is the key value that stores the name of the template to
82      * go back to to (used in wizards)
83      */

84     String JavaDoc BACK_TEMPLATE = "backTemplate";
85
86     /**
87      * This is the key value that stores the name of the template to
88      * go back to to (used in wizards)
89      */

90     String JavaDoc LAST_TEMPLATE = "lastTemplate";
91
92     /**
93      * This is the key value that stores the name of the template
94      * that is currently being executed.
95      */

96     String JavaDoc TEMPLATE = "template";
97
98     /**
99      * This is the key value that stores the name of the action
100      * that is currently being executed.
101      */

102     String JavaDoc ACTION = "action";
103
104     /**
105      * This is the key value that stores the name of the template
106      * other than the next, or cancel, where a user can go
107      * depending on an action.
108      */

109     String JavaDoc OTHER_TEMPLATE = "otherTemplate";
110     
111     /**
112      * This is the key value that stores the issue
113      * id.
114      */

115     String JavaDoc ID = "id";
116     
117     /**
118      * Primary System Object
119      */

120     String JavaDoc SCARAB_REQUEST_TOOL = "scarabR";
121     
122     /**
123      * Name of the scarab Link Tool
124      */

125     String JavaDoc SCARAB_LINK_TOOL = "link";
126
127     /**
128      * Collection of useful methods
129      */

130     String JavaDoc SCARAB_GLOBAL_TOOL = "scarabG";
131
132     /**
133      * The name used for the Intake tool
134      */

135     String JavaDoc INTAKE_TOOL = "intake";
136
137     /**
138      * The name used for the Security tool
139      */

140     String JavaDoc SECURITY_TOOL = "security";
141
142     /**
143      * The name used for the Security Admin tool
144      */

145     String JavaDoc SECURITY_ADMIN_TOOL = "securityAdmin";
146
147     /**
148      * The name used for the Localization tool
149      */

150     String JavaDoc LOCALIZATION_TOOL = "l10n";
151
152     /**
153      * Key passed around in the query string which tracks the
154      * current module.
155      */

156     String JavaDoc DEBUG = "debug";
157     String JavaDoc CURRENT_MODULE = "curmodule";
158     String JavaDoc CURRENT_ISSUE_TYPE = "curit";
159     String JavaDoc CURRENT_ADMIN_MENU = "curadminmenu";
160     String JavaDoc REPORTING_ISSUE = "rissue";
161     String JavaDoc CURRENT_REPORT = "curreport";
162     String JavaDoc REMOVE_CURRENT_REPORT = "remcurreport";
163     String JavaDoc HISTORY_SCREEN = "oldscreen";
164     String JavaDoc NEW_MODULE = "newmodule";
165     String JavaDoc NEW_ISSUE_TYPE = "newissuetype";
166     String JavaDoc CURRENT_QUERY = "queryString";
167     String JavaDoc CURRENT_MITLIST_ID = "curmitlistid";
168     String JavaDoc CURRENT_MITLISTITEM = "curmitlistitem";
169     String JavaDoc USER_SELECTED_MODULE = "scarab.user.selected.module";
170     /** @deprecated No longer used */
171     String JavaDoc PROJECT_CHANGE_BOX = "project_change_box";
172
173     String JavaDoc THREAD_QUERY_KEY = "tqk";
174     String JavaDoc REMOVE_CURRENT_MITLIST_QKEY = "remcurmitl";
175
176     /**
177      * This name will be used to distinguish specific scarab application
178      * from other instances that it may interact with (in the future).
179      * It is the prefix to all issue id's created in response to an issue
180      * entered against a module in this instance's database.
181      */

182     String JavaDoc INSTANCE_ID = "scarab.instance.id";
183
184     /**
185      * This is maximum rating for a word.
186      *
187      */

188     int MAX_WORD_RATING = 100000;
189
190     /**
191      * The list of issue id's resulting from a search.
192      *
193      */

194     String JavaDoc ISSUE_ID_LIST = "scarab.issueIdList";
195
196     /**
197      * The message the user sees if they try to perform an action
198      * For which they have no permissions.
199      *
200      */

201     String JavaDoc NO_PERMISSION_MESSAGE = "YouDoNotHavePermissionToAction";
202
203     String JavaDoc ATTACHMENTS_REPO_KEY = "scarab.attachments.repository";
204
205     String JavaDoc ARCHIVE_EMAIL_ADDRESS = "scarab.email.archive.toAddress";
206
207     /**
208      * An attribute type
209      */

210     String JavaDoc DROPDOWN_LIST = "Dropdown list";
211
212     /**
213      * Scarab.properties key for roles to be automatically approved.
214      */

215     String JavaDoc AUTO_APPROVED_ROLES = "scarab.automatic.role.approval";
216
217     /**
218      * key used to store session preference for long issue view vs. tabs
219      * used in get/setTemp within ScarabUser.
220      */

221     String JavaDoc TAB_KEY = "scarab.view.issue.details";
222
223     /**
224      * Value of the session parameter to view the issue in long form.
225      */

226     String JavaDoc ISSUE_VIEW_ALL = "all";
227
228     /**
229      * list of invalid characters when doing searches
230      */

231     String JavaDoc INVALID_SEARCH_CHARACTERS = "\"\t(){}[]!,;:?./*-+=+&|<>\\~^";
232
233     /**
234      * format for displaying dates
235      */

236     String JavaDoc DATE_FORMAT = "yyyy-MM-dd HH:mm:ss z";
237     
238     /**
239      * The ISO date format that we accept when users enter dates.
240      */

241     String JavaDoc ISO_DATE_PATTERN = "yyyy-MM-dd";
242     
243     /**
244      * The ISO date/time format that we accept when users enter
245      * dates and times.
246      */

247     String JavaDoc ISO_DATETIME_PATTERN = "yyyy-MM-dd HH:mm";
248
249     /**
250      * The default base for resolving ResourceBundles.
251      */

252     String JavaDoc DEFAULT_BUNDLE_NAME = "ScarabBundle";
253
254     /**
255      * Default locale, taken from configuration files.
256      */

257     Locale JavaDoc DEFAULT_LOCALE = new Locale JavaDoc(Localization.getDefaultLanguage(),
258                                         Localization.getDefaultCountry());
259
260     /**
261      * Scarab.properties key for email encoding property.
262      */

263     String JavaDoc DEFAULT_EMAIL_ENCODING_KEY = "scarab.email.encoding";
264
265     Integer JavaDoc INTEGER_0 = new Integer JavaDoc(0);
266
267     //int QUERY_MAX_FILTER_CRITERIA =
268
// Turbine.getConfiguration().getInt("scarab.query.max.filter_criteria", 10);
269
int QUERY_MAX_FILTER_CRITERIA = 10;
270     int QUERY_MAX_JOIN = 31;
271         //Turbine.getConfiguration().getInt("scarab.query.max.join", 31);
272

273     /**
274      * The maximum number of issues for batch view of detail.
275      */

276     int ISSUE_MAX_VIEW =
277         Turbine.getConfiguration().getInt("scarab.issue.max.view", 25);
278
279     /**
280      * The maximum number of issues for batch assign.
281      */

282     int ISSUE_MAX_ASSIGN =
283         Turbine.getConfiguration().getInt("scarab.issue.max.assign", 25);
284
285     /**
286      * The maximum number of issues for batch copy.
287      */

288     int ISSUE_MAX_COPY =
289         Turbine.getConfiguration().getInt("scarab.issue.max.copy", 250);
290
291     /**
292      * The maximum number of issues for batch move.
293      */

294     int ISSUE_MAX_MOVE =
295         Turbine.getConfiguration().getInt("scarab.issue.max.move", 250);
296
297     /**
298      * The maximumn number of report headings
299      */

300     int REPORT_MAX_CRITERIA =
301         Turbine.getConfiguration().getInt("scarab.report.max.criteria", 5);
302
303
304     // Http parameters
305
public static final String JavaDoc HTTP_DOMAIN = "scarab.http.domain";
306     public static final String JavaDoc HTTP_SCHEME = "scarab.http.scheme";
307     public static final String JavaDoc HTTP_SCRIPT_NAME = "scarab.http.scriptname";
308     public static final String JavaDoc HTTP_PORT = "scarab.http.port";
309     
310     // Condition editor constants
311
public static int TRANSITION_OBJECT = 0;
312     public static int GLOBAL_ATTRIBUTE_OBJECT = 1;
313     public static int MODULE_ATTRIBUTE_OBJECT = 2;
314     public static int BLOCKED_MODULE_ISSUE_TYPE_OBJECT = 3;
315 }
316
Popular Tags