Package org.jboss.vfs

Examples of org.jboss.vfs.VirtualFile


   private static TempFileProvider tempFileProvider;
   private final List<Closeable> vfsHandles = new ArrayList<Closeable>();
  
   protected VFSDeploymentUnit assertDeploy(Archive<?> archive) throws Exception
   {
      VirtualFile virtualFile = mount(archive);
      VFSDeploymentUnit unit = assertDeploy(virtualFile);
      return unit;
   }
View Full Code Here


                  excludedFiles.add(VFS.getChild(eu));
            }
            Set<VirtualFile> files = new HashSet<VirtualFile>();
            for (URL u : urls)
            {
               VirtualFile vf = VFS.getChild(u);
               boolean include = true;
               if (excludedFiles != null)
               {
                  for (VirtualFile ef : excludedFiles)
                  {
                     if (vf.getParentFileList().contains(ef))
                     {
                        include = false;
                        break;
                     }
                  }
View Full Code Here

               returnValue = delegate.resolveDeploymentNames(dtID.getNames());
            }
            else if( parameter.equals("distribute") )
            {
               final URL url = dtID.getContentURL();
               final VirtualFile vf = VFS.getChild(url);
               if(vf == null || vf.exists() == false) {
                  throw new IllegalStateException(String.format("file (%s) does not exist. Use 'copyContent = true' to copy the deployment", url));
               }
               returnValue = delegate.distribute(dtID, null);
            }
            else if( parameter.equals("prepare"))
View Full Code Here

   private Collection<VFSDeploymentUnit> units = new ArrayList<VFSDeploymentUnit>();
  
   private VirtualFile mount(Archive<?> archive) throws IOException
   {
      final TempDir tempDir = tempFileProvider.createTempDir(archive.getName());
      VirtualFile virtualFile = VFS.getChild(UUID.randomUUID().toString()).getChild(archive.getName());
      vfsHandles.add(VFS.mount(virtualFile, new ArchiveFileSystem(archive, tempDir)));
      mountZipFiles(virtualFile);
      return virtualFile;
   }
View Full Code Here

      assertExpectedWarResources(environment, "warinear.ear/" + WAR_NAME, false, "lib.jar");
   }

   public void testBasicEar() throws Exception
   {
      VirtualFile ear = createBasicEar();
      unit = assertDeploy(ear);

      assertBasicEar();
   }
View Full Code Here

            {
               DeploymentUnit localUnit = deploymentUnitLocal.get();
               if (localUnit instanceof VFSDeploymentUnit)
               {
                  VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)localUnit;
                  VirtualFile vf = vfsUnit.getFile(resourceName);
                  if (vf != null)
                     is = vf.openStream();
               }
            }

            if (is == null)
               is = getClass().getClassLoader().getResourceAsStream(resourceName);
View Full Code Here

      return suite(WeldDiscoveryEnvTestCase.class);
   }

   public void testSimpleUsage() throws Exception
   {
      VirtualFile ear = createBasicEar();
      VFSDeploymentUnit topUnit = assertDeploy(ear);
      try
      {
         WeldDiscoveryEnvironment wbDiscovery = topUnit.getAttachment(WeldDiscoveryEnvironment.class);
         assertNotNull("Null WBDiscoveryEnv.", wbDiscovery);
View Full Code Here

      return (Boolean)m.invoke(target);
   }

   protected void createMcLib(VirtualFile dir, String metaInfParent, Class<?> clazz) throws Exception
   {
      VirtualFile mcDir = dir.getChild("mc.jar");
      createAssembledDirectory(mcDir)
         .addPackage(clazz)
         .addPath(metaInfParent);
   }
View Full Code Here

         .addPath(metaInfParent);
   }
  
   protected void createWeldLib(VirtualFile dir, String metaInfParent, Class<?> clazz) throws Exception
   {
      VirtualFile weldDir = dir.getChild("weld.jar");
      createAssembledDirectory(weldDir)
         .addPackage(clazz)
         .addPath(metaInfParent);
   }
View Full Code Here

      return suite(McIntegrationTestCase.class);
   }

   public void testMcDeployment() throws Exception
   {
      VirtualFile top = VFS.getChild("top-level.ear");
      createAssembledDirectory(top)
         .addPath("/weld/mcandweld/ear/mconly");
      createMcLib(top, "/weld/mcandweld/mc/simple", SimpleBean.class);
     
      Deployment deployment = createVFSDeployment(top);
View Full Code Here

TOP

Related Classes of org.jboss.vfs.VirtualFile

Copyright © 2018 www.massapicom. 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.