Package org.jboss.profileservice.spi

Examples of org.jboss.profileservice.spi.ProfileDeployment


   protected ProfileDeployment scheduleStop(String name, DeploymentRepository deploymentRepository) throws Exception
   {
      String deploymentName = resolveDeploymentName(name);
      if(deploymentName != null)
      {
         ProfileDeployment deployment = this.transientProfile.getDeployment(deploymentName);
         // FIXME update the timestamp
         this.transientProfile.addDeployment(deployment);
         return deployment;
      }
      else
      {
         // Lock content
         ProfileDeployment deployment = deploymentRepository.getDeployment(name);
         deploymentRepository.lockDeploymentContent(deployment.getName());
         return deployment;
      }
   }
View Full Code Here


      for(String deploymentName : deploymentNames)
      {
         // Get the deployment content
         VirtualFile vf = resolveDeploymentName(deploymentName);
         // Load the deployment
         ProfileDeployment deployment = createDeployment(vf);
         // Add the deployment
         addDeployment(deployment.getName(), deployment);
      }
      updateLastModfied();
   }
View Full Code Here

               String name = file.toURI().toString();
               // it still exists - remove it
               if (acceptsDeployment(name) == false)
               {
                  unlockRead();
                  ProfileDeployment previous;
                  try
                  {
                     // the actual removal, but we don't delete the file
                     previous = removeDeployment(name, false);
                  }
View Full Code Here

   public ProfileDeployment getDeployment(String vfsPath) throws NoSuchDeploymentException
   {
      if(vfsPath == null)
         throw new IllegalArgumentException("Null name");
     
      ProfileDeployment ctx = super.getDeployment(vfsPath);
      if(ctx == null)
      {
         List<String> names = findDeploymentContent(vfsPath);
         if(names.size() == 1)
         {
View Full Code Here

      return repositoryName;
   }

   public ProfileDeployment removeDeployment(String vfsPath) throws Exception
   {
      ProfileDeployment deployment = getDeployment(vfsPath);
      VirtualFile root = deployment.getRoot();
      this.clusteringHandler.removeDeploymentContent(root);
      return super.removeDeployment(deployment.getName());
   }
View Full Code Here

         MutableProfile activeProfile = (MutableProfile)profile;
         Collection<ModificationInfo> modifiedDeployments = activeProfile.getModifiedDeployments();
         for (ModificationInfo info : modifiedDeployments)
         {
            ProfileDeployment ctx = info.getDeployment();
            switch (info.getStatus())
            {
               case ADDED:
               case MODIFIED:
                  deployer.addDeployment(ctx);
                  modifiedDeploymentNames.add(ctx.getName());
                  break;
               case REMOVED:
                  deployer.removeDeployment(ctx.getName());
                  break;
            }
         }

         if (modifiedDeployments.size() > 0)
View Full Code Here

   {
      if(vfsPath == null)
         throw new IllegalArgumentException("Null vfsPath");
     
      // Get the deployment
      ProfileDeployment deployment = getDeployment(vfsPath);
      // Remove the entries
      this.applicationCtxs.remove(deployment.getName());
      this.applicationVFCache.remove(deployment.getName());
      // Update last modified
      updateLastModfied();
      // Return
      return deployment;
   }
View Full Code Here

   {
      ArrayList<VirtualFile> added = new ArrayList<VirtualFile>();
      addedDeployment(added, applicationDir);
      for (VirtualFile vf : added)
      {
         ProfileDeployment vfCtx = createDeployment(vf);
         addDeployment(vfCtx.getName(), vfCtx);
      }
   }
View Full Code Here

         if (apps != null)
         {
            Iterator<ProfileDeployment> iter = apps.iterator();
            while (iter.hasNext())
            {
               ProfileDeployment ctx = iter.next();
               VirtualFile root = ctx.getRoot();
               String pathName = ctx.getName();
               // Ignore locked or disabled applications
               if (this.hasDeploymentContentFlags(pathName, ignoreFlags))
               {
                  if (trace)
                     log.trace("Ignoring locked application: " + root);
View Full Code Here

   protected void applyAddedDeployments(URI applicationDir, List<ModificationInfo> modified, List<VirtualFile> added) throws Exception
   {
      for (VirtualFile vf : added)
      {
         // Create deployment
         ProfileDeployment ctx = createDeployment(vf);
         // Create modification info
         ModificationInfo info = new ModificationInfo(ctx, vf.getLastModified(), ModifyStatus.ADDED);
         // Add
         modified.add(info);
         internalAddDeployment(ctx.getName(), ctx);
         getChecker().addStructureRoot(vf);
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.profileservice.spi.ProfileDeployment

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.