Package org.activiti.rest.service.api.engine

Examples of org.activiti.rest.service.api.engine.RestIdentityLink


    return createRestIdentityLink(link.getType(), link.getUserId(), link.getGroupId(), link.getTaskId(),
        link.getProcessDefinitionId(), link.getProcessInstanceId(), serverRootUrl);
  }
 
  public RestIdentityLink createRestIdentityLink(String type, String userId, String groupId, String taskId, String processDefinitionId, String processInstanceId, String serverRootUrl) {
    RestIdentityLink result = new RestIdentityLink();
    result.setUser(userId);
    result.setGroup(groupId);
    result.setType(type);
   
    String family = null;
    if (userId != null) {
      family = RestUrls.SEGMENT_IDENTITYLINKS_FAMILY_USERS;
    } else {
      family = RestUrls.SEGMENT_IDENTITYLINKS_FAMILY_GROUPS;
    }
    if (processDefinitionId != null) {
      result.setUrl(formatUrl(serverRootUrl, RestUrls.URL_PROCESS_DEFINITION_IDENTITYLINK, processDefinitionId, family, (userId != null ? userId : groupId)));
    } else if(taskId != null){
      result.setUrl(formatUrl(serverRootUrl, RestUrls.URL_TASK_IDENTITYLINK, taskId, family, (userId != null ? userId : groupId), type));
    } else {
      result.setUrl(formatUrl(serverRootUrl, RestUrls.URL_PROCESS_INSTANCE_IDENTITYLINK, processInstanceId, (userId != null ? userId : groupId), type));
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of org.activiti.rest.service.api.engine.RestIdentityLink

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.