Search in sources :

Example 1 with DecisionRequirementsDefinitionDto

use of org.camunda.bpm.engine.rest.dto.repository.DecisionRequirementsDefinitionDto in project camunda-bpm-platform by camunda.

the class DecisionRequirementsDefinitionRestServiceImpl method getDecisionRequirementsDefinitions.

@Override
public List<DecisionRequirementsDefinitionDto> getDecisionRequirementsDefinitions(UriInfo uriInfo, Integer firstResult, Integer maxResults) {
    DecisionRequirementsDefinitionQueryDto queryDto = new DecisionRequirementsDefinitionQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
    List<DecisionRequirementsDefinitionDto> dtos = new ArrayList<DecisionRequirementsDefinitionDto>();
    ProcessEngine engine = getProcessEngine();
    DecisionRequirementsDefinitionQuery query = queryDto.toQuery(engine);
    List<DecisionRequirementsDefinition> matchingDefinitions = null;
    if (firstResult != null || maxResults != null) {
        matchingDefinitions = executePaginatedQuery(query, firstResult, maxResults);
    } else {
        matchingDefinitions = query.list();
    }
    for (DecisionRequirementsDefinition definition : matchingDefinitions) {
        DecisionRequirementsDefinitionDto dto = DecisionRequirementsDefinitionDto.fromDecisionRequirementsDefinition(definition);
        dtos.add(dto);
    }
    return dtos;
}
Also used : DecisionRequirementsDefinitionQuery(org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery) DecisionRequirementsDefinition(org.camunda.bpm.engine.repository.DecisionRequirementsDefinition) DecisionRequirementsDefinitionDto(org.camunda.bpm.engine.rest.dto.repository.DecisionRequirementsDefinitionDto) ArrayList(java.util.ArrayList) DecisionRequirementsDefinitionQueryDto(org.camunda.bpm.engine.rest.dto.repository.DecisionRequirementsDefinitionQueryDto) ProcessEngine(org.camunda.bpm.engine.ProcessEngine)

Aggregations

ArrayList (java.util.ArrayList)1 ProcessEngine (org.camunda.bpm.engine.ProcessEngine)1 DecisionRequirementsDefinition (org.camunda.bpm.engine.repository.DecisionRequirementsDefinition)1 DecisionRequirementsDefinitionQuery (org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery)1 DecisionRequirementsDefinitionDto (org.camunda.bpm.engine.rest.dto.repository.DecisionRequirementsDefinitionDto)1 DecisionRequirementsDefinitionQueryDto (org.camunda.bpm.engine.rest.dto.repository.DecisionRequirementsDefinitionQueryDto)1