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