org.camunda.bpm.engine.rest.sub.runtime.impl
Class FilterResourceImpl
java.lang.Object
org.camunda.bpm.engine.rest.spi.impl.AbstractProcessEngineAware
org.camunda.bpm.engine.rest.impl.AbstractRestProcessEngineAware
org.camunda.bpm.engine.rest.impl.AbstractAuthorizedRestResource
org.camunda.bpm.engine.rest.sub.runtime.impl.FilterResourceImpl
- All Implemented Interfaces:
- FilterResource
public class FilterResourceImpl
- extends AbstractAuthorizedRestResource
- implements FilterResource
- Author:
- Sebastian Menski
|
Method Summary |
ResourceOptionsDto |
availableOperations(javax.ws.rs.core.UriInfo context)
|
protected Query |
convertQuery(String queryString)
|
protected Object |
convertToDto(Object entity)
|
protected List<Object> |
convertToDtoList(List<?> entities)
|
protected HalCollectionResource |
convertToHalCollection(List<?> entities,
long count)
|
protected HalResource<?> |
convertToHalResource(Object entity)
|
protected HalTask |
convertToHalTask(Task task)
|
protected HalTaskList |
convertToHalTaskList(List<Task> tasks,
long count)
|
void |
deleteFilter()
|
protected void |
embedVariableValuesInHalTask(HalTask halTask,
Map<String,List<VariableInstance>> variableInstances)
|
CountResultDto |
executeCount()
|
protected long |
executeFilterCount(String extendingQuery)
|
protected List<?> |
executeFilterList(String extendingQueryString,
Integer firstResult,
Integer maxResults)
|
protected Object |
executeFilterSingleResult(String extendingQuery)
|
HalResource |
executeHalList(Integer firstResult,
Integer maxResults)
|
HalResource |
executeHalSingleResult()
|
List<Object> |
executeJsonList(Integer firstResult,
Integer maxResults)
|
Object |
executeJsonSingleResult()
|
Object |
executeList(javax.ws.rs.core.Request request,
Integer firstResult,
Integer maxResults)
|
Object |
executeSingleResult(javax.ws.rs.core.Request request)
|
protected InvalidRequestException |
filterNotFound(Exception cause)
|
protected Filter |
getDbFilter()
|
FilterDto |
getFilter(Boolean itemCount)
|
protected List<String> |
getFilterVariableNames()
|
protected AbstractQueryDto<?> |
getQueryDtoForQuery(String queryString,
String resourceType)
|
protected Map<String,List<VariableInstance>> |
getSortedVariableInstances(Collection<String> variableNames,
Collection<String> variableScopeIds)
|
protected Map<String,List<VariableInstance>> |
getVariableInstancesForTasks(HalTask... halTasks)
|
protected Map<String,List<VariableInstance>> |
getVariableInstancesForTasks(HalTaskList halTaskList)
|
protected LinkedHashSet<String> |
getVariableScopeIds(HalTask... halTasks)
|
protected List<HalResource<?>> |
getVariableValuesForTask(HalTask halTask,
Map<String,List<VariableInstance>> variableInstances)
|
protected InvalidRequestException |
invalidQuery(Exception cause)
|
protected boolean |
isEmptyJson(String jsonString)
|
protected boolean |
isEntityOfClass(Object entity,
Class<?> entityClass)
|
CountResultDto |
queryCount(String extendingQuery)
|
HalResource |
queryHalList(String extendingQuery,
Integer firstResult,
Integer maxResults)
|
HalResource |
queryHalSingleResult(String extendingQuery)
|
List<Object> |
queryJsonList(String extendingQuery,
Integer firstResult,
Integer maxResults)
|
Object |
queryJsonSingleResult(String extendingQuery)
|
Object |
queryList(javax.ws.rs.core.Request request,
String extendingQuery,
Integer firstResult,
Integer maxResults)
|
Object |
querySingleResult(javax.ws.rs.core.Request request,
String extendingQuery)
|
protected List<VariableInstance> |
queryVariablesInstancesByVariableScopeIds(Collection<String> variableNames,
Collection<String> variableScopeIds)
|
protected InvalidRequestException |
unsupportedEntityClass(Object entity)
|
void |
updateFilter(FilterDto filterDto)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_JSON_BODY
public static final Pattern EMPTY_JSON_BODY
PROPERTIES_VARIABLES_KEY
public static final String PROPERTIES_VARIABLES_KEY
- See Also:
- Constant Field Values
PROPERTIES_VARIABLES_NAME_KEY
public static final String PROPERTIES_VARIABLES_NAME_KEY
- See Also:
- Constant Field Values
VARIANTS
public static final List<javax.ws.rs.core.Variant> VARIANTS
relativeRootResourcePath
protected String relativeRootResourcePath
filterService
protected FilterService filterService
dbFilter
protected Filter dbFilter
FilterResourceImpl
public FilterResourceImpl(String processEngineName,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
String filterId,
String relativeRootResourcePath)
getFilter
public FilterDto getFilter(Boolean itemCount)
- Specified by:
getFilter in interface FilterResource
getDbFilter
protected Filter getDbFilter()
deleteFilter
public void deleteFilter()
- Specified by:
deleteFilter in interface FilterResource
updateFilter
public void updateFilter(FilterDto filterDto)
- Specified by:
updateFilter in interface FilterResource
executeSingleResult
public Object executeSingleResult(javax.ws.rs.core.Request request)
- Specified by:
executeSingleResult in interface FilterResource
executeJsonSingleResult
public Object executeJsonSingleResult()
querySingleResult
public Object querySingleResult(javax.ws.rs.core.Request request,
String extendingQuery)
- Specified by:
querySingleResult in interface FilterResource
queryJsonSingleResult
public Object queryJsonSingleResult(String extendingQuery)
executeHalSingleResult
public HalResource executeHalSingleResult()
queryHalSingleResult
public HalResource queryHalSingleResult(String extendingQuery)
executeFilterSingleResult
protected Object executeFilterSingleResult(String extendingQuery)
executeList
public Object executeList(javax.ws.rs.core.Request request,
Integer firstResult,
Integer maxResults)
- Specified by:
executeList in interface FilterResource
executeJsonList
public List<Object> executeJsonList(Integer firstResult,
Integer maxResults)
queryList
public Object queryList(javax.ws.rs.core.Request request,
String extendingQuery,
Integer firstResult,
Integer maxResults)
- Specified by:
queryList in interface FilterResource
queryJsonList
public List<Object> queryJsonList(String extendingQuery,
Integer firstResult,
Integer maxResults)
executeHalList
public HalResource executeHalList(Integer firstResult,
Integer maxResults)
queryHalList
public HalResource queryHalList(String extendingQuery,
Integer firstResult,
Integer maxResults)
executeFilterList
protected List<?> executeFilterList(String extendingQueryString,
Integer firstResult,
Integer maxResults)
executeCount
public CountResultDto executeCount()
- Specified by:
executeCount in interface FilterResource
queryCount
public CountResultDto queryCount(String extendingQuery)
- Specified by:
queryCount in interface FilterResource
executeFilterCount
protected long executeFilterCount(String extendingQuery)
availableOperations
public ResourceOptionsDto availableOperations(javax.ws.rs.core.UriInfo context)
- Specified by:
availableOperations in interface FilterResource
convertQuery
protected Query convertQuery(String queryString)
convertToDto
protected Object convertToDto(Object entity)
convertToDtoList
protected List<Object> convertToDtoList(List<?> entities)
convertToHalResource
protected HalResource<?> convertToHalResource(Object entity)
convertToHalTask
protected HalTask convertToHalTask(Task task)
convertToHalCollection
protected HalCollectionResource convertToHalCollection(List<?> entities,
long count)
convertToHalTaskList
protected HalTaskList convertToHalTaskList(List<Task> tasks,
long count)
embedVariableValuesInHalTask
protected void embedVariableValuesInHalTask(HalTask halTask,
Map<String,List<VariableInstance>> variableInstances)
getQueryDtoForQuery
protected AbstractQueryDto<?> getQueryDtoForQuery(String queryString,
String resourceType)
getVariableValuesForTask
protected List<HalResource<?>> getVariableValuesForTask(HalTask halTask,
Map<String,List<VariableInstance>> variableInstances)
getVariableInstancesForTasks
protected Map<String,List<VariableInstance>> getVariableInstancesForTasks(HalTaskList halTaskList)
getVariableInstancesForTasks
protected Map<String,List<VariableInstance>> getVariableInstancesForTasks(HalTask... halTasks)
getFilterVariableNames
protected List<String> getFilterVariableNames()
getVariableScopeIds
protected LinkedHashSet<String> getVariableScopeIds(HalTask... halTasks)
getSortedVariableInstances
protected Map<String,List<VariableInstance>> getSortedVariableInstances(Collection<String> variableNames,
Collection<String> variableScopeIds)
queryVariablesInstancesByVariableScopeIds
protected List<VariableInstance> queryVariablesInstancesByVariableScopeIds(Collection<String> variableNames,
Collection<String> variableScopeIds)
isEntityOfClass
protected boolean isEntityOfClass(Object entity,
Class<?> entityClass)
isEmptyJson
protected boolean isEmptyJson(String jsonString)
filterNotFound
protected InvalidRequestException filterNotFound(Exception cause)
invalidQuery
protected InvalidRequestException invalidQuery(Exception cause)
unsupportedEntityClass
protected InvalidRequestException unsupportedEntityClass(Object entity)
Copyright © 2016 camunda services GmbH. All rights reserved.