Package org.activiti.rest.service.api.repository

Examples of org.activiti.rest.service.api.repository.ProcessDefinitionResponse


    }
    return new DeploymentResourceResponse(resourceId, resourceUrl, resourceContentUrl, contentType, type);
  }
 
  public ProcessDefinitionResponse createProcessDefinitionResponse(ProcessDefinition processDefinition, boolean graphicalNotationDefined, String serverRootUrl) {
    ProcessDefinitionResponse response = new ProcessDefinitionResponse();
    response.setUrl(formatUrl(serverRootUrl, RestUrls.URL_PROCESS_DEFINITION, processDefinition.getId()));
    response.setId(processDefinition.getId());
    response.setKey(processDefinition.getKey());
    response.setVersion(processDefinition.getVersion());
    response.setCategory(processDefinition.getCategory());
    response.setName(processDefinition.getName());
    response.setDescription(processDefinition.getDescription());
    response.setSuspended(processDefinition.isSuspended());
    response.setStartFormDefined(processDefinition.hasStartFormKey());
    response.setGraphicalNotationDefined(graphicalNotationDefined);
    response.setTenantId(processDefinition.getTenantId());
   
    // Links to other resources
    response.setDeploymentId(processDefinition.getDeploymentId());
    response.setDeploymentUrl(formatUrl(serverRootUrl, RestUrls.URL_DEPLOYMENT, processDefinition.getDeploymentId()));
    response.setResource(formatUrl(serverRootUrl, RestUrls.URL_DEPLOYMENT_RESOURCE, processDefinition.getDeploymentId(), processDefinition.getResourceName()));
    if(processDefinition.getDiagramResourceName() != null) {
      response.setDiagramResource(formatUrl(serverRootUrl, RestUrls.URL_DEPLOYMENT_RESOURCE,
              processDefinition.getDeploymentId(), processDefinition.getDiagramResourceName()));
    }
    return response;
  }
View Full Code Here

TOP

Related Classes of org.activiti.rest.service.api.repository.ProcessDefinitionResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.