Interface CourseRegistrationLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CourseRegistrationLookupSession extends OsidSession

This session provides methods for retrieving CourseRegistrat ions.

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 set or is an error condition
  • isolated course catalog view: All course registration methods in this session operate, retrieve and pertain to course registrations defined explicitly in the current course catalog Using an isolated view is useful for managing CourseRegistra tions with the CourseRegistrationAdminSession .
  • federated course registration view: All course registration methods in this session operate, retrieve and pertain to all course registrations defined in this course catalog and any other course registrations implicitly available in this course catalog through course catalog inheritence.

Generally, the comparative view should be used for most applications as it permits operation even if there is data that cannot be accessed. The methods useFederatedCourseCatalogView() and useIsolatedCourseCatalogView() behave as a radio group and one should be selected before invoking any lookup 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.
    • canLookupCourseRegistrations

      boolean canLookupCourseRegistrations()
      Tests if this user can perform CourseRegistr ation 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 opt not to offer lookup operations to unauthorized users.
      Returns:
      false if lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeCourseRegistrationView

      void useComparativeCourseRegistrationView()
      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.
    • usePlenaryCourseRegistrationView

      void usePlenaryCourseRegistrationView()
      A complete view of the CourseRegistration 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 registrations in 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 lookups to this course catalog only.
      Compliance:
      mandatory - This method is must be implemented.
    • useEffectiveCourseRegistrationView

      void useEffectiveCourseRegistrationView()
      Only course registrations whose effective dates are current are returned by methods in this session.
      Compliance:
      mandatory - This method is must be implemented.
    • useAnyEffectiveCourseRegistrationView

      void useAnyEffectiveCourseRegistrationView()
      All course registrations of any effective dates are returned by methods in this session.
      Compliance:
      mandatory - This method is must be implemented.
    • getCourseRegistration

      CourseRegistration getCourseRegistration(Id courseRegistrationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the CourseRegistr ation specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned CourseRegistr ation may have a different Id than requested, such as the case where a duplicate Id was assigned to a CourseRegistra tion and retained for compatibility.
      Parameters:
      courseRegistrationId - Id of the CourseRegistration
      Returns:
      the course registration
      Throws:
      NotFoundException - courseRegistrationId not found
      NullArgumentException - courseRegistrationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getCourseRegistrationsByIds

      CourseRegistrationList getCourseRegistrationsByIds(IdList courseRegistrationIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets a CourseRegistrationList corresponding to the given IdList . In plenary mode, the returned list contains all of the course registrations 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 CourseRegistratio ns may be omitted from the list and may present the elements in any order including returning a unique set.
      Parameters:
      courseRegistrationIds - the list of Ids to retrieve
      Returns:
      the returned CourseRegistration list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - courseRegistrationIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseRegistrationsByGenusType

      CourseRegistrationList getCourseRegistrationsByGenusType(Type courseRegistrationGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a CourseRegistrationList corresponding to the given course registration genus Type which does not include course registrations of genus types derived from the specified Type . In plenary mode, the returned list contains all known course registrations or an error results. Otherwise, the returned list may contain only those course registrations that are accessible through this session.
      Parameters:
      courseRegistrationGenusType - a course registration genus type
      Returns:
      the returned CourseRegistration list
      Throws:
      NullArgumentException - courseRegistrationGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseRegistrationsByParentGenusType

      CourseRegistrationList getCourseRegistrationsByParentGenusType(Type courseRegistrationGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a CourseRegistrationList corresponding to the given course registration genus Type and include any additional course registrations with genus types derived from the specified Type . In plenary mode, the returned list contains all known course registrations or an error results. Otherwise, the returned list may contain only those course registrations that are accessible through this session.
      Parameters:
      courseRegistrationGenusType - a course registration genus type
      Returns:
      the returned CourseRegistration list
      Throws:
      NullArgumentException - courseRegistrationGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseRegistrationsByRecordType

      CourseRegistrationList getCourseRegistrationsByRecordType(Type courseRegistrationRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a CourseRegistrationList containing the given course registration record Type . In plenary mode, the returned list contains all known course registrations or an error results. Otherwise, the returned list may contain only those course registrations that are accessible through this session.
      Parameters:
      courseRegistrationRecordType - a course registration record type
      Returns:
      the returned CourseRegistration list
      Throws:
      NullArgumentException - courseRegistrationRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseRegistrationsOnDate

      Gets all CourseRegistrations effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known course registrations or an error results. Otherwise, the returned list may contain only those registrations that are accessible through this session. In effective mode, course registrations are returned that are currently effective. In any effective mode, effective course registrations and those currently expired are returned.
      Parameters:
      from - start of date range
      to - end of date range
      Returns:
      a list of CourseRegistrations
      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.
    • getCourseRegistrationsForCourseOffering

      CourseRegistrationList getCourseRegistrationsForCourseOffering(Id courseOfferingId) throws OperationFailedException, PermissionDeniedException
      Gets all CourseRegistrations associated with a given CourseOffering . In plenary mode, the returned list contains all known course registrations or an error results. Otherwise, the returned list may contain only those registrations that are accessible through this session. In effective mode, course registrations are returned that are currently effective. In any effective mode, effective course registrations and those currently expired are returned.
      Parameters:
      courseOfferingId - a course offering Id
      Returns:
      a list of CourseRegistrations
      Throws:
      NullArgumentException - courseOfferingId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseRegistrationsForCourseOfferingOnDate

      CourseRegistrationList getCourseRegistrationsForCourseOfferingOnDate(Id courseOfferingId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets all CourseRegistrations for the given course offering and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known course registrations or an error results. Otherwise, the returned list may contain only those registrations that are accessible through this session. In effective mode, course registrations are returned that are currently effective. In any effective mode, effective course registrations and those currently expired are returned.
      Parameters:
      courseOfferingId - a course offering Id
      from - start of date range
      to - end of date range
      Returns:
      a list of CourseRegistrations
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - courseOfferingId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseRegistrationsForStudent

      CourseRegistrationList getCourseRegistrationsForStudent(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Gets all CourseRegistrations for a given student. In plenary mode, the returned list contains all known course registrations or an error results. Otherwise, the returned list may contain only those registrations that are accessible through this session. In effective mode, course registrations are returned that are currently effective. In any effective mode, effective course registrations and those currently expired are returned.
      Parameters:
      resourceId - a resource Id
      Returns:
      a list of CourseRegistrations
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseRegistrationsForStudentOnDate

      CourseRegistrationList getCourseRegistrationsForStudentOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets all CourseRegistrations for a student during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known course registrations or an error results. Otherwise, the returned list may contain only those registrations that are accessible through this session. In effective mode, course registrations are returned that are currently effective. In any effective mode, effective course registrations and those currently expired are returned.
      Parameters:
      resourceId - a resource Id
      from - start of date range
      to - end of date range
      Returns:
      a list of CourseRegistrations
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - resourceId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseRegistrationsForCourseOfferingAndStudent

      CourseRegistrationList getCourseRegistrationsForCourseOfferingAndStudent(Id courseOfferingId, Id resourceId) throws OperationFailedException, PermissionDeniedException
      Gets all CourseRegistrations for a given course offering and student. In plenary mode, the returned list contains all known course registrations or an error results. Otherwise, the returned list may contain only those registrations that are accessible through this session. In effective mode, course registrations are returned that are currently effective. In any effective mode, effective course registrations and those currently expired are returned.
      Parameters:
      courseOfferingId - a course offering Id
      resourceId - a resource Id
      Returns:
      a list of CourseRegistrations
      Throws:
      NullArgumentException - courseOfferingId or resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseRegistrationsForCourseOfferingAndStudentOnDate

      CourseRegistrationList getCourseRegistrationsForCourseOfferingAndStudentOnDate(Id courseOfferingId, Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets all CourseRegistrations for a course offering and student during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known course registrations or an error results. Otherwise, the returned list may contain only those registrations that are accessible through this session. In effective mode, course registrations are returned that are currently effective. In any effective mode, effective course registrations and those currently expired are returned.
      Parameters:
      courseOfferingId - a course offering Id
      resourceId - a resource Id
      from - start of date range
      to - end of date range
      Returns:
      a list of CourseRegistrations
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - courseOfferingId, resourceId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCourseRegistrations

      Gets all CourseRegistrations . In plenary mode, the returned list contains all known course registrations or an error results. Otherwise, the returned list may contain only those course registrations that are accessible through this session.
      Returns:
      a list of CourseRegistrations
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.