Interface ITaskSearchQueryExtended

All Superinterfaces:
ITaskConstants, ITaskSearchQuery
All Known Subinterfaces:
ITaskSearchQueryExtended
All Known Implementing Classes:
TaskInboxHpstraSearchContentProvider.HpstraInboxSearchQuery, TaskInboxIndexedSearchContentProvider.InboxSearchQuery, TaskInboxSearchContentProvider.InboxSearchQuery, TaskSearchQuery, TaskSearchQuery, TaskSearchQueryExtended, TaskSearchQueryV2, TaskSearchQueryV2

public interface ITaskSearchQueryExtended extends ITaskSearchQuery
Interface, providing functionality for working with task search queries. Supports multiple task search query terms, paging, sorting, aggregation. The search engine can also be specified.
  • Method Details

    • getMaxResults

      int getMaxResults()
      Returns:
      the max results to be returned. Default to -1, means no maximum is set. This is ignored when using task indexed searches. For indexed searches full count is always determined and only current page is returned.
    • isShowNonActiveTasks

      boolean isShowNonActiveTasks()
      Returns:
      flag to show non active tasks in the search result. This only valid for inbox type searches. See ITaskSearchContentProvider#setSearchInbox(boolean).
    • isCheckPermissions

      boolean isCheckPermissions()
      Returns:
      flag if current user permission should be checked for the task searches
    • getTerms

      TaskSearchQueryTerm[] getTerms()
      Returns search query terms.
      Returns:
      array of search terms
    • findTerm

      TaskSearchQueryTerm findTerm(String fieldName, String operator)
      Find the search term based on the field name and operator specified. Return null if there is no match.
      Parameters:
      fieldName - field name to search
      operator - operator to search
      Returns:
      found search term or null
    • findTerm

      TaskSearchQueryTerm findTerm(String fieldName)
      Find the search term based on the fieldName specified. Return null if there is no match.
      Parameters:
      fieldName - field name to find term for
      Returns:
      search term or null. It there are more than one term for the same field name it will return only the first term
    • getPrincipalID

      String getPrincipalID()
      Returns:
      the principal id whose inbox should be searched. If null then current user is assumed.
    • matches

      boolean matches(FacesContext facesContext) throws Exception
      Evaluates query against task set on facesContext. This calls into TaskSearchQueryTerm.matches(FacesContext) for every term defined for this task. Some terms may implement a search in the database (for most TaskInfo fields). If term implements its search in the database, then this term is ignored as it already been evaluated.
      Parameters:
      facesContext - current facesContext. The current task is available on the context by #{currentTask} binding expression
      Returns:
      true if all terms from this query match the current task
      Throws:
      Exception - if any exception occurs during the operation execution
    • reset

      void reset()
      Resets a query before search. This needs to be called if the same query is used multiple times for different searches (e.g. only modifying search terms values).
    • validate

      void validate() throws Exception
      Validates this query, throws any exception if query is not valid.
      Throws:
      Exception - if the query is invalid
    • isDoNotShowAcceptedByOthers

      boolean isDoNotShowAcceptedByOthers()
      Returns:
      whether query should display tasks accepted by other principals
    • getInvocationID

      long getInvocationID()
      Returns:
      ID of the search invocation.
    • getSearchEngineType

      String getSearchEngineType()
      Returns:
      the engine type, which will be referenced when a search is performed. More information can be found here IndexEngineType and here. Custom search engines can be defined as well.
    • getSortBy

      default String getSortBy()
      Returns:
      the comma-separated list of fields which are used for sorting. Defaults to null.
    • getSortOrder

      default String getSortOrder()
      Returns:
      the comma-separated list of the sort orders, corresponding to the fields defined in getSortBy(). Defaults to null.
    • getFromIndex

      default int getFromIndex()
      Returns:
      the start index for search paging, if any. Defaults to -1.
    • getToIndex

      default int getToIndex()
      Returns:
      the end index for search paging, if any. Defaults to -1.
    • getQueryAggregationInfo

      default IQueryAggregationInfo getQueryAggregationInfo()
      Returns:
      the aggregation information for this query, if any. Defaults to null.
    • isActiveVoting

      boolean isActiveVoting()
      Returns:
      returns true if search must include active voting tasks only (with at least one vote)