Interface LessonLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Lessons The
Lesson represents a collection of syllabi.
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 view or is an error condition
- isolated course catalog view: All lesson methods in this session
operate, retrieve and pertain to lessonsdefined explicitly in the
current course catalog. Using an isolated view is useful for managing
lessonswith the
LessonAdminSession. - federated course catalog view: All lesson lookup methods in this session operate, retrieve and pertain to all lessonsdefined in this course catalog and any other course catalogs implicitly available in this course catalog through course catalog inheritence.
- effective lesson view: All lesson lookup methods return lessons where the current date falls in between the effective dates inclusive.
- any lesson view: Lessons of any effective date are returned from methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performLessonlookups.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.Gets theLessonspecified by itsId.Gets allLessons.getLessonsByGenusType(Type lessonGenusType) Gets aLessonListcorresponding to the given lesson genusTypewhich does not include lessonsof genus types derived from the specifiedType.getLessonsByIds(IdList lessonIds) Gets aLessonListcorresponding to the givenIdList.getLessonsByParentGenusType(Type lessonGenusType) Gets aLessonListcorresponding to the given lesson genusTypeand include any additional lessons with genus types derived from the specifiedType.getLessonsByRecordType(Type lessonRecordType) Gets aLessonListcontaining the given lesson recordType.getLessonsForDocet(Id docetId) Gets aLessonListfor the given docetId.getLessonsForDocetOnDate(Id docetId, DateTime from, DateTime to) Gets aLessonListfor a docet effective sduring the entire given date range inclusive but not confined to the date range.getLessonsForPlan(Id planId) Gets aLessonListfor the given planId.getLessonsForPlanAndDocet(Id planId, Id docetId) Gets aLessonListfor the given plan and docet.getLessonsForPlanAndDocetOnDate(Id planId, Id docetId, DateTime from, DateTime to) Gets aLessonListfor a plan and docet effective during the entire given date range inclusive but not confined to the date range.getLessonsForPlanOnDate(Id planId, DateTime from, DateTime to) Gets aLessonListfor a plan effective during the entire given date range inclusive but not confined to the date range.getLessonsOnDate(DateTime from, DateTime to) Gets aLessonListeffective sduring the entire given date range inclusive but not confined to the date range.voidAll lessons 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 lessons 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 theLessonreturns 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.
-
canLookupLessons
boolean canLookupLessons()Tests if this user can performLessonlookups. 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.
-
useComparativeLessonView
void useComparativeLessonView()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.
-
usePlenaryLessonView
void usePlenaryLessonView()A complete view of theLessonreturns 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 lessonsin 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 retrievals to this course catalog only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveLessonView
void useEffectiveLessonView()Only lessons whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveLessonView
void useAnyEffectiveLessonView()All lessons of any effective dates are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getLesson
Lesson getLesson(Id lessonId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theLessonspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedLessonmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aLessonand retained for compatibility. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.- Parameters:
lessonId-Idof theLesson- Returns:
- the lesson
- Throws:
NotFoundException-lessonIdnot foundNullArgumentException-lessonIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getLessonsByIds
LessonList getLessonsByIds(IdList lessonIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aLessonListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the lessonsspecified 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, inaccessibleLessonsmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.- Parameters:
lessonIds- the list ofIdsto retrieve- Returns:
- the returned
Lessonlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-lessonIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLessonsByGenusType
LessonList getLessonsByGenusType(Type lessonGenusType) throws OperationFailedException, PermissionDeniedException Gets aLessonListcorresponding to the given lesson genusTypewhich does not include lessonsof genus types derived from the specifiedType. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.- Parameters:
lessonGenusType- a lesson genus type- Returns:
- the returned
Lessonlist - Throws:
NullArgumentException-lessonGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLessonsByParentGenusType
LessonList getLessonsByParentGenusType(Type lessonGenusType) throws OperationFailedException, PermissionDeniedException Gets aLessonListcorresponding to the given lesson genusTypeand include any additional lessons with genus types derived from the specifiedType. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.- Parameters:
lessonGenusType- a lesson genus type- Returns:
- the returned
Lessonlist - Throws:
NullArgumentException-lessonGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLessonsByRecordType
LessonList getLessonsByRecordType(Type lessonRecordType) throws OperationFailedException, PermissionDeniedException Gets aLessonListcontaining the given lesson recordType. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.- Parameters:
lessonRecordType- a lesson record type- Returns:
- the returned
Lessonlist - Throws:
NullArgumentException-lessonRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLessonsOnDate
LessonList getLessonsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aLessonListeffective sduring the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.- Parameters:
from- s atsrting dateto- an ending date- Returns:
- the returned
Lessonlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLessonsForPlan
Gets aLessonListfor the given planId. In plenary mode, the returned list contains all known lessons or an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.- Parameters:
planId- a planId- Returns:
- the returned
Lessonlist - Throws:
NullArgumentException-planIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLessonsForPlanOnDate
LessonList getLessonsForPlanOnDate(Id planId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aLessonListfor a plan effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.- Parameters:
planId- a planIdfrom- s atsrting dateto- an ending date- Returns:
- the returned
Lessonlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-planId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLessonsForDocet
LessonList getLessonsForDocet(Id docetId) throws OperationFailedException, PermissionDeniedException Gets aLessonListfor the given docetId. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.- Parameters:
docetId- a docetId- Returns:
- the returned
Lessonlist - Throws:
NullArgumentException-docetIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLessonsForDocetOnDate
LessonList getLessonsForDocetOnDate(Id docetId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aLessonListfor a docet effective sduring the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.- Parameters:
docetId- a docetIdfrom- s atsrting dateto- an ending date- Returns:
- the returned
Lessonlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-docetId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLessonsForPlanAndDocet
LessonList getLessonsForPlanAndDocet(Id planId, Id docetId) throws OperationFailedException, PermissionDeniedException Gets aLessonListfor the given plan and docet. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.- Parameters:
planId- a planIddocetId- a docetId- Returns:
- the returned
Lessonlist - Throws:
NullArgumentException-planIdordocetIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLessonsForPlanAndDocetOnDate
LessonList getLessonsForPlanAndDocetOnDate(Id planId, Id docetId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aLessonListfor a plan and docet effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.- Parameters:
planId- a planIddocetId- a docetIdfrom- s atsrting dateto- an ending date- Returns:
- the returned
Lessonlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-planId, docetId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLessons
Gets allLessons. In plenary mode, the returned list contains all known lessonsor an error results. Otherwise, the returned list may contain only those lessonsthat are accessible through this session. In effective mode, lessons are returned that are currently effective. In any effective mode, effective lessons and those currently expired are returned.- Returns:
- a list of
Lessons - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-