Interface ModuleSearchSession

All Superinterfaces:
AutoCloseable, Closeable, ModuleQuerySession, OsidSession, OsidSession

public interface ModuleSearchSession extends ModuleQuerySession

This session provides methods for searching Modules. The search query is constructed using the ModuleQuery. The module record Type also specifies the record for the module query.

getModulesByQuery() is the basic search method and returns a list of CourseCatalog elements. A more advanced search may be performed with getModulesBySearch(). It accepts a ModuleSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getModulesBySearch() returns a ModuleSearchResults that can be used to access the resulting ModuleList or be used to perform a search within the result set through ModuleSearch.

Modules may have a query record indicated by their respective record types. The query record is accessed via the ModuleQuery. The returns in this session may not be cast directly to these interfaces.

  • Method Details

    • getModuleSearch

      ModuleSearch getModuleSearch()
      Gets a module search.
      Returns:
      the module search
      Compliance:
      mandatory - This method must be implemented.
    • getModuleSearchOrder

      ModuleSearchOrder getModuleSearchOrder()
      Gets a module search order. The ModuleSearchOrder is supplied to a ModuleSearch to specify the ordering of results.
      Returns:
      the module search order interface
      Compliance:
      mandatory - This method must be implemented.
    • getModulesBySearch

      ModuleSearchResults getModulesBySearch(ModuleQuery moduleQuery, ModuleSearch moduleSearch) throws OperationFailedException, PermissionDeniedException
      Gets the search results matching the given search.
      Parameters:
      moduleQuery - the module query
      moduleSearch - the module search
      Returns:
      the module search results
      Throws:
      NullArgumentException - moduleQuery or moduleSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - moduleQuery or moduleSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getModuleQueryFromInspector

      ModuleQuery getModuleQueryFromInspector(ModuleQueryInspector moduleQueryInspector)
      Gets a module query from an inspector. The inspector is available from a ModuleSearchResults.
      Parameters:
      moduleQueryInspector - a module query inspector
      Returns:
      the module query
      Throws:
      NullArgumentException - moduleQueryInspector is null
      UnsupportedException - moduleQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.