public VirtualFile getFile(String path) { return delegate.getFile(path); }
@Deprecated protected VirtualFile getWebInf(VFSDeploymentUnit unit) { return unit.getFile("WEB-INF"); } }
public URL getUrl() { try { return unit.getFile("").toURL(); } catch (Exception e) { throw new RuntimeException(e); } }
public String getShortName() { return unit.getFile("").getName(); }
protected boolean isIntegrationDeployment(VFSDeploymentUnit unit) { String[] files = getFiles(); if (files == null || files.length == 0) return false; for(String path : files) { VirtualFile vf = unit.getFile(path); if (vf != null) return true; } return false; } }
public org.jboss.ejb3.vfs.spi.VirtualFile getRootFile() { return new VirtualFileWrapper(unit.getFile("")); }
try VirtualFile classes = vfsUnit.getFile("WEB-INF/classes");
/** * Entry point for handling a VFSDeploymentUnit. * * @param unit the current deployment unit * @throws DeploymentException for any error */ public void deploy(VFSDeploymentUnit unit) throws DeploymentException { VirtualFile root = unit.getRoot(); String relativePath = unit.getRelativePath(); VirtualFile ear = unit.getFile(relativePath); if (ear == null) throw new DeploymentException("No such ear file, relative path: '" + relativePath + "', root: " + root); deploy(unit, root, ear); }
private void callSubDeployer(URL deployableUnitURL, DeploymentUnitRecord record) throws Exception { internalDeployer.accepts(deployableUnitURL); internalDeployer.init(deployableUnitURL); for (String componentJar : record.sdmd.duContents) { URL componentURL = null; try { componentURL = VFSUtils.getCompatibleURL(record.vfsDU .getFile(componentJar)); } catch (Exception e) { throw new IllegalArgumentException("Failed to locate " + componentJar + " in DU. Does it exists?", e); } internalDeployer.accepts(componentURL); internalDeployer.init(componentURL); internalDeployer.start(componentURL); } internalDeployer.start(deployableUnitURL); }
if (topUnit == unit) throw new DeploymentException("Unable to resolve " + altDDPath + " as WEB-INF path"); altDD = topUnit.getFile(altDDPath); if (altDD == null) throw new DeploymentException("Unable to resolve " + altDDPath + " as a deployment path");
VirtualFile vf = vfsUnit.getFile(resourceName); if (vf != null) is = vf.openStream();
webInfLib = vfsUnit.getFile("WEB-INF/lib"); if (webInfLib != null)