Interface LessonSearchSession

All Superinterfaces:
AutoCloseable, Closeable, LessonQuerySession, OsidSession, OsidSession

public interface LessonSearchSession extends LessonQuerySession

This session provides methods for searching Lessons. The search query is constructed using the LessonQuery. The lesson record Type also specifies the record for the lesson query.

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

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

  • Method Details

    • getLessonSearch

      LessonSearch getLessonSearch()
      Gets a lesson search.
      Returns:
      the lesson search
      Compliance:
      mandatory - This method must be implemented.
    • getLessonSearchOrder

      LessonSearchOrder getLessonSearchOrder()
      Gets a lesson search order. The LessonSearchOrder is supplied to a LessonSearch to specify the ordering of results.
      Returns:
      the lesson search order
      Compliance:
      mandatory - This method must be implemented.
    • getLessonsBySearch

      LessonSearchResults getLessonsBySearch(LessonQuery lessonQuery, LessonSearch lessonSearch) throws OperationFailedException, PermissionDeniedException
      Gets the search results matching the given search.
      Parameters:
      lessonQuery - the lesson query
      lessonSearch - the lesson search
      Returns:
      the lesson search results
      Throws:
      NullArgumentException - lessonQuery or lessonSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - lessonQuery or lessonSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getLessonQueryFromInspector

      LessonQuery getLessonQueryFromInspector(LessonQueryInspector lessonQueryInspector)
      Gets a lesson query from an inspector. The inspector is available from a LessonSearchResults.
      Parameters:
      lessonQueryInspector - a lesson query inspector
      Returns:
      the course catalog query
      Throws:
      NullArgumentException - lessonQueryInspector is null
      UnsupportedException - lessonQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.