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.ejb.annotation;
44
import java.beans.PropertyChangeListener;
45
import java.io.IOException;
46
import java.io.OutputStream;
47
import java.math.BigDecimal;
49
import org.netbeans.modules.j2ee.dd.api.common.CommonDDBean;
50
import org.netbeans.modules.j2ee.dd.api.common.Icon;
51
import org.netbeans.modules.j2ee.dd.api.common.NameAlreadyUsedException;
52
import org.netbeans.modules.j2ee.dd.api.common.RootInterface;
53
import org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException;
54
import org.netbeans.modules.j2ee.dd.api.ejb.AssemblyDescriptor;
55
import org.netbeans.modules.j2ee.dd.api.ejb.EjbJar;
56
import org.netbeans.modules.j2ee.dd.api.ejb.EnterpriseBeans;
57
import org.netbeans.modules.j2ee.dd.api.ejb.Interceptors;
58
import org.netbeans.modules.j2ee.dd.api.ejb.Relationships;
59
import org.netbeans.modules.j2ee.metadata.model.api.support.annotation.AnnotationModelHelper;
60
import org.openide.filesystems.FileObject;
61
import org.xml.sax.SAXParseException;
65
* @author Martin Adamek
67
public class EjbJarImpl implements EjbJar {
69
private final AnnotationModelHelper helper;
70
private final EnterpriseBeans enterpriseBeans;
72
public EjbJarImpl(AnnotationModelHelper helper) {
74
this.enterpriseBeans = EnterpriseBeansImpl.create(helper);
77
public EnterpriseBeans getEnterpriseBeans() {
78
return enterpriseBeans;
81
public BigDecimal getVersion() {
82
return BigDecimal.valueOf(3.0);
85
public AssemblyDescriptor getSingleAssemblyDescriptor() {
86
return new AssemblyDescriptorImpl(helper);
89
// <editor-fold defaultstate="collapsed" desc="Not implemented methods">
91
public Object clone() {
92
throw new UnsupportedOperationException("Not supported yet.");
95
public void setVersion(BigDecimal version) {
96
throw new UnsupportedOperationException("Not supported yet.");
99
public SAXParseException getError() {
100
throw new UnsupportedOperationException("Not supported yet.");
103
public int getStatus() {
104
throw new UnsupportedOperationException("Not supported yet.");
107
public void setEnterpriseBeans(EnterpriseBeans value) {
108
throw new UnsupportedOperationException("Not supported yet.");
111
public EnterpriseBeans newEnterpriseBeans() {
112
throw new UnsupportedOperationException("Not supported yet.");
115
public void setRelationships(Relationships value) {
116
throw new UnsupportedOperationException("Not supported yet.");
119
public Relationships getSingleRelationships() {
120
throw new UnsupportedOperationException("Not supported yet.");
123
public Relationships newRelationships() {
124
throw new UnsupportedOperationException("Not supported yet.");
127
public void setAssemblyDescriptor(AssemblyDescriptor value) {
128
throw new UnsupportedOperationException("Not supported yet.");
131
public AssemblyDescriptor newAssemblyDescriptor() {
132
throw new UnsupportedOperationException("Not supported yet.");
135
public void setEjbClientJar(String value) {
136
throw new UnsupportedOperationException("Not supported yet.");
139
public String getSingleEjbClientJar() {
140
throw new UnsupportedOperationException("Not supported yet.");
143
public void setInterceptors(Interceptors valueInterface) throws VersionNotSupportedException {
144
throw new UnsupportedOperationException("Not supported yet.");
147
public Interceptors getInterceptors() throws VersionNotSupportedException {
148
throw new UnsupportedOperationException("Not supported yet.");
151
public Interceptors newInterceptors() throws VersionNotSupportedException {
152
throw new UnsupportedOperationException("Not supported yet.");
155
public void write(FileObject fo) throws IOException {
156
throw new UnsupportedOperationException("Not supported yet.");
159
public void merge(RootInterface root, int mode) {
160
throw new UnsupportedOperationException("Not supported yet.");
163
public void addPropertyChangeListener(PropertyChangeListener pcl) {
164
throw new UnsupportedOperationException("Not supported yet.");
167
public void removePropertyChangeListener(PropertyChangeListener pcl) {
168
throw new UnsupportedOperationException("Not supported yet.");
171
public void setId(String value) {
172
throw new UnsupportedOperationException("Not supported yet.");
175
public String getId() {
176
throw new UnsupportedOperationException("Not supported yet.");
179
public Object getValue(String propertyName) {
180
throw new UnsupportedOperationException("Not supported yet.");
183
public void write(OutputStream os) throws IOException {
184
throw new UnsupportedOperationException("Not supported yet.");
187
public void setDescription(String locale, String description) throws VersionNotSupportedException {
188
throw new UnsupportedOperationException("Not supported yet.");
191
public void setDescription(String description) {
192
throw new UnsupportedOperationException("Not supported yet.");
195
public void setAllDescriptions(Map descriptions) throws VersionNotSupportedException {
196
throw new UnsupportedOperationException("Not supported yet.");
199
public String getDescription(String locale) throws VersionNotSupportedException {
200
throw new UnsupportedOperationException("Not supported yet.");
203
public String getDefaultDescription() {
204
throw new UnsupportedOperationException("Not supported yet.");
207
public Map getAllDescriptions() {
208
throw new UnsupportedOperationException("Not supported yet.");
211
public void removeDescriptionForLocale(String locale) throws VersionNotSupportedException {
212
throw new UnsupportedOperationException("Not supported yet.");
215
public void removeDescription() {
216
throw new UnsupportedOperationException("Not supported yet.");
219
public void removeAllDescriptions() {
220
throw new UnsupportedOperationException("Not supported yet.");
223
public void setDisplayName(String locale, String displayName) throws VersionNotSupportedException {
224
throw new UnsupportedOperationException("Not supported yet.");
227
public void setDisplayName(String displayName) {
228
throw new UnsupportedOperationException("Not supported yet.");
231
public void setAllDisplayNames(Map displayNames) throws VersionNotSupportedException {
232
throw new UnsupportedOperationException("Not supported yet.");
235
public String getDisplayName(String locale) throws VersionNotSupportedException {
236
throw new UnsupportedOperationException("Not supported yet.");
239
public String getDefaultDisplayName() {
240
throw new UnsupportedOperationException("Not supported yet.");
243
public Map getAllDisplayNames() {
244
throw new UnsupportedOperationException("Not supported yet.");
247
public void removeDisplayNameForLocale(String locale) throws VersionNotSupportedException {
248
throw new UnsupportedOperationException("Not supported yet.");
251
public void removeDisplayName() {
252
throw new UnsupportedOperationException("Not supported yet.");
255
public void removeAllDisplayNames() {
256
throw new UnsupportedOperationException("Not supported yet.");
259
public CommonDDBean createBean(String beanName) throws ClassNotFoundException {
260
throw new UnsupportedOperationException("Not supported yet.");
263
public CommonDDBean addBean(String beanName, String[] propertyNames,
264
Object[] propertyValues, String keyProperty) throws ClassNotFoundException,
265
NameAlreadyUsedException {
266
throw new UnsupportedOperationException("Not supported yet.");
269
public CommonDDBean addBean(String beanName) throws ClassNotFoundException {
270
throw new UnsupportedOperationException("Not supported yet.");
273
public CommonDDBean findBeanByName(String beanName, String propertyName,
275
throw new UnsupportedOperationException("Not supported yet.");
278
public void setSmallIcon(String locale, String icon) throws VersionNotSupportedException {
279
throw new UnsupportedOperationException("Not supported yet.");
282
public void setSmallIcon(String icon) {
283
throw new UnsupportedOperationException("Not supported yet.");
286
public void setLargeIcon(String locale, String icon) throws VersionNotSupportedException {
287
throw new UnsupportedOperationException("Not supported yet.");
290
public void setLargeIcon(String icon) {
291
throw new UnsupportedOperationException("Not supported yet.");
294
public void setAllIcons(String[] locales, String[] smallIcons,
295
String[] largeIcons) throws VersionNotSupportedException {
296
throw new UnsupportedOperationException("Not supported yet.");
299
public void setIcon(Icon icon) {
300
throw new UnsupportedOperationException("Not supported yet.");
303
public String getSmallIcon(String locale) throws VersionNotSupportedException {
304
throw new UnsupportedOperationException("Not supported yet.");
307
public String getSmallIcon() {
308
throw new UnsupportedOperationException("Not supported yet.");
311
public String getLargeIcon(String locale) throws VersionNotSupportedException {
312
throw new UnsupportedOperationException("Not supported yet.");
315
public String getLargeIcon() {
316
throw new UnsupportedOperationException("Not supported yet.");
319
public Icon getDefaultIcon() {
320
throw new UnsupportedOperationException("Not supported yet.");
323
public Map getAllIcons() {
324
throw new UnsupportedOperationException("Not supported yet.");
327
public void removeSmallIcon(String locale) throws VersionNotSupportedException {
328
throw new UnsupportedOperationException("Not supported yet.");
331
public void removeLargeIcon(String locale) throws VersionNotSupportedException {
332
throw new UnsupportedOperationException("Not supported yet.");
335
public void removeIcon(String locale) throws VersionNotSupportedException {
336
throw new UnsupportedOperationException("Not supported yet.");
339
public void removeSmallIcon() {
340
throw new UnsupportedOperationException("Not supported yet.");
343
public void removeLargeIcon() {
344
throw new UnsupportedOperationException("Not supported yet.");
347
public void removeIcon() {
348
throw new UnsupportedOperationException("Not supported yet.");
351
public void removeAllIcons() {
352
throw new UnsupportedOperationException("Not supported yet.");