return null;
}
}
}
if (completeBuilder != null) {
ServerGroupDeploymentPlanBuilder groupDeploymentBuilder = null;
for (String serverGroupName : domain.getServerGroups()) {
groupDeploymentBuilder = (groupDeploymentBuilder == null ? completeBuilder.toServerGroup(serverGroupName) :
groupDeploymentBuilder.toServerGroup(serverGroupName));
}
if (groupDeploymentBuilder == null) {
throw new DeploymentFailureException("No server groups were defined for the deployment.");
}
return groupDeploymentBuilder.withRollback().build();
}
throw new IllegalStateException(String.format("Invalid type '%s' for deployment", type));
}