001: package 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:
022: /**
023: * This interface contains all the constants used throughout
024: * the Turbine code base.
025: *
026: * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
027: * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
028: * @author <a href="mailto:seade@backstagetech.com.au">Scott Eade</a>
029: * @version $Id: TurbineConstants.java 543168 2007-05-31 15:42:24Z seade $
030: */
031: public interface TurbineConstants {
032: /**
033: * <p>The prefix used to denote the namespace reserved for and
034: * used by Turbine-specific configuration parameters (such as
035: * those passed in via servlet container's config file
036: * (<code>server.xml</code>), or the web app deployment descriptor
037: * (<code>web.xml</code>).</p>
038: *
039: * <p>For example, a parameter in the Turbine namespace would be
040: * <code>org.apache.turbine.loggingRoot</code>.</p>
041: */
042: String CONFIG_NAMESPACE = "org.apache.turbine";
043:
044: /** The key for the Log4J File */
045: String LOG4J_CONFIG_FILE = "log4j.file";
046:
047: /** The default value for the Log4J File */
048: String LOG4J_CONFIG_FILE_DEFAULT = "/WEB-INF/conf/Log4j.properties";
049:
050: /** This is the default log file to be used for logging */
051: String DEFAULT_LOGGER = "turbine";
052:
053: /** The logging facility which captures output from the SchedulerService. */
054: String SCHEDULER_LOG_FACILITY = "scheduler";
055:
056: /** The SMTP server Turbine uses to send mail. */
057: String MAIL_SERVER_KEY = "mail.server";
058:
059: /** Default Value for he SMTP server that Turbine uses to send mail. */
060: String MAIL_SERVER_DEFAULT = "localhost";
061:
062: /** The Smtp sender address property */
063: String MAIL_SMTP_FROM = "mail.smtp.from";
064:
065: /** Property that controls whether Turbine modules are cached or not. */
066: String MODULE_CACHE_KEY = "module.cache";
067:
068: /** Default value of the Turbine Module Caching */
069: boolean MODULE_CACHE_DEFAULT = true;
070:
071: /** Property for the size of the action cache if caching is on */
072: String ACTION_CACHE_SIZE_KEY = "action.cache.size";
073:
074: /** The default size for the action cache */
075: int ACTION_CACHE_SIZE_DEFAULT = 20;
076:
077: /** Property for the size of the layout cache if caching is on */
078: String LAYOUT_CACHE_SIZE_KEY = "layout.cache.size";
079:
080: /** The default size for the layout cache */
081: int LAYOUT_CACHE_SIZE_DEFAULT = 10;
082:
083: /** Property for the size of the navigation cache if caching is on */
084: String NAVIGATION_CACHE_SIZE_KEY = "navigation.cache.size";
085:
086: /** The default size for the navigation cache */
087: int NAVIGATION_CACHE_SIZE_DEFAULT = 10;
088:
089: /** Property for the size of the page cache if caching is on */
090: String PAGE_CACHE_SIZE_KEY = "page.cache.size";
091:
092: /** The default size for the page cache */
093: int PAGE_CACHE_SIZE_DEFAULT = 5;
094:
095: /** Property for the size of the screen cache if caching is on */
096: String SCREEN_CACHE_SIZE_KEY = "screen.cache.size";
097:
098: /** The default size for the screen cache */
099: int SCREEN_CACHE_SIZE_DEFAULT = 50;
100:
101: /** The key for the schedulder job cache size if module caching is on. */
102: String SCHEDULED_JOB_CACHE_SIZE_KEY = "scheduledjob.cache.size";
103:
104: /** The default size of the schedulder job cache if module caching is on. */
105: int SCHEDULED_JOB_CACHE_SIZE_DEFAULT = 10;
106:
107: /** The packages where Turbine will look for modules. */
108: String MODULE_PACKAGES = "module.packages";
109:
110: /** Home page template. */
111: String TEMPLATE_HOMEPAGE = "template.homepage";
112:
113: /** Login template. */
114: String TEMPLATE_LOGIN = "template.login";
115:
116: /** Template error template Property. */
117: String TEMPLATE_ERROR_KEY = "template.error";
118:
119: /** Template error default for JSP */
120: String TEMPLATE_ERROR_JSP = "error.jsp";
121:
122: /** Template error default for Velocity */
123: String TEMPLATE_ERROR_VM = "error.vm";
124:
125: /** Home page screen. */
126: String SCREEN_HOMEPAGE = "screen.homepage";
127:
128: /** Login screen. */
129: String SCREEN_LOGIN = "screen.login";
130:
131: /** Login error screen. */
132: String SCREEN_ERROR_KEY = "screen.error";
133:
134: /** Default value for Login Screen */
135: String SCREEN_ERROR_DEFAULT = "VelocityErrorScreen";
136:
137: /** Report Screen for invalid state in the application*/
138: String SCREEN_INVALID_STATE = "screen.invalidstate";
139:
140: /** Report Template for invalid state in the application */
141: String TEMPLATE_INVALID_STATE = "template.invalidstate";
142:
143: /** Action to perform when a user logs in. */
144: String ACTION_LOGIN_KEY = "action.login";
145:
146: /** Default Value for login Action */
147: String ACTION_LOGIN_DEFAULT = "LoginUser";
148:
149: /** Action to perform when a user logs out. */
150: String ACTION_LOGOUT_KEY = "action.logout";
151:
152: /** Default Value for ACTION_LOGOUT */
153: String ACTION_LOGOUT_DEFAULT = "LogoutUser";
154:
155: /** Actions that performs session validation. */
156: String ACTION_SESSION_VALIDATOR_KEY = "action.sessionvalidator";
157:
158: /** Default value for the session validator. (org.apache.modules.actions.sessionvalidator.TemplateSessionValidator) */
159: String ACTION_SESSION_VALIDATOR_DEFAULT = "sessionvalidator.TemplateSessionValidator";
160:
161: /** Action that performs Access control */
162: String ACTION_ACCESS_CONTROLLER_KEY = "action.accesscontroller";
163:
164: /** Default value for the access controller. (org.apache.modules.actions.AccessController) */
165: String ACTION_ACCESS_CONTROLLER_DEFAULT = "AccessController";
166:
167: /** Select whether an Action Event must have a non-zero value */
168: String ACTION_EVENTSUBMIT_NEEDSVALUE_KEY = "action.eventsubmit.needsvalue";
169:
170: /** Default value for action.eventsubmit.needsvalue */
171: boolean ACTION_EVENTSUBMIT_NEEDSVALUE_DEFAULT = false;
172:
173: /** Default layout. */
174: String LAYOUT_DEFAULT = "layout.default";
175:
176: /** Default page. */
177: String PAGE_DEFAULT_KEY = "page.default";
178:
179: /** Default value for the Default Page */
180: String PAGE_DEFAULT_DEFAULT = "DefaultPage";
181:
182: /** Default value for the Default Screen */
183: String SCREEN_DEFAULT_DEFAULT = "DefaultScreen";
184:
185: /** Message to display upon successful login. */
186: String LOGIN_MESSAGE = "login.message";
187:
188: /** Message to display when a user fails to login. */
189: String LOGIN_ERROR = "login.error";
190:
191: /** Message to display when screens variable invalid. */
192: String LOGIN_MESSAGE_NOSCREEN = "login.message.noscreen";
193:
194: /** Message to display when a user logs out. */
195: String LOGOUT_MESSAGE = "logout.message";
196:
197: /** Session Timeout */
198: String SESSION_TIMEOUT_KEY = "session.timeout";
199:
200: /** Session Timeout Default Value */
201: int SESSION_TIMEOUT_DEFAULT = -1;
202:
203: /** Indicate whether this Turbine application is using SSL. */
204: String USE_SSL_KEY = "use.ssl";
205:
206: /** Default value for the SSL key */
207: boolean USE_SSL_DEFAULT = true;
208:
209: /**
210: * Should the PP fold the case of everything. Possible values are
211: * "upper", "lower" and "none".
212: */
213: String PP_URL_CASE_FOLDING = "url.case.folding";
214:
215: /** Default document type. */
216: String DEFAULT_DOCUMENT_TYPE_KEY = "default.doctype";
217:
218: /** Html 4.0 Transitional */
219: String DOCUMENT_TYPE_HTML40TRANSITIONAL = "Html40Transitional";
220: /** Html 4.0 Strict */
221: String DOCUMENT_TYPE_HTML40STRICT = "Html40Strict";
222: /** Html 4.0 Frameset */
223: String DOCUMENT_TYPE_HTML40FRAMESET = "Html40Frameset";
224:
225: /** Default doctype root element. */
226: String DEFAULT_HTML_DOCTYPE_ROOT_ELEMENT_KEY = "default.html.doctype.root.element";
227:
228: /** Default value for the doctype root element */
229: String DEFAULT_HTML_DOCTYPE_ROOT_ELEMENT_DEFAULT = "HTML";
230:
231: /** Default doctype dtd. */
232: String DEFAULT_HTML_DOCTYPE_IDENTIFIER_KEY = "default.html.doctype.identifier";
233:
234: /** Default Doctype dtd value */
235: String DEFAULT_HTML_DOCTYPE_IDENTIFIER_DEFAULT = "-//W3C//DTD HTML 4.01 Transitional//EN";
236:
237: /** Default doctype url. */
238: String DEFAULT_HTML_DOCTYPE_URI_KEY = "default.html.doctype.url";
239:
240: /** Default doctype url value. */
241: String DEFAULT_HTML_DOCTYPE_URI_DEFAULT = "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd";
242:
243: /** Default Language property */
244: String LOCALE_DEFAULT_LANGUAGE_KEY = "locale.default.language";
245:
246: /** Default value for Language property */
247: String LOCALE_DEFAULT_LANGUAGE_DEFAULT = "en";
248:
249: /** Default Country property */
250: String LOCALE_DEFAULT_COUNTRY_KEY = "locale.default.country";
251:
252: /** Default value for Country property */
253: String LOCALE_DEFAULT_COUNTRY_DEFAULT = "US";
254:
255: /** Default Charset property */
256: String LOCALE_DEFAULT_CHARSET_KEY = "locale.default.charset";
257:
258: /** Default value for Charset property */
259: String LOCALE_DEFAULT_CHARSET_DEFAULT = "ISO-8859-1";
260:
261: /** If this value is set as applicationRoot, then the webContext is used
262: * as application root
263: */
264: String WEB_CONTEXT = "webContext";
265:
266: /** Key for the Path to the TurbineResources.properties File */
267: String APPLICATION_ROOT_KEY = "applicationRoot";
268:
269: /** Default Value for the Path to the TurbineResources.properties File */
270: String APPLICATION_ROOT_DEFAULT = WEB_CONTEXT;
271:
272: /** This is the key used in the Turbine.properties to access resources
273: * relative to the Web Application root. It might differ from the
274: * Application root, but the normal case is, that the webapp root
275: * and the application root point to the same path.
276: */
277: String WEBAPP_ROOT_KEY = "webappRoot";
278:
279: /** The Key in the deployment descriptor for the Logging Directory */
280: String LOGGING_ROOT_KEY = "loggingRoot";
281:
282: /** Default Value for the Logging Directory, relative to the webroot */
283: String LOGGING_ROOT_DEFAULT = "/logs";
284:
285: /** Key for loading the UUID Generator with a constant value */
286: String UUID_ADDRESS_KEY = "uuid.address";
287:
288: /** Context Key for the screen placeholder in the various velocity layouts */
289: String SCREEN_PLACEHOLDER = "screen_placeholder";
290:
291: /** Context Key for the navigation object placeholder in the various velocity layouts */
292: String NAVIGATION_PLACEHOLDER = "navigation";
293:
294: /** Context Key for the Processing Exception */
295: String PROCESSING_EXCEPTION_PLACEHOLDER = "processingException";
296:
297: /** Context Key for the Stack Trace */
298: String STACK_TRACE_PLACEHOLDER = "stackTrace";
299:
300: /** Prefix for layout related classes and templates */
301: String LAYOUT_PREFIX = "layouts";
302:
303: /** Prefix for screen related classes and templates */
304: String SCREEN_PREFIX = "screens";
305:
306: /** Prefix for navigation related classes and templates */
307: String NAVIGATION_PREFIX = "navigations";
308:
309: /** Prefix for action related classes and templates */
310: String ACTION_PREFIX = "actions";
311:
312: /** Prefix for page related classes and templates */
313: String PAGE_PREFIX = "pages";
314:
315: /** Prefix for scheduler job related classes */
316: String SCHEDULEDJOB_PREFIX = "scheduledjobs";
317:
318: /** Encoding for Parameter Parser */
319: String PARAMETER_ENCODING_KEY = "input.encoding";
320:
321: /** Default Encoding for Parameter Parser */
322: String PARAMETER_ENCODING_DEFAULT = "ISO-8859-1";
323:
324: /** Default serverName for ServerData */
325: static final String DEFAULT_SERVER_NAME_KEY = "serverdata.default.serverName";
326:
327: /** Default serverPort for ServerData */
328: static final String DEFAULT_SERVER_PORT_KEY = "serverdata.default.serverPort";
329:
330: /** Default serverScheme for ServerData */
331: static final String DEFAULT_SERVER_SCHEME_KEY = "serverdata.default.serverScheme";
332:
333: /** Default scriptName for ServerData */
334: static final String DEFAULT_SCRIPT_NAME_KEY = "serverdata.default.scriptName";
335:
336: /** Default contextPath for ServerData */
337: static final String DEFAULT_CONTEXT_PATH_KEY = "serverdata.default.contextPath";
338: }
|