001// Licensed under the Apache License, Version 2.0 (the "License");
002// you may not use this file except in compliance with the License.
003// You may obtain a copy of the License at
004//
005// http://www.apache.org/licenses/LICENSE-2.0
006//
007// Unless required by applicable law or agreed to in writing, software
008// distributed under the License is distributed on an "AS IS" BASIS,
009// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
010// See the License for the specific language governing permissions and
011// limitations under the License.
012
013package org.apache.tapestry5;
014
015import org.apache.tapestry5.corelib.base.AbstractField;
016import org.apache.tapestry5.corelib.components.AjaxFormLoop;
017import org.apache.tapestry5.corelib.components.BeanDisplay;
018import org.apache.tapestry5.corelib.components.BeanEditForm;
019import org.apache.tapestry5.corelib.components.BeanEditor;
020import org.apache.tapestry5.corelib.components.Errors;
021import org.apache.tapestry5.corelib.mixins.FormGroup;
022import org.apache.tapestry5.http.TapestryHttpConstants;
023import org.apache.tapestry5.http.TapestryHttpSymbolConstants;
024import org.apache.tapestry5.http.services.BaseURLSource;
025import org.apache.tapestry5.internal.services.AssetDispatcher;
026import org.apache.tapestry5.internal.services.rest.DefaultOpenApiDescriptionGenerator;
027import org.apache.tapestry5.modules.NoBootstrapModule;
028import org.apache.tapestry5.services.Html5Support;
029import org.apache.tapestry5.services.assets.AssetPathConstructor;
030import org.apache.tapestry5.services.assets.ResourceMinimizer;
031import org.apache.tapestry5.services.compatibility.Trait;
032import org.apache.tapestry5.services.javascript.JavaScriptStack;
033import org.apache.tapestry5.services.rest.OpenApiDescriptionGenerator;
034
035/**
036 * Defines the names of symbols used to configure Tapestry.
037 *
038 * @see org.apache.tapestry5.ioc.services.SymbolSource
039 */
040public class SymbolConstants
041{
042    /**
043     * A comma separated list of execution modes used to control how the application is initialized.
044     * Each modes can contribute a list (comma separated) of Module classes to be loaded during startup,
045     * the order in which they appear is preserved.
046     * The default value is: <code>production</code>.
047     * This is an alias for {@link TapestryHttpSymbolConstants#EXECUTION_MODE}.
048     */
049    public static final String EXECUTION_MODE = TapestryHttpSymbolConstants.EXECUTION_MODE;
050    /**
051     * Indicates whether Tapestry is running in production mode or developer mode. This affects a large
052     * number of Tapestry behaviors related to performance and security, including how exceptions are
053     * reported, whether far-future expire headers are emitted, whether JavaScript files may be combined,
054     * whether JSON is compressed, whether component field and parameter values are shadowed to instance
055     * variables (to assist with debugging), and more.
056     * 
057     * This is an alias to {@link TapestryHttpSymbolConstants#PRODUCTION_MODE}.
058     */
059    public static final String PRODUCTION_MODE = TapestryHttpSymbolConstants.PRODUCTION_MODE;
060
061    /**
062     * A version of {@link TapestryHttpSymbolConstants#PRODUCTION_MODE} as a symbol reference. This can be used as the default value
063     * of other symbols, to indicate that their default matches whatever PRODUCTION_MODE is set to, which is quite
064     * common.
065     *
066     * @since 5.2.0
067     */
068    public static final String PRODUCTION_MODE_VALUE = String.format("${%s}", TapestryHttpSymbolConstants.PRODUCTION_MODE);
069
070    /**
071     * The list of locales supported by the application; locales identified in the incoming request are "narrowed" to
072     * one of these values. The first locale name in the list is the default locale used when no proper match can be
073     * found.
074     */
075    public static final String SUPPORTED_LOCALES = "tapestry.supported-locales";
076
077    /**
078     * Controls whether whitespace is compressed by default in templates, or left as is. The factory default is to
079     * compress whitespace. (This can also be overridden using the xml:space attribute inside template elements.)
080     */
081    public static final String COMPRESS_WHITESPACE = "tapestry.compress-whitespace";
082
083    /**
084     * Time interval defining how often Tapestry will check for updates to local files (including classes).
085     * Starting with 5.3, this is only used when not running in production mode. The default is "1 s"
086     * (one second), which is appropriate for development. With Tapestry 5.2 and earlier this number
087     * should be raised in a production environment.
088     */
089    public static final String FILE_CHECK_INTERVAL = "tapestry.file-check-interval";
090
091    /**
092     * Time interval that sets how long Tapestry will wait to obtain the exclusive lock needed to check local files. The
093     * default is "50 ms". Starting with 5.3, this is only used when not running in production mode.
094     */
095    public static final String FILE_CHECK_UPDATE_TIMEOUT = "tapestry.file-check-update-timeout";
096
097    /**
098     * The version number of the core Tapestry framework, or UNKNOWN if the version number is not available (which
099     * should only occur when developing Tapestry).
100     * This is an alias for {@link TapestryHttpSymbolConstants#CHARSET}.
101     */
102    public static final String TAPESTRY_VERSION = TapestryHttpConstants.TAPESTRY_VERSION;
103
104    /**
105     * The location of the application-wide component messages catalog, relative to the web application context. This
106     * will normally be <code>WEB-INF/app.properties</code>.
107     */
108    public static final String APPLICATION_CATALOG = "tapestry.app-catalog";
109
110    /**
111     * The charset used when rendering page markup; the charset is also used as the request encoding when handling
112     * incoming requests. The default is "UTF-8".
113     * This is an alias for {@link TapestryHttpSymbolConstants#CHARSET}.
114     */
115    public static final String CHARSET = TapestryHttpSymbolConstants.CHARSET;
116
117    /**
118     * Used as the default for the Form's autofocus and clientValidation parameters. If overridden to "false", then
119     * Forms will not (unless explicitly specified) use client validation or autofocus, which in turn, means that most
120     * pages with Forms will not make use of the Tapestry JavaScript stack.
121     */
122    public static final String FORM_CLIENT_LOGIC_ENABLED = "tapestry.form-client-logic-enabled";
123
124    /**
125     * Name of page used to report exceptions; the page must implement
126     * {@link org.apache.tapestry5.services.ExceptionReporter}.
127     * This is used by the default exception report handler service.
128     */
129    public static final String EXCEPTION_REPORT_PAGE = "tapestry.exception-report-page";
130
131    /**
132     * Identifies the default persistence strategy for all pages that do not provide an override (using this value as
133     * {@link org.apache.tapestry5.annotations.Meta key}).
134     *
135     * @since 5.1.0.0
136     */
137    public static final String PERSISTENCE_STRATEGY = "tapestry.persistence-strategy";
138
139    /**
140     * Minimum output stream size, in bytes, before output is compressed using GZIP. Shorter streams are not compressed.
141     * Tapestry buffers this amount and switches to a GZIP output stream as needed. The default is "100".
142     * This is an alias to {@link TapestryHttpSymbolConstants#MIN_GZIP_SIZE}.
143     *
144     * @see TapestryHttpSymbolConstants#GZIP_COMPRESSION_ENABLED
145     * @since 5.1.0.0
146     */
147    public static final String MIN_GZIP_SIZE = TapestryHttpSymbolConstants.MIN_GZIP_SIZE;
148
149    /**
150     * Version number of the application. Prior to 5.4, this version number was integrated into asset URLs. Starting
151     * with 5.4, a checksum of the individual asset's content is used instead, and this version number is only used
152     * for documentation purposes; it appears in the default exception report page, for example.
153     *
154     * The default value is "0.0.1".  In 5.3 and earlier, the default value was a random hexadecimal string.
155     * 
156     * This is an alias to {@link TapestryHttpSymbolConstants#APPLICATION_VERSION}.
157     *
158     * @see AssetDispatcher
159     * @see AssetPathConstructor
160     * @since 5.1.0.0
161     */
162    public static final String APPLICATION_VERSION = TapestryHttpSymbolConstants.APPLICATION_VERSION;
163
164    /**
165     * Used to omit the normal Tapestry framework generator meta tag. The meta tag is rendered by default, but clients
166     * who do not wish to advertise their use of Tapestry may set this symbol to "true".
167     *
168     * @since 5.1.0.0
169     */
170    public static final String OMIT_GENERATOR_META = "tapestry.omit-generator-meta";
171
172    /**
173     * If "true" (the default) then GZip compression is enabled for dynamic requests and for static assets. If you are
174     * using a server that handles GZip compression for you, or you don't want to use the extra processing power
175     * necessary to GZIP requests, then override this to "false".
176     * This is an alias to {@link TapestryHttpSymbolConstants#GZIP_COMPRESSION_ENABLED}.
177     *
178     * @see TapestryHttpSymbolConstants#MIN_GZIP_SIZE
179     * @see org.apache.tapestry5.http.services.ResponseCompressionAnalyzer
180     * @see org.apache.tapestry5.http.services.CompressionAnalyzer
181     * @since 5.1.0.0
182     */
183    public static final String GZIP_COMPRESSION_ENABLED = TapestryHttpSymbolConstants.GZIP_COMPRESSION_ENABLED;
184
185    /**
186     * If "true" (which itself defaults to production mode), then the {@link org.apache.tapestry5.annotations.Secure}
187     * annotation will be honored. If "false" (i.e., development mode), then the annotation and related HTTP/HTTPS
188     * logic is ignored.
189     *
190     * @since 5.1.0.1
191     */
192    public static final String SECURE_ENABLED = "tapestry.secure-enabled";
193
194    /**
195     * If "true" (the default), then the {@link org.apache.tapestry5.services.PersistentLocale} will be encoded into the
196     * {@link org.apache.tapestry5.http.Link} path by the {@link org.apache.tapestry5.services.ComponentEventLinkEncoder}
197     * service. If overridden to "false" this does not occur, but you should provide a
198     * {@link org.apache.tapestry5.services.LinkCreationListener2} (registered with the
199     * {@link org.apache.tapestry5.services.LinkCreationHub}) in order to add the locale as a query parameter (or
200     * provide some alternate means of persisting the locale between requests).
201     *
202     * @since 5.1.0.1
203     */
204    public static final String ENCODE_LOCALE_INTO_PATH = "tapestry.encode-locale-into-path";
205
206    /**
207     * If "true" then JavaScript files in a {@link JavaScriptStack} will be combined into a single virtual JavaScript
208     * file. Defaults to "true" in production mode.
209     *
210     * @since 5.1.0.2
211     */
212    public static final String COMBINE_SCRIPTS = "tapestry.combine-scripts";
213
214
215    /**
216     * The default time interval that cookies created by Tapestry will be kept in the client web browser. The default is
217     * "7 d" (that is, seven days).
218     *
219     * @since 5.2.0
220     */
221    public static final String COOKIE_MAX_AGE = "tapestry.default-cookie-max-age";
222
223    /**
224     * The logical name of the start page, the page that is rendered for the root URL.
225     *
226     * @since 5.2.0
227     */
228    public static final String START_PAGE_NAME = "tapestry.start-page-name";
229
230    /**
231     * The default stylesheet automatically inserted into every rendered HTML page when
232     * no Bootstrap version is enabled (i.e both {@link Trait#BOOTSTRAP_3} and {@link Trait#BOOTSTRAP_4}
233     * traits are disabled, something done by {@linkplain NoBootstrapModule}). 
234     * 
235     * It was deprecated in 5.4 with no replacement (the stylesheet is now associated with the core {@link JavaScriptStack}.),
236     * but undeprecated in 5.5.0 with the caveat described above.
237     *
238     * @see NoBootstrapModule
239     * @since 5.2.0
240     */
241    public static final String DEFAULT_STYLESHEET = "tapestry.default-stylesheet";
242
243    /**
244     * The Asset path to the embedded copy of script.aculo.us packaged with Tapestry.
245     *
246     * @since 5.2.0
247     */
248    public static final String SCRIPTACULOUS = "tapestry.scriptaculous";
249
250    /**
251     * The Asset path to the embedded datepicker.
252     *
253     * @since 5.2.0
254     */
255    public static final String DATEPICKER = "tapestry.datepicker";
256
257    /**
258     * If "true", then JSON page initialization content is compressed; if "false"
259     * then extra white space is added (pretty printing). Defaults to "true" in production mode.
260     *
261     * @since 5.2.0
262     */
263    public static final String COMPACT_JSON = "tapestry.compact-json";
264
265    /**
266     * If "true" and {@link TapestryHttpSymbolConstants#PRODUCTION_MODE} is off, comments will be rendered before and after the rendering of any
267     * component
268     * allowing more visibility into which components rendered which markup. Defaults to "false". Component render
269     * tracing may be
270     * enabled per-request by the presence of a request parameter "t:component-trace" with a value of "true".
271     *
272     * @since 5.2.5
273     */
274    public static final String COMPONENT_RENDER_TRACING_ENABLED = "tapestry.component-render-tracing-enabled";
275
276    /**
277     * The hostname that application should use when constructing an absolute URL. The default is "", i.e. an empty
278     * string,
279     * in which case system will use request.getServerName(). Not the same as environment variable HOSTNAME, but you can
280     * also
281     * contribute "$HOSTNAME" as the value to make it the same as the environment variable HOSTNAME.
282     * This is an alias to {@link TapestryHttpSymbolConstants#HOSTNAME}.
283     *
284     * @since 5.3
285     */
286    public static final String HOSTNAME = TapestryHttpSymbolConstants.HOSTNAME;
287
288    /**
289     * The hostport that application should use when constructing an absolute URL. The default is "0", i.e. use the port
290     * value from
291     * the request. This is an alias to {@link TapestryHttpSymbolConstants#HOSTPORT}.
292     *
293     * @since 5.3
294     */
295    public static final String HOSTPORT = TapestryHttpSymbolConstants.HOSTPORT;
296
297    /**
298     * The secure (https) hostport that application should use when constructing an absolute URL. The default is "0",
299     * i.e. use
300     * the value from the request.
301     * This is an alias to {@link TapestryHttpSymbolConstants#HOSTPORT_SECURE}.
302     *
303     * @since 5.3
304     */
305    public static final String HOSTPORT_SECURE = TapestryHttpSymbolConstants.HOSTPORT_SECURE;
306
307    /**
308     * If "true", then resources (individually or when aggregated into stacks) will be minimized via the
309     * {@link ResourceMinimizer} service. If "false", then minification is disabled. Tracks production mode
310     * (minification is normally disabled in development mode).
311     *
312     * Note that Tapestry's default implementation of {@link ResourceMinimizer} does nothing; minification is provided
313     * by add-on libraries.
314     *
315     * @since 5.3
316     */
317    public static final String MINIFICATION_ENABLED = "tapestry.enable-minification";
318
319    /**
320     * If "true" then at the end of each request the
321     * {@link org.apache.tapestry5.http.services.SessionPersistedObjectAnalyzer} will be called on each session persisted
322     * object that was accessed during the request.
323     *
324     * This is provided as a performance enhancement for servers that do not use clustered sessions.
325     *
326     * The default is {@code true}, to preserve 5.2 behavior. For non-clustered applications (the majority), this value should be
327     * overridden to {@code false}. A future release of Tapestry may change the default.
328     * 
329     * This is an alias to {@link TapestryHttpSymbolConstants#CLUSTERED_SESSIONS}.
330     *
331     * @since 5.3
332     */
333    public static final String CLUSTERED_SESSIONS = TapestryHttpSymbolConstants.CLUSTERED_SESSIONS;
334
335    /**
336     * The name of a folder in which the Tapestry application executes. Prior to 5.3, a Tapestry application always responded to all
337     * URLs in the context under the context root; by setting this to the name of a folder, the T5 URLs will be inside that folder only, and should
338     * match a corresponding entry in the {@code web.xml} configuration file.  This is useful when running multiple servlets within the same web application (such as when migrating
339     * from Tapestry 4 or some other framework, to Tapestry 5).
340     * Effectively, if this symbol is set to a value, that folder name will be placed after the context path
341     * (typically "/") and before the locale, page name, or other prefix.  For example, if this symbol is set to "app", the {@code web.xml <url-pattern>} should be set to {@code /app/*}, and Tapestry will
342     * only be in invoked by the servlet container for requests inside the virtual {@code app} folder.
343     *
344     * This also affects the search for page templates (which are allowed within the web context). When set to a non-blank value, page templates are searched for in the folder, rather than in the root context.
345     *
346     * The default value is the empty string, which preserves Tapestry 5.2 behavior (and continues to be appropriate for most applications).
347     *
348     * Note that while Tapestry is case-insensitive, the servlet container is not, so the configured value must exactly match
349     * the folder name inside the {@code <url-parameter>} value, including case.
350     *
351     * @since 5.3
352     */
353    public static final String APPLICATION_FOLDER = "tapestry.application-folder";
354
355    /**
356     * Boolean value to indicate if every {@link  org.apache.tapestry5.Asset} should be fully qualified or not.
357     * Default to <code>false</code> meaning no Asset URL will be fully qualified.
358     *
359     * @since 5.3
360     */
361    public static final String ASSET_URL_FULL_QUALIFIED = "tapestry.asset-url-fully-qualified";
362
363    /**
364     * Prefix to be used for all resource paths, used to recognize which requests are for assets. This value
365     * is appended to the context path and the (optional {@linkplain #APPLICATION_FOLDER application folder}.
366     * It may contain slashes, but should not begin or end with one.
367     *
368     * The default is "assets".
369     */
370    public static final String ASSET_PATH_PREFIX = "tapestry.asset-path-prefix";
371
372
373    /**
374     * Prefix used for all module resources. This may contain slashes, but should not being or end with one.
375     * Tapestry will create two {@link org.apache.tapestry5.http.services.Dispatcher}s from this: one for normal
376     * modules, the other for GZip compressed modules (by appending ".gz" to this value).
377     *
378     * The default is "modules".
379     *
380     * @since 5.4
381     */
382    public static final String MODULE_PATH_PREFIX = "tapestry.module-path-prefix";
383
384    /**
385     * Identifies the context path of the application, as determined from {@link javax.servlet.ServletContext#getContextPath()}.
386     * This is either a blank string or a string that starts with a slash but does not end with one.
387     * This is an alias to {@link TapestryHttpSymbolConstants#CONTEXT_PATH}.
388     *
389     * @since 5.4
390     */
391    public static final String CONTEXT_PATH = TapestryHttpSymbolConstants.CONTEXT_PATH;
392
393    /**
394     * A passphrase used as the basis of hash-based message authentication (HMAC) for any object stream data stored on
395     * the client.  The default phrase is the empty string, which will result in a logged runtime <em>error</em>.
396     * You should configure this to a reasonable value (longer is better) and ensure that all servers in your cluster
397     * share the same value (configuring this in code, rather than the command line, is preferred).
398     *
399     * @see org.apache.tapestry5.services.ClientDataEncoder
400     * @since 5.3.6
401     */
402    public static final String HMAC_PASSPHRASE = "tapestry.hmac-passphrase";
403
404    /**
405     * The root asset path for Twitter Bootstrap; if your application uses a modified version of Bootstrap,
406     * you can override this symbol to have Tapestry automatically use your version. The value should be a path
407     * to a folder (under "classpath:" or "context:") and should not include a trailing slash.
408     *
409     * @since 5.4
410     */
411    public static final String BOOTSTRAP_ROOT = "tapestry.bootstrap-root";
412
413    /**
414     * The root asset path for Font Awesome; if your application uses a modified version of it,
415     * you can override this symbol to have Tapestry automatically use your version. The value should be a path
416     * to a folder (under "classpath:" or "context:") and should not include a trailing slash.
417     *
418     * @since 5.5
419     */
420    public static final String FONT_AWESOME_ROOT = "tapestry.font-awesome-root";
421
422    /**
423     * Tapestry relies on an underlying client-side JavaScript infrastructure framework to handle DOM manipulation,
424     * event handling, and Ajax requests. Through Tapestry 5.3, the foundation was
425     * <a href="http://http://prototypejs.org/">Prototype</a>. In 5.4, support for
426     * <a href="http://jquery.org/">jQuery</a> has been added, and it is possible to add others. This symbol defines a value that is used to select
427     * a resource that is provided to the {@link org.apache.tapestry5.services.javascript.ModuleManager} service
428     * as a {@link org.apache.tapestry5.services.javascript.JavaScriptModuleConfiguration} to provide a specific implementation
429     * of the {@code t5/core/dom} module. Tapestry 5.4 directly supports "prototype" or "jquery".  To support
430     * other foundation frameworks, override this symbol value and supply your own module configuration.
431     *
432     * In Tapestry 5.4, this defaults to "prototype" for compatibility with 5.3. This will likely change in
433     * 5.5 to default to "jquery". At some point in the future, Prototype support will no longer be present.
434     *
435     * @since 5.4
436     */
437    public static final String JAVASCRIPT_INFRASTRUCTURE_PROVIDER = "tapestry.javascript-infrastructure-provider";
438
439    /**
440     * If true (the default), then Tapestry will apply locking semantics around access to the {@link javax.servlet.http.HttpSession}.
441     * Reading attribute names occurs with a shared read lock; getting or setting an attribute upgrades to an exclusive write lock.
442     * This can tend to serialize threads when a number of simultaneous (Ajax) requests from the client arrive ... however,
443     * many implementations of HttpSession are not thread safe, and often mutable objects are stored in the session and shared
444     * between threads. Leaving this on the default will yield a more robust application; setting it to false may speed
445     * up processing for more Ajax intensive applications (but care should then be given to ensuring that objects shared inside
446     * the session are themselves immutable or thread-safe).
447     * 
448     * This is an alias to {@link TapestryHttpSymbolConstants#SESSION_LOCKING_ENABLED}.
449     *
450     * @since 5.4
451     */
452    public static final String SESSION_LOCKING_ENABLED = TapestryHttpSymbolConstants.SESSION_LOCKING_ENABLED;
453
454    /**
455     * If true (the default), then Tapestry will automatically include the "core" stack in all
456     * pages.
457     *
458     * @see <a href="https://issues.apache.org/jira/browse/TAP5-2169">TAP5-2169</a>
459     * @since 5.4
460     */
461    public static final String INCLUDE_CORE_STACK = "tapestry.include-core-stack";
462
463    /**
464     * Defines the CSS class that will be given to HTML element (usually a div) &lt;div&gt; generated by
465     * the {@linkplain FormGroup} mixin and the
466     * {@linkplain BeanEditForm} and {@linkplain BeanEditor}
467     * components surrounding the label and the field. If the value isn't 
468     * {@code form-group}, the div will have {@code class="form-group [value]}.
469     * The default value is <code>form-group</code>.
470     *
471     * @see <a href="https://issues.apache.org/jira/browse/TAP5-2182">TAP5-2182</a>
472     * @since 5.4
473     */
474    public static final String FORM_GROUP_WRAPPER_CSS_CLASS = "tapestry.form-group-wrapper-css-class";
475
476    /**
477     * Defines the name of the HTML element that will surround the HTML form field generated by
478     * the {@linkplain FormGroup} mixin and the {@linkplain BeanEditForm} and {@linkplain BeanEditor}.
479     * If this symbol is null or an empty string, no element will be generated surrouding the
480     * form field. The default value is the empty string (no wrapping).
481     *
482     * @see <a href="https://issues.apache.org/jira/browse/TAP5-2182">TAP5-2182</a>
483     * @see #FORM_GROUP_FORM_FIELD_WRAPPER_ELEMENT_CSS_CLASS
484     * @since 5.4
485     */
486    public static final String FORM_GROUP_FORM_FIELD_WRAPPER_ELEMENT_NAME = "tapestry.form-group-form-field-wrapper-element-name";
487
488    /**
489     * Defines the CSS class of the HTML element generated by
490     * the {@linkplain FormGroup} mixin and the {@linkplain BeanEditForm} and {@linkplain BeanEditor}.
491     * when {@linkplain #FORM_GROUP_FORM_FIELD_WRAPPER_ELEMENT_NAME} is not set to null or the empty string.
492     * The default value is the empty string (no CSS class added).
493     *
494     * @see <a href="https://issues.apache.org/jira/browse/TAP5-2182">TAP5-2182</a>
495     * @since 5.4
496     */
497    public static final String FORM_GROUP_FORM_FIELD_WRAPPER_ELEMENT_CSS_CLASS = "tapestry.form-group-form-field-wrapper-element-css-class";
498
499    /**
500     * Defines the CSS class that will be given to &lt;label&gt; element generated by
501     * the {@linkplain FormGroup} mixin and the
502     * {@linkplain BeanEditForm} and {@linkplain BeanEditor}
503     * components. The default value is <code>control-label</code>.
504     *
505     * @see <a href="https://issues.apache.org/jira/browse/TAP5-2182">TAP5-2182</a>
506     * @since 5.4
507     */
508    public static final String FORM_GROUP_LABEL_CSS_CLASS = "tapestry.form-group-label-css-class";
509
510    /**
511     * Defines the CSS class that will be given to form field components which are
512     * {@linkplain AbstractField} subclasses. The default value is <code>form-control</code>.
513     *
514     * @see <a href="https://issues.apache.org/jira/browse/TAP5-2182">TAP5-2182</a>
515     * @since 5.4
516     */
517    public static final String FORM_FIELD_CSS_CLASS = "tapestry.form-field-css-class";
518
519    /**
520     * Defines the CSS class that will be given to the &lt;dl&gt; HTML element generated by
521     * {@linkplain BeanDisplay}. The default value is <code>well dl-horizontal</code>.
522     *
523     * @since 5.5
524     */
525    public static final String BEAN_DISPLAY_CSS_CLASS = "tapestry.bean-display-css-class";
526
527    /**
528     * Defines the CSS class that will be given to the &lt;div&gt; HTML element generated by
529     * {@linkplain BeanEditor}/{@linkplain BeanEditForm} for boolean properties.
530     * The default value is <code>input-group</code>.
531     *
532     * @since 5.5
533     */
534    public static final String BEAN_EDITOR_BOOLEAN_PROPERTY_DIV_CSS_CLASS = "tapestry.bean-editor-boolean-property-div-css-class";
535
536    /**
537     * Defines the CSS class that will be given to the HTML element generated by
538     * {@linkplain Error}. If the value isn't <code>help-block</code>, the class attribute
539     * will be <code>help-block [symbol value]</code>
540     * The default value is <code>help-block</code>.
541     *
542     * @since 5.5
543     */
544    public static final String ERROR_CSS_CLASS = "tapestry.error-css-class";
545
546    /**
547     * Defines the CSS class that will be given to the add row link generated by
548     * {@linkplain AjaxFormLoop}. The default value is <code>btn btn-default btn-sm</code>.
549     *
550     * @since 5.5
551     */
552    public static final String AJAX_FORM_LOOP_ADD_ROW_LINK_CSS_CLASS = "tapestry.ajax-form-loop-add-row-link-css-class";
553    
554    /**
555     * Defines the prefix of the CSS class that will be given to the outer &lt;div&gt; element generated by
556     * {@linkplain Errors}. The value of {@linkplain Errors}'s <code>class</code> parameter appended
557     * after the prefix and a space character. The default value is <code>alert-dismissable</code>.
558     *
559     * @since 5.5
560     */
561    public static final String ERRORS_BASE_CSS_CLASS = "tapestry.errors-base-css-class";
562
563    /**
564     * Defines the default value of the {@linkplain Errors}'s <code>class</code> parameter.
565     * The default value for this symbol is <code>alert alert-danger</code>.
566     *
567     * @since 5.5
568     */
569    public static final String ERRORS_DEFAULT_CLASS_PARAMETER_VALUE = "tapestry.errors-default-class-parameter-value";
570
571    /**
572     * Defines the CSS class that will be given to the close &lt;button&gt; generated by
573     * {@linkplain Errors}. The default value is <code>close</code>.
574     *
575     * @since 5.5
576     */
577    public static final String ERRORS_CLOSE_BUTTON_CSS_CLASS = "tapestry.errors-close-button-css-class";
578
579    /**
580     * Defines whether {@link java.text.DateFormat} instances created by Tapestry should be
581     * lenient or not by default. The default value is <code>false</code>.
582     *
583     * @since 5.4
584     */
585    public static final String LENIENT_DATE_FORMAT = "tapestry.lenient-date-format";
586
587    /**
588     * The directory to which exception report files should be written. The default is appropriate
589     * for development: {@code build/exceptions}, and should be changed for production.
590     *
591     * @see org.apache.tapestry5.services.ExceptionReporter
592     * @since 5.4
593     */
594
595    public static final String EXCEPTION_REPORTS_DIR = "tapestry.exception-reports-dir";
596
597    /**
598     * Defines whether {@link org.apache.tapestry5.internal.services.assets.CSSURLRewriter} will throw an exception when a CSS file
599     * references an URL which doesn't exist. The default value is <code>false</code>.
600     *
601     * @since 5.4
602     */
603    public static final String STRICT_CSS_URL_REWRITING = "tapestry.strict-css-url-rewriting";
604
605    /**
606     * When an asset (typically, a JavaScript module) is streamed without an explicit expiration header, then
607     * this value is sent as the {@code Cache-Control} header; the default is "max-age=60, must-revalidate". Setting
608     * max-age to a value above zero significantly reduces the number of client requests for module content, as client
609     * browsers will then cache previously downloaded versions. For normal assets, which are immutable, and fingerprinted with
610     * a content hash, there is no need to set max age, and instead, a far-future expiration date is provided.
611     *
612     * @since 5.4
613     */
614    public static final String OMIT_EXPIRATION_CACHE_CONTROL_HEADER = "tapestry.omit-expiration-cache-control-header";
615
616    /**
617     * Defines whether HTML5 features should be used. Value used in the default implementation of
618     * {@link Html5Support#isHtml5SupportEnabled()}. Default value: <code>false</code>.
619     *
620     * @see Html5Support#isHtml5SupportEnabled()
621     * @since 5.4
622     */
623    public static final String ENABLE_HTML5_SUPPORT = "tapestry.enable-html5-support";
624
625    /**
626     * A general switch for restrictive environments, such as Google App Engine, which forbid some useful operations,
627     * such as creating files or directories. Defaults to false.
628     *
629     * @since 5.4
630     */
631    public static final String RESTRICTIVE_ENVIRONMENT = "tapestry.restrictive-environment";
632
633    /**
634     * If true, then when a page includes any JavaScript, a {@code script} block is added to insert
635     * a pageloader mask into the page; the pageloader mask ensure that the user can't interact with the page
636     * until after the page is fully initialized.
637     *
638     * @since 5.4
639     */
640    public static final String ENABLE_PAGELOADING_MASK = "tapestry.enable-pageloading-mask";
641
642    /**
643     * Controls in what environment page preloading should occur. By default, preloading only occurs
644     * in production.
645     *
646     * @see org.apache.tapestry5.services.pageload.PagePreloader
647     * @see org.apache.tapestry5.services.pageload.PreloaderMode
648     * @since 5.4
649     */
650    public static final String PRELOADER_MODE = "tapestry.page-preload-mode";
651    
652    /**
653     * Defines the OpenAPI version to be used in the generated OpenAPI description.
654     * Default value is <code>3.0.0</code>.
655     * @see DefaultOpenApiDescriptionGenerator
656     * @see OpenApiDescriptionGenerator
657     * @since 5.8.0
658     */
659    public static final String OPENAPI_VERSION = "tapestry.openapi-version";
660    
661    /**
662     * Defines the title of this application in the generated OpenAPI description. No default value is provided.
663     * @see DefaultOpenApiDescriptionGenerator
664     * @see OpenApiDescriptionGenerator
665     * @since 5.8.0
666     */
667    public static final String OPENAPI_TITLE = "tapestry.openapi-title";
668
669    /**
670     * Defines the description of this application in the generated OpenAPI description. 
671     * No default value is provided.
672     * @see DefaultOpenApiDescriptionGenerator
673     * @see OpenApiDescriptionGenerator
674     * @since 5.8.0
675     */
676    public static final String OPENAPI_DESCRIPTION = "tapestry.openapi-description";
677
678    /**
679     * Defines the version of this application in the generated OpenAPI description (i.e. info/version). 
680     * No default value is provided.
681     * @see DefaultOpenApiDescriptionGenerator
682     * @see OpenApiDescriptionGenerator
683     * @since 5.8.0
684     */
685    public static final String OPENAPI_APPLICATION_VERSION = "tapestry.openapi-application-version";
686
687    /**
688     * Defines whether the OpenAPI description file of this application's REST endpoints should be 
689     * published or not. The default value is <code>false</code>.
690     * @see OpenApiDescriptionGenerator
691     * @see #OPENAPI_DESCRIPTION_PATH
692     * @since 5.8.0
693     */
694    public static final String PUBLISH_OPENAPI_DEFINITON = "tapestry.publish-openapi-description";
695
696    /**
697     * Defines the path the OpenAPI description file of this application's REST endpoints will be
698     * published. It should start with a slash. Default value is <code>/openapi.json</code>.
699     * The description will only be published if {{@link #PUBLISH_OPENAPI_DEFINITON} is set to
700     * <code>true</code>.
701     * @see OpenApiDescriptionGenerator
702     * @since 5.8.0
703     */
704    public static final String OPENAPI_DESCRIPTION_PATH = "tapestry.openapi-description-path";
705    
706    /**
707     * Defines a base path to the generated OpenAPI description relative to the application
708     * URL as defined by {@link BaseURLSource#getBaseURL(boolean)}. It should be either
709     * the empty string, meaning there's no base path, or a string starting and ending 
710     * with a slash. Default value is "/" (without the quotes)
711     * @see OpenApiDescriptionGenerator
712     * @since 5.8.0
713     */
714    public static final String OPENAPI_BASE_PATH = "tapestry.openapi-base-path";
715
716}