View Javadoc

1   package org.apache.turbine;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  /***
23   * This interface contains all the constants used throughout
24   * the Turbine code base.
25   *
26   * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
27   * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
28   * @author <a href="mailto:seade@backstagetech.com.au">Scott Eade</a>
29   * @version $Id: TurbineConstants.java 543168 2007-05-31 15:42:24Z seade $
30   */
31  public interface TurbineConstants
32  {
33      /***
34       * <p>The prefix used to denote the namespace reserved for and
35       * used by Turbine-specific configuration parameters (such as
36       * those passed in via servlet container's config file
37       * (<code>server.xml</code>), or the web app deployment descriptor
38       * (<code>web.xml</code>).</p>
39       *
40       * <p>For example, a parameter in the Turbine namespace would be
41       * <code>org.apache.turbine.loggingRoot</code>.</p>
42       */
43      String CONFIG_NAMESPACE = "org.apache.turbine";
44  
45      /*** The key for the Log4J File */
46      String LOG4J_CONFIG_FILE = "log4j.file";
47  
48      /*** The default value for the Log4J File */
49      String LOG4J_CONFIG_FILE_DEFAULT = "/WEB-INF/conf/Log4j.properties";
50  
51      /*** This is the default log file to be used for logging */
52      String DEFAULT_LOGGER = "turbine";
53  
54      /*** The logging facility which captures output from the SchedulerService. */
55      String SCHEDULER_LOG_FACILITY = "scheduler";
56  
57      /*** The SMTP server Turbine uses to send mail. */
58      String MAIL_SERVER_KEY = "mail.server";
59  
60      /*** Default Value for he SMTP server that Turbine uses to send mail. */
61      String MAIL_SERVER_DEFAULT = "localhost";
62  
63      /*** The Smtp sender address property */
64      String MAIL_SMTP_FROM = "mail.smtp.from";
65  
66      /*** Property that controls whether Turbine modules are cached or not. */
67      String MODULE_CACHE_KEY = "module.cache";
68  
69      /*** Default value of the Turbine Module Caching */
70      boolean MODULE_CACHE_DEFAULT = true;
71  
72      /*** Property for the size of the action cache if caching is on */
73      String ACTION_CACHE_SIZE_KEY = "action.cache.size";
74  
75      /*** The default size for the action cache */
76      int ACTION_CACHE_SIZE_DEFAULT = 20;
77  
78      /*** Property for the size of the layout cache if caching is on */
79      String LAYOUT_CACHE_SIZE_KEY = "layout.cache.size";
80  
81      /*** The default size for the layout cache */
82      int LAYOUT_CACHE_SIZE_DEFAULT = 10;
83  
84      /*** Property for the size of the navigation cache if caching is on */
85      String NAVIGATION_CACHE_SIZE_KEY = "navigation.cache.size";
86  
87      /*** The default size for the navigation cache */
88      int NAVIGATION_CACHE_SIZE_DEFAULT = 10;
89  
90      /*** Property for the size of the page cache if caching is on */
91      String PAGE_CACHE_SIZE_KEY = "page.cache.size";
92  
93      /*** The default size for the page cache */
94      int PAGE_CACHE_SIZE_DEFAULT = 5;
95  
96      /*** Property for the size of the screen cache if caching is on */
97      String SCREEN_CACHE_SIZE_KEY = "screen.cache.size";
98  
99      /*** The default size for the screen cache */
100     int SCREEN_CACHE_SIZE_DEFAULT = 50;
101 
102     /*** The key for the schedulder job cache size if module caching is on. */
103     String SCHEDULED_JOB_CACHE_SIZE_KEY = "scheduledjob.cache.size";
104 
105     /*** The default size of the schedulder job cache if module caching is on. */
106     int SCHEDULED_JOB_CACHE_SIZE_DEFAULT = 10;
107 
108     /**<Turbine will look for modules/ *//package-summary/html">The packages where Turbine will look for modules/ *//package-summary.html">em>* Turbine will look for modules/ *//package-summary.html">The packages where Turbine will look for modules. */
109     String MODULE_PACKAGES = "module.packages";
110 
111     /*** Home page template. */
112     String TEMPLATE_HOMEPAGE = "template.homepage";
113 
114     /*** Login template. */
115     String TEMPLATE_LOGIN = "template.login";
116 
117     /*** Template error template Property. */
118     String TEMPLATE_ERROR_KEY = "template.error";
119 
120     /*** Template error default for JSP */
121     String TEMPLATE_ERROR_JSP = "error.jsp";
122 
123     /*** Template error default for Velocity */
124     String TEMPLATE_ERROR_VM = "error.vm";
125 
126     /*** Home page screen. */
127     String SCREEN_HOMEPAGE = "screen.homepage";
128 
129     /*** Login screen. */
130     String SCREEN_LOGIN = "screen.login";
131 
132     /*** Login error screen. */
133     String SCREEN_ERROR_KEY = "screen.error";
134 
135     /*** Default value for Login Screen */
136     String SCREEN_ERROR_DEFAULT = "VelocityErrorScreen";
137 
138     /*** Report Screen for invalid state in the application*/
139     String SCREEN_INVALID_STATE = "screen.invalidstate";
140 
141     /*** Report Template for invalid state in the application */
142     String TEMPLATE_INVALID_STATE = "template.invalidstate";
143 
144     /*** Action to perform when a user logs in. */
145     String ACTION_LOGIN_KEY = "action.login";
146 
147     /*** Default Value for login Action */
148     String ACTION_LOGIN_DEFAULT = "LoginUser";
149 
150     /*** Action to perform when a user logs out. */
151     String ACTION_LOGOUT_KEY = "action.logout";
152 
153     /*** Default Value for ACTION_LOGOUT */
154     String ACTION_LOGOUT_DEFAULT = "LogoutUser";
155 
156     /*** Actions that performs session validation. */
157     String ACTION_SESSION_VALIDATOR_KEY = "action.sessionvalidator";
158 
159     /*** Default value for the session validator. (org.apache.modules.actions.sessionvalidator.TemplateSessionValidator) */
160     String ACTION_SESSION_VALIDATOR_DEFAULT = "sessionvalidator.TemplateSessionValidator";
161 
162     /*** Action that performs Access control */
163     String ACTION_ACCESS_CONTROLLER_KEY = "action.accesscontroller";
164 
165     /*** Default value for the access controller. (org.apache.modules.actions.AccessController) */
166     String ACTION_ACCESS_CONTROLLER_DEFAULT = "AccessController";
167 
168     /*** Select whether an Action Event must have a non-zero value */
169     String ACTION_EVENTSUBMIT_NEEDSVALUE_KEY = "action.eventsubmit.needsvalue";
170 
171     /*** Default value for action.eventsubmit.needsvalue */
172     boolean ACTION_EVENTSUBMIT_NEEDSVALUE_DEFAULT = false;
173 
174     /*** Default layout. */
175     String LAYOUT_DEFAULT = "layout.default";
176 
177     /*** Default page. */
178     String PAGE_DEFAULT_KEY = "page.default";
179 
180     /*** Default value for the Default Page */
181     String PAGE_DEFAULT_DEFAULT = "DefaultPage";
182 
183     /*** Default value for the Default Screen */
184     String SCREEN_DEFAULT_DEFAULT = "DefaultScreen";
185 
186     /*** Message to display upon successful login. */
187     String LOGIN_MESSAGE = "login.message";
188 
189     /*** Message to display when a user fails to login. */
190     String LOGIN_ERROR = "login.error";
191 
192     /*** Message to display when screens variable invalid. */
193     String LOGIN_MESSAGE_NOSCREEN = "login.message.noscreen";
194 
195     /*** Message to display when a user logs out. */
196     String LOGOUT_MESSAGE = "logout.message";
197 
198     /*** Session Timeout */
199     String SESSION_TIMEOUT_KEY = "session.timeout";
200 
201     /*** Session Timeout Default Value */
202     int SESSION_TIMEOUT_DEFAULT = -1;
203 
204     /*** Indicate whether this Turbine application is using SSL. */
205     String USE_SSL_KEY = "use.ssl";
206 
207     /*** Default value for the SSL key */
208     boolean USE_SSL_DEFAULT = true;
209 
210     /***
211      * Should the PP fold the case of everything. Possible values are
212      * "upper", "lower" and "none".
213      */
214     String PP_URL_CASE_FOLDING = "url.case.folding";
215 
216     /*** Default document type. */
217     String DEFAULT_DOCUMENT_TYPE_KEY = "default.doctype";
218 
219     /*** Html 4.0 Transitional */
220     String DOCUMENT_TYPE_HTML40TRANSITIONAL = "Html40Transitional";
221     /*** Html 4.0 Strict */
222     String DOCUMENT_TYPE_HTML40STRICT = "Html40Strict";
223     /*** Html 4.0 Frameset */
224     String DOCUMENT_TYPE_HTML40FRAMESET = "Html40Frameset";
225 
226     /*** Default doctype root element. */
227     String DEFAULT_HTML_DOCTYPE_ROOT_ELEMENT_KEY
228             = "default.html.doctype.root.element";
229 
230     /*** Default value for the doctype root element */
231     String DEFAULT_HTML_DOCTYPE_ROOT_ELEMENT_DEFAULT
232             = "HTML";
233 
234     /*** Default doctype dtd. */
235     String DEFAULT_HTML_DOCTYPE_IDENTIFIER_KEY
236             = "default.html.doctype.identifier";
237 
238     /*** Default Doctype dtd value */
239     String DEFAULT_HTML_DOCTYPE_IDENTIFIER_DEFAULT
240             = "-//W3C//DTD HTML 4.01 Transitional//EN";
241 
242     /*** Default doctype url. */
243     String DEFAULT_HTML_DOCTYPE_URI_KEY
244             = "default.html.doctype.url";
245 
246     /*** Default doctype url value. */
247     String DEFAULT_HTML_DOCTYPE_URI_DEFAULT
248             = "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd";
249 
250     /*** Default Language property */
251     String LOCALE_DEFAULT_LANGUAGE_KEY = "locale.default.language";
252 
253     /*** Default value for Language property */
254     String LOCALE_DEFAULT_LANGUAGE_DEFAULT = "en";
255 
256     /*** Default Country property */
257     String LOCALE_DEFAULT_COUNTRY_KEY = "locale.default.country";
258 
259     /*** Default value for Country property */
260     String LOCALE_DEFAULT_COUNTRY_DEFAULT = "US";
261 
262     /*** Default Charset property */
263     String LOCALE_DEFAULT_CHARSET_KEY = "locale.default.charset";
264 
265     /*** Default value for Charset property */
266     String LOCALE_DEFAULT_CHARSET_DEFAULT = "ISO-8859-1";
267 
268     /*** If this value is set as applicationRoot, then the webContext is used
269      * as application root
270      */
271     String WEB_CONTEXT = "webContext";
272 
273     /*** Key for the Path to the TurbineResources.properties File */
274     String APPLICATION_ROOT_KEY = "applicationRoot";
275 
276     /*** Default Value for the Path to the TurbineResources.properties File */
277     String APPLICATION_ROOT_DEFAULT = WEB_CONTEXT;
278 
279     /*** This is the key used in the Turbine.properties to access resources
280      * relative to the Web Application root. It might differ from the
281      * Application root, but the normal case is, that the webapp root
282      * and the application root point to the same path.
283      */
284     String WEBAPP_ROOT_KEY = "webappRoot";
285 
286     /*** The Key in the deployment descriptor for the Logging Directory */
287     String LOGGING_ROOT_KEY = "loggingRoot";
288 
289     /*** Default Value for the Logging Directory, relative to the webroot */
290     String LOGGING_ROOT_DEFAULT = "/logs";
291 
292     /*** Key for loading the UUID Generator with a constant value */
293     String UUID_ADDRESS_KEY = "uuid.address";
294 
295     /*** Context Key for the screen placeholder in the various velocity layouts */
296     String SCREEN_PLACEHOLDER = "screen_placeholder";
297 
298     /*** Context Key for the navigation object placeholder in the various velocity layouts */
299     String NAVIGATION_PLACEHOLDER = "navigation";
300 
301     /*** Context Key for the Processing Exception */
302     String PROCESSING_EXCEPTION_PLACEHOLDER = "processingException";
303 
304     /*** Context Key for the Stack Trace */
305     String STACK_TRACE_PLACEHOLDER = "stackTrace";
306 
307     /*** Prefix for layout related classes and templates */
308     String LAYOUT_PREFIX = "layouts";
309 
310     /*** Prefix for screen related classes and templates */
311     String SCREEN_PREFIX = "screens";
312 
313     /*** Prefix for navigation related classes and templates */
314     String NAVIGATION_PREFIX = "navigations";
315 
316     /*** Prefix for action related classes and templates */
317     String ACTION_PREFIX = "actions";
318 
319     /*** Prefix for page related classes and templates */
320     String PAGE_PREFIX = "pages";
321 
322     /*** Prefix for scheduler job related classes */
323     String SCHEDULEDJOB_PREFIX = "scheduledjobs";
324 
325     /*** Encoding for Parameter Parser */
326     String PARAMETER_ENCODING_KEY = "input.encoding";
327 
328     /*** Default Encoding for Parameter Parser */
329     String PARAMETER_ENCODING_DEFAULT = "ISO-8859-1";
330 
331     /*** Default serverName for ServerData */
332     static final String DEFAULT_SERVER_NAME_KEY
333             = "serverdata.default.serverName";
334 
335     /*** Default serverPort for ServerData */
336     static final String DEFAULT_SERVER_PORT_KEY
337             = "serverdata.default.serverPort";
338 
339     /*** Default serverScheme for ServerData */
340     static final String DEFAULT_SERVER_SCHEME_KEY
341             = "serverdata.default.serverScheme";
342 
343     /*** Default scriptName for ServerData */
344     static final String DEFAULT_SCRIPT_NAME_KEY
345             = "serverdata.default.scriptName";
346 
347     /*** Default contextPath for ServerData */
348     static final String DEFAULT_CONTEXT_PATH_KEY
349             = "serverdata.default.contextPath";
350 }