Interface CourseRegistrationLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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
CourseRegistrations with theCourseRegistrationAdminSession. - 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 Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performCourseRegistration lookups.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.getCourseRegistration(Id courseRegistrationId) Gets theCourseRegistration specified by itsId.Gets allCourseRegistrations.getCourseRegistrationsByGenusType(Type courseRegistrationGenusType) Gets aCourseRegistrationListcorresponding to the given course registration genusTypewhich does not include course registrations of genus types derived from the specifiedType.getCourseRegistrationsByIds(IdList courseRegistrationIds) Gets aCourseRegistrationListcorresponding to the givenIdList.getCourseRegistrationsByParentGenusType(Type courseRegistrationGenusType) Gets aCourseRegistrationListcorresponding to the given course registration genusTypeand include any additional course registrations with genus types derived from the specifiedType.getCourseRegistrationsByRecordType(Type courseRegistrationRecordType) Gets aCourseRegistrationListcontaining the given course registration recordType.getCourseRegistrationsForCourseOffering(Id courseOfferingId) Gets allCourseRegistrationsassociated with a givenCourseOffering.getCourseRegistrationsForCourseOfferingAndStudent(Id courseOfferingId, Id resourceId) Gets allCourseRegistrationsfor a given course offering and student.getCourseRegistrationsForCourseOfferingAndStudentOnDate(Id courseOfferingId, Id resourceId, DateTime from, DateTime to) Gets allCourseRegistrationsfor a course offering and student during the entire given date range inclusive but not confined to the date range.getCourseRegistrationsForCourseOfferingOnDate(Id courseOfferingId, DateTime from, DateTime to) Gets allCourseRegistrationsfor the given course offering and effective during the entire given date range inclusive but not confined to the date range.getCourseRegistrationsForStudent(Id resourceId) Gets allCourseRegistrationsfor a given student.getCourseRegistrationsForStudentOnDate(Id resourceId, DateTime from, DateTime to) Gets allCourseRegistrationsfor a student during the entire given date range inclusive but not confined to the date range.getCourseRegistrationsOnDate(DateTime from, DateTime to) Gets allCourseRegistrationseffective during the entire given date range inclusive but not confined to the date range.voidAll course registrations of any effective dates are returned by methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidOnly course registrations whose effective dates are current are returned by methods in this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theCourseRegistrationreturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getCourseCatalogId
Id getCourseCatalogId()Gets theCourseCatalogIdassociated with this session.- Returns:
- the
CourseCatalog Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCourseCatalog
Gets theCourseCatalogassociated with this session.- Returns:
- the course catalog
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupCourseRegistrations
boolean canLookupCourseRegistrations()Tests if this user can performCourseRegistration 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 aPERMISSION_DENIED.This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- 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 theCourseRegistrationreturns 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 theCourseRegistration specified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedCourseRegistration may have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aCourseRegistration and retained for compatibility.- Parameters:
courseRegistrationId-Idof theCourseRegistration- Returns:
- the course registration
- Throws:
NotFoundException-courseRegistrationIdnot foundNullArgumentException-courseRegistrationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getCourseRegistrationsByIds
CourseRegistrationList getCourseRegistrationsByIds(IdList courseRegistrationIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aCourseRegistrationListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the course registrations specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleCourseRegistrations may be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
courseRegistrationIds- the list ofIdsto retrieve- Returns:
- the returned
CourseRegistrationlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-courseRegistrationIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseRegistrationsByGenusType
CourseRegistrationList getCourseRegistrationsByGenusType(Type courseRegistrationGenusType) throws OperationFailedException, PermissionDeniedException Gets aCourseRegistrationListcorresponding to the given course registration genusTypewhich does not include course registrations of genus types derived from the specifiedType. 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
CourseRegistrationlist - Throws:
NullArgumentException-courseRegistrationGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseRegistrationsByParentGenusType
CourseRegistrationList getCourseRegistrationsByParentGenusType(Type courseRegistrationGenusType) throws OperationFailedException, PermissionDeniedException Gets aCourseRegistrationListcorresponding to the given course registration genusTypeand include any additional course registrations with genus types derived from the specifiedType. 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
CourseRegistrationlist - Throws:
NullArgumentException-courseRegistrationGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseRegistrationsByRecordType
CourseRegistrationList getCourseRegistrationsByRecordType(Type courseRegistrationRecordType) throws OperationFailedException, PermissionDeniedException Gets aCourseRegistrationListcontaining the given course registration recordType. 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
CourseRegistrationlist - Throws:
NullArgumentException-courseRegistrationRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseRegistrationsOnDate
CourseRegistrationList getCourseRegistrationsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets allCourseRegistrationseffective 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 rangeto- end of date range- Returns:
- a list of
CourseRegistrations - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseRegistrationsForCourseOffering
CourseRegistrationList getCourseRegistrationsForCourseOffering(Id courseOfferingId) throws OperationFailedException, PermissionDeniedException Gets allCourseRegistrationsassociated with a givenCourseOffering. 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 offeringId- Returns:
- a list of
CourseRegistrations - Throws:
NullArgumentException-courseOfferingIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseRegistrationsForCourseOfferingOnDate
CourseRegistrationList getCourseRegistrationsForCourseOfferingOnDate(Id courseOfferingId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets allCourseRegistrationsfor 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 offeringIdfrom- start of date rangeto- end of date range- Returns:
- a list of
CourseRegistrations - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-courseOfferingId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseRegistrationsForStudent
CourseRegistrationList getCourseRegistrationsForStudent(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets allCourseRegistrationsfor 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 resourceId- Returns:
- a list of
CourseRegistrations - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseRegistrationsForStudentOnDate
CourseRegistrationList getCourseRegistrationsForStudentOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets allCourseRegistrationsfor 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 resourceIdfrom- start of date rangeto- end of date range- Returns:
- a list of
CourseRegistrations - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseRegistrationsForCourseOfferingAndStudent
CourseRegistrationList getCourseRegistrationsForCourseOfferingAndStudent(Id courseOfferingId, Id resourceId) throws OperationFailedException, PermissionDeniedException Gets allCourseRegistrationsfor 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 offeringIdresourceId- a resourceId- Returns:
- a list of
CourseRegistrations - Throws:
NullArgumentException-courseOfferingIdorresourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseRegistrationsForCourseOfferingAndStudentOnDate
CourseRegistrationList getCourseRegistrationsForCourseOfferingAndStudentOnDate(Id courseOfferingId, Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets allCourseRegistrationsfor 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 offeringIdresourceId- a resourceIdfrom- start of date rangeto- end of date range- Returns:
- a list of
CourseRegistrations - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-courseOfferingId, resourceId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseRegistrations
CourseRegistrationList getCourseRegistrations() throws OperationFailedException, PermissionDeniedExceptionGets allCourseRegistrations. 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 requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-