/** * Resolve a deployment name against all registered profiles. * * @param name the simple deployment name * @return the resolved deployment name * @throws NoSuchDeploymentException */ protected String resolveDeploymentName(String name) throws NoSuchDeploymentException { for(ProfileKey key : actionController.getActiveProfiles()) { ManagedProfile managed = actionController.getManagedProfile(key); if(managed == null) { continue; } Profile profile = managed.getProfile(); if(profile.hasDeployment(name)) { ProfileDeployment deployment = profile.getDeployment(name); return deployment.getName(); } } throw new NoSuchDeploymentException(name); }
if(checkMutableOnly && profile.isMutable() == false) if(profile.hasDeployment(deploymentName))
for(String deploymentName : getDeploymentNames()) ProfileDeployment deployment = profile.getDeployment(deploymentName); ProfileDeploymentInfo info = deployment.getDeploymentInfo(); if(info.isDeployed())
for(ProfileDeployment deployment : profile.getDeployments())
protected boolean doPrepare(ProfileModificationResponse response) { try { final Profile profile = getManagedProfile().getProfile(); final ManagedProfileDeployer deployer = getManagedProfile().getManagedDeployer(); for(String deploymentName : getDeploymentNames()) { ProfileDeployment deployment = profile.getDeployment(deploymentName); ProfileDeploymentInfo info = deployment.getDeploymentInfo(); info.setFlag(ProfileDeploymentFlag.LOCKED); // Remove from deployer deployer.removeDeployment(deployment); // Add to the deployment list addDeployment(deployment); } // Process deployer.process(); // Notify response.fireModificationEvent(ProfileModificationEvent.create(ProfileModificationType.DELETE, getManagedProfile().getProfileKey())); } catch(Exception e) { response.setFailure(e); return false; } return true; }
if(managed.getProfile().isMutable() == false || managed.getProfile() instanceof MutableProfile == false)