Package org.jboss.deployers.vfs.plugins.structure

Examples of org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl


    }

    public static VFSDeploymentContext getDeploymentContext(final VirtualFile esbArchive) throws Exception
    {
        VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(esbArchive);
        VFSStructuralDeployersImpl structuralDeployers = new VFSStructuralDeployersImpl();
        VFSStructureBuilder builder = new VFSStructureBuilder();
        structuralDeployers.setStructureBuilder(builder);
        StructureDeployer[] deployers = new StructureDeployer[]{new JARStructure()};
        for (StructureDeployer deployer : deployers)
        {
            structuralDeployers.addDeployer(deployer);
        }
        return (VFSDeploymentContext) structuralDeployers.determineStructure(deployment);
    }
View Full Code Here


      return deployment;
   }

   protected VFSDeploymentContext determineStructureWithStructureDeployers(VFSDeployment deployment, StructureDeployer... deployers) throws Exception
   {
      VFSStructuralDeployersImpl structuralDeployers = new TestStructuralDeployers();
      VFSStructureBuilder builder = getStructureBuilder();
      structuralDeployers.setStructureBuilder(builder);

      for (StructureDeployer deployer : deployers)
         structuralDeployers.addDeployer(deployer);

      return (VFSDeploymentContext) structuralDeployers.determineStructure(deployment);
   }
View Full Code Here

      return determineStructureWithStructureDeployers(deployment, true, deployers);
   }

   protected VFSDeploymentContext determineStructureWithStructureDeployers(VFSDeployment deployment, boolean serialize, StructureDeployer... deployers) throws Exception
   {
      VFSStructuralDeployersImpl structuralDeployers = new VFSStructuralDeployersImpl();
      VFSStructureBuilder builder = new VFSStructureBuilder();
      structuralDeployers.setStructureBuilder(builder);
     
      for (StructureDeployer deployer : deployers)
         structuralDeployers.addDeployer(deployer);

      VFSDeploymentContext context = (VFSDeploymentContext)structuralDeployers.determineStructure(deployment);
      if (serialize)
         return serializeDeserialize(context, VFSDeploymentContext.class);
      else
         return context;
   }
View Full Code Here

   }

   protected StructuralDeployers createStructuralDeployers()
   {
      StructureBuilder builder = createStructureBuilder();
      VFSStructuralDeployersImpl structure = new VFSStructuralDeployersImpl();
      structure.setStructureBuilder(builder);
      return structure;
   }
View Full Code Here

   }
  
   protected void addStructureDeployer(DeployerClient main, StructureDeployer deployer)
   {
      MainDeployerImpl mainDeployerImpl = (MainDeployerImpl) main;
      VFSStructuralDeployersImpl structure = (VFSStructuralDeployersImpl) mainDeployerImpl.getStructuralDeployers();
      structure.addDeployer(deployer);
   }
View Full Code Here

   }

   public void testContextClassLoader() throws Exception
   {
      TestDummyClassLoader dummy = new TestDummyClassLoader();
      VFSStructuralDeployersImpl structuralDeployers = new VFSStructuralDeployersImpl();
      VFSStructureBuilder builder = new VFSStructureBuilder();
      structuralDeployers.setStructureBuilder(builder);
      structuralDeployers.addDeployer(new JARStructure());
      structuralDeployers.addDeployer(new FileStructure());

      ClassLoader previous = Thread.currentThread().getContextClassLoader();
      Thread.currentThread().setContextClassLoader(dummy);
      try
      {
         TestDummyClassLoaderStructureDeployer deployer = new TestDummyClassLoaderStructureDeployer();
         structuralDeployers.addDeployer(deployer);
      }
      finally
      {
         Thread.currentThread().setContextClassLoader(previous);
      }

      VFSDeployment deployment = createDeployment("/structure/file", "simple");
      structuralDeployers.determineStructure(deployment);
      assertEquals(dummy, TestDummyClassLoaderStructureDeployer.getAndResetClassLoader());
   }
View Full Code Here

      return deployment;
   }

   protected VFSDeploymentContext determineStructureWithStructureDeployers(VFSDeployment deployment, StructureDeployer... deployers) throws Exception
   {
      VFSStructuralDeployersImpl structuralDeployers = new TestStructuralDeployers();
      VFSStructureBuilder builder = getStructureBuilder();
      structuralDeployers.setStructureBuilder(builder);

      for (StructureDeployer deployer : deployers)
         structuralDeployers.addDeployer(deployer);

      return (VFSDeploymentContext) structuralDeployers.determineStructure(deployment);
   }
View Full Code Here

      return determineStructureWithStructureDeployers(deployment, true, deployers);
   }

   protected VFSDeploymentContext determineStructureWithStructureDeployers(VFSDeployment deployment, boolean serialize, StructureDeployer... deployers) throws Exception
   {
      VFSStructuralDeployersImpl structuralDeployers = new VFSStructuralDeployersImpl();
      VFSStructureBuilder builder = new VFSStructureBuilder();
      structuralDeployers.setStructureBuilder(builder);
     
      for (StructureDeployer deployer : deployers)
         structuralDeployers.addDeployer(deployer);

      VFSDeploymentContext context = (VFSDeploymentContext)structuralDeployers.determineStructure(deployment);
      if (serialize)
         return serializeDeserialize(context, VFSDeploymentContext.class);
      else
         return context;
   }
View Full Code Here

TOP

Related Classes of org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl

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.