KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > enterprise > deploy > spi > DConfigBean


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package javax.enterprise.deploy.spi;
25
26 import java.beans.PropertyChangeListener JavaDoc;
27 import javax.enterprise.deploy.model.*;
28 import javax.enterprise.deploy.spi.exceptions.ConfigurationException JavaDoc;
29 import javax.enterprise.deploy.spi.exceptions.BeanNotFoundException JavaDoc;
30
31 /**
32  * The DConfigBean is a deployment configuration bean (DConfigBean)
33  * that is associated with one or more deployment descriptor beans,
34  * (DDBean). A DConfigBean represents a logical grouping of deployment
35  * configuration data to be presented to the Deployer. A DConfigBean
36  * provides zero or more XPaths that identifies the XML information
37  * it requires. A DConfigBean may contain other DConfigBeans and
38  * regular JavaBeans. The top most DConfigBean is a DConfigBeanRoot
39  * object which represents a single XML instance document.
40  *
41  * <p>
42  * A DConfigBean is created by calling DConfigBean.getDConfigBean(DDBean)
43  * method, where DConfigBean is the object that provided the XPath which
44  * the DDBean represents.
45  *
46  * <p>
47  * A DConfigBean is a JavaBean component that presents the dynamic
48  * deployment configuration information for a J2EE plugin to the deployer.
49  * It is a JavaBean. The JavaBean architecture was chosen because
50  * of its versatility in providing both simple and complex components.
51  * JavaBeans also enable the development of property sheets and property
52  * editors, as well as sophisticated customization wizards.
53  *
54  * <p>
55  * It is expected that a plugin vendor will provide a Property Editor
56  * for any complex datatype in a DConfigBean that a deployer needs to edit
57  * through a property sheet. The Property Editor should be implemented
58  * and made available to a tool according to the guidelines defined in the
59  * JavaBeans API Specification version 1.01.
60  */

61 public interface DConfigBean
62 {
63         
64    /**
65     * Return the JavaBean containing the deployment
66     * descriptor XML text associated with this DConfigBean.
67     * @return The bean class containing the XML text for
68     * this DConfigBean.
69     */

70    public DDBean getDDBean();
71    
72     /**
73      * Return a list of XPaths designating the deployment descriptor
74      * information this DConfigBean requires.
75      *
76      * A given server vendor will need to specify some server-specific
77      * information. Each String returned by this method is an XPath
78      * describing a certain portion of the standard deployment descriptor
79      * for which there is corresponding server-specific configuration.
80      *
81      * @return a list of XPath Strings representing XML data to be retrieved
82      * or 'null' if there are none.
83      */

84     public String JavaDoc[] getXpaths();
85     
86     /**
87      * Return the JavaBean containing the server-specific deployment
88      * configuration information based upon the XML data provided
89      * by the DDBean.
90      *
91      * @return The DConfigBean to display the server-specific properties
92      * for the standard bean.
93      * @param bean The DDBean containing the XML data to be
94      * evaluated.
95      * @throws ConfigurationException reports errors in generating
96      * a configuration bean. This DDBean is considered
97      * undeployable to this server until this exception
98      * is resolved.
99      * A suitably descriptive message is required so the user
100      * can diagnose the error.
101      */

102     public DConfigBean JavaDoc getDConfigBean(DDBean bean)
103                throws ConfigurationException JavaDoc;
104
105     /**
106      * Remove a child DConfigBean from this bean.
107      *
108      * @param bean The child DConfigBean to be removed.
109      * @throws BeanNotFoundException the bean provided
110      * is not in the child list of this bean.
111      */

112     public void removeDConfigBean(DConfigBean JavaDoc bean)
113            throws BeanNotFoundException JavaDoc;
114
115
116     /**
117      * A notification that the DDBean provided in the
118      * event has changed and this bean or its child beans need
119      * to reevaluate themselves.
120      *
121      * @param event an event containing a reference to the
122      * DDBean which has changed.
123      */

124     public void notifyDDChange(XpathEvent event);
125     
126     /**
127      * Register a property listener for this bean.
128      * @param pcl PropertyChangeListener to add
129      */

130    public void addPropertyChangeListener(PropertyChangeListener JavaDoc pcl);
131
132    /**
133     * Unregister a property listener for this bean.
134     * @param pcl Listener to remove.
135     */

136    public void removePropertyChangeListener(PropertyChangeListener JavaDoc pcl);
137
138 }
139
Popular Tags