Interface ProgramLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving programs. A P
rogram is canonical and a ProgramOffering is derived from a
Program .
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 methods in this session
operate, retrieve and pertain to programs defined explicitly in the
current course catalog. Using an isolated view is useful for managing
Programswith the ProgramAdminSession. - federated course catalog view: All program lookup methods in this session operate, retrieve and pertain to all programs defined in this course catalog and any other programs implicitly available in this course catalog through course catalog inheritence.
- active program view: All program lookup methods return active programs.
- any status program view: Programs of any active or inactive 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.
Programs may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Program .
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performProgramlookups.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.getProgram(Id programId) Gets theProgramspecified by itsId.Gets allPrograms.getProgramsByCredential(Id credentialId) Gets aProgramListcontaining the given credential.getProgramsByGenusType(Type programGenusType) Gets aProgramListcorresponding to the given program genusTypewhich does not include programs of types derived from the specifiedType.getProgramsByIds(IdList programIds) Gets aProgramListcorresponding to the givenIdList.getProgramsByNumber(String number) Gets aProgramListfor the given number.getProgramsByObjective(Id objectiveId) Gets aProgramListfor the given learning objective.getProgramsByParentGenusType(Type programGenusType) Gets aProgramListcorresponding to the given program genusTypeand include any additional programs with genus types derived from the specifiedType.getProgramsByParentProgram(Id programId) Gets aProgramListfor the given parent program.getProgramsByRecordType(Type programRecordType) Gets aProgramListcontaining the given program recordType.getProgramsBySponsor(Id sponsorId) Gets aProgramListfor the given sponsor.voidOnly active programs are returned by methods in this session.voidAll programs of any active or inactive status 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.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theProgramreturns 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.
-
canLookupPrograms
boolean canLookupPrograms()Tests if this user can performProgramlookups. 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.
-
useComparativeProgramView
void useComparativeProgramView()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.
-
usePlenaryProgramView
void usePlenaryProgramView()A complete view of theProgramreturns 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 programs 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.
-
useActiveProgramView
void useActiveProgramView()Only active programs are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyStatusProgramView
void useAnyStatusProgramView()All programs of any active or inactive status are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getProgram
Program getProgram(Id programId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theProgramspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedprogrammay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aprogramand retained for compatibility. In active mode, active programs are returned. In any status mode, active and inactive programs are returned.- Parameters:
programId- theIdof theProgramto retrieve- Returns:
- the returned
Program - Throws:
NotFoundException- noprogramfound with the givenIdNullArgumentException-programIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramsByIds
ProgramList getProgramsByIds(IdList programIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aProgramListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the programs 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, inaccessibleProgramsmay be omitted from the list and may present the elements in any order including returning a unique set. In active mode, active programs are returned. In any status mode, active and inactive programs are returned.- Parameters:
programIds- the list ofIdsto retrieve- Returns:
- the returned
ProgramListlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-programIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramsByGenusType
ProgramList getProgramsByGenusType(Type programGenusType) throws OperationFailedException, PermissionDeniedException Gets aProgramListcorresponding to the given program genusTypewhich does not include programs of types derived from the specifiedType. In plenary mode, the returned list contains all known programs or an error results. Otherwise, the returned list may contain only those programs that are accessible through this session. In active mode, active programs are returned. In any status mode, active and inactive programs are returned.- Parameters:
programGenusType- a program genus type- Returns:
- the returned
ProgramListlist - Throws:
NullArgumentException-programGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramsByParentGenusType
ProgramList getProgramsByParentGenusType(Type programGenusType) throws OperationFailedException, PermissionDeniedException Gets aProgramListcorresponding to the given program genusTypeand include any additional programs with genus types derived from the specifiedType. In plenary mode, the returned list contains all known programs or an error results. Otherwise, the returned list may contain only those programs that are accessible through this session. In active mode, active programs are returned. In any status mode, active and inactive programs are returned.- Parameters:
programGenusType- a program genus type- Returns:
- the returned
ProgramListlist - Throws:
NullArgumentException-programGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramsByRecordType
ProgramList getProgramsByRecordType(Type programRecordType) throws OperationFailedException, PermissionDeniedException Gets aProgramListcontaining the given program recordType. In plenary mode, the returned list contains all known programs or an error results. Otherwise, the returned list may contain only those programs that are accessible through this session. In active mode, active programs are returned. In any status mode, active and inactive programs are returned.- Parameters:
programRecordType- a program record type- Returns:
- the returned
ProgramListlist - Throws:
NullArgumentException-programRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramsByNumber
ProgramList getProgramsByNumber(String number) throws OperationFailedException, PermissionDeniedException Gets aProgramListfor the given number. In plenary mode, the returned list contains all known programs or an error results. Otherwise, the returned list may contain only those programs that are accessible through this session. In active mode, active programs are returned. In any status mode, active and inactive programs are returned.- Parameters:
number- a program number- Returns:
- the returned
ProgramListlist - Throws:
NullArgumentException-numberisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramsBySponsor
ProgramList getProgramsBySponsor(Id sponsorId) throws OperationFailedException, PermissionDeniedException Gets aProgramListfor the given sponsor. In plenary mode, the returned list contains all known programs or an error results. Otherwise, the returned list may contain only those programs that are accessible through this session. In active mode, active programs are returned. In any status mode, active and inactive programs are returned.- Parameters:
sponsorId- a sponsorId- Returns:
- the returned
ProgramListlist - Throws:
NullArgumentException-sponsorIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramsByParentProgram
ProgramList getProgramsByParentProgram(Id programId) throws OperationFailedException, PermissionDeniedException Gets aProgramListfor the given parent program. In plenary mode, the returned list contains all known programs or an error results. Otherwise, the returned list may contain only those programs that are accessible through this session. In active mode, active programs are returned. In any status mode, active and inactive programs are returned.- Parameters:
programId- a programId- Returns:
- the returned
ProgramListlist - Throws:
NullArgumentException-programIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramsByObjective
ProgramList getProgramsByObjective(Id objectiveId) throws OperationFailedException, PermissionDeniedException Gets aProgramListfor the given learning objective. In plenary mode, the returned list contains all known programs or an error results. Otherwise, the returned list may contain only those programs that are accessible through this session. In active mode, active programs are returned. In any status mode, active and inactive programs are returned.- Parameters:
objectiveId- a learning objectiveId- Returns:
- the returned
ProgramList - Throws:
NullArgumentException-objectiveIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProgramsByCredential
ProgramList getProgramsByCredential(Id credentialId) throws OperationFailedException, PermissionDeniedException Gets aProgramListcontaining the given credential. In plenary mode, the returned list contains all known programs or an error results. Otherwise, the returned list may contain only those programs that are accessible through this session. In active mode, active programs are returned. In any status mode, active and inactive programs are returned.- Parameters:
credentialId- a credentialId- Returns:
- the returned
ProgramListlist - Throws:
NullArgumentException-credentialIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPrograms
Gets allPrograms. In plenary mode, the returned list contains all known programs or an error results. Otherwise, the returned list may contain only those programs that are accessible through this session. In active mode, active programs are returned. In any status mode, active and inactive programs are returned.- Returns:
- a list of
Programs - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-