001package org.apache.turbine;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *   http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022import org.apache.turbine.pipeline.TurbinePipeline;
023
024
025
026
027/**
028 * This interface contains all the constants used throughout
029 * the Turbine code base.
030 *
031 * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
032 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
033 * @author <a href="mailto:seade@backstagetech.com.au">Scott Eade</a>
034 * @version $Id: TurbineConstants.java 1709648 2015-10-20 17:08:10Z tv $
035 */
036public interface TurbineConstants
037{
038        /**
039         * <p>The prefix used to denote the namespace reserved for and
040         * used by Turbine-specific configuration parameters (such as
041         * those passed in via servlet container's config file
042         * (<code>server.xml</code>), or the web app deployment descriptor
043         * (<code>web.xml</code>).</p>
044         *
045         * <p>For example, a parameter in the Turbine namespace would be
046         * <code>org.apache.turbine.loggingRoot</code>.</p>
047         */
048        String CONFIG_NAMESPACE = "org.apache.turbine";
049
050        /** The key for the Log4J File */
051        String LOG4J_CONFIG_FILE = "log4j.file";
052
053        /** The default value for the Log4J File */
054        String LOG4J_CONFIG_FILE_DEFAULT = "/WEB-INF/conf/Log4j.properties";
055
056        /** This is the default log file to be used for logging */
057        String DEFAULT_LOGGER = "turbine";
058
059        /** The logging facility which captures output from the SchedulerService. */
060        String SCHEDULER_LOG_FACILITY = "scheduler";
061
062        /** The SMTP server Turbine uses to send mail. */
063        String MAIL_SERVER_KEY = "mail.server";
064
065        /** Default Value for he SMTP server that Turbine uses to send mail. */
066        String MAIL_SERVER_DEFAULT = "localhost";
067
068        /** The Smtp sender address property */
069        String MAIL_SMTP_FROM = "mail.smtp.from";
070
071        /** Property that controls whether Turbine modules are cached or not. */
072        String MODULE_CACHE_KEY = "module.cache";
073
074        /** Default value of the Turbine Module Caching */
075        boolean MODULE_CACHE_DEFAULT = true;
076
077    /** Property that controls the module cache size. */
078    String MODULE_CACHE_SIZE_KEY = "module.cache.size";
079
080    /** Default value of the Turbine Module Cache Size */
081    int MODULE_CACHE_SIZE_DEFAULT = 128;
082
083        /** The packages where Turbine will look for modules. */
084        String MODULE_PACKAGES = "module.packages";
085
086        /** Home page template. */
087        String TEMPLATE_HOMEPAGE = "template.homepage";
088
089        /** Login template. */
090        String TEMPLATE_LOGIN = "template.login";
091
092        /** Template error template Property. */
093        String TEMPLATE_ERROR_KEY = "template.error";
094
095        /** Template error default for JSP */
096        String TEMPLATE_ERROR_JSP = "error.jsp";
097
098        /** Template error default for Velocity */
099        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        /** Default doctype root element. */
201        String DEFAULT_HTML_DOCTYPE_ROOT_ELEMENT_KEY
202                        = "default.html.doctype.root.element";
203
204        /** Default value for the doctype root element */
205        String DEFAULT_HTML_DOCTYPE_ROOT_ELEMENT_DEFAULT
206                        = "HTML";
207
208        /** Default doctype dtd. */
209        String DEFAULT_HTML_DOCTYPE_IDENTIFIER_KEY
210                        = "default.html.doctype.identifier";
211
212        /** Default Doctype dtd value */
213        String DEFAULT_HTML_DOCTYPE_IDENTIFIER_DEFAULT
214                        = "-//W3C//DTD HTML 4.01 Transitional//EN";
215
216        /** Default doctype url. */
217        String DEFAULT_HTML_DOCTYPE_URI_KEY
218                        = "default.html.doctype.url";
219
220        /** Default doctype url value. */
221        String DEFAULT_HTML_DOCTYPE_URI_DEFAULT
222                        = "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd";
223
224        /** Default Language property */
225        String LOCALE_DEFAULT_LANGUAGE_KEY = "locale.default.language";
226
227        /** Default value for Language property */
228        String LOCALE_DEFAULT_LANGUAGE_DEFAULT = "en";
229
230        /** Default Country property */
231        String LOCALE_DEFAULT_COUNTRY_KEY = "locale.default.country";
232
233        /** Default value for Country property */
234        String LOCALE_DEFAULT_COUNTRY_DEFAULT = "US";
235
236        /** Default Charset property */
237        String LOCALE_DEFAULT_CHARSET_KEY = "locale.default.charset";
238
239        /** Default value for Charset property */
240        String LOCALE_DEFAULT_CHARSET_DEFAULT = "ISO-8859-1";
241
242        /** If this value is set as applicationRoot, then the webContext is used
243         * as application root
244         */
245        String WEB_CONTEXT = "webContext";
246
247        /** Key for the Path to the TurbineResources.properties File */
248        String APPLICATION_ROOT_KEY = "applicationRoot";
249
250        /** Default Value for the Path to the TurbineResources.properties File */
251        String APPLICATION_ROOT_DEFAULT = WEB_CONTEXT;
252
253        /** This is the key used in the Turbine.properties to access resources
254         * relative to the Web Application root. It might differ from the
255         * Application root, but the normal case is, that the webapp root
256         * and the application root point to the same path.
257         */
258        String WEBAPP_ROOT_KEY = "webappRoot";
259
260        /** The Key in the deployment descriptor for the Logging Directory */
261        String LOGGING_ROOT_KEY = "loggingRoot";
262
263        /** Default Value for the Logging Directory, relative to the webroot */
264        String LOGGING_ROOT_DEFAULT = "/logs";
265
266        /** Key for loading the UUID Generator with a constant value */
267        String UUID_ADDRESS_KEY = "uuid.address";
268
269        /** Context Key for the screen placeholder in the various velocity layouts */
270        String SCREEN_PLACEHOLDER = "screen_placeholder";
271
272        /** Context Key for the navigation object placeholder in the various velocity layouts */
273        String NAVIGATION_PLACEHOLDER = "navigation";
274
275        /** Context Key for the Processing Exception */
276        String PROCESSING_EXCEPTION_PLACEHOLDER = "processingException";
277
278        /** Context Key for the Stack Trace */
279        String STACK_TRACE_PLACEHOLDER = "stackTrace";
280
281    /** Encoding for Parameter Parser */
282    String PARAMETER_ENCODING_KEY = "input.encoding";
283
284    /** Default Encoding for Parameter Parser */
285    String PARAMETER_ENCODING_DEFAULT = "ISO-8859-1";
286
287    /** Default serverName for ServerData */
288    String DEFAULT_SERVER_NAME_KEY
289            = "serverdata.default.serverName";
290
291    /** Default serverPort for ServerData */
292    String DEFAULT_SERVER_PORT_KEY
293            = "serverdata.default.serverPort";
294
295    /** Default serverScheme for ServerData */
296    String DEFAULT_SERVER_SCHEME_KEY
297            = "serverdata.default.serverScheme";
298
299    /** Default scriptName for ServerData */
300    String DEFAULT_SCRIPT_NAME_KEY
301            = "serverdata.default.scriptName";
302
303    /** Default contextPath for ServerData */
304    String DEFAULT_CONTEXT_PATH_KEY
305            = "serverdata.default.contextPath";
306
307    /** The default Session key for the Access Control List */
308    String ACL_SESSION_KEY = "turbine.AccessControlList";
309
310    /**
311         * The fully qualified class name of the default {@link
312         * org.apache.turbine.pipeline.Pipeline} implementation to use in the
313         * {@link org.apache.turbine.Turbine} servlet.
314         */
315        String STANDARD_PIPELINE = TurbinePipeline.class.getName();
316}