Interface CategorySearchSession

All Superinterfaces:
AutoCloseable, CategoryQuerySession, Closeable, OsidSession, OsidSession

public interface CategorySearchSession extends CategoryQuerySession

This session provides methods for searching among Categories . The search query is constructed using the CategoryQuery .

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

This session defines views that offer differing behaviors for searching.

  • federated business view: searches include categories in businesses of which this business is an ancestor in the business hierarchy
  • isolated business view: searches are restricted to categories in this business

Categories may have a query record indicated by their respective record types. The queryrecord is accessed via the CategoryQuery .

  • Method Details

    • getCategorySearch

      CategorySearch getCategorySearch()
      Gets a category search.
      Returns:
      the category search
      Compliance:
      mandatory - This method must be implemented.
    • getCategorySearchOrder

      CategorySearchOrder getCategorySearchOrder()
      Gets a category search order. The CategorySearchOrder is supplied to a CategorySearch to specify the ordering of results.
      Returns:
      the category search order
      Compliance:
      mandatory - This method must be implemented.
    • getCategoriesBySearch

      CategorySearchResults getCategoriesBySearch(CategoryQuery categoryQuery, CategorySearch categorySearch) throws OperationFailedException, PermissionDeniedException
      Gets the search results matching the given search query using the given search.
      Parameters:
      categoryQuery - the category query
      categorySearch - the category search
      Returns:
      the category search results
      Throws:
      NullArgumentException - categoryQuery or categorySearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - categoryQuery or categorySearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getCategoryQueryFromInspector

      CategoryQuery getCategoryQueryFromInspector(ItemQueryInspector categoryQueryInspector)
      Gets a category query from an inspector. The inspector is available from a CategorySearchResults .
      Parameters:
      categoryQueryInspector - a category query inspector
      Returns:
      the category query
      Throws:
      NullArgumentException - categoryQueryInspector is null
      UnsupportedException - categoryQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.