~ubuntu-branches/ubuntu/trusty/netbeans/trusty

« back to all changes in this revision

Viewing changes to j2ee/ddapi/src/org/netbeans/modules/j2ee/dd/impl/common/annotation/ResourceEnvRefImpl.java

  • Committer: Bazaar Package Importer
  • Author(s): Marek Slama
  • Date: 2008-01-29 14:11:22 UTC
  • Revision ID: james.westby@ubuntu.com-20080129141122-fnzjbo11ntghxfu7
Tags: upstream-6.0.1
ImportĀ upstreamĀ versionĀ 6.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
3
 *
 
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 
5
 *
 
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]"
 
23
 *
 
24
 * Contributor(s):
 
25
 *
 
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.
 
29
 *
 
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.
 
40
 */
 
41
 
 
42
package org.netbeans.modules.j2ee.dd.impl.common.annotation;
 
43
 
 
44
import java.beans.PropertyChangeListener;
 
45
import java.io.IOException;
 
46
import java.io.OutputStream;
 
47
import java.util.Map;
 
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;
 
51
 
 
52
/**
 
53
 * Default implemetation of {@link ResourceEnvRef}.
 
54
 * For getting all {@link ResourceEnvRef}s use one of 
 
55
 * {@link CommonAnnotationHelper#getResourceEnvRefs CommonAnnotationHelper.getResourceEnvRefs()} methods.
 
56
 * <p>
 
57
 * For more info see {@link ResourceImpl}.
 
58
 * @author Tomas Mysik
 
59
 */
 
60
public class ResourceEnvRefImpl implements ResourceEnvRef {
 
61
    
 
62
    private final ResourceImpl resource;
 
63
    
 
64
    /**
 
65
     * Create a new instance of ResourceRefImpl.
 
66
     * @param resource {@link javax.annotation.Resource @Resource} implementation.
 
67
     */
 
68
    public ResourceEnvRefImpl(ResourceImpl resource) {
 
69
        this.resource = resource;
 
70
    }
 
71
    
 
72
    // <editor-fold desc="Model implementation">
 
73
    public String getResourceEnvRefName() {
 
74
        return resource.getName();
 
75
    }
 
76
 
 
77
    public String getResourceEnvRefType() {
 
78
        return resource.getType();
 
79
    }
 
80
 
 
81
    public String getMappedName() throws VersionNotSupportedException {
 
82
        return resource.getMappedName();
 
83
    }
 
84
 
 
85
    public String getDefaultDescription() {
 
86
        return resource.getDescription();
 
87
    }
 
88
    // </editor-fold>
 
89
 
 
90
    // <editor-fold defaultstate="collapsed" desc="Not implemented methods">
 
91
    public void setResourceEnvRefName(String value) {
 
92
        throw new UnsupportedOperationException("Not supported yet.");
 
93
    }
 
94
 
 
95
    public void setResourceEnvRefType(String value) {
 
96
        throw new UnsupportedOperationException("Not supported yet.");
 
97
    }
 
98
 
 
99
    public void setMappedName(String value) throws VersionNotSupportedException {
 
100
        throw new UnsupportedOperationException("Not supported yet.");
 
101
    }
 
102
 
 
103
    public void setInjectionTarget(int index, InjectionTarget valueInterface) throws VersionNotSupportedException {
 
104
        throw new UnsupportedOperationException("Not supported yet.");
 
105
    }
 
106
 
 
107
    public InjectionTarget getInjectionTarget(int index) throws VersionNotSupportedException {
 
108
        throw new UnsupportedOperationException("Not supported yet.");
 
109
    }
 
110
 
 
111
    public int sizeInjectionTarget() throws VersionNotSupportedException {
 
112
        throw new UnsupportedOperationException("Not supported yet.");
 
113
    }
 
114
 
 
115
    public void setInjectionTarget(InjectionTarget[] value) throws VersionNotSupportedException {
 
116
        throw new UnsupportedOperationException("Not supported yet.");
 
117
    }
 
118
 
 
119
    public InjectionTarget[] getInjectionTarget() throws VersionNotSupportedException {
 
120
        throw new UnsupportedOperationException("Not supported yet.");
 
121
    }
 
122
 
 
123
    public int addInjectionTarget(InjectionTarget valueInterface) throws VersionNotSupportedException {
 
124
        throw new UnsupportedOperationException("Not supported yet.");
 
125
    }
 
126
 
 
127
    public int removeInjectionTarget(InjectionTarget valueInterface) throws VersionNotSupportedException {
 
128
        throw new UnsupportedOperationException("Not supported yet.");
 
129
    }
 
130
 
 
131
    public InjectionTarget newInjectionTarget() throws VersionNotSupportedException {
 
132
        throw new UnsupportedOperationException("Not supported yet.");
 
133
    }
 
134
 
 
135
    public void addPropertyChangeListener(PropertyChangeListener pcl) {
 
136
        throw new UnsupportedOperationException("Not supported yet.");
 
137
    }
 
138
 
 
139
    public void removePropertyChangeListener(PropertyChangeListener pcl) {
 
140
        throw new UnsupportedOperationException("Not supported yet.");
 
141
    }
 
142
 
 
143
    public void setId(String value) {
 
144
        throw new UnsupportedOperationException("Not supported yet.");
 
145
    }
 
146
 
 
147
    public String getId() {
 
148
        throw new UnsupportedOperationException("Not supported yet.");
 
149
    }
 
150
 
 
151
    public Object getValue(String propertyName) {
 
152
        throw new UnsupportedOperationException("Not supported yet.");
 
153
    }
 
154
 
 
155
    public void write(OutputStream os) throws IOException {
 
156
        throw new UnsupportedOperationException("Not supported yet.");
 
157
    }
 
158
 
 
159
    public void setDescription(String locale, String description) throws VersionNotSupportedException {
 
160
        throw new UnsupportedOperationException("Not supported yet.");
 
161
    }
 
162
 
 
163
    public void setDescription(String description) {
 
164
        throw new UnsupportedOperationException("Not supported yet.");
 
165
    }
 
166
 
 
167
    public void setAllDescriptions(Map descriptions) throws VersionNotSupportedException {
 
168
        throw new UnsupportedOperationException("Not supported yet.");
 
169
    }
 
170
 
 
171
    public String getDescription(String locale) throws VersionNotSupportedException {
 
172
        throw new UnsupportedOperationException("Not supported yet.");
 
173
    }
 
174
 
 
175
    public Map getAllDescriptions() {
 
176
        throw new UnsupportedOperationException("Not supported yet.");
 
177
    }
 
178
 
 
179
    public void removeDescriptionForLocale(String locale) throws VersionNotSupportedException {
 
180
        throw new UnsupportedOperationException("Not supported yet.");
 
181
    }
 
182
 
 
183
    public void removeDescription() {
 
184
        throw new UnsupportedOperationException("Not supported yet.");
 
185
    }
 
186
 
 
187
    public void removeAllDescriptions() {
 
188
        throw new UnsupportedOperationException("Not supported yet.");
 
189
    }
 
190
    
 
191
    @Override
 
192
    public Object clone() {
 
193
        throw new UnsupportedOperationException("Not supported yet.");
 
194
    }
 
195
    // </editor-fold>
 
196
}