Package org.jboss.profileservice.spi.managed

Examples of org.jboss.profileservice.spi.managed.ManagedProfileDeployer


            if (trace)
               log.trace("Ignoring not mutable profile: " + key);
            continue;
         }
         MutableProfile activeProfile = MutableProfile.class.cast(managed.getProfile());
         ManagedProfileDeployer deployer = managed.getManagedDeployer();
       
         Collection<ModificationInfo> modifiedDeployments = activeProfile.getModifiedDeployments();
         Collection<String> checkNames = new ArrayList<String>();
         for (ModificationInfo info : modifiedDeployments)
         {
            ProfileDeployment ctx = info.getDeployment();
            try
            {
               switch (info.getStatus())
               {
                  case ADDED:
                  case MODIFIED:
                     deployer.addDeployment(ctx);
                     checkNames.add(ctx.getName());
                     break;
                  case REMOVED:
                     deployer.removeDeployment(ctx);
                     break;
               }
            }
            catch(DeploymentException e)
            {
               log.warn("Failed to add deployment: " + ctx.getName(), e);
            }
         }
         try
         {
            // Process the changes
            if (modifiedDeployments.isEmpty() == false)
            {
               log.info(modifiedDeployments);
              
               deployer.process();
              
               getEventBus().fireModificationEvent(new ProfileModificationEvent(ProfileModificationType.UPDATE, key));
              
               if(checkNames.isEmpty() == false)
               {
                  deployer.checkComplete(checkNames.toArray(new String[checkNames.size()]));
               }
            }
         }
         catch (Exception e)
         {
View Full Code Here

TOP

Related Classes of org.jboss.profileservice.spi.managed.ManagedProfileDeployer

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.