| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| InternalConstants |
|
| 0.0;0 |
| 1 | // Copyright 2006, 2007, 2008, 2009 The Apache Software Foundation | |
| 2 | // | |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); | |
| 4 | // you may not use this file except in compliance with the License. | |
| 5 | // You may obtain a copy of the License at | |
| 6 | // | |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 | // | |
| 9 | // Unless required by applicable law or agreed to in writing, software | |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, | |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 12 | // See the License for the specific language governing permissions and | |
| 13 | // limitations under the License. | |
| 14 | ||
| 15 | package org.apache.tapestry5.internal; | |
| 16 | ||
| 17 | import org.apache.tapestry5.ioc.util.TimeInterval; | |
| 18 | ||
| 19 | 0 | public final class InternalConstants |
| 20 | { | |
| 21 | /** | |
| 22 | * Init parameter used to identify the package from which application classes are loaded. Such classes are in the | |
| 23 | * pages, components and mixins sub-packages. | |
| 24 | */ | |
| 25 | public static final String TAPESTRY_APP_PACKAGE_PARAM = "tapestry.app-package"; | |
| 26 | ||
| 27 | /** | |
| 28 | * Turns off loading of default modules (as driven by JAR file Manifest entries). | |
| 29 | */ | |
| 30 | public static final String DISABLE_DEFAULT_MODULES_PARAM = "tapestry.disable-default-modules"; | |
| 31 | ||
| 32 | /** | |
| 33 | * The extension used for Tapestry component template files, <em>T</em>apestry <em>M</em>arkup <em>L</em>anguage. | |
| 34 | * Template files are well-formed XML files. | |
| 35 | */ | |
| 36 | public static final String TEMPLATE_EXTENSION = "tml"; | |
| 37 | ||
| 38 | /** | |
| 39 | * The name of the query parameter that stores the page activation context inside an action request. | |
| 40 | */ | |
| 41 | public static final String PAGE_CONTEXT_NAME = "t:ac"; | |
| 42 | ||
| 43 | /** | |
| 44 | * Name of event triggered by Grid sub-components when an in-place Grid is updated. | |
| 45 | */ | |
| 46 | public static final String GRID_INPLACE_UPDATE = "inplaceupdate"; | |
| 47 | ||
| 48 | /** | |
| 49 | * The name of a query parameter that stores the containing page (used in action links when the page containing the | |
| 50 | * component is not the same as the page that was rendering). The active page (the page which initiated the render) | |
| 51 | * is encoded into the URL, and the containing page is tacked on as this query parameter. | |
| 52 | */ | |
| 53 | public static final String CONTAINER_PAGE_NAME = "t:cp"; | |
| 54 | ||
| 55 | public static final String OBJECT_RENDER_DIV_SECTION = "t-env-data-section"; | |
| 56 | ||
| 57 | public static final String MIXINS_SUBPACKAGE = "mixins"; | |
| 58 | ||
| 59 | public static final String COMPONENTS_SUBPACKAGE = "components"; | |
| 60 | ||
| 61 | public static final String PAGES_SUBPACKAGE = "pages"; | |
| 62 | ||
| 63 | public static final String BASE_SUBPACKAGE = "base"; | |
| 64 | ||
| 65 | /** | |
| 66 | * Used in some Ajax scenarios to set the content type for the response early, when the Page instance (the authority | |
| 67 | * on content types) is known. The value is of type {@link org.apache.tapestry5.ContentType}. | |
| 68 | */ | |
| 69 | public static final String CONTENT_TYPE_ATTRIBUTE_NAME = "content-type"; | |
| 70 | ||
| 71 | public static final String CHARSET_CONTENT_TYPE_PARAMETER = "charset"; | |
| 72 | ||
| 73 | /** | |
| 74 | * Request attribute that stores a {@link org.apache.tapestry5.internal.structure.Page} instance that will be | |
| 75 | * rendered as the {@linkplain org.apache.tapestry5.SymbolConstants#SUPPRESS_REDIRECT_FROM_ACTION_REQUESTS immediate | |
| 76 | * mode response}. | |
| 77 | */ | |
| 78 | public static final String IMMEDIATE_RESPONSE_PAGE_ATTRIBUTE = "tapestry.immediate-response-page"; | |
| 79 | ||
| 80 | /** | |
| 81 | * Request attribute that forces {@link org.apache.tapestry5.internal.services.RequestPathOptimizer} to use not | |
| 82 | * optimize URLs (this is necessitated by {@link org.apache.tapestry5.services.PageDocumentGenerator}). Any non-null | |
| 83 | * value will force the URLs to be non-optimized. | |
| 84 | */ | |
| 85 | public static final String GENERATING_RENDERED_PAGE = "tapestry.generating-rendered-page"; | |
| 86 | ||
| 87 | /** | |
| 88 | * Required MIME type for JSON responses. If this MIME type is not used, the client-side Prototype code will not | |
| 89 | * recognize the response as JSON, and the Ajax.Response.responseJSON property will be null. | |
| 90 | */ | |
| 91 | public static final String JSON_MIME_TYPE = "application/json"; | |
| 92 | ||
| 93 | /** | |
| 94 | * Request attribute key; if non-null, then automatic GZIP compression of response stream is suppressed. This is | |
| 95 | * useful when the code opening the response stream wants to explicitly control whether GZIP compression occurs or | |
| 96 | * not. | |
| 97 | * | |
| 98 | * @since 5.1.0.0 | |
| 99 | */ | |
| 100 | public static final String SUPPRESS_COMPRESSION = "tapestry.supress-compression"; | |
| 101 | ||
| 102 | /** | |
| 103 | * Name of response header for content encoding. | |
| 104 | * | |
| 105 | * @since 5.1.0.0 | |
| 106 | */ | |
| 107 | public static final String CONTENT_ENCODING_HEADER = "Content-Encoding"; | |
| 108 | ||
| 109 | /** | |
| 110 | * Response content encoding value indicating use of GZIP compression. | |
| 111 | * | |
| 112 | * @since 5.1.0.0 | |
| 113 | */ | |
| 114 | public static final String GZIP_CONTENT_ENCODING = "gzip"; | |
| 115 | /** | |
| 116 | * Identifies the start of an expansion inside a template. | |
| 117 | */ | |
| 118 | public static final String EXPANSION_START = "${"; | |
| 119 | /** | |
| 120 | * Special prefix for parameters that are inherited from named parameters of their container. | |
| 121 | */ | |
| 122 | public static final String INHERIT_BINDING_PREFIX = "inherit:"; | |
| 123 | 2 | public static final long TEN_YEARS = new TimeInterval("10y").milliseconds(); |
| 124 | } |