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