use of org.wso2.carbon.bpmn.rest.model.history.HistoricIdentityLinkResponse in project carbon-business-process by wso2.
the class HistoricProcessInstanceService method getProcessIdentityLinks.
@GET
@Path("/{processInstanceId}/identitylinks")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public Response getProcessIdentityLinks(@PathParam("processInstanceId") String processInstanceId) {
HistoryService historyService = BPMNOSGIService.getHistoryService();
List<HistoricIdentityLink> identityLinks = historyService.getHistoricIdentityLinksForProcessInstance(processInstanceId);
if (identityLinks != null) {
List<HistoricIdentityLinkResponse> historicIdentityLinkResponses = new RestResponseFactory().createHistoricIdentityLinkResponseList(identityLinks, uriInfo.getBaseUri().toString());
HistoricIdentityLinkResponseCollection historicIdentityLinkResponseCollection = new HistoricIdentityLinkResponseCollection();
historicIdentityLinkResponseCollection.setHistoricIdentityLinkResponses(historicIdentityLinkResponses);
return Response.ok().entity(historicIdentityLinkResponseCollection).build();
}
return Response.ok().build();
}
use of org.wso2.carbon.bpmn.rest.model.history.HistoricIdentityLinkResponse in project carbon-business-process by wso2.
the class HistoricTaskInstanceService method getTaskIdentityLinks.
@GET
@Path("/{taskId}/identitylinks")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public Response getTaskIdentityLinks(@PathParam("taskId") String taskId) {
HistoryService historyService = BPMNOSGIService.getHistoryService();
List<HistoricIdentityLink> identityLinks = historyService.getHistoricIdentityLinksForTask(taskId);
List<HistoricIdentityLinkResponse> historicIdentityLinkResponseList = new ArrayList<>();
if (identityLinks != null) {
historicIdentityLinkResponseList = new RestResponseFactory().createHistoricIdentityLinkResponseList(identityLinks, uriInfo.getBaseUri().toString());
}
HistoricIdentityLinkResponseCollection historicIdentityLinkResponseCollection = new HistoricIdentityLinkResponseCollection();
historicIdentityLinkResponseCollection.setHistoricIdentityLinkResponses(historicIdentityLinkResponseList);
return Response.ok().entity(historicIdentityLinkResponseCollection).build();
}
Aggregations