Package org.jboss.deployers.vfs.spi.client

Examples of org.jboss.deployers.vfs.spi.client.VFSDeployment


      if (log.isTraceEnabled())
      {
         log.trace("Deploying: " + component);
      }

      VFSDeployment deployment = null;
      try
      {
         Profile profile = profileService.getProfile(profileKey);
         deployment = add(profile, component);
      }
      catch (Exception e)
      {
         log.debug("Failed to deploy: " + component, e);
      }

      if (deployment != null && !deployedSet.containsKey(component))
      {
         deployedSet.put(component, deployment.getName());
      }
   }
View Full Code Here


   protected void determineStructure(Deployment deployment, StructureMetaData structure) throws Exception
   {
      if (deployment instanceof VFSDeployment == false)
         throw new DeploymentException("Structure can only be determined for VFSDeployments " + deployment);
     
      VFSDeployment vfsDeployment = (VFSDeployment) deployment;
     
      VirtualFile root = vfsDeployment.getRoot();
      if (root == null)
         throw new IllegalStateException("Deployment has no root " + deployment);
      if (doDetermineStructure(root, null, root, structure) == false)
         throw new DeploymentException("No deployer recognised the structure of " + deployment.getName());
   }
View Full Code Here

  
   protected DeploymentContext createRootDeploymentContext(Deployment deployment) throws Exception
   {
      if (deployment instanceof VFSDeployment)
      {
         VFSDeployment vfsDeployment = (VFSDeployment) deployment;
         return new AbstractVFSDeploymentContext(vfsDeployment.getRoot(), "");
      }
      return super.createRootDeploymentContext(deployment);
   }
View Full Code Here

      if (deploymentName == null)
      {
         try
         {
            VirtualFile file = VFS.createNewRoot(url);
            VFSDeployment deployment = deploymentFactory.createVFSDeployment(file);
            delegate.addDeployment(deployment);
            deploymentName = deployment.getName();
            delegate.process();
            // TODO: JBAS-4292
            contextMap.put(url, deploymentName);
            delegate.checkComplete(deployment);
         }
View Full Code Here

   protected void determineStructure(Deployment deployment, StructureMetaData structure) throws Exception
   {
      if (deployment instanceof VFSDeployment == false)
         throw new DeploymentException("Structure can only be determined for VFSDeployments " + deployment);
     
      VFSDeployment vfsDeployment = (VFSDeployment) deployment;
     
      VirtualFile root = vfsDeployment.getRoot();
      if (root == null)
         throw new IllegalStateException("Deployment has no root " + deployment);
      StructureContext context = new StructureContext(root, structure, this);
      if (doDetermineStructure(context) == false)
         throw new DeploymentException("No deployer recognised the structure of " + deployment.getName());
View Full Code Here

/*  804 */     if (deploymentName == null)
/*      */     {
/*      */       try
/*      */       {
/*  808 */         VirtualFile file = VFS.getRoot(url);
/*  809 */         VFSDeployment deployment = this.deploymentFactory.createVFSDeployment(file);
/*  810 */         this.delegate.addDeployment(deployment);
/*  811 */         deploymentName = deployment.getName();
/*  812 */         this.delegate.process();
/*      */
/*  814 */         this.delegate.checkComplete(new Deployment[] { deployment });
/*  815 */         this.contextMap.put(url, deploymentName);
/*      */       }
View Full Code Here

/*     */   }
/*     */
/*     */   public VFSDeployment getDeployment(String name, ManagedDeployment.DeploymentPhase phase)
/*     */     throws NoSuchDeploymentException
/*     */   {
/* 196 */     VFSDeployment d = findDeployment(name, phase);
/*     */
/* 198 */     if (d == null)
/* 199 */       throw new NoSuchDeploymentException("name=" + name + ", phase=" + phase);
/* 200 */     return d;
/*     */   }
View Full Code Here

/* 285 */     if (apps != null)
/*     */     {
/* 287 */       Iterator iter = apps.iterator();
/* 288 */       while (iter.hasNext())
/*     */       {
/* 290 */         VFSDeployment d = (VFSDeployment)iter.next();
/* 291 */         VirtualFile root = d.getRoot();
/*     */
/* 293 */         VirtualFile parent = root.getParent();
/* 294 */         if ((applicationDir == null) || (parent.getPathName().compareTo(applicationDir.getPathName()) < 0))
/* 295 */           applicationDir = parent;
/* 296 */         Long rootLastModified = Long.valueOf(root.getLastModified());
/* 297 */         String name = root.getPathName();
/*     */
/* 299 */         if (!root.exists())
/*     */         {
/* 301 */           ModificationInfo info = new ModificationInfo(d, rootLastModified.longValue(), ModificationInfo.ModifyStatus.REMOVED);
/* 302 */           modified.add(info);
/* 303 */           iter.remove();
/* 304 */           if (trace) {
/* 305 */             this.log.trace(name + " was removed");
/*     */           }
/*     */         }
/* 308 */         else if (root.hasBeenModified())
/*     */         {
/* 310 */           if (trace) {
/* 311 */             this.log.trace(name + " was modified: " + rootLastModified);
/*     */           }
/* 313 */           VFSDeployment deployment2 = this.deploymentFactory.createVFSDeployment(root);
/* 314 */           ModificationInfo info = new ModificationInfo(deployment2, rootLastModified.longValue(), ModificationInfo.ModifyStatus.MODIFIED);
/* 315 */           modified.add(info);
/*     */         }
/*     */
/*     */       }
/*     */
/* 321 */       if (applicationDir == null) {
/* 322 */         applicationDir = getRootFile(ManagedDeployment.DeploymentPhase.APPLICATION);
/*     */       }
/* 324 */       ArrayList added = new ArrayList();
/* 325 */       addDeployments(added, applicationDir);
/* 326 */       for (VirtualFile vf : added)
/*     */       {
/* 328 */         VFSDeployment d = this.deploymentFactory.createVFSDeployment(vf);
/* 329 */         ModificationInfo info = new ModificationInfo(d, vf.getLastModified(), ModificationInfo.ModifyStatus.ADDED);
/* 330 */         modified.add(info);
/* 331 */         this.applications.put(d.getName(), d);
/*     */       }
/*     */     }
/* 334 */     return modified;
/*     */   }
View Full Code Here

/* 395 */     return (VFSDeployment)this.bootstraps.remove(name);
/*     */   }
/*     */
/*     */   protected VFSDeployment getBootstrap(String name)
/*     */   {
/* 400 */     VFSDeployment deployment = (VFSDeployment)this.bootstraps.get(name);
/* 401 */     return deployment;
/*     */   }
View Full Code Here

/* 416 */     return (VFSDeployment)this.deployers.remove(name);
/*     */   }
/*     */
/*     */   protected VFSDeployment getDeployer(String name)
/*     */   {
/* 421 */     VFSDeployment deployment = (VFSDeployment)this.deployers.get(name);
/* 422 */     return deployment;
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.deployers.vfs.spi.client.VFSDeployment

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.