@Override public URL getUrl() { try { return file.toURL(); } catch (MalformedURLException e) { throw new RuntimeException(e); } }
private void handleDirectory(VirtualFile file, String path) { WeldLogger.DEPLOYMENT_LOGGER.tracef("handling directory: %s", file); for (VirtualFile child : file.getChildren()) { String newPath = (path == null) ? child.getName() : (path + '/' + child.getName()); if (child.isDirectory()) { handleDirectory(child, newPath); } else { handleFile(newPath, () -> file.toURL().openStream()); } } }
protected URL vfsFileAsUrl(VirtualFile processesXmlFile) { try { return processesXmlFile.toURL(); } catch (MalformedURLException e) { throw new RuntimeException(e); } }
protected URL vfsFileAsUrl(VirtualFile processesXmlFile) { try { return processesXmlFile.toURL(); } catch (MalformedURLException e) { throw new RuntimeException(e); } }
protected URL vfsFileAsUrl(VirtualFile processesXmlFile) { try { return processesXmlFile.toURL(); } catch (MalformedURLException e) { throw new RuntimeException(e); } }
deploymentUnit.addToAttachmentList(ServletContextAttribute.ATTACHMENT_KEY, new ServletContextAttribute(Constants.CODE_SOURCE_ATTRIBUTE_NAME, deploymentRoot.toURL())); } catch (MalformedURLException e) { throw new DeploymentUnitProcessingException(e);
public URL getUrl() { try { return file.toURL(); } catch (Exception e) { throw new RuntimeException(e); } }
@Override public URL getUrl() { try { return file.toURL(); } catch (MalformedURLException e) { throw new RuntimeException(e); } }
@Override public URL getUrl() { try { return file.toURL(); } catch (MalformedURLException e) { throw new RuntimeException(e); } }
public URL toURL() { try { return getFile().toURL(); } catch (Exception e) { return null; } }
public void visit(VirtualFile virtualFile) { // See if the filter matches Matcher matcher = filter.matcher(virtualFile.getName()); if (matcher.find() == false) return; try { paths.add(virtualFile.toURL()); } catch (Exception e) { throw MESSAGES.runtimeErrorVistingFile(e, virtualFile); } }
@Override public Resource next() { VirtualFile file = children.next(); URL fileURL; try { fileURL = file.toURL(); } catch (MalformedURLException ex) { throw new IllegalStateException(ex); } return new VFSEntryResource(file.getPathNameRelativeTo(root), file, fileURL); }
@Override public Resource next() { VirtualFile file = children.next(); URL fileURL; try { fileURL = file.toURL(); } catch (MalformedURLException ex) { throw new IllegalStateException(ex); } return new VFSEntryResource(file.getPathNameRelativeTo(root), file, fileURL); }
private URL getPersistenceUnitURL(VirtualFile persistence_xml) { try { VirtualFile metaData = persistence_xml;// di.getMetaDataFile("persistence.xml"); return metaData.getParent().getParent().toURL(); } catch (Exception e) { throw new RuntimeException(e); } }
private URL getJBossWebServicesDescriptorURL(final ResourceRoot deploymentRoot) throws DeploymentUnitProcessingException { VirtualFile jwsdd = deploymentRoot.getRoot().getChild("WEB-INF/jboss-webservices.xml"); if (!jwsdd.exists()) { jwsdd = deploymentRoot.getRoot().getChild("META-INF/jboss-webservices.xml"); } try { return jwsdd.exists() ? jwsdd.toURL() : null; } catch (IOException e) { throw WSLogger.ROOT_LOGGER.cannotGetURLForDescriptor(e, jwsdd.getPathName()); } }
private URL getJBossWebServicesDescriptorURL(final ResourceRoot deploymentRoot) throws DeploymentUnitProcessingException { VirtualFile jwsdd = deploymentRoot.getRoot().getChild("WEB-INF/jboss-webservices.xml"); if (!jwsdd.exists()) { jwsdd = deploymentRoot.getRoot().getChild("META-INF/jboss-webservices.xml"); } try { return jwsdd.exists() ? jwsdd.toURL() : null; } catch (IOException e) { throw MESSAGES.cannotGetURLForDescriptor(e, jwsdd.getPathName()); } }
private URL getJBossWebServicesDescriptorURL(final ResourceRoot deploymentRoot) throws DeploymentUnitProcessingException { VirtualFile jwsdd = deploymentRoot.getRoot().getChild("WEB-INF/jboss-webservices.xml"); if (!jwsdd.exists()) { jwsdd = deploymentRoot.getRoot().getChild("META-INF/jboss-webservices.xml"); } try { return jwsdd.exists() ? jwsdd.toURL() : null; } catch (IOException e) { throw WSLogger.ROOT_LOGGER.cannotGetURLForDescriptor(e, jwsdd.getPathName()); } }
private URL getWebServicesDescriptorURL(final ResourceRoot deploymentRoot) throws DeploymentUnitProcessingException { VirtualFile wsdd = deploymentRoot.getRoot().getChild("WEB-INF/webservices.xml"); if (!wsdd.exists()) { wsdd = deploymentRoot.getRoot().getChild("META-INF/webservices.xml"); } try { return wsdd.exists() ? wsdd.toURL() : null; } catch (IOException e) { throw WSLogger.ROOT_LOGGER.cannotGetURLForDescriptor(e, wsdd.getPathName()); } }
private URL getWebServicesDescriptorURL(final ResourceRoot deploymentRoot) throws DeploymentUnitProcessingException { VirtualFile wsdd = deploymentRoot.getRoot().getChild("WEB-INF/webservices.xml"); if (!wsdd.exists()) { wsdd = deploymentRoot.getRoot().getChild("META-INF/webservices.xml"); } try { return wsdd.exists() ? wsdd.toURL() : null; } catch (IOException e) { throw WSLogger.ROOT_LOGGER.cannotGetURLForDescriptor(e, wsdd.getPathName()); } }