Search in sources :

Example 1 with HistoricIdentityLinkResponse

use of org.activiti.rest.service.api.history.HistoricIdentityLinkResponse in project Activiti by Activiti.

the class RestResponseFactory method createHistoricIdentityLinkResponse.

public HistoricIdentityLinkResponse createHistoricIdentityLinkResponse(HistoricIdentityLink identityLink, RestUrlBuilder urlBuilder) {
    HistoricIdentityLinkResponse result = new HistoricIdentityLinkResponse();
    result.setType(identityLink.getType());
    result.setUserId(identityLink.getUserId());
    result.setGroupId(identityLink.getGroupId());
    result.setTaskId(identityLink.getTaskId());
    if (StringUtils.isNotEmpty(identityLink.getTaskId())) {
        result.setTaskUrl(urlBuilder.buildUrl(RestUrls.URL_HISTORIC_TASK_INSTANCE, identityLink.getTaskId()));
    }
    result.setProcessInstanceId(identityLink.getProcessInstanceId());
    if (StringUtils.isNotEmpty(identityLink.getProcessInstanceId())) {
        result.setProcessInstanceUrl(urlBuilder.buildUrl(RestUrls.URL_HISTORIC_PROCESS_INSTANCE, identityLink.getProcessInstanceId()));
    }
    return result;
}
Also used : HistoricIdentityLinkResponse(org.activiti.rest.service.api.history.HistoricIdentityLinkResponse)

Example 2 with HistoricIdentityLinkResponse

use of org.activiti.rest.service.api.history.HistoricIdentityLinkResponse in project Activiti by Activiti.

the class RestResponseFactory method createHistoricIdentityLinkResponseList.

public List<HistoricIdentityLinkResponse> createHistoricIdentityLinkResponseList(List<HistoricIdentityLink> identityLinks) {
    RestUrlBuilder urlBuilder = createUrlBuilder();
    List<HistoricIdentityLinkResponse> responseList = new ArrayList<HistoricIdentityLinkResponse>();
    for (HistoricIdentityLink instance : identityLinks) {
        responseList.add(createHistoricIdentityLinkResponse(instance, urlBuilder));
    }
    return responseList;
}
Also used : HistoricIdentityLinkResponse(org.activiti.rest.service.api.history.HistoricIdentityLinkResponse) HistoricIdentityLink(org.activiti.engine.history.HistoricIdentityLink) ArrayList(java.util.ArrayList)

Aggregations

HistoricIdentityLinkResponse (org.activiti.rest.service.api.history.HistoricIdentityLinkResponse)2 ArrayList (java.util.ArrayList)1 HistoricIdentityLink (org.activiti.engine.history.HistoricIdentityLink)1