Package org.jboss.vfs

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


         return null;
      }
      try
      {
         VirtualFile root = findRoot(path);
         URL codeSourceURL = root.toURL();

         if (log.isTraceEnabled())
            log.trace("getProtectionDomain:className="+ className + " path="+ path + " codeSourceURL=" + codeSourceURL);

         final CodeSigner[] signers = clazz.getCodeSigners();
View Full Code Here


        try {
            final VirtualFile file = root.getChild(PathUtils.canonicalize(name));
            if (!file.exists()) {
                return null;
            }
            return new VFSEntryResource(file, file.toURL());
        } catch (MalformedURLException e) {
            // must be invalid...?  (todo: check this out)
            return null;
        }
    }
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 (!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());
        }
    }
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 MESSAGES.cannotGetURLForDescriptor(e, wsdd.getPathName());
        }
    }
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

                        //war's can also have a META-INF/beans.xml that does not show up as an
                        //existing beans.xml, as they already have a WEB-INF/beans.xml
                        ResourceRoot deploymentRoot = deployment.getAttachment(Attachments.DEPLOYMENT_ROOT);
                        VirtualFile beans = deploymentRoot.getRoot().getChild(META_INF_BEANS_XML);
                        if(beans.exists()) {
                            existing.add(beans.toURL());
                        }
                    }

                }
            } catch (MalformedURLException e) {
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

        try {
            final VirtualFile file = root.getChild(name);
            if (!file.exists()) {
                return null;
            }
            return new VFSEntryResource(file, file.toURL());
        } catch (MalformedURLException e) {
            // must be invalid...?  (todo: check this out)
            return null;
        }
    }
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

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.