KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > controls > spi > bean > ControlFactory


1 package org.apache.beehive.controls.spi.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.bean.ControlBean;
21 import org.apache.beehive.controls.api.context.ControlBeanContext;
22 import org.apache.beehive.controls.api.properties.PropertyMap;
23
24 import java.lang.reflect.Method JavaDoc;
25
26 /**
27  * The ControlFactory interface defines a service provider interface for integrating
28  * an external JavaBean instantation/configuration framework with the Controls runtime.
29  */

30 public interface ControlFactory
31 {
32     /**
33      * Instantiates a new ControlBean of the requested class, using mechanisms provided
34      * by a provider-specific JavaBeans framework.
35      *
36      * @param beanClass the ControlBean class to instantiate
37      * @param props an initial set of client-specified properties to associate with the
38      * bean instance. May be null.
39      * @param context the containing ControlBeanContext for the bean, if nested inside of
40      * a container or other control. May be null to use the current active
41      * execution context.
42      * @param id the bean control ID. Must be unique within the containing context. If
43      * null, a unique identifier will be auto-generated.
44      * @returns a new ControlBean instance of the requested class.
45      */

46     public <T extends ControlBean> T instantiate(Class JavaDoc<T> beanClass,
47                                                  PropertyMap props,
48                                                  ControlBeanContext context,
49                                                  String JavaDoc id);
50 }
51
Popular Tags