KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > spec > IPropertySpecification


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. A
21  * {@link org.apache.tapestry.enhance.ComponentClassFactory}uses this information to create a
22  * subclass with the necessary instance variables and methods.
23  *
24  * @author glongman@intelligentworks.com
25  */

26 public interface IPropertySpecification extends LocationHolder
27 {
28     /**
29      * Returns the initial value for this property, as a binding reference. May return null if the
30      * property has no initial value. The initial value is from finishLoad() and re-applied in
31      * pageDetached().
32      */

33
34     public String JavaDoc getInitialValue();
35
36     public String JavaDoc getName();
37
38     /**
39      * Returns true if {@link #getPersistence()}is null.
40      */

41     public boolean isPersistent();
42
43     public String JavaDoc getType();
44
45     public void setInitialValue(String JavaDoc initialValue);
46
47     /**
48      * Sets the name of the property. This should not be changed once this IPropertySpecification is
49      * added to a {@link org.apache.tapestry.spec.IComponentSpecification}.
50      */

51     public void setName(String JavaDoc name);
52
53     public void setType(String JavaDoc type);
54
55     /**
56      * A string indicating how the property is persisted.
57      *
58      * @since 4.0
59      */

60
61     public void setPersistence(String JavaDoc persistence);
62
63     /**
64      * If null, then the property is not persistent.
65      *
66      * @since 4.0
67      */

68     public String JavaDoc getPersistence();
69
70 }
Popular Tags