private DeploymentPlanBuilder replaceContent(DeploymentPlanBuilder builder, Set<String> addedContent, Set<String> deployedContent, Set<String> undeployedContent, Set<String> removedContent, ModelNode domainModel) throws IOException { String toDeploy = chooseUndeployedContent("Choose the replacement deployment:", removedContent, removedContent, removedContent, removedContent, domainModel); if (toDeploy != null) { String toReplace = chooseDeployedContent("Choose the deployment to be replaced:", deployedContent, undeployedContent, domainModel); if (toReplace != null) { return builder.replace(toDeploy, toReplace); } } return builder; }
builder = builder.replace(contentName, content); ModelNode existing = model.get("deployment", contentName); if (deployedContent.contains(contentName) || (existing.isDefined() && existing.get("enabled").asBoolean(true) && !undeployedContent.contains(contentName))) {