View Javadoc

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