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

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


      return classPath;
   }
  
   public void visit(DeploymentContext context) throws DeploymentException
   {
      VFSDeploymentContext vfsContext = (VFSDeploymentContext) context;
      List<VirtualFile> paths = vfsContext.getClassPath();
      if (paths != null)
         classPath.addAll(paths);
   }
View Full Code Here


/* 52 */     return this.classPath;
/*    */   }
/*    */
/*    */   public void visit(DeploymentContext context) throws DeploymentException
/*    */   {
/* 57 */     VFSDeploymentContext vfsContext = (VFSDeploymentContext)context;
/* 58 */     List paths = vfsContext.getClassPath();
/* 59 */     if (paths != null)
/* 60 */       this.classPath.addAll(paths);
/*    */   }
View Full Code Here

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

/* 87 */     if ((context instanceof VFSDeploymentContext))
/*    */     {
/* 89 */       boolean trace = log.isTraceEnabled();
/* 90 */       log.trace("Apply context: " + context.getName() + " " + contextInfo);
/*    */
/* 92 */       VFSDeploymentContext vfsContext = (VFSDeploymentContext)context;
/* 93 */       List metaDataPath = contextInfo.getMetaDataPath();
/* 94 */       if ((metaDataPath != null) && (!metaDataPath.isEmpty())) {
/* 95 */         vfsContext.setMetaDataPath(contextInfo.getMetaDataPath());
/*    */       }
/* 97 */       boolean classPathHadVF = false;
/*    */
/* 99 */       List classPathEntries = contextInfo.getClassPath();
/* 100 */       VFSDeploymentContext top = vfsContext.getTopLevel();
/* 101 */       VirtualFile root = top.getRoot();
/* 102 */       List classPath = new ArrayList();
/*    */
/* 104 */       if (classPathEntries != null)
/*    */       {
/* 106 */         for (ClassPathEntry entry : classPathEntries)
View Full Code Here

/*     */
/*  76 */     VirtualFile root = null;
/*  77 */     URL url = null;
/*  78 */     if ((context instanceof VFSDeploymentContext))
/*     */     {
/*  80 */       VFSDeploymentContext vfsContext = (VFSDeploymentContext)context;
/*     */
/*  83 */       root = vfsContext.getRoot();
/*     */       try
/*     */       {
/*  86 */         if (root != null)
/*  87 */           url = trimJARURL(root.toURL());
/*     */       }
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.getChild(path);
            return new AbstractVFSDeploymentContext(applyModification(file.exists() ? file : null, child), path);
         }
         catch (RuntimeException t)
         {
            throw DeploymentException.rethrowAsDeploymentException("Unable to determine child " + path + " from parent " + vfsParent.getRoot().getName(), t);
         }
      }
      return super.createChildDeploymentContext(parent, child);
   }
View Full Code Here

      {
         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

   public void prepareContextInfo(DeploymentContext parentDeploymentContext, ContextInfo contextInfo)
   {
      if (parentDeploymentContext instanceof VFSDeploymentContext == false || contextInfo == null)
         return;

      VFSDeploymentContext vfsParentDeploymentContext = VFSDeploymentContext.class.cast(parentDeploymentContext);
      VirtualFile root = vfsParentDeploymentContext.getFile(contextInfo.getPath());
      checkForModification(root, contextInfo);
   }
View Full Code Here

           
            return result;
         }
      }

      VFSDeploymentContext deploymentContext;
      try
      {
         String name = root.toURI().toString();
         deploymentContext = getDeploymentContext(name);
         if (deploymentContext != null)
View Full Code Here

   public boolean hasStructureBeenModified(VFSDeployment deployment) throws IOException
   {
      if (deployment == null)
         throw new IllegalArgumentException("Null deployment");

      VFSDeploymentContext deploymentContext = getDeploymentContext(deployment.getName());
      return deploymentContext != null && hasStructureBeenModified(deploymentContext);
   }
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.