Class SearchController

java.lang.Object
org.imixs.workflow.faces.data.ViewController
org.imixs.workflow.office.views.SearchController
All Implemented Interfaces:
Serializable

@Named @SessionScoped public class SearchController extends org.imixs.workflow.faces.data.ViewController implements Serializable
The SearchController provides methods for a convenient search experience.

The controller extends the Imixs ViewController and provides custom filter and search queries to request a individual WorkList result. The ItemCollection search filter holds filter criteria for a customized search query.

The bean is session scoped to hold the search filter over a page journey.

The SearchController defines also a set of predefined filter properties:

  • _processRef = holds a reference to a core process entity
  • _spaceRef = holds a reference to a core space entity
  • _phrase = holds the serach phrase
Version:
2.2.0
Author:
rsoika
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected jakarta.enterprise.event.Event<SearchEvent>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
     
    org.imixs.workflow.ItemCollection
     
    Returns a Lucene search query based on the define searchFilter parameter set
    org.imixs.workflow.ItemCollection
     
     
    org.imixs.workflow.ItemCollection
     
     
    void
    This method set the sort order and sort criteria
    boolean
     
    This method resets the search PageIndex to 0 and updates the bookmarkable search link to the worklist including the current search phrase.
    refreshSearch(jakarta.faces.event.AjaxBehaviorEvent event)
     
    void
    Resets the search filter and the current result.
    Resets the search filter but not the search phrase (phrase) The method reset the current result.
    This method reset the search filter and the search pageIndex and creates a new bookmarkable search link to the worklist including the current search phrase.
    void
    setDMSMode(boolean dms)
    Can be set to true to restrict the result to workitems containing attachments.
    void
    setSearchFilter(org.imixs.workflow.ItemCollection searchFilter)
     

    Methods inherited from class org.imixs.workflow.faces.data.ViewController

    getPageIndex, getPageSize, getWorkitems, isEndOfList, isLoadStubs, loadData, setEndOfList, setLoadStubs, setPageIndex, setPageSize, setQuery, setSortBy, setSortReverse

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • searchEvents

      @Inject protected jakarta.enterprise.event.Event<SearchEvent> searchEvents
  • Constructor Details

    • SearchController

      public SearchController()
  • Method Details

    • init

      public void init()
      This method set the sort order and sort criteria
      Overrides:
      init in class org.imixs.workflow.faces.data.ViewController
    • getSortBy

      public String getSortBy()
      Overrides:
      getSortBy in class org.imixs.workflow.faces.data.ViewController
    • getDefaultQuery

      public String getDefaultQuery()
    • getTitle

      public String getTitle()
    • isSortReverse

      public boolean isSortReverse()
      Overrides:
      isSortReverse in class org.imixs.workflow.faces.data.ViewController
    • getProcess

      public org.imixs.workflow.ItemCollection getProcess()
    • getSpace

      public org.imixs.workflow.ItemCollection getSpace()
    • reset

      public void reset()
      Resets the search filter and the current result.
      Overrides:
      reset in class org.imixs.workflow.faces.data.ViewController
      Parameters:
      event -
    • resetFilter

      public String resetFilter()
      Resets the search filter but not the search phrase (phrase) The method reset the current result.
      Parameters:
      event -
    • resetSearch

      public String resetSearch()
      This method reset the search filter and the search pageIndex and creates a new bookmarkable search link to the worklist including the current search phrase.
    • refreshSearch

      public String refreshSearch()
      This method resets the search PageIndex to 0 and updates the bookmarkable search link to the worklist including the current search phrase.
    • refreshSearch

      public String refreshSearch(jakarta.faces.event.AjaxBehaviorEvent event)
    • getSearchFilter

      public org.imixs.workflow.ItemCollection getSearchFilter()
    • setSearchFilter

      public void setSearchFilter(org.imixs.workflow.ItemCollection searchFilter)
    • setDMSMode

      public void setDMSMode(boolean dms)
      Can be set to true to restrict the result to workitems containing attachments.
      Parameters:
      dms -
    • getQuery

      public String getQuery()
      Returns a Lucene search query based on the define searchFilter parameter set

      If a search phrase is given, sortBy and sortReverse are reset. In case of a general search in a specific contest the sortBy and sortReverse are set the settings provided by the setupController

      Overrides:
      getQuery in class org.imixs.workflow.faces.data.ViewController
      Parameters:
      searchFilter - - ItemCollection with filter criteria
      view - - WorkList View type - @see WorklistController
      Returns:
      - a lucene search query
    • getCount

      public long getCount()