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

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


    response.setUrl(formatUrl(serverRootUrl, RestUrls.URL_GROUP_MEMBERSHIP, groupId, userId));
    return response;
  }
 
  public ModelResponse createModelResponse(Model model, String serverRootUrl) {
    ModelResponse response = new ModelResponse();
   
    response.setCategory(model.getCategory());
    response.setCreateTime(model.getCreateTime());
    response.setId(model.getId());
    response.setKey(model.getKey());
    response.setLastUpdateTime(model.getLastUpdateTime());
    response.setMetaInfo(model.getMetaInfo());
    response.setName(model.getName());
    response.setDeploymentId(model.getDeploymentId());
    response.setVersion(model.getVersion());
    response.setTenantId(model.getTenantId());
   
    response.setUrl(formatUrl(serverRootUrl, RestUrls.URL_MODEL, model.getId()));
    if(model.getDeploymentId() != null) {
      response.setDeploymentUrl(formatUrl(serverRootUrl, RestUrls.URL_DEPLOYMENT, model.getDeploymentId()));
    }
   
    if(model.hasEditorSource()) {
      response.setSourceUrl(formatUrl(serverRootUrl, RestUrls.URL_MODEL_SOURCE, model.getId()));
    }
   
    if(model.hasEditorSourceExtra()) {
      response.setSourceExtraUrl(formatUrl(serverRootUrl, RestUrls.URL_MODEL_SOURCE_EXTRA, model.getId()));
    }
   
    return response;
  }
View Full Code Here

TOP

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

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.