Package org.jboss.deployers.vfs.spi.structure

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext


      {
         boolean trace = log.isTraceEnabled();
         if (trace)
            log.trace("Apply context: " + context.getName() + " " + contextInfo);
        
         VFSDeploymentContext vfsContext = (VFSDeploymentContext) context;
         List<MetaDataEntry> metaDataPath = contextInfo.getMetaDataPath();
         if (metaDataPath != null && metaDataPath.isEmpty() == false)
            vfsContext.setMetaDataPath(contextInfo.getMetaDataPath());
        
         boolean classPathHadVF = false;

         List<ClassPathEntry> classPathEntries = contextInfo.getClassPath();
         VFSDeploymentContext top = vfsContext.getTopLevel();
         VirtualFile root = top.getRoot();
         List<VirtualFile> classPath = new ArrayList<VirtualFile>();

         if (classPathEntries != null)
         {
            for (ClassPathEntry entry : classPathEntries)
View Full Code Here


{
    private TestUtil() { }

    public static VFSDeploymentUnit getDeploymentUnit(final VirtualFile esbArchive) throws Exception
    {
        VFSDeploymentContext deploymentContext = getDeploymentContext(esbArchive);
        deploymentContext.setClassLoader(TestUtil.class.getClassLoader());
        return getDeploymentUnit(deploymentContext);
    }
View Full Code Here

   protected DeploymentContext createChildDeploymentContext(DeploymentContext parent, ContextInfo child) throws Exception
   {
      if (parent instanceof VFSDeploymentContext)
      {
         VFSDeploymentContext vfsParent = (VFSDeploymentContext) parent;
         String path = child.getPath();
         try
         {
            VirtualFile parentFile = vfsParent.getRoot();
            VirtualFile file = parentFile.findChild(path);
            return new AbstractVFSDeploymentContext(file, path);
         }
         catch (Throwable t)
         {
            throw DeploymentException.rethrowAsDeploymentException("Unable to determine child " + path + " from parent " + vfsParent.getRoot().getName(), t);
         }
      }
      return super.createChildDeploymentContext(parent, child);
   }
View Full Code Here

      if (context instanceof VFSDeploymentContext)
      {
         boolean trace = log.isTraceEnabled();
         log.trace("Apply context: " + context.getName() + " " + contextInfo);
        
         VFSDeploymentContext vfsContext = (VFSDeploymentContext) context;
         List<String> metaDataPath = contextInfo.getMetaDataPath();
         if (metaDataPath != null && metaDataPath.isEmpty() == false)
            vfsContext.setMetaDataPath(contextInfo.getMetaDataPath());
        
         boolean classPathHadVF = false;

         List<ClassPathEntry> classPathEntries = contextInfo.getClassPath();
         VFSDeploymentContext top = vfsContext.getTopLevel();
         VirtualFile root = top.getRoot();
         List<VirtualFile> classPath = new ArrayList<VirtualFile>();

         if (classPathEntries != null)
         {
            for (ClassPathEntry entry : classPathEntries)
View Full Code Here

   protected DeploymentContext createChildDeploymentContext(DeploymentContext parent, ContextInfo child) throws Exception
   {
      if (parent instanceof VFSDeploymentContext)
      {
         VFSDeploymentContext vfsParent = (VFSDeploymentContext) parent;
         String path = child.getPath();
         try
         {
            VirtualFile parentFile = vfsParent.getRoot();
            VirtualFile file = parentFile.findChild(path); // leaving the findChild usage
            return new AbstractVFSDeploymentContext(file, path);
         }
         catch (Throwable t)
         {
            throw DeploymentException.rethrowAsDeploymentException("Unable to determine child " + path + " from parent " + vfsParent.getRoot().getName(), t);
         }
      }
      return super.createChildDeploymentContext(parent, child);
   }
View Full Code Here

      if (context instanceof VFSDeploymentContext)
      {
         boolean trace = log.isTraceEnabled();
         log.trace("Apply context: " + context.getName() + " " + contextInfo);
        
         VFSDeploymentContext vfsContext = (VFSDeploymentContext) context;
         List<String> metaDataPath = contextInfo.getMetaDataPath();
         if (metaDataPath != null && metaDataPath.isEmpty() == false)
            vfsContext.setMetaDataPath(contextInfo.getMetaDataPath());
        
         boolean classPathHadVF = false;

         List<ClassPathEntry> classPathEntries = contextInfo.getClassPath();
         VFSDeploymentContext top = vfsContext.getTopLevel();
         VirtualFile root = top.getRoot();
         List<VirtualFile> classPath = new ArrayList<VirtualFile>();

         if (classPathEntries != null)
         {
            for (ClassPathEntry entry : classPathEntries)
View Full Code Here

   }

   protected Deployment createDeployment(StructureDeployer... deployers) throws Exception
   {
      VFSDeployment deployment = createDeployment();
      VFSDeploymentContext context = determineStructureWithStructureDeployers(deployment, deployers);
      ((MutableAttachments)deployment.getPredeterminedManagedObjects()).addAttachment(DeploymentContext.class, context);
      return deployment;
   }
View Full Code Here

      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 VFSDeploymentContext deploy(String context, String path) throws Throwable
   {
      VFSDeployment deployment = createDeployment(context, path);
      VFSDeploymentContext result = determineStructure(deployment);
      assertNotNull(result);
      if (result.getProblem() != null)
         throw result.getProblem();
      return result;
   }
View Full Code Here

      return result;
   }
  
   protected VFSDeploymentContext assertDeploy(String context, String path) throws Throwable
   {
      VFSDeploymentContext result = deploy(context, path);
      assertEquals(path, result.getSimpleName());
      return result;
   }
View Full Code Here

TOP

Related Classes of org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext

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.