Interface ActivityUnitLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving activity units. An
ActivityUnit is part of 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 activity unit methods in this
session operate, retrieve and pertain to activity units defined
explicitly in the current course catalog. Using an isolated view is
useful for managing
ActivityUnitswith theActivityUnitAdminSession. - federated course catalog view: All activity unit lookup methods in this session operate, retrieve and pertain to all activity units defined in this course catalog and any other activity units implicitly available in this course catalog through course catalog inheritence.
- active activity unit view: All activity unit lookup methods return activity units which are active.
- any active activity unit view: Activity units 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.
Activity units may have an additional records indicated by their
respective record types. The record may not be accessed through a cast of
the ActivityUnit .
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performActivityUnitlookups.getActivityUnit(Id activityUnitId) Gets theActivityUnitspecified by itsId.Gets allActivityUnits.getActivityUnitsByGenusType(Type activityUnitGenusType) Gets anActivityUnitListcorresponding to the given activity unit genusTypewhich does not include activity units of types derived from the specifiedType.getActivityUnitsByIds(IdList activityUnitIds) Gets anActivityUnitListcorresponding to the givenIdList.getActivityUnitsByParentGenusType(Type activityUnitGenusType) Gets anActivityUnitListcorresponding to the given activity unit genusTypeand include any additional activity units with genus types derived from the specifiedType.getActivityUnitsByRecordType(Type activityUnitRecordType) Gets anActivityUnitListcontaining the given activity unit recordType.getActivityUnitsForCourse(Id courseId) Gets anActivityUnitListfor the given course.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.voidOnly active activity units are returned by methods in this session.voidAll activity units 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 theActivityUnitreturns 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.
-
canLookupActivityUnits
boolean canLookupActivityUnits()Tests if this user can performActivityUnitlookups. 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.
-
useComparativeActivityUnitView
void useComparativeActivityUnitView()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.
-
usePlenaryActivityUnitView
void usePlenaryActivityUnitView()A complete view of theActivityUnitreturns 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 activity units 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.
-
useActiveActivityUnitView
void useActiveActivityUnitView()Only active activity units are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyStatusActivityUnitView
void useAnyStatusActivityUnitView()All activity units of any active or inactive status are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getActivityUnit
ActivityUnit getActivityUnit(Id activityUnitId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theActivityUnitspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedActivityUnitmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aActivityUnitand retained for compatibility. In active mode, activity units are returned that are currently active. In any status mode, active and inactive activity units are returned.- Parameters:
activityUnitId- theIdof theActivityUnitto retrieve- Returns:
- the returned
ActivityUnit - Throws:
NotFoundException- noActivityUnitfound with the givenIdNullArgumentException-activityUnitIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getActivityUnitsByIds
ActivityUnitList getActivityUnitsByIds(IdList activityUnitIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anActivityUnitListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the activity units 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, inaccessibleActivityUnitsmay be omitted from the list and may present the elements in any order including returning a unique set. In active mode, activity units are returned that are currently active. In any status mode, active and inactive activity units are returned.- Parameters:
activityUnitIds- the list ofIdsto retrieve- Returns:
- the returned
ActivityUnitlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-activityUnitIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getActivityUnitsByGenusType
ActivityUnitList getActivityUnitsByGenusType(Type activityUnitGenusType) throws OperationFailedException, PermissionDeniedException Gets anActivityUnitListcorresponding to the given activity unit genusTypewhich does not include activity units of types derived from the specifiedType. In plenary mode, the returned list contains all known activity units or an error results. Otherwise, the returned list may contain only those activity units that are accessible through this session. In active mode, activity units are returned that are currently active. In any status mode, active and inactive activity units are returned.- Parameters:
activityUnitGenusType- an activity unit genus type- Returns:
- the returned
ActivityUnitlist - Throws:
NullArgumentException-activityUnitGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getActivityUnitsByParentGenusType
ActivityUnitList getActivityUnitsByParentGenusType(Type activityUnitGenusType) throws OperationFailedException, PermissionDeniedException Gets anActivityUnitListcorresponding to the given activity unit genusTypeand include any additional activity units with genus types derived from the specifiedType. In plenary mode, the returned list contains all known activity units or an error results. Otherwise, the returned list may contain only those activity units that are accessible through this session. In active mode, activity units are returned that are currently active. In any status mode, active and inactive activity units are returned.- Parameters:
activityUnitGenusType- an activity unit genus type- Returns:
- the returned
ActivityUnitlist - Throws:
NullArgumentException-activityUnitGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getActivityUnitsByRecordType
ActivityUnitList getActivityUnitsByRecordType(Type activityUnitRecordType) throws OperationFailedException, PermissionDeniedException Gets anActivityUnitListcontaining the given activity unit recordType. In plenary mode, the returned list contains all known activity units or an error results. Otherwise, the returned list may contain only those activity units that are accessible through this session. In active mode, activity units are returned that are currently active. In any status mode, active and inactive activity units are returned.- Parameters:
activityUnitRecordType- an activity unit record type- Returns:
- the returned
ActivityUnitlist - Throws:
NullArgumentException-activityUnitRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getActivityUnitsForCourse
ActivityUnitList getActivityUnitsForCourse(Id courseId) throws OperationFailedException, PermissionDeniedException Gets anActivityUnitListfor the given course. In plenary mode, the returned list contains all known activity units or an error results. Otherwise, the returned list may contain only those activity units that are accessible through this session. In active mode, activity units are returned that are currently active. In any status mode, active and inactive activity units are returned.- Parameters:
courseId- a courseId- Returns:
- the returned
ActivityUnitlist - Throws:
NullArgumentException-courseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getActivityUnits
Gets allActivityUnits. In plenary mode, the returned list contains all known activity units or an error results. Otherwise, the returned list may contain only those activity units that are accessible through this session. In active mode, activity units are returned that are currently active. In any status mode, active and inactive activity units are returned.- Returns:
- a list of
ActivityUnits - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-