private UnifiedVirtualFile getWebservicesFile(DeploymentUnit unit) { VirtualFile vf = ((VFSDeploymentUnit)unit).getMetaDataFile("webservices.xml"); return (vf != null ? new VirtualFileAdaptor(vf) : null); } }
@SuppressWarnings("deprecation") public UnifiedVirtualFile findChild(String child) throws IOException { VirtualFile vf = getFile().findChild(child); return new VirtualFileAdaptor(vf); }
public URL toURL() { try { return getFile().toURL(); } catch (Exception e) { return null; } }
public String getName() { try { return getFile().getName(); } catch (Exception e) { throw new RuntimeException(e); } } }
private UnifiedVirtualFile getWebservicesFile(DeploymentUnit unit) { UnifiedVirtualFile wsFile = null; if (unit instanceof VFSDeploymentUnit) { VirtualFile vf = ((VFSDeploymentUnit)unit).getMetaDataFile("webservices.xml"); wsFile = vf != null ? new VirtualFileAdaptor(vf) : null; } return wsFile; } }
public List<UnifiedVirtualFile> getChildren() throws IOException { List<VirtualFile> vfList = getFile().getChildren(); if (vfList == null) return null; List<UnifiedVirtualFile> uvfList = new LinkedList<UnifiedVirtualFile>(); for (VirtualFile vf : vfList) { uvfList.add(new VirtualFileAdaptor(vf)); } return uvfList; }
private void writeObject(ObjectOutputStream out) throws IOException, URISyntaxException { URL url = rootUrl; if (url == null) { VFS vfs = getFile().getVFS(); url = vfs.getRoot().toURL(); } String pathName = path; if (pathName == null) pathName = getFile().getPathName(); ObjectOutputStream.PutField fields = out.putFields(); fields.put("rootUrl", url); fields.put("path", pathName); out.writeFields(); }
private UnifiedVirtualFile getWebservicesFile(DeploymentUnit unit) { UnifiedVirtualFile wsFile = null; if (unit instanceof VFSDeploymentUnit) { VirtualFile vf = ((VFSDeploymentUnit)unit).getMetaDataFile("webservices.xml"); wsFile = vf != null ? new VirtualFileAdaptor(vf) : null; } return wsFile; } }
private UnifiedVirtualFile getWebservicesFile(DeploymentUnit unit) { UnifiedVirtualFile wsFile = null; if (unit instanceof VFSDeploymentUnit) { VirtualFile vf = ((VFSDeploymentUnit)unit).getMetaDataFile("webservices.xml"); wsFile = vf != null ? new VirtualFileAdaptor(vf) : null; } return wsFile; } }
private UnifiedVirtualFile getWebservicesFile(DeploymentUnit unit) { UnifiedVirtualFile wsFile = null; if (unit instanceof VFSDeploymentUnit) { VirtualFile vf = ((VFSDeploymentUnit)unit).getMetaDataFile("webservices.xml"); wsFile = vf != null ? new VirtualFileAdaptor(vf) : null; } return wsFile; } }
public UnifiedVirtualFile findChild(String child) throws IOException { VirtualFile vf = root; while (child.startsWith("./")) { child = child.substring(2); } while (child.startsWith("../")) { child = child.substring(3); vf = vf.getParent(); } vf = vf.findChild(child); return new VirtualFileAdaptor(vf); }
private void linkServiceRefs(DeploymentUnit unit, ServiceReferencesMetaData serviceRefs, Context envCtx) throws NamingException { if (unit instanceof VFSDeploymentUnit) { VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)unit; ClassLoader loader = unit.getClassLoader(); UnifiedVirtualFile vfsRoot = new VirtualFileAdaptor(vfsUnit.getRoot()); for (ServiceReferenceMetaData sref : serviceRefs) { String refName = sref.getServiceRefName(); new ServiceReferenceHandler().bindServiceRef(envCtx, refName, vfsRoot, loader, sref); } } }
@Override public Deployment createDeployment(DeploymentUnit unit) { ArchiveDeployment dep = newDeployment(unit); dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot())); dep.setRuntimeClassLoader(unit.getClassLoader()); dep.setType(getDeploymentType()); Service service = dep.getService(); Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class); if (ejb3Deployment == null) throw new IllegalStateException("Deployment unit does not contain ejb3 deployment"); // Copy the attachments dep.addAttachment(Ejb3Deployment.class, ejb3Deployment); Iterator it = ejb3Deployment.getEjbContainers().values().iterator(); while (it.hasNext()) { EJBContainer container = (EJBContainer)it.next(); if (isWebServiceBean(container)) { String ejbName = container.getEjbName(); String epBean = container.getBeanClassName(); // Create the endpoint Endpoint ep = newEndpoint(epBean); ep.setShortName(ejbName); service.addEndpoint(ep); } } return dep; }
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot())); dep.setRuntimeClassLoader(unit.getClassLoader()); dep.setType(getDeploymentType());
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot())); dep.setRuntimeClassLoader(unit.getClassLoader()); dep.setType(getDeploymentType());
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot())); dep.setRuntimeClassLoader(unit.getClassLoader()); dep.setType(getDeploymentType());
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot())); dep.setRuntimeClassLoader(unit.getClassLoader()); dep.setType(getDeploymentType());
uVirtualFiles.add(new VirtualFileAdaptor(vf.getVFS().getRoot())); dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit) unit).getRoot()));
uVirtualFiles.add(new VirtualFileAdaptor(vf.getVFS().getRoot())); dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit) unit).getRoot()));
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot())); dep.setRuntimeClassLoader(unit.getClassLoader()); dep.setType(getDeploymentType());