Interface FilterService

  • All Known Implementing Classes:
    FilterServiceImpl

    public interface FilterService
    Author:
    Sebastian Menski
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Long count​(java.lang.String filterId)
      Executes the query of the filter and returns the result count.
      java.lang.Long count​(java.lang.String filterId, Query<?,​?> extendingQuery)
      Executes the extended query of the filter and returns the result count.
      FilterQuery createFilterQuery()
      Creates a new filter query
      FilterQuery createTaskFilterQuery()
      Creates a new task filter query.
      void deleteFilter​(java.lang.String filterId)
      Deletes a filter by its id.
      Filter getFilter​(java.lang.String filterId)
      Returns the filter for the given filter id.
      <T> java.util.List<T> list​(java.lang.String filterId)
      Executes the query of the filter and returns the result as list.
      <T,​Q extends Query<?,​T>>
      java.util.List<T>
      list​(java.lang.String filterId, Q extendingQuery)
      Executes the extended query of a filter and returns the result as list.
      <T> java.util.List<T> listPage​(java.lang.String filterId, int firstResult, int maxResults)
      Executes the query of the filter and returns the result in the given boundaries as list.
      <T,​Q extends Query<?,​T>>
      java.util.List<T>
      listPage​(java.lang.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.
      Filter newTaskFilter()
      Creates a new task filter.
      Filter newTaskFilter​(java.lang.String filterName)
      Creates a new task filter with a given name.
      Filter saveFilter​(Filter filter)
      Saves the filter in the database.
      <T> T singleResult​(java.lang.String filterId)
      Executes the query of the filter and returns the a single result.
      <T,​Q extends Query<?,​T>>
      T
      singleResult​(java.lang.String filterId, Q extendingQuery)
      Executes the extended query of the filter and returns the a single result.
    • Method Detail

      • 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

        Filter saveFilter​(Filter filter)
        Saves the filter in the database.
        Parameters:
        filter - the filter to save
        Returns:
        return the saved filter
        Throws:
        AuthorizationException - if the user has no Permissions.CREATE permissions on Resources.FILTER (save new filter) or if user has no Permissions.UPDATE permissions on Resources.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 (default false) and enableExpressionsInStoredQueries (default true) to true.
      • list

        <T> java.util.List<T> list​(java.lang.String filterId)
        Executes the query of the filter and returns the result as list.
        Parameters:
        filterId - the the id of the filter
        Returns:
        the query result as list
        Throws:
        AuthorizationException - if the user has no Permissions.READ permissions on Resources.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 (default false) and enableExpressionsInStoredQueries (default true) to true.
        • When a maximum results limit is specified. A maximum results limit can be specified with the process engine configuration property queryMaxResultsLimit (default Integer.MAX_VALUE). Please use listPage(String, int, int) instead.
      • list

        <T,​Q extends Query<?,​T>> java.util.List<T> list​(java.lang.String filterId,
                                                                    Q extendingQuery)
        Executes the extended query of a filter and returns the result as list.
        Parameters:
        filterId - the id of the filter
        extendingQuery - additional query to extend the filter query
        Returns:
        the query result as list
        Throws:
        AuthorizationException - if the user has no Permissions.READ permissions on Resources.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 (default false) and enableExpressionsInStoredQueries (default true) to true.
        • When a maximum results limit is specified. A maximum results limit can be specified with the process engine configuration property queryMaxResultsLimit (default Integer.MAX_VALUE). Please use listPage(String, Query, int, int) instead.
      • listPage

        <T> java.util.List<T> listPage​(java.lang.String filterId,
                                       int firstResult,
                                       int maxResults)
        Executes the query of the filter and returns the result in the given boundaries as list.
        Parameters:
        filterId - the the id of the filter
        firstResult - first result to select
        maxResults - maximal number of results
        Returns:
        the query result as list
        Throws:
        AuthorizationException - if the user has no Permissions.READ permissions on Resources.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 (default false) and enableExpressionsInStoredQueries (default true) to true.
        • When {@param maxResults} exceeds the maximum results limit. A maximum results limit can be specified with the process engine configuration property queryMaxResultsLimit (default Integer.MAX_VALUE).
      • listPage

        <T,​Q extends Query<?,​T>> java.util.List<T> listPage​(java.lang.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 query
        filterId - the id of the filter
        firstResult - first result to select
        maxResults - maximal number of results
        Returns:
        the query result as list
        Throws:
        AuthorizationException - if the user has no Permissions.READ permissions on Resources.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 (default false) and enableExpressionsInStoredQueries (default true) to true.
        • When {@param maxResults} exceeds the maximum results limit. A maximum results limit can be specified with the process engine configuration property queryMaxResultsLimit (default Integer.MAX_VALUE).
      • singleResult

        <T> T singleResult​(java.lang.String filterId)
        Executes the query of the filter and returns the a single result.
        Parameters:
        filterId - the the id of the filter
        Returns:
        the single query result
        Throws:
        AuthorizationException - if the user has no Permissions.READ permissions on Resources.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 (default false) and enableExpressionsInStoredQueries (default true) to true.
      • singleResult

        <T,​Q extends Query<?,​T>> T singleResult​(java.lang.String filterId,
                                                            Q extendingQuery)
        Executes the extended query of the filter and returns the a single result.
        Parameters:
        filterId - the the id of the filter
        extendingQuery - additional query to extend the filter query
        Returns:
        the single query result
        Throws:
        AuthorizationException - if the user has no Permissions.READ permissions on Resources.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 (default false) and enableExpressionsInStoredQueries (default true) to true.
      • count

        java.lang.Long count​(java.lang.String filterId)
        Executes the query of the filter and returns the result count.
        Parameters:
        filterId - the the id of the filter
        Returns:
        the result count
        Throws:
        AuthorizationException - if the user has no Permissions.READ permissions on Resources.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 (default false) and enableExpressionsInStoredQueries (default true) to true.
      • count

        java.lang.Long count​(java.lang.String filterId,
                             Query<?,​?> extendingQuery)
        Executes the extended query of the filter and returns the result count.
        Parameters:
        filterId - the the id of the filter
        extendingQuery - additional query to extend the filter query
        Returns:
        the result count
        Throws:
        AuthorizationException - if the user has no Permissions.READ permissions on Resources.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 (default false) and enableExpressionsInStoredQueries (default true) to true.