1 19 27 28 package org.netbeans.modules.websvc.api.jaxws.project.config; 29 30 import java.io.IOException ; 31 import java.io.InputStream ; 32 import org.openide.filesystems.FileObject; 33 34 38 public class EndpointsProvider { 39 40 private static EndpointsProvider provider; 41 42 43 private EndpointsProvider() { 44 } 45 46 public static synchronized EndpointsProvider getDefault() { 47 if (provider==null) { 48 provider = new EndpointsProvider(); 49 } 50 return provider; 51 } 52 53 public Endpoints getEndpoints(InputStream is) throws IOException { 54 org.netbeans.modules.websvc.jaxwsmodel.endpoints_config1_0.Endpoints impl = 55 org.netbeans.modules.websvc.jaxwsmodel.endpoints_config1_0.Endpoints.createGraph(is); 56 return (impl==null?null:new Endpoints(impl)); 57 } 58 59 public Endpoints getEndpoints(FileObject fo) throws IOException { 60 org.netbeans.modules.websvc.jaxwsmodel.endpoints_config1_0.Endpoints impl = 61 org.netbeans.modules.websvc.jaxwsmodel.endpoints_config1_0.Endpoints.createGraph(fo.getInputStream()); 62 return (impl==null?null:new Endpoints(impl)); 63 } 64 } 65 | Popular Tags |