Interface CourseOfferingLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CourseOfferingLookupSession extends OsidSession

This session defines methods for retrieving course offerings. A CourseOffering is a scheduled course listed in a course catalog. A CourseOffering is derived from a Course and maps to an offering time and registered students.

This lookup session defines several views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
  • isolated course catalog view: All course offering methods in this session operate, retrieve and pertain to course offerings defined explicitly in the current course catalog. Using an isolated view is useful for managing CourseOfferings with the CourseOfferingAdminSession .
  • federated course catalog view: All course offering lookup methods in this session operate, retrieve and pertain to all course offerings defined in this course catalog and any other courses implicitly available in this course catalog through course catalog inheritence.
  • effective course offering view: All course offering lookup methods return course offerings where the current date falls within the effective dates inclusive.
  • any effective course offering view: Course offerings of any effective or expired status are returned from methods.

The methods useFederatedCourseCatalogView() and useIsolatedCourseCatalogView() behave as a radio group and one should be selected before invoking any lookup methods.

Courses may have an additional records indicated by their respective record types. The record may not be accessed through a cast of the Course .

  • 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.
    • canLookupCourseOfferings

      boolean canLookupCourseOfferings()
      Tests if this user can perform CourseOffering 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.
    • useComparativeCourseOfferingView

      void useComparativeCourseOfferingView()
      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.
    • usePlenaryCourseOfferingView

      void usePlenaryCourseOfferingView()
      A complete view of the CourseOffering 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 course offerings in catalogs which are children of this 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.
    • useEffectiveCourseOfferingView

      void useEffectiveCourseOfferingView()
      All course offering methods return course offerings where the current date falls within the effective dates inclusive.
      Compliance:
      mandatory - This method is must be implemented.
    • useAnyEffectiveCourseOfferingView

      void useAnyEffectiveCourseOfferingView()
      All methods return course offerings of any effective or expired status.
      Compliance:
      mandatory - This method is must be implemented.
    • getCourseOffering

      Gets the CourseOffering specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned CourseOffering may have a different Id than requested, such as the case where a duplicate Id was assigned to a Course and retained for compatibility. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      courseOfferingId - the Id of the CourseOffering to retrieve
      Returns:
      the returned CourseOffering
      Throws:
      NotFoundException - no CourseOffering found with the given Id
      NullArgumentException - courseOfferingId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingsByIds

      Gets a CourseOfferingList corresponding to the given IdList . In plenary mode, the returned list contains all of the course offerings specified 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 CourseOfferings may be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      courseOfferingIds - the list of Ids to retrieve
      Returns:
      the returned CourseOffering list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - courseOfferingIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingsByGenusType

      CourseOfferingList getCourseOfferingsByGenusType(Type courseOfferingGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a CourseOfferingList corresponding to the given course offering genus Type which does not include course offerings of types derived from the specified Type . In plenary mode, the returned list contains all known course offerings or an error results. Otherwise, the returned list may contain only those course offerings that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      courseOfferingGenusType - a course offering genus type
      Returns:
      the returned CourseOffering list
      Throws:
      NullArgumentException - courseOfferingGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingsByParentGenusType

      CourseOfferingList getCourseOfferingsByParentGenusType(Type courseOfferingGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a CourseOfferingList corresponding to the given course genus Type and include any additional course offerings with genus types derived from the specified Type . In plenary mode, the returned list contains all known course offerings or an error results. Otherwise, the returned list may contain only those course offerings that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      courseOfferingGenusType - a course offering genus type
      Returns:
      the returned CourseOffering list
      Throws:
      NullArgumentException - courseOfferingGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingsByRecordType

      CourseOfferingList getCourseOfferingsByRecordType(Type courseOfferingRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a CourseOfferingList containing the given course offering record Type . In plenary mode, the returned list contains all known courses or an error results. Otherwise, the returned list may contain only those course offerings that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      courseOfferingRecordType - a course offering record type
      Returns:
      the returned CourseOffering list
      Throws:
      NullArgumentException - courseOfferingRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingsOnDate

      Gets all CourseOfferings effective within the given date range inclusive. In plenary mode, the returned list contains all known course offerings or an error results. Otherwise, the returned list may contain only those course offerings that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      from - start of date range
      to - end of date range
      Returns:
      a list of CourseOfferings
      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.
    • getCourseOfferingsForCourse

      CourseOfferingList getCourseOfferingsForCourse(Id courseId) throws OperationFailedException, PermissionDeniedException
      Gets all CourseOfferings associated with a given Course . In plenary mode, the returned list contains all known course offerings or an error results. Otherwise, the returned list may contain only those course offerings that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      courseId - a course Id
      Returns:
      a list of CourseOfferings
      Throws:
      NullArgumentException - courseId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingsForCourseOnDate

      CourseOfferingList getCourseOfferingsForCourseOnDate(Id courseId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets all CourseOfferings for a course and effective within the given date range inclusive. In plenary mode, the returned list contains all known course offerings or an error results. Otherwise, the returned list may contain only those course offerings that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      courseId - a course Id
      from - start of date range
      to - end of date range
      Returns:
      a list of CourseOfferings
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - courseId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingsForTerm

      CourseOfferingList getCourseOfferingsForTerm(Id termId) throws OperationFailedException, PermissionDeniedException
      Gets all CourseOfferings associated for a given Term . In plenary mode, the returned list contains all known course offerings or an error results. Otherwise, the returned list may contain only those course offerings that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      termId - a term Id
      Returns:
      a list of CourseOfferings
      Throws:
      NullArgumentException - termId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingsForTermOnDate

      CourseOfferingList getCourseOfferingsForTermOnDate(Id termId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets all CourseOfferings for a term and effective within the given date range inclusive. In plenary mode, the returned list contains all known course offerings or an error results. Otherwise, the returned list may contain only those course offerings that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      termId - a term Id
      from - start of date range
      to - end of date range
      Returns:
      a list of CourseOfferings
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - termId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingsForCourseAndTerm

      CourseOfferingList getCourseOfferingsForCourseAndTerm(Id courseId, Id termId) throws OperationFailedException, PermissionDeniedException
      Gets all CourseOfferings associated with a given Term and Course . In plenary mode, the returned list contains all known course offerings or an error results. Otherwise, the returned list may contain only those course offerings that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      courseId - a course Id
      termId - a term Id
      Returns:
      a list of CourseOfferings
      Throws:
      NullArgumentException - courseId or termId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingsForCourseAndTermOnDate

      CourseOfferingList getCourseOfferingsForCourseAndTermOnDate(Id courseId, Id termId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets all CourseOfferings for a course, term, and effective within the given date range inclusive. In plenary mode, the returned list contains all known course offerings or an error results. Otherwise, the returned list may contain only those course offerings that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      courseId - a course Id
      termId - a term Id
      from - start of date range
      to - end of date range
      Returns:
      a list of CourseOfferings
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - courseId, termId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingsByNumberForTerm

      CourseOfferingList getCourseOfferingsByNumberForTerm(Id termId, String number) throws OperationFailedException, PermissionDeniedException
      Gets all CourseOfferings ny number and associated with a given Term . In plenary mode, the returned list contains all known course offerings or an error results. Otherwise, the returned list may contain only those course offerings that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      termId - a term Id
      number - a course offering number
      Returns:
      a list of CourseOfferings
      Throws:
      NullArgumentException - termId or number is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingsBySponsorForTerm

      CourseOfferingList getCourseOfferingsBySponsorForTerm(Id sponsorId, Id termId) throws OperationFailedException, PermissionDeniedException
      Gets a CourseOfferingList by the given sponsor associated with a given Term . In plenary mode, the returned list contains all known course offerings or an error results. Otherwise, the returned list may contain only those course offerings that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      sponsorId - a sponsor Id
      termId - a term Id
      Returns:
      a list of CourseOfferings
      Throws:
      NullArgumentException - sponsorId or termId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingsByInstructorForTerm

      CourseOfferingList getCourseOfferingsByInstructorForTerm(Id instructorId, Id termId) throws OperationFailedException, PermissionDeniedException
      Gets a CourseOfferingList by the given instructor associated with a given Term . In plenary mode, the returned list contains all known course offerings or an error results. Otherwise, the returned list may contain only those course offerings that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Parameters:
      instructorId - an instructor Id
      termId - a term Id
      Returns:
      a list of CourseOfferings
      Throws:
      NullArgumentException - termId or instructorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferings

      Gets all CourseOfferings . In plenary mode, the returned list contains all known course offerings or an error results. Otherwise, the returned list may contain only those courses that are accessible through this session. In effective mode, course offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired course offerings are returned.
      Returns:
      a list of CourseOfferings
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.