Interface JobSearchSession

All Superinterfaces:
AutoCloseable, Closeable, JobQuerySession, OsidSession, OsidSession

public interface JobSearchSession extends JobQuerySession

This session provides methods for searching among Job objects. The search query is constructed using the JobQuery.

getJobsByQuery() is the basic search method and returns a list of Jobs. A more advanced search may be performed with getJobsBySearch(). It accepts a JobSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getJobsBySearch() returns a JobSearchResults that can be used to access the resulting JobList or be used to perform a search within the result set through JobSearch.

This session defines views that offer differing behaviors for searching.

  • federated foundry view: searches include jobs in foundries of which this foundry is an ancestor in the foundry hierarchy
  • isolated foundry view: searches are restricted to jobs in this foundry

Jobs may have a query record indicated by their respective record types. The query record is accessed via the JobQuery.

  • Method Details

    • getJobSearch

      JobSearch getJobSearch()
      Gets a job search.
      Returns:
      the job search
      Compliance:
      mandatory - This method must be implemented.
    • getJobSearchOrder

      JobSearchOrder getJobSearchOrder()
      Gets a job search order. The JobSearchOrder is supplied to a JobSearch to specify the ordering of results.
      Returns:
      the job search order
      Compliance:
      mandatory - This method must be implemented.
    • getJobsBySearch

      Gets the search results matching the given search query using the given search.
      Parameters:
      jobQuery - the job query
      jobSearch - the job search
      Returns:
      the returned search results
      Throws:
      NullArgumentException - jobQuery or jobSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - jobQuery or jobSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getJobQueryFromInspector

      JobQuery getJobQueryFromInspector(JobQueryInspector jobQueryInspector)
      Gets a job query from an inspector. The inspector is available from a JobSearchResults.
      Parameters:
      jobQueryInspector - a job query inspector
      Returns:
      the job query
      Throws:
      NullArgumentException - jobQueryInspector is null
      UnsupportedException - jobQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.