Package org.camunda.bpm.engine
Interface FilterService
- All Known Implementing Classes:
FilterServiceImpl
public interface FilterService
- Author:
- Sebastian Menski
-
Method Summary
Modifier and TypeMethodDescriptionExecutes the query of the filter and returns the result count.Executes the extended query of the filter and returns the result count.Creates a new filter queryCreates a new task filter query.voiddeleteFilter(String filterId) Deletes a filter by its id.Returns the filter for the given filter id.<T> List<T>Executes the query of the filter and returns the result as list.Executes the extended query of a filter and returns the result as list.<T> List<T>Executes the query of the filter and returns the result in the given boundaries as list.Executes the extended query of a filter and returns the result in the given boundaries as list.Creates a new task filter.newTaskFilter(String filterName) Creates a new task filter with a given name.saveFilter(Filter filter) Saves the filter in the database.<T> TsingleResult(String filterId) Executes the query of the filter and returns the a single result.<T,Q extends Query<?, T>>
TsingleResult(String filterId, Q extendingQuery) Executes the extended query of the filter and returns the a single result.
-
Method Details
-
newTaskFilter
Filter newTaskFilter()Creates a new task filter.- Returns:
- a new task filter
- Throws:
AuthorizationException- if the user has noPermissions.CREATEpermissions onResources.FILTER.
-
newTaskFilter
Creates a new task filter with a given name.- Returns:
- a new task filter with a name
- Throws:
AuthorizationException- if the user has noPermissions.CREATEpermissions onResources.FILTER.
-
createFilterQuery
FilterQuery createFilterQuery()Creates a new filter query- Returns:
- a new query for filters
-
createTaskFilterQuery
FilterQuery createTaskFilterQuery()Creates a new task filter query.- Returns:
- a new query for task filters
-
saveFilter
Saves the filter in the database.- Parameters:
filter- the filter to save- Returns:
- return the saved filter
- Throws:
AuthorizationException- if the user has noPermissions.CREATEpermissions onResources.FILTER(save new filter) or if user has noPermissions.UPDATEpermissions onResources.FILTER(update existing filter).BadUserRequestException-- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
Expression evaluation can be activated by setting the process engine configuration properties
enableExpressionsInAdhocQueries(defaultfalse) andenableExpressionsInStoredQueries(defaulttrue) totrue.
- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
Expression evaluation can be activated by setting the process engine configuration properties
-
getFilter
Returns the filter for the given filter id.- Parameters:
filterId- the id of the filter- Returns:
- the filter
- Throws:
AuthorizationException- if the user has noPermissions.READpermissions onResources.FILTER.
-
deleteFilter
Deletes a filter by its id.- Parameters:
filterId- the id of the filter- Throws:
AuthorizationException- if the user has noPermissions.DELETEpermissions onResources.FILTER.
-
list
Executes the query of the filter and returns the result as list.- Parameters:
filterId- the id of the filter- Returns:
- the query result as list
- Throws:
AuthorizationException- if the user has noPermissions.READpermissions onResources.FILTER.BadUserRequestException-- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
Expression evaluation can be activated by setting the process engine configuration properties
enableExpressionsInAdhocQueries(defaultfalse) andenableExpressionsInStoredQueries(defaulttrue) totrue. - When a maximum results limit is specified. A maximum results limit can be specified with
the process engine configuration property
queryMaxResultsLimit(defaultInteger.MAX_VALUE). Please uselistPage(String, int, int)instead.
- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
Expression evaluation can be activated by setting the process engine configuration properties
-
list
Executes the extended query of a filter and returns the result as list.- Parameters:
filterId- the id of the filterextendingQuery- additional query to extend the filter query- Returns:
- the query result as list
- Throws:
AuthorizationException- if the user has noPermissions.READpermissions onResources.FILTER.BadUserRequestException-- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
- When the extending query uses expressions and expression evaluation is deactivated for adhoc queries.
Expression evaluation can be activated by setting the process engine configuration properties
enableExpressionsInAdhocQueries(defaultfalse) andenableExpressionsInStoredQueries(defaulttrue) totrue. - When a maximum results limit is specified. A maximum results limit can be specified with
the process engine configuration property
queryMaxResultsLimit(defaultInteger.MAX_VALUE). Please uselistPage(String, Query, int, int)instead.
-
listPage
Executes the query of the filter and returns the result in the given boundaries as list.- Parameters:
filterId- the id of the filterfirstResult- first result to selectmaxResults- maximal number of results- Returns:
- the query result as list
- Throws:
AuthorizationException- if the user has noPermissions.READpermissions onResources.FILTER.BadUserRequestException-- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
Expression evaluation can be activated by setting the process engine configuration properties
enableExpressionsInAdhocQueries(defaultfalse) andenableExpressionsInStoredQueries(defaulttrue) totrue. - When exceeds the maximum results limit. A maximum results limit can
be specified with the process engine configuration property
queryMaxResultsLimit(defaultInteger.MAX_VALUE).
- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
Expression evaluation can be activated by setting the process engine configuration properties
-
listPage
<T,Q extends Query<?, List<T> listPageT>> (String filterId, Q extendingQuery, int firstResult, int maxResults) Executes the extended query of a filter and returns the result in the given boundaries as list.- Parameters:
extendingQuery- additional query to extend the filter queryfilterId- the id of the filterfirstResult- first result to selectmaxResults- maximal number of results- Returns:
- the query result as list
- Throws:
AuthorizationException- if the user has noPermissions.READpermissions onResources.FILTER.BadUserRequestException-- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
- When the extending query uses expressions and expression evaluation is deactivated for adhoc queries.
Expression evaluation can be activated by setting the process engine configuration properties
enableExpressionsInAdhocQueries(defaultfalse) andenableExpressionsInStoredQueries(defaulttrue) totrue. - When exceeds the maximum results limit. A maximum results limit can
be specified with the process engine configuration property
queryMaxResultsLimit(defaultInteger.MAX_VALUE).
-
singleResult
Executes the query of the filter and returns the a single result.- Parameters:
filterId- the id of the filter- Returns:
- the single query result
- Throws:
AuthorizationException- if the user has noPermissions.READpermissions onResources.FILTER.BadUserRequestException-- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
Expression evaluation can be activated by setting the process engine configuration properties
enableExpressionsInAdhocQueries(defaultfalse) andenableExpressionsInStoredQueries(defaulttrue) totrue.
- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
Expression evaluation can be activated by setting the process engine configuration properties
-
singleResult
Executes the extended query of the filter and returns the a single result.- Parameters:
filterId- the id of the filterextendingQuery- additional query to extend the filter query- Returns:
- the single query result
- Throws:
AuthorizationException- if the user has noPermissions.READpermissions onResources.FILTER.BadUserRequestException-- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
- When the extending query uses expressions and expression evaluation is deactivated for adhoc queries.
Expression evaluation can be activated by setting the process engine configuration properties
enableExpressionsInAdhocQueries(defaultfalse) andenableExpressionsInStoredQueries(defaulttrue) totrue.
-
count
Executes the query of the filter and returns the result count.- Parameters:
filterId- the id of the filter- Returns:
- the result count
- Throws:
AuthorizationException- if the user has noPermissions.READpermissions onResources.FILTER.BadUserRequestException-- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
Expression evaluation can be activated by setting the process engine configuration properties
enableExpressionsInAdhocQueries(defaultfalse) andenableExpressionsInStoredQueries(defaulttrue) totrue.
- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
Expression evaluation can be activated by setting the process engine configuration properties
-
count
Executes the extended query of the filter and returns the result count.- Parameters:
filterId- the id of the filterextendingQuery- additional query to extend the filter query- Returns:
- the result count
- Throws:
AuthorizationException- if the user has noPermissions.READpermissions onResources.FILTER.BadUserRequestException-- When the filter query uses expressions and expression evaluation is deactivated for stored queries.
- When the extending query uses expressions and expression evaluation is deactivated for adhoc queries.
Expression evaluation can be activated by setting the process engine configuration properties
enableExpressionsInAdhocQueries(defaultfalse) andenableExpressionsInStoredQueries(defaulttrue) totrue.
-