2
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
* Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
6
* The contents of this file are subject to the terms of either the GNU
7
* General Public License Version 2 only ("GPL") or the Common
8
* Development and Distribution License("CDDL") (collectively, the
9
* "License"). You may not use this file except in compliance with the
10
* License. You can obtain a copy of the License at
11
* http://www.netbeans.org/cddl-gplv2.html
12
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
* specific language governing permissions and limitations under the
14
* License. When distributing the software, include this License Header
15
* Notice in each file and include the License file at
16
* nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
17
* particular file as subject to the "Classpath" exception as provided
18
* by Sun in the GPL Version 2 section of the License file that
19
* accompanied this code. If applicable, add the following below the
20
* License Header, with the fields enclosed by brackets [] replaced by
21
* your own identifying information:
22
* "Portions Copyrighted [year] [name of copyright owner]"
26
* The Original Software is NetBeans. The Initial Developer of the Original
27
* Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
28
* Microsystems, Inc. All Rights Reserved.
30
* If you wish your version of this file to be governed by only the CDDL
31
* or only the GPL Version 2, indicate your decision by adding
32
* "[Contributor] elects to include this software in this distribution
33
* under the [CDDL or GPL Version 2] license." If you do not indicate a
34
* single choice of license, a recipient has the option to distribute
35
* your version of this file under either the CDDL, the GPL Version 2 or
36
* to extend the choice of license to its licensees as provided above.
37
* However, if you add GPL Version 2 code and therefore, elected the GPL
38
* Version 2 license, then the option applies only if the new code is
39
* made subject to such option by the copyright holder.
42
package org.netbeans.modules.j2ee.dd.impl.common.annotation;
44
import java.beans.PropertyChangeListener;
45
import java.io.IOException;
46
import java.io.OutputStream;
48
import org.netbeans.modules.j2ee.dd.api.common.InjectionTarget;
49
import org.netbeans.modules.j2ee.dd.api.common.ResourceEnvRef;
50
import org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException;
53
* Default implemetation of {@link ResourceEnvRef}.
54
* For getting all {@link ResourceEnvRef}s use one of
55
* {@link CommonAnnotationHelper#getResourceEnvRefs CommonAnnotationHelper.getResourceEnvRefs()} methods.
57
* For more info see {@link ResourceImpl}.
60
public class ResourceEnvRefImpl implements ResourceEnvRef {
62
private final ResourceImpl resource;
65
* Create a new instance of ResourceRefImpl.
66
* @param resource {@link javax.annotation.Resource @Resource} implementation.
68
public ResourceEnvRefImpl(ResourceImpl resource) {
69
this.resource = resource;
72
// <editor-fold desc="Model implementation">
73
public String getResourceEnvRefName() {
74
return resource.getName();
77
public String getResourceEnvRefType() {
78
return resource.getType();
81
public String getMappedName() throws VersionNotSupportedException {
82
return resource.getMappedName();
85
public String getDefaultDescription() {
86
return resource.getDescription();
90
// <editor-fold defaultstate="collapsed" desc="Not implemented methods">
91
public void setResourceEnvRefName(String value) {
92
throw new UnsupportedOperationException("Not supported yet.");
95
public void setResourceEnvRefType(String value) {
96
throw new UnsupportedOperationException("Not supported yet.");
99
public void setMappedName(String value) throws VersionNotSupportedException {
100
throw new UnsupportedOperationException("Not supported yet.");
103
public void setInjectionTarget(int index, InjectionTarget valueInterface) throws VersionNotSupportedException {
104
throw new UnsupportedOperationException("Not supported yet.");
107
public InjectionTarget getInjectionTarget(int index) throws VersionNotSupportedException {
108
throw new UnsupportedOperationException("Not supported yet.");
111
public int sizeInjectionTarget() throws VersionNotSupportedException {
112
throw new UnsupportedOperationException("Not supported yet.");
115
public void setInjectionTarget(InjectionTarget[] value) throws VersionNotSupportedException {
116
throw new UnsupportedOperationException("Not supported yet.");
119
public InjectionTarget[] getInjectionTarget() throws VersionNotSupportedException {
120
throw new UnsupportedOperationException("Not supported yet.");
123
public int addInjectionTarget(InjectionTarget valueInterface) throws VersionNotSupportedException {
124
throw new UnsupportedOperationException("Not supported yet.");
127
public int removeInjectionTarget(InjectionTarget valueInterface) throws VersionNotSupportedException {
128
throw new UnsupportedOperationException("Not supported yet.");
131
public InjectionTarget newInjectionTarget() throws VersionNotSupportedException {
132
throw new UnsupportedOperationException("Not supported yet.");
135
public void addPropertyChangeListener(PropertyChangeListener pcl) {
136
throw new UnsupportedOperationException("Not supported yet.");
139
public void removePropertyChangeListener(PropertyChangeListener pcl) {
140
throw new UnsupportedOperationException("Not supported yet.");
143
public void setId(String value) {
144
throw new UnsupportedOperationException("Not supported yet.");
147
public String getId() {
148
throw new UnsupportedOperationException("Not supported yet.");
151
public Object getValue(String propertyName) {
152
throw new UnsupportedOperationException("Not supported yet.");
155
public void write(OutputStream os) throws IOException {
156
throw new UnsupportedOperationException("Not supported yet.");
159
public void setDescription(String locale, String description) throws VersionNotSupportedException {
160
throw new UnsupportedOperationException("Not supported yet.");
163
public void setDescription(String description) {
164
throw new UnsupportedOperationException("Not supported yet.");
167
public void setAllDescriptions(Map descriptions) throws VersionNotSupportedException {
168
throw new UnsupportedOperationException("Not supported yet.");
171
public String getDescription(String locale) throws VersionNotSupportedException {
172
throw new UnsupportedOperationException("Not supported yet.");
175
public Map getAllDescriptions() {
176
throw new UnsupportedOperationException("Not supported yet.");
179
public void removeDescriptionForLocale(String locale) throws VersionNotSupportedException {
180
throw new UnsupportedOperationException("Not supported yet.");
183
public void removeDescription() {
184
throw new UnsupportedOperationException("Not supported yet.");
187
public void removeAllDescriptions() {
188
throw new UnsupportedOperationException("Not supported yet.");
192
public Object clone() {
193
throw new UnsupportedOperationException("Not supported yet.");