use of org.camunda.bpm.engine.rest.dto.management.JobDefinitionDto in project camunda-bpm-platform by camunda.
the class JobDefinitionRestServiceImpl method queryJobDefinitions.
public List<JobDefinitionDto> queryJobDefinitions(JobDefinitionQueryDto queryDto, Integer firstResult, Integer maxResults) {
queryDto.setObjectMapper(getObjectMapper());
JobDefinitionQuery query = queryDto.toQuery(getProcessEngine());
List<JobDefinition> matchingJobDefinitions;
if (firstResult != null || maxResults != null) {
matchingJobDefinitions = executePaginatedQuery(query, firstResult, maxResults);
} else {
matchingJobDefinitions = query.list();
}
List<JobDefinitionDto> jobDefinitionResults = new ArrayList<JobDefinitionDto>();
for (JobDefinition jobDefinition : matchingJobDefinitions) {
JobDefinitionDto result = JobDefinitionDto.fromJobDefinition(jobDefinition);
jobDefinitionResults.add(result);
}
return jobDefinitionResults;
}
Aggregations