Package org.jboss.vfs

Examples of org.jboss.vfs.VirtualFile.toURL()


   {
      try
      {
         VirtualFile file = findFile(className);
         if (file != null)
            return file.toURL();
      }
      catch (Exception ignored)
      {
      }
      return null;
View Full Code Here


    private void writeObject(ObjectOutputStream out) throws IOException, URISyntaxException {
        VirtualFile file = getFile();
        URL url = rootUrl;
        if (url == null) {
            VirtualFile parentFile = file.getParent();
            url = parentFile != null ? parentFile.toURL() : null;
        }
        String pathName = path;
        if (pathName == null)
            pathName = file.getName();
View Full Code Here

                VirtualFile parent = deploymentUnitFile.getParent().getParent().getParent();
                VirtualFile baseDir = (parent != null ? parent : deploymentUnitFile);
                VirtualFile jarFile = baseDir.getChild(jar);
                if (jarFile == null)
                    throw MESSAGES.childNotFound(jar, baseDir);
                return jarFile.toURL();
            } catch (Exception e1) {
                throw MESSAGES.relativePathNotFound(e1, jar);
            }
        }
    }
View Full Code Here

               if (jbossStructure.exists())
               {
                  if (trace)
                     log.trace("... context has a META-INF/jboss-structure.xml");

                  URL url = jbossStructure.toURL();
                  UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
                  Unmarshaller unmarshaller = factory.newUnmarshaller();
                  StructureMetaDataObjectFactory ofactory = new StructureMetaDataObjectFactory();
                  unmarshaller.unmarshal(url.toString(), ofactory, structureContext.getMetaData());
                  mountChildren(structureContext);
View Full Code Here

                VirtualFile parent = deploymentUnitFile.getParent().getParent().getParent();
                VirtualFile baseDir = (parent != null ? parent : deploymentUnitFile);
                VirtualFile jarFile = baseDir.getChild(jar);
                if (jarFile == null)
                    throw new RuntimeException("could not find child '" + jar + "' on '" + baseDir + "'");
                return jarFile.toURL();
            } catch (Exception e1) {
                throw new RuntimeException("could not find relative path: " + jar, e1);
            }
        }
    }
View Full Code Here

                VirtualFile parent = deploymentUnitFile.getParent().getParent().getParent();
                VirtualFile baseDir = (parent != null ? parent : deploymentUnitFile);
                VirtualFile jarFile = baseDir.getChild(jar);
                if (jarFile == null)
                    throw JpaLogger.ROOT_LOGGER.childNotFound(jar, baseDir);
                return jarFile.toURL();
            } catch (Exception e1) {
                throw JpaLogger.ROOT_LOGGER.relativePathNotFound(e1, jar);
            }
        }
    }
View Full Code Here

            for (String wsdlLocation : map.keySet()) {
                try {
                    final ResourceRoot resourceRoot = getWsdlResourceRoot(unit, wsdlLocation);
                    if (resourceRoot == null) continue;
                    final VirtualFile wsdlLocationFile = resourceRoot.getRoot().getChild(wsdlLocation);
                    final URL url = wsdlLocationFile.toURL();
                    SOAPAddressWSDLParser parser = new SOAPAddressWSDLParser(url);
                    for (AnnotationInstance ai : map.get(wsdlLocation)) {
                        String port = ai.value(PORT_NAME).asString();
                        String service = ai.value(SERVICE_NAME).asString();
                        AnnotationValue targetNS = ai.value(TARGET_NAMESPACE);
View Full Code Here

        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());
        }
    }
View Full Code Here

        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());
        }
    }
View Full Code Here

      VirtualFile child = findChild(path);
      if (child != null)
      {
         try
         {
            return child.toURL();
         }
         catch (Exception ignored)
         {
            log.debug("Error determining URL for " + child, ignored);
            return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.