protected void doCommit(ProfileModificationResponse response) { for(DeploymentState state : getDeployments()) { ProfileDeploymentInfo info = state.getDeployment().getDeploymentInfo(); // Mark as deployed info.setFlag(ProfileDeploymentFlag.DEPLOYED); // Clear locked and enable hot-deployment scans info.clearFlag(ProfileDeploymentFlag.LOCKED); } }
protected boolean doPrepare(ProfileModificationResponse response) { try { ProfileDeployment deployment = deploymentRepository.getDeployment(deploymentName); deployment.getDeploymentInfo().setFlag(ProfileDeploymentFlag.LOCKED); deploymentRepository.removeDeployment(deploymentName); // Notify response.fireModificationEvent(ProfileModificationEvent.create(ProfileModificationType.DELETE, key)); } catch(Exception e) { response.setFailure(e); return false; } return true; }
protected boolean doPrepare(ProfileModificationResponse response) { try { final String name = getDeploymentName(); final URL url = getDeploymentID().getContentURL(); if(url == null) { return false; } // final VirtualFile vf = VFS.getChild(url); // Create the deployment directly final ProfileDeployment deployment = deploymentFactory.createDeployment(vf, new TransientDeploymentMetaData(name)); deployment.getDeploymentInfo().setFlag(ProfileDeploymentFlag.LOCKED); // Attach original deployment url for resolving deployment names deployment.getTransientAttachments().putAttachment(TransientProfileActivator.TRANSIENT_DEPLOYMENT_URL_KEY, url.toExternalForm()); getProfile().addDeployment(deployment); // Notify response.fireModificationEvent(ProfileModificationEvent.create(ProfileModificationType.ADD, getProfile().getKey())); } catch(Exception e) { response.setFailure(e); return false; } return true; }
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; }