KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > controls > api > properties > PropertyMap


1 package org.apache.beehive.controls.api.properties;
2 /*
3  * Copyright 2004 The Apache Software Foundation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * 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  * $Header:$
18  */

19
20 import java.lang.annotation.Annotation JavaDoc;
21 import java.lang.reflect.AnnotatedElement JavaDoc;
22 import java.lang.reflect.Field JavaDoc;
23 import java.lang.reflect.Method JavaDoc;
24 import java.util.HashMap JavaDoc;
25 import java.util.HashSet JavaDoc;
26 import java.util.Iterator JavaDoc;
27
28
29 import org.apache.beehive.controls.api.bean.ControlBean;
30 import org.apache.beehive.controls.api.bean.ControlExtension;
31 import org.apache.beehive.controls.api.bean.ControlInterface;
32
33 /**
34  * The PropertyMap interface represents a collection of ControlBean properties. Concrete
35  * implementations of this interface might derive property values from a local Map, JSR-175
36  * annotation, external configuration, or other property sources.
37  */

38 public interface PropertyMap
39 {
40     /**
41      * Returns the PropertySet or Control interface class associated with the PropertyMap.
42      */

43     public Class JavaDoc getMapClass();
44
45     /**
46      * Sets a delegate base property map from which values will be derived if not found within
47      * the local property map.
48      */

49     public void setDelegateMap(PropertyMap delegateMap);
50
51     /**
52      * Returns a delegate base property map from which values will be derived if not found within
53      * the local property map.
54      */

55     public PropertyMap getDelegateMap();
56
57     /**
58      * Sets the property specifed by 'key' within this map.
59      */

60     public void setProperty(PropertyKey key, Object JavaDoc value);
61
62     /**
63      * Returns the property value specified by 'key' within this map.
64      */

65     public Object JavaDoc getProperty(PropertyKey key);
66
67     /**
68      * Returns true if the PropertyMap contains one or more values for the specified
69      * PropertySet, false otherwise
70      */

71     public boolean containsPropertySet(Class JavaDoc<? extends Annotation JavaDoc> propertySet);
72
73     /**
74      * Returns a PropertySet proxy instance that derives its data from the contents of
75      * the property map. Will return null if the PropertyMap does not contain any properties
76      * associated with the specified PropertySet.
77      */

78     public <T extends Annotation JavaDoc> T getPropertySet(Class JavaDoc<T> propertySet);
79 }
80
Popular Tags