Map<UUID, ServerDeploymentActionResult> planResults = new HashMap<UUID, ServerDeploymentActionResult>();
for (Map.Entry<UUID, ServerDeploymentActionResult> entry : updateResults.entrySet()) {
ServerDeploymentActionResult actionResult = entry.getValue();
if (actionResult == null) {
// Treat as success
actionResult = new SimpleServerDeploymentActionResult(entry.getKey(), Result.EXECUTED);
}
if (actionResult.getResult() != Result.NOT_EXECUTED) {
ServerDeploymentActionResult rollbackResult = null;
if (successfulRollbacks.contains(entry.getKey())) {
rollbackResult = new SimpleServerDeploymentActionResult(entry.getKey(), Result.EXECUTED);
}
else if (failedRollbacks.containsKey(entry.getKey())) {
Throwable cause = failedRollbacks.get(entry.getKey());
rollbackResult = new SimpleServerDeploymentActionResult(entry.getKey(), cause);
}
if (rollbackResult != null) {
AbstractServerUpdateActionResult.installRollbackResult((AbstractServerUpdateActionResult<ServerDeploymentActionResult>) entry.getValue(), rollbackResult);
}
}