Interface LessonLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface LessonLookupSession extends OsidSession

This session provides methods for retrieving Lessons The Lesson represents a collection of syllabi.

This session defines views that offer differing behaviors when retrieving multiple objects.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete view or is an error condition
  • isolated course catalog view: All lesson methods in this session operate, retrieve and pertain to lessonsdefined explicitly in the current course catalog. Using an isolated view is useful for managing lessonswith the LessonAdminSession .
  • federated course catalog view: All lesson lookup methods in this session operate, retrieve and pertain to all lessonsdefined in this course catalog and any other course catalogs implicitly available in this course catalog through course catalog inheritence.
  • effective lesson view: All lesson lookup methods return lessons where the current date falls in between the effective dates inclusive.
  • any lesson view: Lessons of any effective date are returned from methods.
  • Method Details

    • getCourseCatalogId

      Id getCourseCatalogId()
      Gets the CourseCatalog Id associated with this session.
      Returns:
      the CourseCatalog Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCourseCatalog

      Gets the CourseCatalog associated with this session.
      Returns:
      the course catalog
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canLookupLessons

      boolean canLookupLessons()
      Tests if this user can perform Lesson lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not offer lookup operations to unauthorized users.
      Returns:
      false if lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeLessonView

      void useComparativeLessonView()
      The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
      Compliance:
      mandatory - This method is must be implemented.
    • usePlenaryLessonView

      void usePlenaryLessonView()
      A complete view of the Lesson returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
      Compliance:
      mandatory - This method is must be implemented.
    • useFederatedCourseCatalogView

      void useFederatedCourseCatalogView()
      Federates the view for methods in this session. A federated view will include lessonsin course catalogs which are children of this course catalog in the course catalog hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedCourseCatalogView

      void useIsolatedCourseCatalogView()
      Isolates the view for methods in this session. An isolated view restricts retrievals to this course catalog only.
      Compliance:
      mandatory - This method is must be implemented.
    • useEffectiveLessonView

      void useEffectiveLessonView()
      Only lessons whose effective dates are current are returned by methods in this session.
      Compliance:
      mandatory - This method is must be implemented.
    • useAnyEffectiveLessonView

      void useAnyEffectiveLessonView()
      All lessons of any effective dates are returned by methods in this session.
      Compliance:
      mandatory - This method is must be implemented.
    • getLesson

      Gets the Lesson specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Lesson may have a different Id than requested, such as the case where a duplicate Id was assigned to a Lesson and retained for compatibility. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.
      Parameters:
      lessonId - Id of the Lesson
      Returns:
      the lesson
      Throws:
      NotFoundException - lessonId not found
      NullArgumentException - lessonId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getLessonsByIds

      Gets a LessonList corresponding to the given IdList . In plenary mode, the returned list contains all of the lessonsspecified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Lessons may be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.
      Parameters:
      lessonIds - the list of Ids to retrieve
      Returns:
      the returned Lesson list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - lessonIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLessonsByGenusType

      LessonList getLessonsByGenusType(Type lessonGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a LessonList corresponding to the given lesson genus Type which does not include lessonsof genus types derived from the specified Type . In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.
      Parameters:
      lessonGenusType - a lesson genus type
      Returns:
      the returned Lesson list
      Throws:
      NullArgumentException - lessonGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLessonsByParentGenusType

      LessonList getLessonsByParentGenusType(Type lessonGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a LessonList corresponding to the given lesson genus Type and include any additional lessons with genus types derived from the specified Type . In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.
      Parameters:
      lessonGenusType - a lesson genus type
      Returns:
      the returned Lesson list
      Throws:
      NullArgumentException - lessonGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLessonsByRecordType

      LessonList getLessonsByRecordType(Type lessonRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a LessonList containing the given lesson record Type . In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.
      Parameters:
      lessonRecordType - a lesson record type
      Returns:
      the returned Lesson list
      Throws:
      NullArgumentException - lessonRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLessonsOnDate

      Gets a LessonList effective sduring the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.
      Parameters:
      from - s atsrting date
      to - an ending date
      Returns:
      the returned Lesson list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLessonsForPlan

      Gets a LessonList for the given plan Id . In plenary mode, the returned list contains all known lessons or an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.
      Parameters:
      planId - a plan Id
      Returns:
      the returned Lesson list
      Throws:
      NullArgumentException - planId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLessonsForPlanOnDate

      LessonList getLessonsForPlanOnDate(Id planId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a LessonList for a plan effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.
      Parameters:
      planId - a plan Id
      from - s atsrting date
      to - an ending date
      Returns:
      the returned Lesson list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - planId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLessonsForDocet

      LessonList getLessonsForDocet(Id docetId) throws OperationFailedException, PermissionDeniedException
      Gets a LessonList for the given docet Id . In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.
      Parameters:
      docetId - a docet Id
      Returns:
      the returned Lesson list
      Throws:
      NullArgumentException - docetId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLessonsForDocetOnDate

      LessonList getLessonsForDocetOnDate(Id docetId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a LessonList for a docet effective sduring the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.
      Parameters:
      docetId - a docet Id
      from - s atsrting date
      to - an ending date
      Returns:
      the returned Lesson list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - docetId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLessonsForPlanAndDocet

      LessonList getLessonsForPlanAndDocet(Id planId, Id docetId) throws OperationFailedException, PermissionDeniedException
      Gets a LessonList for the given plan and docet. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.
      Parameters:
      planId - a plan Id
      docetId - a docet Id
      Returns:
      the returned Lesson list
      Throws:
      NullArgumentException - planId or docetId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLessonsForPlanAndDocetOnDate

      LessonList getLessonsForPlanAndDocetOnDate(Id planId, Id docetId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a LessonList for a plan and docet effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.
      Parameters:
      planId - a plan Id
      docetId - a docet Id
      from - s atsrting date
      to - an ending date
      Returns:
      the returned Lesson list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - planId, docetId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLessons

      Gets all Lessons . In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.
      Returns:
      a list of Lessons
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.