Examples of VFSDeployment


Examples of org.jboss.test.virtual.support.ps.VFSDeployment

   {
   }
   public VFSDeployment getDeployment(String name, DeploymentPhase phase)
      throws Exception
   {
      VFSDeployment ctx = null;
      if( phase == null )
      {
         try
         {
            if( ctx == null )
View Full Code Here

Examples of org.jboss.test.virtual.support.ps.VFSDeployment

         if( apps != null )
         {
            Iterator<VFSDeployment> iter = apps.iterator();
            while( iter.hasNext() )
            {
               VFSDeployment ctx = iter.next();
               VirtualFile root = ctx.getRoot();
               // See if this file is locked
               if(this.lockedApps.contains(root.getPathName()))
               {
                  if(trace)
                     log.trace("Ignoring locked application: "+root);
                  continue;
               }
               Long rootLastModified = root.getLastModified();
               String name = root.getPathName();
               // Check for removal
               if( root.exists() == false )
               {
                  ModificationInfo info = new ModificationInfo(ctx, rootLastModified, ModifyStatus.REMOVED);
                  modified.add(info);
                  iter.remove();
                  if( trace )
                     log.trace(name+" was removed");
               }
               // Check for modification
               else if( root.hasBeenModified() )
               {
                  if( trace )
                     log.trace(name+" was modified: "+rootLastModified);
                  // Need to create a duplicate ctx
                  VFSDeployment ctx2 = loadDeploymentData(root);
                  ModificationInfo info = new ModificationInfo(ctx2, rootLastModified, ModifyStatus.MODIFIED);
                  modified.add(info);
               }
               // TODO: this could check metadata files modifications as well
            }
            // Now check for additions
            for (File applicationDir : applicationDirs)
            {
               VirtualFile deployDir = VFS.getRoot(applicationDir.toURI());
               List<VirtualFile> children = deployDir.getChildren();
               for(VirtualFile vf : children)
               {
                  URI uri = vf.toURI();
                  if( applicationCtxs.containsKey(uri.toString()) == false )
                  {
                     VFSDeployment ctx = loadDeploymentData(vf);
                     ModificationInfo info = new ModificationInfo(ctx, vf.getLastModified(), ModifyStatus.ADDED);
                     modified.add(info);
                     applicationCtxs.put(vf.toURI().toString(), ctx);
                  }
               }
View Full Code Here

Examples of org.jboss.test.virtual.support.ps.VFSDeployment

   }

   public VFSDeployment removeDeployment(String name, DeploymentPhase phase)
      throws Exception
   {
      VFSDeployment ctx = null;
      switch( phase )
      {
         case BOOTSTRAP:
            ctx = this.removeBootstrap(name);
            break;
View Full Code Here

Examples of org.jboss.test.virtual.support.ps.VFSDeployment

   }

   protected VFSDeployment getBootstrap(String vfsPath)
      throws Exception
   {
      VFSDeployment ctx = null;
      return ctx;
   }
View Full Code Here

Examples of org.jboss.test.virtual.support.ps.VFSDeployment

   }

   protected VFSDeployment getApplication(String vfsPath)
      throws Exception
   {
      VFSDeployment ctx = applicationCtxs.get(vfsPath);
      if( ctx == null )
      {
         // Try to find the simple name
         log.debug("Failed to find application for: "+vfsPath+", scanning for simple name");
         for(VFSDeployment deployment : applicationCtxs.values())
View Full Code Here

Examples of org.jboss.test.virtual.support.ps.VFSDeployment

      return applicationCtxs.values();
   }

   protected VFSDeployment removeBootstrap(String vfsPath) throws IOException
   {
      VFSDeployment vfsDeployment = null;
      return vfsDeployment;
   }
View Full Code Here

Examples of org.jboss.test.virtual.support.ps.VFSDeployment

   }

   // this is an infinite loop
   protected VFSDeployment removeDeployer(String vfsPath) throws IOException
   {
      VFSDeployment vfsDeployment = null;
      return vfsDeployment;
   }
View Full Code Here

Examples of org.jboss.test.virtual.support.ps.VFSDeployment

      VFSDeployment vfsDeployment = null;
      return vfsDeployment;
   }
   protected VFSDeployment removeApplication(String vfsPath) throws IOException
   {
      VFSDeployment vfsDeployment = applicationCtxs.get(vfsPath);
      if(vfsDeployment == null)
         throw new IllegalStateException("Deployment not found: " + vfsPath);
      // Find the application dir
      File applicationDir = applicationDirs[0];
      File deploymentFile = new File(applicationDir, vfsDeployment.getSimpleName());
      if( Files.delete(deploymentFile) == false )
         throw new IOException("Failed to delete: "+deploymentFile);
      return this.applicationCtxs.remove(vfsPath);
   }
View Full Code Here

Examples of org.jboss.test.virtual.support.ps.VFSDeployment

      throws IOException
   {
      List<VirtualFile> children = applicationDir.getChildren();
      for(VirtualFile vf : children)
      {
         VFSDeployment vfCtx = loadDeploymentData(vf);
         applicationCtxs.put(vfCtx.getName(), vfCtx);        
      }
   }
View Full Code Here

Examples of org.jboss.test.virtual.support.ps.VFSDeployment

    */
   private VFSDeployment loadDeploymentData(VirtualFile file)
   {
      // Check for a persisted context
      // Load the base deployment
      VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(file);
      log.debug("Created deployment: "+deployment);
      return deployment;
   }
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.