use of org.wso2.carbon.bpmn.rest.model.repository.DeploymentResponse in project carbon-business-process by wso2.
the class DeploymentService method getDeployment.
@GET
@Path("/{deploymentId}")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public Response getDeployment(@PathParam("deploymentId") String deploymentId) {
RepositoryService repositoryService = BPMNOSGIService.getRepositoryService();
Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
if (deployment == null) {
throw new ActivitiObjectNotFoundException("Could not find a deployment with deploymentId '" + deploymentId + "'.", Deployment.class);
}
DeploymentResponse deploymentResponse = new RestResponseFactory().createDeploymentResponse(deployment, uriInfo.getBaseUri().toString());
return Response.ok().entity(deploymentResponse).build();
}
Aggregations