KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > turbine > TurbineConstants


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

56
57 import org.apache.turbine.pipeline.TurbinePipeline;
58
59 /**
60  * This interface contains all the constants used throughout
61  * the Turbine code base.
62  *
63  * @author <a HREF="mailto:jvanzyl@apache.org">Jason van Zyl</a>
64  */

65 public interface TurbineConstants
66 {
67     /**
68      * <p>The prefix used to denote the namespace reserved for and
69      * used by Turbine-specific configuration parameters (such as
70      * those passed in via servlet container's config file
71      * (<code>server.xml</code>), or the web app deployment descriptor
72      * (<code>web.xml</code>).</p>
73      *
74      * <p>For example, a parameter in the Turbine namespace would be
75      * <code>org.apache.turbine.loggingRoot</code>.</p>
76      */

77     public static final String JavaDoc CONFIG_NAMESPACE = "org.apache.turbine";
78
79     /**
80      * The logging facility which captures output from Peers.
81      */

82     public static final String JavaDoc SQL_LOG_FACILITY = "sql";
83
84     /**
85      * The logging facility which captures output from the SchedulerService.
86      */

87     public static final String JavaDoc SCHEDULER_LOG_FACILITY = "scheduler";
88
89     /**
90      * SMTP server Turbine uses to send mail.
91      */

92     public static final String JavaDoc MAIL_SERVER_KEY = "mail.server";
93
94     /**
95      * The size of the actions cache if module caching is on.
96      */

97     public static final String JavaDoc ACTION_CACHE_SIZE = "action.cache.size";
98
99     /**
100      * The size of the layout cache if module caching is on.
101      */

102     public static final String JavaDoc LAYOUT_CACHE_SIZE = "layout.cache.size";
103
104     /**
105      * The size of the navigation cache if module caching is on.
106      */

107     public static final String JavaDoc NAVIGATION_CACHE_SIZE = "navigation.cache.size";
108
109     /**
110      * The size of the actions page if module caching is on.
111      */

112     public static final String JavaDoc PAGE_CACHE_SIZE = "page.cache.size";
113
114     /**
115      * The size of the actions cache if module caching is on.
116      */

117     public static final String JavaDoc SCREEN_CACHE_SIZE = "screen.cache.size";
118
119     /**
120      * The size of the actions cache if module caching is on.
121      */

122     public static final String JavaDoc SCHEDULED_JOB_CACHE_SIZE =
123         "scheduledjob.cache.size";
124
125     /**
126      * The fully qualified class name of the default {@link
127      * org.apache.turbine.Pipeline} implementation to use in the
128      * {@link org.apache.turbine.Turbine} servlet.
129      */

130     public static final String JavaDoc STANDARD_PIPELINE =
131         TurbinePipeline.class.getName();
132
133     /**
134      * The packages where Turbine will look for modules.
135      * This is effectively Turbine's classpath.
136      */

137     public static final String JavaDoc MODULE_PACKAGES = "module.packages";
138
139     /**
140      * Configuration key for the ExceptionHandler that Turbine will use.
141      */

142     public static final String JavaDoc EXCEPTION_HANDLER = "exceptionHandler.default";
143
144     /**
145      * what resolver Turbine will use
146      */

147     public static final String JavaDoc RESOLVER = "resolver.default";
148
149     /**
150      * what will the resolver cache (replaces the <module.cache> property)
151      */

152     public static final String JavaDoc RESOLVER_MODULE_CACHE = "resolver.cache.module";
153     public static final String JavaDoc RESOLVER_TEMPLATE_CACHE =
154         "resolver.cache.template";
155
156     /**
157      * Home page template.
158      */

159     public static final String JavaDoc TEMPLATE_HOMEPAGE = "template.homepage";
160
161     /**
162      * Login template.
163      */

164     public static final String JavaDoc TEMPLATE_LOGIN = "template.login";
165
166     /**
167      * Login error template.
168      */

169     public static final String JavaDoc TEMPLATE_ERROR = "template.error";
170
171     /**
172      * Home page screen.
173      */

174     public static final String JavaDoc SCREEN_HOMEPAGE = "screen.homepage";
175
176     /**
177      * Login screen.
178      */

179     public static final String JavaDoc SCREEN_LOGIN = "screen.login";
180
181     /**
182      * Login error screen.
183      */

184     public static final String JavaDoc SCREEN_ERROR = "screen.error";
185     public static final String JavaDoc SCREEN_INVALID_STATE = "screen.invalidstate";
186     public static final String JavaDoc TEMPLATE_INVALID_STATE = "template.invalidstate";
187
188     /**
189      * Action to perform when a user logs in.
190      */

191     public static final String JavaDoc ACTION_LOGIN = "action.login";
192
193     /**
194      * Action to perform when a user logs out.
195      */

196     public static final String JavaDoc ACTION_LOGOUT = "action.logout";
197
198     /**
199      * Actions that performs session validation.
200      */

201     public static final String JavaDoc ACTION_SESSION_VALIDATOR =
202         "action.sessionvalidator";
203
204     /**
205      * I don't think this is being used, is it?
206      */

207     public static final String JavaDoc ACTION_ACCESS_CONTROLLER =
208         "action.accesscontroller";
209
210     /**
211      * Default layout.
212      */

213     public static final String JavaDoc LAYOUT_DEFAULT = "layout.default";
214
215     /**
216      * Default page property.
217      */

218     public static final String JavaDoc PAGE_DEFAULT = "page.default";
219
220     /**
221      * Default Page module if one isn't specified in TRP.
222      */

223     public static final String JavaDoc DEFAULT_PAGE_MODULE = "DefaultPage";
224
225     /**
226      * Message to display upon successful login.
227      */

228     public static final String JavaDoc LOGIN_MESSAGE = "login.message";
229
230     /**
231      * Message to display when a user fails to login.
232      */

233     public static final String JavaDoc LOGIN_ERROR = "login.error";
234
235     /**
236      * Message to display when screens variable invalid.
237      */

238     public static final String JavaDoc LOGIN_MESSAGE_NOSCREEN =
239         "login.message.noscreen";
240
241     /**
242      * Message to display when a user logs out.
243      */

244     public static final String JavaDoc LOGOUT_MESSAGE = "logout.message";
245
246     /**
247      * Indicate whether this Turbine application is using SSL.
248      * Used for creating dynamic URIs.
249      */

250     public static final String JavaDoc USE_SSL = "use.ssl";
251
252     /**
253      * Should the PP fold the case of everything. Possible values are
254      * "upper", "lower" and "none".
255      */

256     public static final String JavaDoc PP_URL_CASE_FOLDING = "url.case.folding";
257
258     /**
259      * Default document type.
260      */

261     public static final String JavaDoc DEFAULT_DOCUMENT_TYPE = "default.doctype";
262
263     /**
264      * Default value of TurbineResources.properties file path
265      * (<code>/WEB-INF/conf/TurbineResources.properties</code>).
266      */

267     public static final String JavaDoc DEFAULT_TURBINE_RESOURCES =
268         "/WEB-INF/conf/TurbineResources.properties";
269
270     public static final String JavaDoc ACTIONS = "actions";
271     public static final String JavaDoc PAGES = "pages";
272     public static final String JavaDoc LAYOUTS = "layouts";
273     public static final String JavaDoc NAVIGATIONS = "navigations";
274     public static final String JavaDoc SCREENS = "screens";
275
276     //!! I don't think jobs should be part of the module system
277
// at all but will be left for BC for now.
278
public static final String JavaDoc JOBS = "scheduledjobs";
279
280     public static final String JavaDoc DEFAULT_MODULE_PACKAGE =
281         "org.apache.turbine.modules";
282
283     public static final String JavaDoc SESSION_TIMEOUT = "session.timeout";
284
285     public static final String JavaDoc SCREEN = "screen";
286     public static final String JavaDoc ACTION = "action";
287     public static final String JavaDoc TEMPLATE = "template";
288     
289     public static final String JavaDoc CONTEXT = "__template_context__";
290
291     /**
292      * Name of path info parameter used to indicate the redirected stage of
293      * a given user's initial Turbine request
294      */

295     public static final String JavaDoc REDIRECTED_PATHINFO_NAME = "redirected";
296
297     /**
298      * The base directory key
299      */

300     public static final String JavaDoc BASEDIR_KEY = "basedir";
301
302     /**
303      * Application root key that can be used in the deployment
304      * descriptor to change the root directory where a turbine
305      * application runs from.
306      */

307     public static final String JavaDoc APPLICATION_ROOT = "applicationRoot";
308     public static final String JavaDoc WEBAPP_ROOT = "webappRoot";
309     public static final String JavaDoc WEB_CONTEXT = "webContext";
310     public static final String JavaDoc LOGGING_ROOT = "loggingRoot";
311     
312     /**
313      * configuration subset
314      */

315     public static final String JavaDoc SYSTEM = "system";
316
317
318     /**
319      * Request key where a RunData object may be stored. Useful in cases
320      * where one application is invoked by another.
321      */

322     public static final String JavaDoc RUNDATA_REQUEST_KEY =
323         "org.apache.turbine.RunData.request.key";
324
325     /**
326      * Request key for standalone vs. integrated operation. If an object
327      * exists under this key, integrated operation will be assumed
328      * regardless of MODE set in the configuration.
329      */

330     public static final String JavaDoc INTEGRATED_REQUEST_KEY =
331         "org.apache.turbine.integrated.request.key";
332
333     /**
334      * Configuration key for standalone vs. integrated operation.
335      */

336     public static final String JavaDoc MODE = "turbine.mode";
337
338     /**
339      * Configuration value for MODE property, if not set to integrated,
340      * standalone is assumed.
341      */

342     public static final String JavaDoc INTEGRATED = "integrated";
343     
344     /** The key for the Log4J File */
345     public static final String JavaDoc LOG4J_CONFIG_FILE = "log4j.file";
346
347     /** The default value for the Log4J File */
348     public static final String JavaDoc LOG4J_CONFIG_FILE_DEFAULT = "/WEB-INF/conf/log4j.properties";
349 }
350
Popular Tags