Search in sources :

Example 1 with HistoricDetailDto

use of org.camunda.bpm.engine.rest.dto.history.HistoricDetailDto in project camunda-bpm-platform by camunda.

the class HistoricDetailRestServiceImpl method getHistoricDetails.

@Override
public List<HistoricDetailDto> getHistoricDetails(UriInfo uriInfo, Integer firstResult, Integer maxResults, boolean deserializeObjectValues) {
    HistoricDetailQueryDto queryDto = new HistoricDetailQueryDto(objectMapper, uriInfo.getQueryParameters());
    HistoricDetailQuery query = queryDto.toQuery(processEngine);
    query.disableBinaryFetching();
    if (!deserializeObjectValues) {
        query.disableCustomObjectDeserialization();
    }
    List<HistoricDetail> queryResult;
    if (firstResult != null || maxResults != null) {
        queryResult = executePaginatedQuery(query, firstResult, maxResults);
    } else {
        queryResult = query.list();
    }
    List<HistoricDetailDto> result = new ArrayList<HistoricDetailDto>();
    for (HistoricDetail historicDetail : queryResult) {
        HistoricDetailDto dto = HistoricDetailDto.fromHistoricDetail(historicDetail);
        result.add(dto);
    }
    return result;
}
Also used : HistoricDetail(org.camunda.bpm.engine.history.HistoricDetail) HistoricDetailQueryDto(org.camunda.bpm.engine.rest.dto.history.HistoricDetailQueryDto) ArrayList(java.util.ArrayList) HistoricDetailQuery(org.camunda.bpm.engine.history.HistoricDetailQuery) HistoricDetailDto(org.camunda.bpm.engine.rest.dto.history.HistoricDetailDto)

Aggregations

ArrayList (java.util.ArrayList)1 HistoricDetail (org.camunda.bpm.engine.history.HistoricDetail)1 HistoricDetailQuery (org.camunda.bpm.engine.history.HistoricDetailQuery)1 HistoricDetailDto (org.camunda.bpm.engine.rest.dto.history.HistoricDetailDto)1 HistoricDetailQueryDto (org.camunda.bpm.engine.rest.dto.history.HistoricDetailQueryDto)1