Search in sources :

Example 1 with UserOperationLogQueryDto

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

the class UserOperationLogRestServiceImpl method queryUserOperationEntries.

@Override
public List<UserOperationLogEntryDto> queryUserOperationEntries(UriInfo uriInfo, Integer firstResult, Integer maxResults) {
    UserOperationLogQueryDto queryDto = new UserOperationLogQueryDto(objectMapper, uriInfo.getQueryParameters());
    UserOperationLogQuery query = queryDto.toQuery(processEngine);
    if (firstResult == null && maxResults == null) {
        return UserOperationLogEntryDto.map(query.list());
    } else {
        if (firstResult == null) {
            firstResult = 0;
        }
        if (maxResults == null) {
            maxResults = Integer.MAX_VALUE;
        }
        return UserOperationLogEntryDto.map(query.listPage(firstResult, maxResults));
    }
}
Also used : UserOperationLogQueryDto(org.camunda.bpm.engine.rest.dto.history.UserOperationLogQueryDto) UserOperationLogQuery(org.camunda.bpm.engine.history.UserOperationLogQuery)

Example 2 with UserOperationLogQueryDto

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

the class UserOperationLogRestServiceImpl method queryUserOperationCount.

@Override
public CountResultDto queryUserOperationCount(UriInfo uriInfo) {
    UserOperationLogQueryDto queryDto = new UserOperationLogQueryDto(objectMapper, uriInfo.getQueryParameters());
    UserOperationLogQuery query = queryDto.toQuery(processEngine);
    return new CountResultDto(query.count());
}
Also used : UserOperationLogQueryDto(org.camunda.bpm.engine.rest.dto.history.UserOperationLogQueryDto) CountResultDto(org.camunda.bpm.engine.rest.dto.CountResultDto) UserOperationLogQuery(org.camunda.bpm.engine.history.UserOperationLogQuery)

Aggregations

UserOperationLogQuery (org.camunda.bpm.engine.history.UserOperationLogQuery)2 UserOperationLogQueryDto (org.camunda.bpm.engine.rest.dto.history.UserOperationLogQueryDto)2 CountResultDto (org.camunda.bpm.engine.rest.dto.CountResultDto)1