KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > controls > api > bean > ControlBean


1 package org.apache.beehive.controls.api.bean;
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 org.apache.beehive.controls.api.context.ControlBeanContext;
21
22 import java.beans.beancontext.BeanContext JavaDoc;
23 import java.beans.beancontext.BeanContextProxy JavaDoc;
24 /**
25  * The ControlBean interface defines a base set of methods that are implemented by all
26  * <code>JavaBeans</code> that host Java Controls.
27  * <p>
28  * A ControlBean will implement the <code>java.beans.beancontext.BeanContextProxy</code>
29  * interface to provide a way to get the <code>BeanContext</code> directly associated
30  * with the Java Control. The <code>getBeanContext()</code> API on the interface will
31  * return the parent (containing) context.
32  *
33  * @see java.beans.beancontext.BeanContextProxy
34  */

35 public interface ControlBean extends BeanContextProxy JavaDoc, java.io.Serializable JavaDoc
36 {
37     /**
38      * The IDSeparator character is used to separated individual control IDs in nesting
39      * scenarios whether the identifier is actually a composite path that represents
40      * a nesting relationship.
41      */

42     public static final char IDSeparator = '/';
43
44     /**
45      * Returns the <code>java.beans.beancontext.BeanContext</code> that provides the parent
46      * context for the Java Control.
47      * @return the containing <code>BeanContext</code> for the Java ControlBean.
48      *
49      * @see java.beans.beancontext.BeanContext
50      */

51     BeanContext getBeanContext();
52
53     /**
54      * Returns the <code>org.apache.beehive.controls.api.context.ControlBeanContext</code> instance
55      * that provides the local context for this control bean. <b>This is not the parent
56      * context for the control.</b> It is the context that would be the parent context for
57      * any nested controls hosted by this control.
58      */

59     ControlBeanContext getControlBeanContext();
60
61     /**
62      * Returns the unique control ID associated with the Java ControlBean. This control ID
63      * is guaranteed to be unique within the containing <code>BeanContext</code>
64      * @return the control ID
65      */

66     String JavaDoc getControlID();
67
68     /**
69      * Returns the Java Control public interface for the ControlBean. This interface defines
70      * the operations and events exposed by the Java Control to its clients.
71      * @return the control public interface
72      */

73     Class JavaDoc getControlInterface();
74 }
75
Popular Tags