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
-
-
Field Summary
Fields Modifier and Type Field Description protected org.camunda.bpm.engine.filter.FilterdbFilterstatic PatternEMPTY_JSON_BODYprotected org.camunda.bpm.engine.FilterServicefilterServicestatic StringPROPERTIES_VARIABLES_KEYstatic StringPROPERTIES_VARIABLES_NAME_KEYprotected StringrelativeRootResourcePathstatic List<javax.ws.rs.core.Variant>VARIANTS-
Fields inherited from class org.camunda.bpm.engine.rest.impl.AbstractAuthorizedRestResource
resource, resourceId
-
Fields inherited from class org.camunda.bpm.engine.rest.impl.AbstractRestProcessEngineAware
objectMapper
-
Fields inherited from class org.camunda.bpm.engine.rest.spi.impl.AbstractProcessEngineAware
processEngine
-
-
Constructor Summary
Constructors Constructor Description FilterResourceImpl(String processEngineName, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String filterId, String relativeRootResourcePath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceOptionsDtoavailableOperations(javax.ws.rs.core.UriInfo context)protected org.camunda.bpm.engine.query.QueryconvertQuery(String queryString)protected ObjectconvertToDto(Object entity)protected List<Object>convertToDtoList(List<?> entities)protected HalCollectionResourceconvertToHalCollection(List<?> entities, long count)protected HalResource<?>convertToHalResource(Object entity)protected HalTaskconvertToHalTask(org.camunda.bpm.engine.task.Task task)protected HalTaskListconvertToHalTaskList(List<org.camunda.bpm.engine.task.Task> tasks, long count)voiddeleteFilter()protected voidembedVariableValuesInHalTask(HalTask halTask, Map<String,List<org.camunda.bpm.engine.runtime.VariableInstance>> variableInstances)CountResultDtoexecuteCount()protected longexecuteFilterCount(String extendingQuery)protected List<?>executeFilterList(String extendingQueryString, Integer firstResult, Integer maxResults)protected ObjectexecuteFilterSingleResult(String extendingQuery)HalResourceexecuteHalList(Integer firstResult, Integer maxResults)HalResourceexecuteHalSingleResult()List<Object>executeJsonList(Integer firstResult, Integer maxResults)ObjectexecuteJsonSingleResult()ObjectexecuteList(javax.ws.rs.core.Request request, Integer firstResult, Integer maxResults)ObjectexecuteSingleResult(javax.ws.rs.core.Request request)protected InvalidRequestExceptionfilterNotFound(Exception cause)protected org.camunda.bpm.engine.filter.FiltergetDbFilter()FilterDtogetFilter(Boolean itemCount)protected List<String>getFilterVariableNames()protected AbstractQueryDto<?>getQueryDtoForQuery(String queryString, String resourceType)protected Map<String,List<org.camunda.bpm.engine.runtime.VariableInstance>>getSortedVariableInstances(Collection<String> variableNames, Collection<String> variableScopeIds)protected Map<String,List<org.camunda.bpm.engine.runtime.VariableInstance>>getVariableInstancesForTasks(HalTask... halTasks)protected Map<String,List<org.camunda.bpm.engine.runtime.VariableInstance>>getVariableInstancesForTasks(HalTaskList halTaskList)protected LinkedHashSet<String>getVariableScopeIds(HalTask... halTasks)protected List<HalResource<?>>getVariableValuesForTask(HalTask halTask, Map<String,List<org.camunda.bpm.engine.runtime.VariableInstance>> variableInstances)protected InvalidRequestExceptioninvalidQuery(Exception cause)protected booleanisEmptyJson(String jsonString)protected booleanisEntityOfClass(Object entity, Class<?> entityClass)CountResultDtoqueryCount(String extendingQuery)HalResourcequeryHalList(String extendingQuery, Integer firstResult, Integer maxResults)HalResourcequeryHalSingleResult(String extendingQuery)List<Object>queryJsonList(String extendingQuery, Integer firstResult, Integer maxResults)ObjectqueryJsonSingleResult(String extendingQuery)ObjectqueryList(javax.ws.rs.core.Request request, String extendingQuery, Integer firstResult, Integer maxResults)ObjectquerySingleResult(javax.ws.rs.core.Request request, String extendingQuery)protected List<org.camunda.bpm.engine.runtime.VariableInstance>queryVariablesInstancesByVariableScopeIds(Collection<String> variableNames, Collection<String> variableScopeIds)protected InvalidRequestExceptionunsupportedEntityClass(Object entity)voidupdateFilter(FilterDto filterDto)-
Methods inherited from class org.camunda.bpm.engine.rest.impl.AbstractAuthorizedRestResource
isAuthorized, isAuthorized, isAuthorized
-
Methods inherited from class org.camunda.bpm.engine.rest.impl.AbstractRestProcessEngineAware
getObjectMapper, getProcessEngine, setRelativeRootResourceUri
-
-
-
-
Field Detail
-
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 org.camunda.bpm.engine.FilterService filterService
-
dbFilter
protected org.camunda.bpm.engine.filter.Filter dbFilter
-
-
Method Detail
-
getFilter
public FilterDto getFilter(Boolean itemCount)
- Specified by:
getFilterin interfaceFilterResource
-
getDbFilter
protected org.camunda.bpm.engine.filter.Filter getDbFilter()
-
deleteFilter
public void deleteFilter()
- Specified by:
deleteFilterin interfaceFilterResource
-
updateFilter
public void updateFilter(FilterDto filterDto)
- Specified by:
updateFilterin interfaceFilterResource
-
executeSingleResult
public Object executeSingleResult(javax.ws.rs.core.Request request)
- Specified by:
executeSingleResultin interfaceFilterResource
-
executeJsonSingleResult
public Object executeJsonSingleResult()
-
querySingleResult
public Object querySingleResult(javax.ws.rs.core.Request request, String extendingQuery)
- Specified by:
querySingleResultin interfaceFilterResource
-
executeHalSingleResult
public HalResource executeHalSingleResult()
-
queryHalSingleResult
public HalResource queryHalSingleResult(String extendingQuery)
-
executeList
public Object executeList(javax.ws.rs.core.Request request, Integer firstResult, Integer maxResults)
- Specified by:
executeListin interfaceFilterResource
-
queryList
public Object queryList(javax.ws.rs.core.Request request, String extendingQuery, Integer firstResult, Integer maxResults)
- Specified by:
queryListin interfaceFilterResource
-
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:
executeCountin interfaceFilterResource
-
queryCount
public CountResultDto queryCount(String extendingQuery)
- Specified by:
queryCountin interfaceFilterResource
-
executeFilterCount
protected long executeFilterCount(String extendingQuery)
-
availableOperations
public ResourceOptionsDto availableOperations(javax.ws.rs.core.UriInfo context)
- Specified by:
availableOperationsin interfaceFilterResource
-
convertQuery
protected org.camunda.bpm.engine.query.Query convertQuery(String queryString)
-
convertToHalResource
protected HalResource<?> convertToHalResource(Object entity)
-
convertToHalTask
protected HalTask convertToHalTask(org.camunda.bpm.engine.task.Task task)
-
convertToHalCollection
protected HalCollectionResource convertToHalCollection(List<?> entities, long count)
-
convertToHalTaskList
protected HalTaskList convertToHalTaskList(List<org.camunda.bpm.engine.task.Task> tasks, long count)
-
embedVariableValuesInHalTask
protected void embedVariableValuesInHalTask(HalTask halTask, Map<String,List<org.camunda.bpm.engine.runtime.VariableInstance>> variableInstances)
-
getQueryDtoForQuery
protected AbstractQueryDto<?> getQueryDtoForQuery(String queryString, String resourceType)
-
getVariableValuesForTask
protected List<HalResource<?>> getVariableValuesForTask(HalTask halTask, Map<String,List<org.camunda.bpm.engine.runtime.VariableInstance>> variableInstances)
-
getVariableInstancesForTasks
protected Map<String,List<org.camunda.bpm.engine.runtime.VariableInstance>> getVariableInstancesForTasks(HalTaskList halTaskList)
-
getVariableInstancesForTasks
protected Map<String,List<org.camunda.bpm.engine.runtime.VariableInstance>> getVariableInstancesForTasks(HalTask... halTasks)
-
getVariableScopeIds
protected LinkedHashSet<String> getVariableScopeIds(HalTask... halTasks)
-
getSortedVariableInstances
protected Map<String,List<org.camunda.bpm.engine.runtime.VariableInstance>> getSortedVariableInstances(Collection<String> variableNames, Collection<String> variableScopeIds)
-
queryVariablesInstancesByVariableScopeIds
protected List<org.camunda.bpm.engine.runtime.VariableInstance> queryVariablesInstancesByVariableScopeIds(Collection<String> variableNames, Collection<String> variableScopeIds)
-
isEmptyJson
protected boolean isEmptyJson(String jsonString)
-
filterNotFound
protected InvalidRequestException filterNotFound(Exception cause)
-
invalidQuery
protected InvalidRequestException invalidQuery(Exception cause)
-
unsupportedEntityClass
protected InvalidRequestException unsupportedEntityClass(Object entity)
-
-