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)
{