protected boolean doPrepare(ProfileModificationResponse response) { try { // TODO fail if not supported if(persistenceRepository.isSupportPersistence(component)) { ManagedDeployment deployment = component.getDeployment(); persistenceRepository.removeComponent(deployment.getName(), component); } } catch(Exception e) { response.setFailure(e); return false; } return true; }
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; }
if(deploymentRepository == null) response.setFailure(new IllegalStateException("failed to resolve deployment repository")); return false; response.setFailure(new SyncFailedException("Deployment content already exists: "+ artifactName)); return false; response.setFailure(e); return false;
response.setFailure(e); return false;
response.setFailure(t); return false;
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; }
response.setFailure(e); return false;
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; }
response.setFailure(e); return false;