1 19 20 package org.netbeans.modules.j2ee.ejbjarproject; 21 22 import org.netbeans.api.project.FileOwnerQuery; 23 import org.netbeans.api.project.Project; 24 import org.netbeans.modules.websvc.api.jaxws.client.JAXWSClientSupport; 25 import org.netbeans.modules.websvc.jaxws.api.JAXWSSupport; 26 import org.openide.filesystems.FileObject; 27 28 import org.netbeans.modules.websvc.api.webservices.WebServicesSupport; 29 import org.netbeans.modules.websvc.spi.webservices.WebServicesSupportProvider; 30 import org.netbeans.modules.websvc.api.client.WebServicesClientSupport; 31 import org.netbeans.modules.websvc.jaxws.spi.JAXWSSupportProvider; 32 import org.netbeans.modules.websvc.spi.client.WebServicesClientSupportProvider; 33 34 39 public class ProjectWebServicesSupportProvider implements 40 JAXWSSupportProvider, WebServicesSupportProvider, 41 WebServicesClientSupportProvider { 42 43 public ProjectWebServicesSupportProvider () { 44 } 45 46 public WebServicesSupport findWebServicesSupport (FileObject file) { 47 Project project = FileOwnerQuery.getOwner (file); 48 if (project != null && project instanceof EjbJarProject) { 49 return ((EjbJarProject) project).getAPIWebServicesSupport(); 50 } 51 return null; 52 } 53 54 public WebServicesClientSupport findWebServicesClientSupport (FileObject file) { 55 Project project = FileOwnerQuery.getOwner (file); 56 if (project != null && project instanceof EjbJarProject) { 57 return ((EjbJarProject) project).getAPIWebServicesClientSupport(); 58 } 59 return null; 60 } 61 62 public JAXWSSupport findJAXWSSupport(FileObject file) { 63 Project project = FileOwnerQuery.getOwner(file); 64 if (project != null && project instanceof EjbJarProject) { 65 return ((EjbJarProject) project).getAPIJAXWSSupport(); 66 } 67 return null; 68 } 69 70 public JAXWSClientSupport findJAXWSClientSupport(FileObject file) { 71 Project project = FileOwnerQuery.getOwner(file); 72 if (project != null && project instanceof EjbJarProject) { 73 return ((EjbJarProject) project).getAPIJAXWSClientSupport(); 74 } 75 return null; 76 } 77 } 78 | Popular Tags |