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;
}
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;
}
Aggregations