public interface CourseProgramLookupSession extends OsidSession
This session defines methods for retrieving course program mappings. A
Course
maps to many Programs
and a
Program
may be shared among multiple Courses.
This lookup session defines several views:
The methods useFederatedCourseCatalogView()
and
useIsolatedCourseCatalogView()
behave as a radio group and one
should be selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupCourseProgramMappings()
Tests if this user can perform
Course/Program lookups. |
CourseCatalog |
getCourseCatalog()
Gets the
CourseCatalog associated with this session. |
Id |
getCourseCatalogId()
Gets the
CourseCatalog Id associated
with this session. |
CourseList |
getCoursesForProgram(IdList programId)
Gets a
CourseList corresponding to the given
Program. |
ProgramList |
getProgramsForCourse(Id courseId)
Gets the
Programs for the given Course. |
void |
useComparativeCourseProgramView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
useFederatedCourseCatalogView()
Federates the view for methods in this session.
|
void |
useIsolatedCourseCatalogView()
Isolates the view for methods in this session.
|
void |
usePlenaryCourseProgramView()
A complete view of the lookups is desired.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getCourseCatalogId()
CourseCatalog
Id
associated
with this session. CourseCatalog Id
associated with this
sessionmandatory
- This method must be implemented. CourseCatalog getCourseCatalog() throws OperationFailedException, PermissionDeniedException
CourseCatalog
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupCourseProgramMappings()
Course/Program
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 not offer lookup operations to
unauthorized users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeCourseProgramView()
mandatory
- This method is must be implemented. void usePlenaryCourseProgramView()
mandatory
- This method is must be implemented. void useFederatedCourseCatalogView()
mandatory
- This method is must be implemented. void useIsolatedCourseCatalogView()
mandatory
- This method is must be implemented. CourseList getCoursesForProgram(IdList programId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CourseList
corresponding to the given
Program.
In plenary mode, the returned list contains all of
the courses, or an error results if a course is not found or
inaccessible. Otherwise, inaccessible Courses
may be
omitted from the list.programId
- a program Id
Course
listNotFoundException
- programId
not foundNullArgumentException
- programId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProgramList getProgramsForCourse(Id courseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Programs
for the given Course.
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.courseId
- the Id
of the Course
to
retrieve Program
listNotFoundException
- no Course
found with
the given Id
NullArgumentException
- courseId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.