001 // Copyright 2008 The Apache Software Foundation
002 //
003 // Licensed under the Apache License, Version 2.0 (the "License");
004 // you may not use this file except in compliance with the License.
005 // You may obtain a copy of the License at
006 //
007 // http://www.apache.org/licenses/LICENSE-2.0
008 //
009 // Unless required by applicable law or agreed to in writing, software
010 // distributed under the License is distributed on an "AS IS" BASIS,
011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012 // See the License for the specific language governing permissions and
013 // limitations under the License.
014
015 package org.apache.tapestry5;
016
017 /**
018 * Defines the names of symbols used to configure Tapestry.
019 *
020 * @see org.apache.tapestry5.ioc.services.SymbolSource
021 */
022 public class SymbolConstants
023 {
024 /**
025 * Indicates whether Tapestry is running in production mode or developer mode. The primary difference is how
026 * exceptions are reported.
027 */
028 public static final String PRODUCTION_MODE = "tapestry.production-mode";
029
030 /**
031 * Symbol which may be set to "true" to force the use of absolute URIs (not relative URIs) exclusively.
032 */
033 public static final String FORCE_ABSOLUTE_URIS = "tapestry.force-absolute-uris";
034
035 /**
036 * If set to true, then action requests will render a page markup response immediately, rather than sending a
037 * redirect to render the response.
038 */
039 public static final String SUPPRESS_REDIRECT_FROM_ACTION_REQUESTS = "tapestry.suppress-redirect-from-action-requests";
040
041 /**
042 * The list of locales supported by the application; locales identified in the incoming request are "narrowed" to
043 * one of these values.
044 */
045 public static final String SUPPORTED_LOCALES = "tapestry.supported-locales";
046
047 /**
048 * Controls whether whitespace is compressed by default in templates, or left as is. The factory default is to
049 * compress whitespace. This can be overridden using the xml:space attribute inside template elements.
050 */
051 public static final String COMPRESS_WHITESPACE = "tapestry.compress-whitespace";
052
053 /**
054 * Time interval defining how often Tapestry will check for updates to local files (including classes). This number
055 * can be raised in a production environment.
056 */
057 public static final String FILE_CHECK_INTERVAL = "tapestry.file-check-interval";
058
059 /**
060 * Time interval that sets how long Tapestry will wait to obtain the exclusive lock needed to check local files.
061 */
062 public static final String FILE_CHECK_UPDATE_TIMEOUT = "tapestry.file-check-update-timeout";
063
064 /**
065 * The version number of the core Tapestry framework, or UNKNOWN if the version number is not available (which
066 * should only occur when developing Tapestry).
067 */
068 public static final String TAPESTRY_VERSION = "tapestry.version";
069
070 /**
071 * The location of the application-wide component messages catalog, relative to the web application context. This
072 * will normally be <code>WEB-INF/app.properties</code>.
073 */
074 public static final String APPLICATION_CATALOG = "tapestry.app-catalog";
075
076 /**
077 * The charset used when rendering page markup; the charset is also used as ther request encoding when handling
078 * incoming requests. The default is "UTF-8".
079 */
080 public static final String CHARSET = "tapestry.charset";
081
082 /**
083 * Used as the default for the Form's autofocus and clientValidation parameters. If overridden to "false", then
084 * Forms will not (unless explicitly specified) use client validation or autofocus, which in turn, means that most
085 * pages with Forms will not make use of the Tapestry JavaScript stack.
086 */
087 public static final String FORM_CLIENT_LOGIC_ENABLED = "tapestry.form-client-logic-enabled";
088
089 /**
090 * Name of page used to report exceptions; the page must implement {@link org.apache.tapestry5.services.ExceptionReporter}.
091 * This is used by the default exception report handler service.
092 */
093 public static final String EXCEPTION_REPORT_PAGE = "tapestry.exception-report-page";
094
095 /**
096 * If true, then links for external JavaScript libraries are placed at the top of the document (just inside the
097 * <body> element). If false, the default, then the libraries are placed at the bottom of the document.
098 * Per-page initialization always goes at the bottom.
099 */
100 public static final String SCRIPTS_AT_TOP = "tapestry.script-at-top";
101 }