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

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


/* 328 */       log.trace("Checking applications for modifications");
/* 329 */     if (resources != null)
/*     */     {
/* 331 */       for (Resource res : resources)
/*     */       {
/* 333 */         VFSDeployment ctx = (VFSDeployment)res.getProperties().get("deployment");
/* 334 */         if (ctx == null)
/*     */           continue;
/* 336 */         MutableRepository.ModifyStatus status = (MutableRepository.ModifyStatus)res.getProperties().get("modifyStatus");
/* 337 */         Long lastModified = (Long)res.getProperties().get("lastModified");
/* 338 */         VirtualFile root = ctx.getRoot();
/* 339 */         String name = root.getPathName();
/*     */
/* 341 */         if (status == MutableRepository.ModifyStatus.REMOVED)
/*     */         {
/* 343 */           ModificationInfo info = new ModificationInfo(ctx, lastModified.longValue(), ModificationInfo.ModifyStatus.REMOVED);
View Full Code Here


/*     */   {
/* 439 */     Resource res = this.delegate.getResource(vfsPath);
/* 440 */     if ((res == null) || (!(res instanceof VFSDeploymentResource)))
/* 441 */       throw new NoSuchDeploymentException(vfsPath);
/* 442 */     VFSDeploymentResource vfsres = (VFSDeploymentResource)res;
/* 443 */     VFSDeployment deployment = (VFSDeployment)vfsres.getProperties().get("deployment");
/* 444 */     return deployment;
/*     */   }
View Full Code Here

/*     */   {
/* 450 */     Resource res = this.delegate.getResource(vfsPath);
/* 451 */     if ((res == null) || (!(res instanceof VFSDeploymentResource)))
/* 452 */       throw new NoSuchDeploymentException(vfsPath);
/* 453 */     VFSDeploymentResource vfsres = (VFSDeploymentResource)res;
/* 454 */     VFSDeployment deployment = (VFSDeployment)vfsres.getProperties().get("deployment");
/* 455 */     return deployment;
/*     */   }
View Full Code Here

/*     */   {
/* 461 */     Resource res = this.delegate.getResource(vfsPath);
/* 462 */     if ((res == null) || (!(res instanceof VFSDeploymentResource)))
/* 463 */       throw new NoSuchDeploymentException(vfsPath);
/* 464 */     VFSDeploymentResource vfsres = (VFSDeploymentResource)res;
/* 465 */     VFSDeployment deployment = (VFSDeployment)vfsres.getProperties().get("deployment");
/* 466 */     return deployment;
/*     */   }
View Full Code Here

/*     */   protected VFSDeployment removeDeployment(String name, URI uri) throws Exception
/*     */   {
/* 503 */     MutableRepository mrepo = getRepository(uri);
/* 504 */     Resource res = mrepo.removeResource(name);
/* 505 */     VFSDeploymentResource vfsres = (VFSDeploymentResource)res;
/* 506 */     VFSDeployment deployment = (VFSDeployment)vfsres.getProperties().get("deployment");
/* 507 */     return deployment;
/*     */   }
View Full Code Here

/*    */ public class VFSDeploymentScannerImpl extends VFSScanner
/*    */ {
/*    */   protected VFSDeployment add(Profile profile, VirtualFile file)
/*    */     throws Exception
/*    */   {
/* 39 */     VFSDeployment deployment = createDeployment(file);
/* 40 */     if (!profile.hasDeployment(deployment.getName(), ManagedDeployment.DeploymentPhase.APPLICATION))
/* 41 */       profile.addDeployment(deployment, ManagedDeployment.DeploymentPhase.APPLICATION);
/* 42 */     return deployment;
/*    */   }
View Full Code Here

/* 319 */     if (apps != null)
/*     */     {
/* 321 */       Iterator iter = apps.iterator();
/* 322 */       while (iter.hasNext())
/*     */       {
/* 324 */         VFSDeployment ctx = (VFSDeployment)iter.next();
/* 325 */         VirtualFile root = ctx.getRoot();
/* 326 */         Long rootLastModified = Long.valueOf(root.getLastModified());
/* 327 */         String name = root.getPathName();
/*     */
/* 329 */         if (!root.exists())
/*     */         {
/* 331 */           ModificationInfo info = new ModificationInfo(ctx, rootLastModified.longValue(), ModificationInfo.ModifyStatus.REMOVED);
/* 332 */           modified.add(info);
/* 333 */           iter.remove();
/* 334 */           if (trace) {
/* 335 */             log.trace(name + " was removed");
/*     */           }
/*     */         }
/* 338 */         else if (root.hasBeenModified())
/*     */         {
/* 340 */           if (trace) {
/* 341 */             log.trace(name + " was modified: " + rootLastModified);
/*     */           }
/* 343 */           VFSDeployment ctx2 = loadDeploymentData(root);
/* 344 */           ModificationInfo info = new ModificationInfo(ctx2, rootLastModified.longValue(), ModificationInfo.ModifyStatus.MODIFIED);
/* 345 */           modified.add(info);
/*     */         }
/*     */
/*     */       }
/*     */
/* 350 */       for (File applicationDir : this.applicationDirs)
/*     */       {
/* 352 */         VFS deployVFS = VFS.getVFS(applicationDir.toURI());
/* 353 */         VirtualFile deployDir = deployVFS.getRoot();
/* 354 */         List children = deployDir.getChildren();
/* 355 */         for (VirtualFile vf : children)
/*     */         {
/* 357 */           URI uri = vf.toURI();
/* 358 */           if (!this.applicationCtxs.containsKey(uri.toString()))
/*     */           {
/* 360 */             VFSDeployment ctx = loadDeploymentData(vf);
/* 361 */             ModificationInfo info = new ModificationInfo(ctx, vf.getLastModified(), ModificationInfo.ModifyStatus.ADDED);
/* 362 */             modified.add(info);
/* 363 */             this.applicationCtxs.put(vf.getName(), ctx);
/*     */           }
/*     */         }
View Full Code Here

/*     */   }
/*     */
/*     */   protected VFSDeployment getBootstrap(String vfsPath)
/*     */     throws Exception
/*     */   {
/* 558 */     VFSDeployment ctx = (VFSDeployment)this.bootstrapCtxs.get(vfsPath);
/* 559 */     if (ctx == null)
/* 560 */       throw new NoSuchDeploymentException(vfsPath);
/* 561 */     return ctx;
/*     */   }
View Full Code Here

/* 582 */     return applicationDir.toURI();
/*     */   }
/*     */
/*     */   protected VFSDeployment getDeployer(String vfsPath) throws Exception
/*     */   {
/* 587 */     VFSDeployment ctx = (VFSDeployment)this.deployerCtxs.get(vfsPath);
/* 588 */     if (ctx == null)
/* 589 */       throw new NoSuchDeploymentException(vfsPath);
/* 590 */     return ctx;
/*     */   }
View Full Code Here

/*     */   }
/*     */
/*     */   protected VFSDeployment getApplication(String vfsPath)
/*     */     throws Exception
/*     */   {
/* 603 */     VFSDeployment ctx = (VFSDeployment)this.applicationCtxs.get(vfsPath);
/* 604 */     if (ctx == null)
/* 605 */       throw new NoSuchDeploymentException(vfsPath);
/* 606 */     return ctx;
/*     */   }
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.