Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Constants |
|
| 1.0;1 |
1 | /* | |
2 | * Licensed to the Apache Software Foundation (ASF) under one or more | |
3 | * contributor license agreements. See the NOTICE file distributed with | |
4 | * this work for additional information regarding copyright ownership. | |
5 | * The ASF licenses this file to you under the Apache License, Version 2.0 | |
6 | * (the "License"); you may not use this file except in compliance with | |
7 | * the License. You may obtain a copy of the License at | |
8 | * | |
9 | * http://www.apache.org/licenses/LICENSE-2.0 | |
10 | * | |
11 | * Unless required by applicable law or agreed to in writing, software | |
12 | * distributed under the License is distributed on an "AS IS" BASIS, | |
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
14 | * See the License for the specific language governing permissions and | |
15 | * limitations under the License. | |
16 | */ | |
17 | ||
18 | package org.apache.shale.remoting; | |
19 | ||
20 | /** | |
21 | * <p>Manifest constants related to Shale Remoting support.</p> | |
22 | */ | |
23 | public final class Constants { | |
24 | ||
25 | ||
26 | // ------------------------------------------------------------ Constructors | |
27 | ||
28 | ||
29 | /** | |
30 | * <p>Private constructor to avoid instantiation.</p> | |
31 | */ | |
32 | private Constants() { } | |
33 | ||
34 | ||
35 | // ------------------------------------------------------ Manifest Constants | |
36 | ||
37 | ||
38 | /** | |
39 | * <p>Context initialization parameter containing a comma-delimited list | |
40 | * of URL matching patterns for resource identifiers that will be | |
41 | * explicitly excluded. If not specified, the value of constant | |
42 | * CLASS_RESOURCES_EXCLUDES_DEFAULT will be used.</p> | |
43 | * | |
44 | * @since 1.0.4 | |
45 | */ | |
46 | public static final String CLASS_RESOURCES_EXCLUDES = | |
47 | "org.apache.shale.remoting.CLASS_RESOURCES_EXCLUDES"; | |
48 | ||
49 | ||
50 | /** | |
51 | * <p>Default value for the CLASS_RESOURCES_EXCLUDES context initialization | |
52 | * parameter if no explicit value is specified.</p> | |
53 | * | |
54 | * <p><strong>IMPLEMENTATION NOTE</strong> - The default exclude list | |
55 | * defined here will be prepended to any exclude list provided by the | |
56 | * application, with the result that it is not possible to configure | |
57 | * this processor to deliver resources matching these patterns.</p> | |
58 | * | |
59 | * @since 1.0.4 | |
60 | */ | |
61 | public static final String CLASS_RESOURCES_EXCLUDES_DEFAULT = | |
62 | "*.class,*.jsp,*.properties"; | |
63 | ||
64 | ||
65 | /** | |
66 | * <p>Context initialization parameter containing a comma-delimited list | |
67 | * of URL matching patterns for resource identifiers that will be | |
68 | * explicitly included. If not specified, the value of constant | |
69 | * CLASS_RESOURCES_INCLUDES_DEFAULT will be used.</p> | |
70 | * | |
71 | * @since 1.0.4 | |
72 | */ | |
73 | public static final String CLASS_RESOURCES_INCLUDES = | |
74 | "org.apache.shale.remoting.CLASS_RESOURCES_INCLUDES"; | |
75 | ||
76 | ||
77 | /** | |
78 | * <p>Default value for the CLASS_RESOURCES_INCLUDES context initialization | |
79 | * parameter if no explicit value is specified.</p> | |
80 | * | |
81 | * @since 1.0.4 | |
82 | */ | |
83 | public static final String CLASS_RESOURCES_INCLUDES_DEFAULT = | |
84 | "*.css,*.gif,*.html,*.jpg,*.js,*.png,*.txt,*.xml"; | |
85 | ||
86 | ||
87 | /** | |
88 | * <p>Context initialization parameter containing a comma-delimited list of | |
89 | * colon-delimited pairs, with each pair representing a URL matching pattern | |
90 | * (such as <code>/foo/*</code> or <code>*.foo</code>) and the fully qualified | |
91 | * class name of a {@link Processor} class to use for handling requests that | |
92 | * match the specified pattern. If no such parameter is specified, the | |
93 | * default value (<code>/static/*:org.apache.shale.remoting.impl.ClassResourceProcessor</code>) | |
94 | * is used. The {@link Mapping} instance for each pair will be configured | |
95 | * with <code>Mechanism.CLASS_RESOURCE</code>.</p> | |
96 | */ | |
97 | public static final String CLASS_RESOURCES_PARAM = | |
98 | "org.apache.shale.remoting.CLASS_RESOURCES"; | |
99 | ||
100 | ||
101 | /** | |
102 | * <p>Context initialization parameter containing a comma-delimited list | |
103 | * of URL matching patterns for resource identifiers that will be | |
104 | * explicitly excluded. If not specified, the value of constant | |
105 | * DYNAMIC_RESOURCES_EXCLUDES_DEFAULT will be used.</p> | |
106 | * | |
107 | * @since 1.0.4 | |
108 | */ | |
109 | public static final String DYNAMIC_RESOURCES_EXCLUDES = | |
110 | "org.apache.shale.remoting.DYNAMIC_RESOURCES_EXCLUDES"; | |
111 | ||
112 | ||
113 | /** | |
114 | * <p>Default value for the DYNAMIC_RESOURCES_EXCLUDES context initialization | |
115 | * parameter if no explicit value is specified.</p> | |
116 | * | |
117 | * <p><strong>IMPLEMENTATION NOTE</strong> - The default exclude list | |
118 | * defined here will be prepended to any exclude list provided by the | |
119 | * application, with the result that it is not possible to configure | |
120 | * this processor to deliver resources matching these patterns.</p> | |
121 | * | |
122 | * @since 1.0.4 | |
123 | */ | |
124 | public static final String DYNAMIC_RESOURCES_EXCLUDES_DEFAULT = | |
125 | "/application/*,/applicationScope/*,/facesContext/*,/request/*,/requestScope/*,/response/*,/session/*,/sessionScope/*,/view/*"; | |
126 | ||
127 | ||
128 | /** | |
129 | * <p>Context initialization parameter containing a comma-delimited list | |
130 | * of URL matching patterns for resource identifiers that will be | |
131 | * explicitly included. If not specified, the value of constant | |
132 | * DYNAMIC_RESOURCES_INCLUDES_DEFAULT will be used.</p> | |
133 | * | |
134 | * @since 1.0.4 | |
135 | */ | |
136 | public static final String DYNAMIC_RESOURCES_INCLUDES = | |
137 | "org.apache.shale.remoting.DYNAMIC_RESOURCES_INCLUDES"; | |
138 | ||
139 | ||
140 | /** | |
141 | * <p>Default value for the DYNAMIC_RESOURCES_INCLUDES context initialization | |
142 | * parameter if no explicit value is specified.</p> | |
143 | * | |
144 | * @since 1.0.4 | |
145 | */ | |
146 | 1 | public static final String DYNAMIC_RESOURCES_INCLUDES_DEFAULT = |
147 | null; | |
148 | ||
149 | ||
150 | /** | |
151 | * <p>Context initialization parameter containing a comma-delimited list of | |
152 | * colon-delimited pairs, with each pair representing a URL matching pattern | |
153 | * (such as <code>/foo/*</code> or <code>*.foo</code>) and the fully qualified | |
154 | * class name of a {@link Processor} class to use for handling requests that | |
155 | * match the specified pattern. If no such parameter is specified, the | |
156 | * default value (<code>/dynamic/*:org.apache.shale.remoting.impl.MethodBindingProcessor</code>) | |
157 | * is used. The {@link Mapping} instance for each pair will be configured | |
158 | * with <code>Mechanism.DYNAMIC_RESOURCE</code>.</p> | |
159 | */ | |
160 | public static final String DYNAMIC_RESOURCES_PARAM = | |
161 | "org.apache.shale.remoting.DYNAMIC_RESOURCES"; | |
162 | ||
163 | ||
164 | /** | |
165 | * <p>Context initialization parameter defining the name of the | |
166 | * Faces Servlet to be used for remoting requests. If not specified, | |
167 | * the last (or only) servlet definition for a servlet whose class is | |
168 | * <code>javax.faces.webapp.FacesServlet</code> is used.</p> | |
169 | */ | |
170 | public static final String FACES_SERVLET_NAME_PARAM = | |
171 | "org.apache.shale.remoting.FACES_SERVLET_NAME"; | |
172 | ||
173 | ||
174 | /** | |
175 | * <p>Context initialization parameter defining the zero-relative index | |
176 | * of the <code>servlet-mapping</code>, for the specified or default | |
177 | * <code>FacesServlet</code> servlet name, to use when generating | |
178 | * URLs for resources. If not specified, the default value is zero, | |
179 | * meaning that the first servlet mapping (in the order listed in | |
180 | * <code>web.xml</code>) will be used.</p> | |
181 | * | |
182 | * @since 1.0.4 | |
183 | */ | |
184 | public static final String FACES_SERVLET_URL_PARAM = | |
185 | "org.apache.shale.remoting.FACES_SERVLET_MAPPING_INDEX"; | |
186 | ||
187 | ||
188 | ||
189 | /** | |
190 | * <p>Context initialization parameter containing the fully qualified | |
191 | * class name of the {@link Mapping} implementation class to use. If | |
192 | * not specified, <code>org.apache.shale.remoting.impl.MappingImpl</code> | |
193 | * is used.</p> | |
194 | */ | |
195 | public static final String MAPPING_CLASS = | |
196 | "org.apache.shale.remoting.MAPPING_CLASS"; | |
197 | ||
198 | ||
199 | /** | |
200 | * <p>Servlet context attribute under which the {@link Mappings} instance | |
201 | * for this web application will be stored.</p> | |
202 | */ | |
203 | public static final String MAPPINGS_ATTR = | |
204 | "org.apache.shale.remoting.MAPPINGS"; | |
205 | ||
206 | ||
207 | /** | |
208 | * <p>Context initialization parameter containing the fully qualified | |
209 | * class name of the {@link Mappings} implementation class to use. If | |
210 | * not specified, <code>org.apache.shale.remoting.impl.MappingsImpl</code> | |
211 | * is used.</p> | |
212 | */ | |
213 | public static final String MAPPINGS_CLASS = | |
214 | "org.apache.shale.remoting.MAPPINGS_CLASS"; | |
215 | ||
216 | ||
217 | /** | |
218 | * <p>Context initialization parameter containing a comma-delimited list | |
219 | * of URL matching patterns for resource identifiers that will be | |
220 | * explicitly excluded. If not specified, the value of constant | |
221 | * OTHER_RESOURCES_EXCLUDES_DEFAULT will be used.</p> | |
222 | * | |
223 | * @since 1.0.4 | |
224 | */ | |
225 | public static final String OTHER_RESOURCES_EXCLUDES = | |
226 | "org.apache.shale.remoting.OTHER_RESOURCES_EXCLUDES"; | |
227 | ||
228 | ||
229 | /** | |
230 | * <p>Default value for the OTHER_RESOURCES_EXCLUDES context initialization | |
231 | * parameter if no explicit value is specified.</p> | |
232 | * | |
233 | * <p><strong>IMPLEMENTATION NOTE</strong> - The default exclude list | |
234 | * defined here will be prepended to any exclude list provided by the | |
235 | * application, with the result that it is not possible to configure | |
236 | * this processor to deliver resources matching these patterns.</p> | |
237 | * | |
238 | * @since 1.0.4 | |
239 | */ | |
240 | public static final String OTHER_RESOURCES_EXCLUDES_DEFAULT = | |
241 | "*.class,*.jsp,*.properties"; | |
242 | ||
243 | ||
244 | /** | |
245 | * <p>Context initialization parameter containing a comma-delimited list | |
246 | * of URL matching patterns for resource identifiers that will be | |
247 | * explicitly included. If not specified, the value of constant | |
248 | * OTHER_RESOURCES_INCLUDES_DEFAULT will be used.</p> | |
249 | * | |
250 | * @since 1.0.4 | |
251 | */ | |
252 | public static final String OTHER_RESOURCES_INCLUDES = | |
253 | "org.apache.shale.remoting.OTHER_RESOURCES_INCLUDES"; | |
254 | ||
255 | ||
256 | /** | |
257 | * <p>Default value for the OTHER_RESOURCES_INCLUDES context initialization | |
258 | * parameter if no explicit value is specified.</p> | |
259 | * | |
260 | * @since 1.0.4 | |
261 | */ | |
262 | public static final String OTHER_RESOURCES_INCLUDES_DEFAULT = | |
263 | "*.css,*.gif,*.html,*.jpg,*.js,*.png,*.xml"; | |
264 | ||
265 | ||
266 | /** | |
267 | * <p>Context initialization parameter containing a comma-delimited list of | |
268 | * colon-delimited pairs, with each pair representing a URL matching pattern | |
269 | * (such as <code>/foo/*</code> or <code>*.foo</code>) and the fully qualified | |
270 | * class name of a {@link Processor} class to use for handling requests that | |
271 | * match the specified pattern. No defaults for this mechanism are defined. | |
272 | * The {@link Mapping} instance for each pair will be configured | |
273 | * with <code>Mechanism.OTHER_RESOURCE</code>.</p> | |
274 | */ | |
275 | public static final String OTHER_RESOURCES_PARAM = | |
276 | "org.apache.shale.remoting.OTHER_RESOURCES"; | |
277 | ||
278 | ||
279 | /** | |
280 | * <p>Context initialization parameter containing a comma-delimited list | |
281 | * of URL matching patterns for resource identifiers that will be | |
282 | * explicitly excluded. If not specified, the value of constant | |
283 | * WEB_RESOURCES_EXCLUDES_DEFAULT will be used.</p> | |
284 | * | |
285 | * @since 1.0.4 | |
286 | */ | |
287 | public static final String WEBAPP_RESOURCES_EXCLUDES = | |
288 | "org.apache.shale.remoting.WEB_RESOURCES_EXCLUDES"; | |
289 | ||
290 | ||
291 | /** | |
292 | * <p>Default value for the WEB_RESOURCES_EXCLUDES context initialization | |
293 | * parameter if no explicit value is specified.</p> | |
294 | * | |
295 | * <p><strong>IMPLEMENTATION NOTE</strong> - The default exclude list | |
296 | * defined here will be prepended to any exclude list provided by the | |
297 | * application, with the result that it is not possible to configure | |
298 | * this processor to deliver resources matching these patterns.</p> | |
299 | * | |
300 | * @since 1.0.4 | |
301 | */ | |
302 | public static final String WEBAPP_RESOURCES_EXCLUDES_DEFAULT = | |
303 | "*.class,*.jsp,*.properties"; | |
304 | ||
305 | ||
306 | /** | |
307 | * <p>Context initialization parameter containing a comma-delimited list | |
308 | * of URL matching patterns for resource identifiers that will be | |
309 | * explicitly included. If not specified, the value of constant | |
310 | * WEB_RESOURCES_INCLUDES_DEFAULT will be used.</p> | |
311 | * | |
312 | * @since 1.0.4 | |
313 | */ | |
314 | public static final String WEBAPP_RESOURCES_INCLUDES = | |
315 | "org.apache.shale.remoting.WEB_RESOURCES_INCLUDES"; | |
316 | ||
317 | ||
318 | /** | |
319 | * <p>Default value for the WEB_RESOURCES_INCLUDES context initialization | |
320 | * parameter if no explicit value is specified.</p> | |
321 | * | |
322 | * @since 1.0.4 | |
323 | */ | |
324 | public static final String WEBAPP_RESOURCES_INCLUDES_DEFAULT = | |
325 | "*.css,*.gif,*.html,*.jpg,*.js,*.png,*.txt,*.xml"; | |
326 | ||
327 | ||
328 | /** | |
329 | * <p>Context initialization parameter containing a comma-delimited list of | |
330 | * colon-delimited pairs, with each pair representing a URL matching pattern | |
331 | * (such as <code>/foo/*</code> or <code>*.foo</code>) and the fully qualified | |
332 | * class name of a {@link Processor} class to use for handling requests that | |
333 | * match the specified pattern. If no such parameter is specified, the | |
334 | * default value (<code>/webapp/*:org.apache.shale.remoting.impl.MethodBindingProcessor</code>) | |
335 | * is used. The {@link Mapping} instance for each pair will be configured | |
336 | * with <code>Mechanism.WEBAPP_RESOURCE</code>.</p> | |
337 | */ | |
338 | public static final String WEBAPP_RESOURCES_PARAM = | |
339 | "org.apache.shale.remoting.WEBAPP_RESOURCES"; | |
340 | ||
341 | ||
342 | } |