KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > tests > j2eeserver > plugin > jsr88 > ResourceRefConfigBean


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20
21 package org.netbeans.tests.j2eeserver.plugin.jsr88;
22
23 import javax.enterprise.deploy.spi.exceptions.*;
24 import javax.enterprise.deploy.spi.*;
25 import java.beans.*;
26 import javax.enterprise.deploy.model.*;
27
28
29 /**
30  *
31  * @author gfink
32  */

33 public class ResourceRefConfigBean implements DConfigBean {
34
35     DDBean bean;
36     DepConfig config;
37     EjbModuleConfigBean module;
38
39     public ResourceRefConfigBean(DDBean bean, DepConfig config) {
40         this.bean = bean; this.config = config;
41         this.resourceName = bean.getText();
42     }
43
44     public ResourceRefConfigBean(DDBean bean, EjbModuleConfigBean module, DepConfig config) {
45         this(bean, config);
46         this.module = module;
47     }
48       
49     public DConfigBean getDConfigBean(DDBean dDBean) throws ConfigurationException {
50         return null;
51     }
52     
53     public DDBean getDDBean() {
54         return bean;
55     }
56     
57     public String JavaDoc[] getXpaths() {
58         return null;
59     }
60     
61     public void notifyDDChange(XpathEvent xpathEvent) {
62     }
63     
64     public void removeDConfigBean(DConfigBean dConfigBean) throws BeanNotFoundException {
65     }
66     
67       /** Utility field used by bound properties. */
68       private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
69       
70       /** Holds value of property resourceName. */
71       private String JavaDoc resourceName;
72       
73       /** Holds value of property jndiName. */
74       private String JavaDoc jndiName;
75       
76     public void addPropertyChangeListener(PropertyChangeListener listener) {
77         propertyChangeSupport.addPropertyChangeListener(listener);
78     }
79     
80     public void removePropertyChangeListener(PropertyChangeListener listener) {
81         propertyChangeSupport.removePropertyChangeListener(listener);
82     }
83     
84     /** Getter for property resourceName.
85      * @return Value of property resourceName.
86      */

87     public String JavaDoc getResourceName() {
88         return this.resourceName;
89     }
90     
91     /** Getter for property jndiName.
92      * @return Value of property jndiName.
93      */

94     public String JavaDoc getJndiName() {
95         return this.jndiName;
96     }
97     
98     /** Setter for property jndiName.
99      * @param jndiName New value of property jndiName.
100      */

101     public void setJndiName(String JavaDoc jndiName) {
102         String JavaDoc oldJndiName = this.jndiName;
103         this.jndiName = jndiName;
104         propertyChangeSupport.firePropertyChange("jndiName", oldJndiName, jndiName);
105     }
106     
107 }
108
Popular Tags