Interface ProgramOfferingLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving program offerings. A
ProgramOffering is an offering of a Program in which a student
can enroll.
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 program offering methods in
this session operate, retrieve and pertain to program offerings
defined explicitly in the current course catalog. Using an isolated
view is useful for managing
ProgramOfferingswith theProgramOfferingAdminSession. - federated course catalog view: All program offering lookup methods in this session operate, retrieve and pertain to all program offerings defined in this course catalog and any other courses implicitly available in this course catalog through course catalog inheritence.
- effective program offering view: All program offering lookup methods return program offerings where the current date falls within the effective dates inclusive.
- any effective program offering view: Program 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 performProgramOfferinglookups.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.getProgramOffering(Id programOfferingId) Gets theProgramOfferingspecified by itsId.Gets allProgramOfferings.getProgramOfferingsByGenusType(Type programOfferingGenusType) Gets aProgramOfferingListcorresponding to the given program offering genusTypewhich does not include program offerings of types derived from the specifiedType.getProgramOfferingsByIds(IdList programOfferingIds) Gets aProgramOfferingListcorresponding to the givenIdList.getProgramOfferingsByNumberForTerm(String number, Id termId) Gets aProgramOfferingListfor the given number associated with a givenTerm.getProgramOfferingsByParentGenusType(Type programOfferingGenusType) Gets aProgramOfferingListcorresponding to the given porgram offering genusTypeand include any additional program offerings with genus types derived from the specifiedType.getProgramOfferingsByParentProgramOffering(Id programOfferingId) Gets aProgramOfferingListfor the given parent program offering.getProgramOfferingsByRecordType(Type programOfferingRecordType) Gets aProgramOfferingListcontaining the given program offering recordType.getProgramOfferingsBySponsorForTerm(Id sponsorId, Id termId) Gets aProgramOfferingListfor the given sponsor associated with a givenTerm.getProgramOfferingsForProgram(Id programId) Gets allProgramOfferingsassociated with a givenProgram.getProgramOfferingsForProgramAndTerm(Id programId, Id termId) Gets allProgramOfferingsassociated with a givenTermandProgram.getProgramOfferingsForProgramAndTermOnDate(Id programId, Id termId, DateTime from, DateTime to) Gets aProgramOfferingListfor the given program, term, and effective within the given date range inclusive.getProgramOfferingsForProgramOnDate(Id programId, DateTime from, DateTime to) Gets aProgramOfferingListfor the given program and effective within the given date range inclusive.getProgramOfferingsForTerm(Id termId) Gets allProgramOfferingsassociated with a givenTerm.getProgramOfferingsForTermOnDate(Id termId, DateTime from, DateTime to) Gets aProgramOfferingListfor the given term and effective within the given date range inclusive.getProgramOfferingsOnDate(DateTime from, DateTime to) Gets aProgramOfferingListeffective within the given date range inclusive.voidAll methods return program 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 program offering methods return program 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 theProgramOfferingreturns 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.
-
canLookupProgramOfferings
boolean canLookupProgramOfferings()Tests if this user can performProgramOfferinglookups. 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.
-
useComparativeProgramOfferingView
void useComparativeProgramOfferingView()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.
-
usePlenaryProgramOfferingView
void usePlenaryProgramOfferingView()A complete view of theProgramOfferingreturns 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 program 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.
-
useEffectiveProgramOfferingView
void useEffectiveProgramOfferingView()All program offering methods return program offerings where the current date falls within the effective dates inclusive.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveProgramOfferingView
void useAnyEffectiveProgramOfferingView()All methods return program offerings of any effective or expired status.- Compliance:
mandatory- This method is must be implemented.
-
getProgramOffering
ProgramOffering getProgramOffering(Id programOfferingId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theProgramOfferingspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedProgramOfferingmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aprogramand retained for compatibility. In effective mode, program offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired program offerings are returned.- Parameters:
programOfferingId- theIdof theProgramOfferingto retrieve- Returns:
- the returned
ProgramOffering - Throws:
NotFoundException- noProgramOfferingfound with the givenIdNullArgumentException-programOfferingIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsByIds
ProgramOfferingList getProgramOfferingsByIds(IdList programOfferingIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aProgramOfferingListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the program 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, inaccessibleProgramOfferingsmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, program offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired program offerings are returned.- Parameters:
programOfferingIds- the list ofIdsto retrieve- Returns:
- the returned
ProgramOfferinglist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-programOfferingIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsByGenusType
ProgramOfferingList getProgramOfferingsByGenusType(Type programOfferingGenusType) throws OperationFailedException, PermissionDeniedException Gets aProgramOfferingListcorresponding to the given program offering genusTypewhich does not include program offerings of types derived from the specifiedType. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session. In effective mode, program offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired program offerings are returned.- Parameters:
programOfferingGenusType- a program offering genus type- Returns:
- the returned
ProgramOfferinglist - Throws:
NullArgumentException-programOfferingGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsByParentGenusType
ProgramOfferingList getProgramOfferingsByParentGenusType(Type programOfferingGenusType) throws OperationFailedException, PermissionDeniedException Gets aProgramOfferingListcorresponding to the given porgram offering genusTypeand include any additional program offerings with genus types derived from the specifiedType. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session. In effective mode, program offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired program offerings are returned.- Parameters:
programOfferingGenusType- a program offering genus type- Returns:
- the returned
ProgramOfferinglist - Throws:
NullArgumentException-programOfferingGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsByRecordType
ProgramOfferingList getProgramOfferingsByRecordType(Type programOfferingRecordType) throws OperationFailedException, PermissionDeniedException Gets aProgramOfferingListcontaining the given program offering recordType. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session. In effective mode, program offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired program offerings are returned.- Parameters:
programOfferingRecordType- a program offering record type- Returns:
- the returned
ProgramOfferinglist - Throws:
NullArgumentException-programOfferingRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsOnDate
ProgramOfferingList getProgramOfferingsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aProgramOfferingListeffective within the given date range inclusive. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session. In effective mode, program offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired program offerings are returned.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
ProgramOfferinglist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsForProgram
ProgramOfferingList getProgramOfferingsForProgram(Id programId) throws OperationFailedException, PermissionDeniedException Gets allProgramOfferingsassociated with a givenProgram. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session.- Parameters:
programId- a programId- Returns:
- a list of
ProgramOfferings - Throws:
NullArgumentException-programIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsForProgramOnDate
ProgramOfferingList getProgramOfferingsForProgramOnDate(Id programId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aProgramOfferingListfor the given program and effective within the given date range inclusive. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session. In effective mode, program offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired program offerings are returned.- Parameters:
programId- a programIdfrom- start of date rangeto- end of date range- Returns:
- the returned
ProgramOfferinglist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-programId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsForTerm
ProgramOfferingList getProgramOfferingsForTerm(Id termId) throws OperationFailedException, PermissionDeniedException Gets allProgramOfferingsassociated with a givenTerm. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session. In effective mode, program offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired program offerings are returned.- Parameters:
termId- a termId- Returns:
- a list of
ProgramOfferings - Throws:
NullArgumentException-termIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsForTermOnDate
ProgramOfferingList getProgramOfferingsForTermOnDate(Id termId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aProgramOfferingListfor the given term and effective within the given date range inclusive. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session. In effective mode, program offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired program offerings are returned.- Parameters:
termId- a termIdfrom- start of date rangeto- end of date range- Returns:
- the returned
ProgramOfferinglist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-termId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsForProgramAndTerm
ProgramOfferingList getProgramOfferingsForProgramAndTerm(Id programId, Id termId) throws OperationFailedException, PermissionDeniedException Gets allProgramOfferingsassociated with a givenTermandProgram. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session. In effective mode, program offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired program offerings are returned.- Parameters:
programId- a programIdIdtermId- a termId- Returns:
- a list of
ProgramOfferings - Throws:
NullArgumentException-programIdortermIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsForProgramAndTermOnDate
ProgramOfferingList getProgramOfferingsForProgramAndTermOnDate(Id programId, Id termId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aProgramOfferingListfor the given program, term, and effective within the given date range inclusive. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session. In effective mode, program offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired program offerings are returned.- Parameters:
programId- a programIdtermId- a termIdfrom- start of date rangeto- end of date range- Returns:
- the returned
ProgramOfferinglist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-programId, termId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsByNumberForTerm
ProgramOfferingList getProgramOfferingsByNumberForTerm(String number, Id termId) throws OperationFailedException, PermissionDeniedException Gets aProgramOfferingListfor the given number associated with a givenTerm. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session. In effective mode, program offerings are returned that are currently effective. In any effective mode, effective program offerings and those currently expired are returned.- Parameters:
number- a program offering numbertermId- a termId- Returns:
- the returned
ProgramOfferingList - Throws:
NullArgumentException-numberortermIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsBySponsorForTerm
ProgramOfferingList getProgramOfferingsBySponsorForTerm(Id sponsorId, Id termId) throws OperationFailedException, PermissionDeniedException Gets aProgramOfferingListfor the given sponsor associated with a givenTerm. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session. In effective mode, program offerings are returned that are currently effective. In any effective mode, effective program offerings and those currently expired are returned.- Parameters:
sponsorId- a sponsorIdtermId- a termId- Returns:
- the returned
ProgramOfferingList - Throws:
NullArgumentException-sponsorIdortermIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferingsByParentProgramOffering
ProgramOfferingList getProgramOfferingsByParentProgramOffering(Id programOfferingId) throws OperationFailedException, PermissionDeniedException Gets aProgramOfferingListfor the given parent program offering. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session. In effective mode, program offerings are returned that are currently effective. In any effective mode, effective program offerings and those currently expired are returned.- Parameters:
programOfferingId- a program offeringId- Returns:
- the returned
ProgramOfferingList - Throws:
NullArgumentException-programOfferingIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramOfferings
ProgramOfferingList getProgramOfferings() throws OperationFailedException, PermissionDeniedExceptionGets allProgramOfferings. In plenary mode, the returned list contains all known program offerings or an error results. Otherwise, the returned list may contain only those program offerings that are accessible through this session. In effective mode, program offerings are returned where the current date falls within the effective dates inclusive. In any effective mode, effective and expired program offerings are returned.- Returns:
- a list of
ProgramOfferings - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-