Interface CourseOfferingLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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
CourseOfferingswith theCourseOfferingAdminSession. - 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 Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performCourseOfferinglookups.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.getCourseOffering(Id courseOfferingId) Gets theCourseOfferingspecified by itsId.Gets allCourseOfferings.getCourseOfferingsByGenusType(Type courseOfferingGenusType) Gets aCourseOfferingListcorresponding to the given course offering genusTypewhich does not include course offerings of types derived from the specifiedType.getCourseOfferingsByIds(IdList courseOfferingIds) Gets aCourseOfferingListcorresponding to the givenIdList.getCourseOfferingsByInstructorForTerm(Id instructorId, Id termId) Gets aCourseOfferingListby the given instructor associated with a givenTerm.getCourseOfferingsByNumberForTerm(Id termId, String number) Gets allCourseOfferings ny number andassociated with a givenTerm.getCourseOfferingsByParentGenusType(Type courseOfferingGenusType) Gets aCourseOfferingListcorresponding to the given course genusTypeand include any additional course offerings with genus types derived from the specifiedType.getCourseOfferingsByRecordType(Type courseOfferingRecordType) Gets aCourseOfferingListcontaining the given course offering recordType.getCourseOfferingsBySponsorForTerm(Id sponsorId, Id termId) Gets aCourseOfferingListby the given sponsor associated with a givenTerm.getCourseOfferingsForCourse(Id courseId) Gets allCourseOfferingsassociated with a givenCourse.getCourseOfferingsForCourseAndTerm(Id courseId, Id termId) Gets allCourseOfferingsassociated with a givenTermandCourse.getCourseOfferingsForCourseAndTermOnDate(Id courseId, Id termId, DateTime from, DateTime to) Gets allCourseOfferingsfor a course, term, and effective within the given date range inclusive.getCourseOfferingsForCourseOnDate(Id courseId, DateTime from, DateTime to) Gets allCourseOfferingsfor a course and effective within the given date range inclusive.getCourseOfferingsForTerm(Id termId) Gets allCourseOfferingsassociated for a givenTerm.getCourseOfferingsForTermOnDate(Id termId, DateTime from, DateTime to) Gets allCourseOfferingsfor a term and effective within the given date range inclusive.getCourseOfferingsOnDate(DateTime from, DateTime to) Gets allCourseOfferingseffective within the given date range inclusive.voidAll methods return course offerings of any effective or expired status.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidAll course offering methods return course offerings where the current date falls within the effective dates inclusive.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theCourseOfferingreturns 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.
-
canLookupCourseOfferings
boolean canLookupCourseOfferings()Tests if this user can performCourseOfferinglookups. 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 not offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- 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 theCourseOfferingreturns 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
CourseOffering getCourseOffering(Id courseOfferingId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theCourseOfferingspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedCourseOfferingmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aCourseand 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- theIdof theCourseOfferingto retrieve- Returns:
- the returned
CourseOffering - Throws:
NotFoundException- noCourseOfferingfound with the givenIdNullArgumentException-courseOfferingIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsByIds
CourseOfferingList getCourseOfferingsByIds(IdList courseOfferingIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aCourseOfferingListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the course offerings 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, inaccessibleCourseOfferingsmay 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 ofIdsto retrieve- Returns:
- the returned
CourseOfferinglist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-courseOfferingIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsByGenusType
CourseOfferingList getCourseOfferingsByGenusType(Type courseOfferingGenusType) throws OperationFailedException, PermissionDeniedException Gets aCourseOfferingListcorresponding to the given course offering genusTypewhich does not include course offerings of types derived from the specifiedType. 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
CourseOfferinglist - Throws:
NullArgumentException-courseOfferingGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsByParentGenusType
CourseOfferingList getCourseOfferingsByParentGenusType(Type courseOfferingGenusType) throws OperationFailedException, PermissionDeniedException Gets aCourseOfferingListcorresponding to the given course genusTypeand include any additional course offerings with genus types derived from the specifiedType. 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
CourseOfferinglist - Throws:
NullArgumentException-courseOfferingGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsByRecordType
CourseOfferingList getCourseOfferingsByRecordType(Type courseOfferingRecordType) throws OperationFailedException, PermissionDeniedException Gets aCourseOfferingListcontaining the given course offering recordType. 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
CourseOfferinglist - Throws:
NullArgumentException-courseOfferingRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsOnDate
CourseOfferingList getCourseOfferingsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets allCourseOfferingseffective 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 rangeto- end of date range- Returns:
- a list of
CourseOfferings - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsForCourse
CourseOfferingList getCourseOfferingsForCourse(Id courseId) throws OperationFailedException, PermissionDeniedException Gets allCourseOfferingsassociated with a givenCourse. 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 courseId- Returns:
- a list of
CourseOfferings - Throws:
NullArgumentException-courseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsForCourseOnDate
CourseOfferingList getCourseOfferingsForCourseOnDate(Id courseId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets allCourseOfferingsfor 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 courseIdfrom- start of date rangeto- end of date range- Returns:
- a list of
CourseOfferings - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-courseId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsForTerm
CourseOfferingList getCourseOfferingsForTerm(Id termId) throws OperationFailedException, PermissionDeniedException Gets allCourseOfferingsassociated for a givenTerm. 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 termId- Returns:
- a list of
CourseOfferings - Throws:
NullArgumentException-termIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsForTermOnDate
CourseOfferingList getCourseOfferingsForTermOnDate(Id termId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets allCourseOfferingsfor 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 termIdfrom- start of date rangeto- end of date range- Returns:
- a list of
CourseOfferings - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-termId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsForCourseAndTerm
CourseOfferingList getCourseOfferingsForCourseAndTerm(Id courseId, Id termId) throws OperationFailedException, PermissionDeniedException Gets allCourseOfferingsassociated with a givenTermandCourse. 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 courseIdtermId- a termId- Returns:
- a list of
CourseOfferings - Throws:
NullArgumentException-courseIdortermIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsForCourseAndTermOnDate
CourseOfferingList getCourseOfferingsForCourseAndTermOnDate(Id courseId, Id termId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets allCourseOfferingsfor 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 courseIdtermId- a termIdfrom- start of date rangeto- end of date range- Returns:
- a list of
CourseOfferings - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-courseId, termId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsByNumberForTerm
CourseOfferingList getCourseOfferingsByNumberForTerm(Id termId, String number) throws OperationFailedException, PermissionDeniedException Gets allCourseOfferings ny number andassociated with a givenTerm. 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 termIdnumber- a course offering number- Returns:
- a list of
CourseOfferings - Throws:
NullArgumentException-termIdornumberisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsBySponsorForTerm
CourseOfferingList getCourseOfferingsBySponsorForTerm(Id sponsorId, Id termId) throws OperationFailedException, PermissionDeniedException Gets aCourseOfferingListby the given sponsor associated with a givenTerm. 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 sponsorIdtermId- a termId- Returns:
- a list of
CourseOfferings - Throws:
NullArgumentException-sponsorIdortermIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferingsByInstructorForTerm
CourseOfferingList getCourseOfferingsByInstructorForTerm(Id instructorId, Id termId) throws OperationFailedException, PermissionDeniedException Gets aCourseOfferingListby the given instructor associated with a givenTerm. 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 instructorIdtermId- a termId- Returns:
- a list of
CourseOfferings - Throws:
NullArgumentException-termIdorinstructorIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCourseOfferings
Gets allCourseOfferings. 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 requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-