Classes in this File | Line Coverage | Branch Coverage | Complexity | |||||||
ServiceConstants |
|
| 0.0;0 |
1 | // Copyright 2004, 2005 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.tapestry.services; |
|
16 | ||
17 | /** |
|
18 | * Defines constants for query parameters names commonly used by services. |
|
19 | * |
|
20 | * @author Howard M. Lewis Ship |
|
21 | * @since 4.0 |
|
22 | */ |
|
23 | 0 | public class ServiceConstants |
24 | { |
|
25 | /** |
|
26 | * The name of the service responsible for processing the request. |
|
27 | */ |
|
28 | public static final String SERVICE = "service"; |
|
29 | ||
30 | /** |
|
31 | * The name of the page to activate when processing the service. |
|
32 | */ |
|
33 | ||
34 | public static final String PAGE = "page"; |
|
35 | ||
36 | /** |
|
37 | * The id path to the component within the page. By convention, this component is within the |
|
38 | * {@link #PAGE}. |
|
39 | */ |
|
40 | ||
41 | public static final String COMPONENT = "component"; |
|
42 | ||
43 | /** |
|
44 | * The name of the page containing the component; this is only specified when the component is |
|
45 | * contained by a page other than the activate page ({@link #PAGE}). |
|
46 | */ |
|
47 | ||
48 | public static final String CONTAINER = "container"; |
|
49 | ||
50 | /** |
|
51 | * A flag indicating whether a session was active when the link was rendered. If this is true, |
|
52 | * but no session is active when the request is processed, the a service may at its discression |
|
53 | * throw a {@iink org.apache.tapestry.StaleLinkException} |
|
54 | */ |
|
55 | ||
56 | public static final String SESSION = "session"; |
|
57 | ||
58 | /** |
|
59 | * Contains a number of additional strings meaningful to the application (the term service |
|
60 | * parameters is something of an entrenched misnomer, a better term would have been application |
|
61 | * parameters). These parameters are typically objects that have been squeezed into strings by |
|
62 | * {@link org.apache.tapestry.services.DataSqueezer}. |
|
63 | * <p> |
|
64 | * The value is currently "sp" for vaguely historical reasons ("service parameter"), though it |
|
65 | * would be better if it were "lp" (for "listener parameter"), or just "param" perhaps. |
|
66 | */ |
|
67 | ||
68 | public static final String PARAMETER = "sp"; |
|
69 | ||
70 | /** |
|
71 | * Contains a string list of the parts in a response that should be updated. Parts |
|
72 | * can be both components and normal html tags resolved via their unique id's. |
|
73 | */ |
|
74 | public static final String UPDATE_PARTS = "updateParts"; |
|
75 | ||
76 | /** |
|
77 | * A list of all the constants defined by this class. |
|
78 | * |
|
79 | * @see org.apache.tapestry.form.FormSupportImpl |
|
80 | */ |
|
81 | 1 | public static final String[] RESERVED_IDS = |
82 | { SERVICE, PAGE, COMPONENT, CONTAINER, SESSION, PARAMETER }; |
|
83 | } |