public DeploymentBuilder nameFromDeployment(String deploymentId) { String name = deployment.getName(); if (name != null && !name.isEmpty()) { String message = String.format("Cannot set the given deployment id '%s' to get the name from it, because the deployment name has been already set to '%s'.", deploymentId, name); throw new NotValidException(message); } nameFromDeployment = deploymentId; return this; }
public DeploymentBuilder nameFromDeployment(String deploymentId) { String name = deployment.getName(); if (name != null && !name.isEmpty()) { String message = String.format("Cannot set the given deployment id '%s' to get the name from it, because the deployment name has been already set to '%s'.", deploymentId, name); throw new NotValidException(message); } nameFromDeployment = deploymentId; return this; }
/** * Searches for previous deployments with the same name. * @param commandContext * @param deployment the current deployment * @return a set of deployment ids */ protected Set<String> resumePreviousByDeploymentName(CommandContext commandContext, DeploymentEntity deployment) { List<Deployment> previousDeployments = new DeploymentQueryImpl().deploymentName(deployment.getName()).list(); Set<String> deploymentIds = new HashSet<String>(previousDeployments.size()); for (Deployment d : previousDeployments) { deploymentIds.add(d.getId()); } return deploymentIds; }
/** * Searches for previous deployments with the same name. * @param commandContext * @param deployment the current deployment * @return a set of deployment ids */ protected Set<String> resumePreviousByDeploymentName(CommandContext commandContext, DeploymentEntity deployment) { List<Deployment> previousDeployments = new DeploymentQueryImpl().deploymentName(deployment.getName()).list(); Set<String> deploymentIds = new HashSet<String>(previousDeployments.size()); for (Deployment d : previousDeployments) { deploymentIds.add(d.getId()); } return deploymentIds; }
protected void setDeploymentName(String deploymentId, DeploymentBuilderImpl deploymentBuilder, CommandContext commandContext) { if (deploymentId != null && !deploymentId.isEmpty()) { DeploymentManager deploymentManager = commandContext.getDeploymentManager(); DeploymentEntity deployment = deploymentManager.findDeploymentById(deploymentId); deploymentBuilder.getDeployment().setName(deployment.getName()); } }
protected void setDeploymentName(String deploymentId, DeploymentBuilderImpl deploymentBuilder, CommandContext commandContext) { if (deploymentId != null && !deploymentId.isEmpty()) { DeploymentManager deploymentManager = commandContext.getDeploymentManager(); DeploymentEntity deployment = deploymentManager.findDeploymentById(deploymentId); deploymentBuilder.getDeployment().setName(deployment.getName()); } }
public void deploy(DeploymentEntity deployment) { LOG.debugProcessingDeployment(deployment.getName()); Properties properties = new Properties(); List<DefinitionEntity> definitions = parseDefinitionResources(deployment, properties); ensureNoDuplicateDefinitionKeys(definitions); postProcessDefinitions(deployment, definitions, properties); }
.findLatestResourcesByDeploymentName(deployment.getName(), containedResources.keySet(), source, deployment.getTenantId());
public void deploy(DeploymentEntity deployment) { LOG.debugProcessingDeployment(deployment.getName()); Properties properties = new Properties(); List<DefinitionEntity> definitions = parseDefinitionResources(deployment, properties); ensureNoDuplicateDefinitionKeys(definitions); postProcessDefinitions(deployment, definitions, properties); }
.findLatestResourcesByDeploymentName(deployment.getName(), containedResources.keySet(), source, deployment.getTenantId());
@Override public DeploymentWithDefinitions call() throws Exception { acquireExclusiveLock(commandContext); DeploymentEntity deployment = initDeployment(); Map<String, ResourceEntity> resourcesToDeploy = resolveResourcesToDeploy(commandContext, deployment); Map<String, ResourceEntity> resourcesToIgnore = new HashMap<String, ResourceEntity>(deployment.getResources()); resourcesToIgnore.keySet().removeAll(resourcesToDeploy.keySet()); if (!resourcesToDeploy.isEmpty()) { LOG.debugCreatingNewDeployment(); deployment.setResources(resourcesToDeploy); deploy(deployment); } else { LOG.usingExistingDeployment(); deployment = getExistingDeployment(commandContext, deployment.getName()); } scheduleProcessDefinitionActivation(commandContext, deployment); if(deploymentBuilder instanceof ProcessApplicationDeploymentBuilder) { // for process application deployments, job executor registration is managed by // process application manager Set<String> processesToRegisterFor = retrieveProcessKeysFromResources(resourcesToIgnore); ProcessApplicationRegistration registration = registerProcessApplication(commandContext, deployment, processesToRegisterFor); return new ProcessApplicationDeploymentImpl(deployment, registration); } else { registerWithJobExecutor(commandContext, deployment); } return deployment; } });
@Override public DeploymentWithDefinitions call() throws Exception { acquireExclusiveLock(commandContext); DeploymentEntity deployment = initDeployment(); Map<String, ResourceEntity> resourcesToDeploy = resolveResourcesToDeploy(commandContext, deployment); Map<String, ResourceEntity> resourcesToIgnore = new HashMap<String, ResourceEntity>(deployment.getResources()); resourcesToIgnore.keySet().removeAll(resourcesToDeploy.keySet()); if (!resourcesToDeploy.isEmpty()) { LOG.debugCreatingNewDeployment(); deployment.setResources(resourcesToDeploy); deploy(deployment); } else { LOG.usingExistingDeployment(); deployment = getExistingDeployment(commandContext, deployment.getName()); } scheduleProcessDefinitionActivation(commandContext, deployment); if(deploymentBuilder instanceof ProcessApplicationDeploymentBuilder) { // for process application deployments, job executor registration is managed by // process application manager Set<String> processesToRegisterFor = retrieveProcessKeysFromResources(resourcesToIgnore); ProcessApplicationRegistration registration = registerProcessApplication(commandContext, deployment, processesToRegisterFor); return new ProcessApplicationDeploymentImpl(deployment, registration); } else { registerWithJobExecutor(commandContext, deployment); } return deployment; } });
public DeploymentBuilder nameFromDeployment(String deploymentId) { String name = deployment.getName(); if (name != null && !name.isEmpty()) { String message = String.format("Cannot set the given deployment id '%s' to get the name from it, because the deployment name has been already set to '%s'.", deploymentId, name); throw new NotValidException(message); } nameFromDeployment = deploymentId; return this; }
/** * Searches for previous deployments with the same name. * @param commandContext * @param deployment the current deployment * @return a set of deployment ids */ protected Set<String> resumePreviousByDeploymentName(CommandContext commandContext, DeploymentEntity deployment) { List<Deployment> previousDeployments = new DeploymentQueryImpl().deploymentName(deployment.getName()).list(); Set<String> deploymentIds = new HashSet<String>(previousDeployments.size()); for (Deployment d : previousDeployments) { deploymentIds.add(d.getId()); } return deploymentIds; }
protected void setDeploymentName(String deploymentId, DeploymentBuilderImpl deploymentBuilder, CommandContext commandContext) { if (deploymentId != null && !deploymentId.isEmpty()) { DeploymentManager deploymentManager = commandContext.getDeploymentManager(); DeploymentEntity deployment = deploymentManager.findDeploymentById(deploymentId); deploymentBuilder.getDeployment().setName(deployment.getName()); } }
public void deploy(DeploymentEntity deployment) { LOG.debugProcessingDeployment(deployment.getName()); Properties properties = new Properties(); List<DefinitionEntity> definitions = parseDefinitionResources(deployment, properties); ensureNoDuplicateDefinitionKeys(definitions); postProcessDefinitions(deployment, definitions, properties); }
.findLatestResourcesByDeploymentName(deployment.getName(), containedResources.keySet(), source, deployment.getTenantId());
@Override public DeploymentWithDefinitions call() throws Exception { acquireExclusiveLock(commandContext); DeploymentEntity deployment = initDeployment(); Map<String, ResourceEntity> resourcesToDeploy = resolveResourcesToDeploy(commandContext, deployment); Map<String, ResourceEntity> resourcesToIgnore = new HashMap<String, ResourceEntity>(deployment.getResources()); resourcesToIgnore.keySet().removeAll(resourcesToDeploy.keySet()); if (!resourcesToDeploy.isEmpty()) { LOG.debugCreatingNewDeployment(); deployment.setResources(resourcesToDeploy); deploy(deployment); } else { LOG.usingExistingDeployment(); deployment = getExistingDeployment(commandContext, deployment.getName()); } scheduleProcessDefinitionActivation(commandContext, deployment); if(deploymentBuilder instanceof ProcessApplicationDeploymentBuilder) { // for process application deployments, job executor registration is managed by // process application manager Set<String> processesToRegisterFor = retrieveProcessKeysFromResources(resourcesToIgnore); ProcessApplicationRegistration registration = registerProcessApplication(commandContext, deployment, processesToRegisterFor); return new ProcessApplicationDeploymentImpl(deployment, registration); } else { registerWithJobExecutor(commandContext, deployment); } return deployment; } });