KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > api > CustomWebServicesSupportProvider


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 package org.netbeans.modules.websvc.api;
21
22 import java.io.IOException JavaDoc;
23 import java.util.HashMap JavaDoc;
24 import java.util.List JavaDoc;
25 import java.util.Map JavaDoc;
26 import org.netbeans.api.java.classpath.ClassPath;
27 import org.netbeans.api.project.Project;
28 import org.netbeans.modules.j2ee.dd.api.webservices.ServiceImplBean;
29 import org.netbeans.modules.websvc.api.webservices.WebServicesSupport;
30 import org.netbeans.modules.websvc.spi.webservices.WebServicesSupportFactory;
31 import org.netbeans.modules.websvc.spi.webservices.WebServicesSupportImpl;
32 import org.netbeans.modules.websvc.spi.webservices.WebServicesSupportProvider;
33 import org.netbeans.spi.project.support.ant.AntProjectHelper;
34 import org.netbeans.spi.project.support.ant.ReferenceHelper;
35 import org.openide.filesystems.FileObject;
36
37 /**
38  *
39  * @author Lukas Jungmann
40  */

41 public class CustomWebServicesSupportProvider implements WebServicesSupportProvider {
42     
43     private Map JavaDoc<FileObject, WebServicesSupport> cache = new HashMap JavaDoc<FileObject, WebServicesSupport>();
44     
45     /** Creates a new instance of CustomWebServicesSupportProvider */
46     public CustomWebServicesSupportProvider() {
47     }
48     
49     public WebServicesSupport findWebServicesSupport(FileObject file) {
50         if (file.getExt().equals("ws")) {
51             WebServicesSupport em = cache.get(file.getParent());
52             if (em == null) {
53                 em = WebServicesSupportFactory.createWebServicesSupport(new CustomWebServicesSupport(file));
54                 cache.put(file.getParent(), em);
55             }
56             return em;
57         }
58         return null;
59     }
60     
61     private static final class CustomWebServicesSupport implements WebServicesSupportImpl {
62         private FileObject fo;
63         
64         CustomWebServicesSupport(FileObject fo) {
65             this.fo = fo;
66         }
67         
68         public void addServiceImpl(String JavaDoc serviceName, FileObject configFile,
69                 boolean fromWSDL, String JavaDoc[] wscompileFeatures) {
70             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
71         }
72         
73         public void addServiceImpl(String JavaDoc serviceName, FileObject configFile,
74                 boolean fromWSDL) {
75             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
76         }
77         
78         public void addServiceEntriesToDD(String JavaDoc serviceName,
79                 String JavaDoc serviceEndpointInterface,
80                 String JavaDoc serviceEndpoint) {
81             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
82         }
83         
84         public FileObject getWebservicesDD() {
85             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
86         }
87         
88         public FileObject getWsDDFolder() {
89             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
90         }
91         
92         public String JavaDoc getArchiveDDFolderName() {
93             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
94         }
95         
96         public String JavaDoc getImplementationBean(String JavaDoc linkName) {
97             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
98         }
99         
100         public void removeServiceEntry(String JavaDoc linkName) {
101             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
102         }
103         
104         public void removeProjectEntries(String JavaDoc serviceName) {
105             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
106         }
107         
108         public AntProjectHelper getAntProjectHelper() {
109             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
110         }
111         
112         public String JavaDoc generateImplementationBean(String JavaDoc wsName, FileObject pkg,
113                 Project project,
114                 String JavaDoc delegateData) throws IOException JavaDoc {
115             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
116         }
117         
118         public void addServiceImplLinkEntry(ServiceImplBean serviceImplBean,
119                 String JavaDoc wsName) {
120             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
121         }
122         
123         public ReferenceHelper getReferenceHelper() {
124             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
125         }
126         
127         public List JavaDoc getServices() {
128             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
129         }
130         
131         public void addInfrastructure(String JavaDoc implBeanClass, FileObject pkg) {
132             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
133         }
134         
135         public boolean isFromWSDL(String JavaDoc serviceName) {
136             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
137         }
138         
139         public ClassPath getClassPath() {
140             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
141         }
142     }
143     
144 }
145
Popular Tags