KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > jaxws > CustomJAXWSSupportProvider


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.jaxws;
21
22 import java.io.IOException JavaDoc;
23 import java.net.URL JavaDoc;
24 import java.util.HashMap JavaDoc;
25 import java.util.List JavaDoc;
26 import java.util.Map JavaDoc;
27 import org.netbeans.modules.websvc.jaxws.api.JAXWSSupport;
28 import org.netbeans.modules.websvc.jaxws.spi.JAXWSSupportFactory;
29 import org.netbeans.modules.websvc.jaxws.spi.JAXWSSupportImpl;
30 import org.netbeans.modules.websvc.jaxws.spi.JAXWSSupportProvider;
31 import org.netbeans.spi.project.support.ant.AntProjectHelper;
32 import org.openide.filesystems.FileObject;
33
34 /**
35  *
36  * @author Lukas Jungmann
37  */

38 public class CustomJAXWSSupportProvider implements JAXWSSupportProvider {
39     
40    private Map JavaDoc<FileObject, JAXWSSupport> cache = new HashMap JavaDoc<FileObject, JAXWSSupport>();
41    
42     /** Creates a new instance of TestProjectJAXWSSupportProvider */
43     public CustomJAXWSSupportProvider() {
44     }
45     
46     public JAXWSSupport findJAXWSSupport(FileObject file) {
47         if (file.getExt().equals ("ws")) {
48             JAXWSSupport em = cache.get(file.getParent());
49             if (em == null) {
50                 em = JAXWSSupportFactory.createJAXWSSupport(new CustomJAXWSSupport(file.getParent()));
51                 cache.put(file.getParent(), em);
52             }
53             return em;
54         }
55         return null;
56     }
57     
58     private static class CustomJAXWSSupport implements JAXWSSupportImpl {
59         
60         private FileObject fo;
61         
62         CustomJAXWSSupport(FileObject fo) {
63             this.fo = fo;
64         }
65         
66         public void addService(String JavaDoc serviceName, String JavaDoc serviceImpl,
67                 boolean isJsr109) {
68             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
69         }
70         
71         public String JavaDoc addService(String JavaDoc name, String JavaDoc serviceImpl, String JavaDoc wsdlUrl,
72                 String JavaDoc serviceName, String JavaDoc portName,
73                 String JavaDoc packageName, boolean isJsr109) {
74             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
75         }
76         
77         public List JavaDoc getServices() {
78             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
79         }
80         
81         public void removeService(String JavaDoc serviceName) {
82             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
83         }
84         
85         public void serviceFromJavaRemoved(String JavaDoc serviceName) {
86             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
87         }
88         
89         public String JavaDoc getServiceImpl(String JavaDoc serviceName) {
90             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
91         }
92         
93         public boolean isFromWSDL(String JavaDoc serviceName) {
94             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
95         }
96         
97         public FileObject getWsdlFolder(boolean create) throws IOException JavaDoc {
98             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
99         }
100         
101         public FileObject getLocalWsdlFolderForService(String JavaDoc serviceName,
102                 boolean createFolder) {
103             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
104         }
105         
106         public FileObject getBindingsFolderForService(String JavaDoc serviceName,
107                 boolean createFolder) {
108             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
109         }
110         
111         public AntProjectHelper getAntProjectHelper() {
112             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
113         }
114         
115         public URL JavaDoc getCatalog() {
116             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
117         }
118         
119         public String JavaDoc getWsdlLocation(String JavaDoc serviceName) {
120             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
121         }
122         
123         public void removeNonJsr109Entries(String JavaDoc serviceName) throws IOException JavaDoc {
124             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
125         }
126         
127         public FileObject getDeploymentDescriptorFolder() {
128             throw new UnsupportedOperationException JavaDoc("Not supported yet.");
129         }
130     }
131 }
132
Popular Tags