}
if(!deploymentBuilder.getResourceNames().isEmpty()) {
Deployment deployment = deploymentBuilder.deploy();
DeploymentDto deploymentDto = DeploymentDto.fromDeployment(deployment);
URI uri = uriInfo.getBaseUriBuilder()
.path(relativeRootResourcePath)
.path(DeploymentRestService.PATH)
.path(deployment.getId())
.build();
// GET /
deploymentDto.addReflexiveLink(uri, HttpMethod.GET, "self");
return deploymentDto;
} else {
throw new InvalidRequestException(Status.BAD_REQUEST, "No deployment resources contained in the form upload.");