Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||
IPropertySpecification |
|
| 1.0;1 |
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.spec; |
|
16 | ||
17 | import org.apache.hivemind.LocationHolder; |
|
18 | ||
19 | /** |
|
20 | * Defines a transient or persistant property of a component or page. |
|
21 | * |
|
22 | * @author glongman@intelligentworks.com |
|
23 | */ |
|
24 | public interface IPropertySpecification extends LocationHolder |
|
25 | { |
|
26 | ||
27 | /** |
|
28 | * Returns the initial value for this property, as a binding reference. May |
|
29 | * return null if the property has no initial value. The initial value is |
|
30 | * from finishLoad() and re-applied in pageDetached(). |
|
31 | */ |
|
32 | ||
33 | String getInitialValue(); |
|
34 | ||
35 | String getName(); |
|
36 | ||
37 | /** |
|
38 | * Returns true if {@link #getPersistence()}is null. |
|
39 | */ |
|
40 | boolean isPersistent(); |
|
41 | ||
42 | String getType(); |
|
43 | ||
44 | void setInitialValue(String initialValue); |
|
45 | ||
46 | /** |
|
47 | * Sets the name of the property. This should not be changed once this |
|
48 | * IPropertySpecification is added to a |
|
49 | * {@link org.apache.tapestry.spec.IComponentSpecification}. |
|
50 | */ |
|
51 | void setName(String name); |
|
52 | ||
53 | void setType(String type); |
|
54 | ||
55 | /** |
|
56 | * Sets whether or not this property represents a concrete generic type. |
|
57 | * |
|
58 | * @param isGeneric |
|
59 | */ |
|
60 | void setGeneric(boolean isGeneric); |
|
61 | ||
62 | /** |
|
63 | * Checks if the type represented by this property is in a generic declaration. |
|
64 | * |
|
65 | * @return True if it is generic, false otherwise. |
|
66 | */ |
|
67 | boolean isGeneric(); |
|
68 | ||
69 | /** |
|
70 | * Checks if this property has previously had it's type information examined to |
|
71 | * determine if it is elligable for proxying. Meaning {@link #canProxy()} should |
|
72 | * be a real value. |
|
73 | * |
|
74 | * @return True if the proxy type has been checked, false otherwise. |
|
75 | */ |
|
76 | boolean isProxyChecked(); |
|
77 | ||
78 | /** |
|
79 | * Sets the state of this property so that it is known whether or not the type |
|
80 | * it represents has been checked as being compatible with proxying or not. |
|
81 | * |
|
82 | * @param checked |
|
83 | */ |
|
84 | void setProxyChecked(boolean checked); |
|
85 | ||
86 | /** |
|
87 | * Checks if this parameter can be proxied. |
|
88 | * |
|
89 | * @return True if the type can be proxied, false otherwise. |
|
90 | */ |
|
91 | boolean canProxy(); |
|
92 | ||
93 | /** |
|
94 | * Sets whether or not this property can be proxied. |
|
95 | * |
|
96 | * @param canProxy |
|
97 | */ |
|
98 | void setCanProxy(boolean canProxy); |
|
99 | ||
100 | /** |
|
101 | * A string indicating how the property is persisted. |
|
102 | * |
|
103 | * @since 4.0 |
|
104 | */ |
|
105 | ||
106 | void setPersistence(String persistence); |
|
107 | ||
108 | /** |
|
109 | * If null, then the property is not persistent. |
|
110 | * |
|
111 | * @since 4.0 |
|
112 | */ |
|
113 | String getPersistence(); |
|
114 | ||
115 | } |