Interface GradeEntryLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving GradeEntrie s.
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 set or is an error condition
- isolated gradebook view: All grade entry methods in this session
operate, retrieve and pertain to grade entries defined explicitly in
the current gradebook. Using an isolated view is useful for managing
grade entries with the
GradeEntryAdminSession. - federated gradebook view: All grade entry methods in this session operate, retrieve and pertain to all grade entries defined in this gradebook and any other gradebooks implicitly available in this gradebook through gradebook inheritence.
- effective grade entry view: All grade entry lookup methods return entries where the current date falls in between the effective dates inclusive.
- any effective grade entry view: Grade entries of any effective date are returned from methods.
Grade entries may have an additional records indicated by their
respective record types. The record may not be accessed through a cast of
the GradeEntry .
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performGradeEntrylookups.Gets theGradebookassociated with this session.Gets theGradebookIdassociated with this session.Gets all grade entries.getGradeEntriesByGenusType(Type gradeEntryGenusType) Gets aGradeEntryListcorresponding to the given grade entry genusTypewhich does not include grade entries of genus types derived from the specifiedType.getGradeEntriesByGrader(Id resourceId) Gets aGradeEntryListfor the given grader.getGradeEntriesByIds(IdList gradeEntryIds) Gets aGradeEntryListcorresponding to the givenIdList.getGradeEntriesByParentGenusType(Type gradeEntryGenusType) Gets aGradeEntryListcorresponding to the given grade entry genusTypeand include any additional grade entry with genus types derived from the specifiedType.getGradeEntriesByRecordType(Type gradeEntryRecordType) Gets aGradeEntryListcontaining the given grade entry recordType.getGradeEntriesForGradebookColumn(Id gradebookColumnId) Gets aGradeEntryListfor the gradebook column.getGradeEntriesForGradebookColumnAndResource(Id gradebookColumnId, Id resourceId) Gets aGradeEntryListfor the gradebook column and key resource.getGradeEntriesForGradebookColumnAndResourceOnDate(Id gradebookColumnId, Id resourceId, DateTime from, DateTime to) Gets aGradeEntryListfor the given gradebook column, resource, and effective during the entire given date range inclusive but not confined to the date range.getGradeEntriesForGradebookColumnOnDate(Id gradebookColumnId, DateTime from, DateTime to) Gets aGradeEntryListfor the given gradebook column and effective during the entire given date range inclusive but not confined to the date range.getGradeEntriesForResource(Id resourceId) Gets aGradeEntryListfor the given key key resource.getGradeEntriesForResourceOnDate(Id resourceId, DateTime from, DateTime to) Gets aGradeEntryListfor the given key resource and effective during the entire given date range inclusive but not confined to the date range.getGradeEntriesOnDate(DateTime from, DateTime to) Gets aGradeEntryListeffective during the entire given date range inclusive but not confined to the date range.getGradeEntry(Id gradeEntryId) Gets theGradeEntryspecified by itsId.voidAll grade entries 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 grade entries 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 theGradeEntryreturns 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
-
getGradebookId
Id getGradebookId()Gets theGradebookIdassociated with this session.- Returns:
- the
Gradebook Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getGradebook
Gets theGradebookassociated with this session.- Returns:
- the
Gradebookassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupGradeEntries
boolean canLookupGradeEntries()Tests if this user can performGradeEntrylookups. 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 opt not to offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeGradeEntryView
void useComparativeGradeEntryView()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.
-
usePlenaryGradeEntryView
void usePlenaryGradeEntryView()A complete view of theGradeEntryreturns 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.
-
useFederatedGradebookView
void useFederatedGradebookView()Federates the view for methods in this session. A federated view will include grade entries in gradebooks which are children of this gradebook in the gradebook hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedGradebookView
void useIsolatedGradebookView()Isolates the view for methods in this session. An isolated view restricts lookups to this gradebook only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveGradeEntryView
void useEffectiveGradeEntryView()Only grade entries whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveGradeEntryView
void useAnyEffectiveGradeEntryView()All grade entries of any effective dates are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getGradeEntry
GradeEntry getGradeEntry(Id gradeEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theGradeEntryspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedGradeEntrymay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aGradeEntryand retained for compatibility. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Parameters:
gradeEntryId-Idof theGradeEntry- Returns:
- the grade entry
- Throws:
NotFoundException-gradeEntryIdnot foundNullArgumentException-gradeEntryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getGradeEntriesByIds
GradeEntryList getGradeEntriesByIds(IdList gradeEntryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aGradeEntryListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the grade entries specified in theIdlist, in the order of the list, including duplicates, or an error results if aIdin the supplied list is not found or inaccessible. Otherwise, inaccessible grade entries may be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Parameters:
gradeEntryIds- the list ofIdsto retrieve- Returns:
- the returned
GradeEntrylist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-gradeEntryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeEntriesByGenusType
GradeEntryList getGradeEntriesByGenusType(Type gradeEntryGenusType) throws OperationFailedException, PermissionDeniedException Gets aGradeEntryListcorresponding to the given grade entry genusTypewhich does not include grade entries of genus types derived from the specifiedType. In plenary mode, the returned list contains all known grade entries or an error results. Otherwise, the returned list may contain only those grade entries that are accessible through this session. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Parameters:
gradeEntryGenusType- a grade entry genus type- Returns:
- the returned
GradeEntrylist - Throws:
NullArgumentException-gradeEntryGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeEntriesByParentGenusType
GradeEntryList getGradeEntriesByParentGenusType(Type gradeEntryGenusType) throws OperationFailedException, PermissionDeniedException Gets aGradeEntryListcorresponding to the given grade entry genusTypeand include any additional grade entry with genus types derived from the specifiedType. In plenary mode, the returned list contains all known grade entries or an error results. Otherwise, the returned list may contain only those grade entries that are accessible through this session. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Parameters:
gradeEntryGenusType- a grade entry genus type- Returns:
- the returned
GradeEntrylist - Throws:
NullArgumentException-gradeEntryGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeEntriesByRecordType
GradeEntryList getGradeEntriesByRecordType(Type gradeEntryRecordType) throws OperationFailedException, PermissionDeniedException Gets aGradeEntryListcontaining the given grade entry recordType. In plenary mode, the returned list contains all known grade entries or an error results. Otherwise, the returned list may contain only those grade entries that are accessible through this session. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Parameters:
gradeEntryRecordType- a grade entry record type- Returns:
- the returned
GradeEntrylist - Throws:
NullArgumentException-gradeEntryRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeEntriesOnDate
GradeEntryList getGradeEntriesOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aGradeEntryListeffective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known grade entries or an error results. Otherwise, the returned list may contain only those grade entries that are accessible through this session. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
GradeEntrylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-from or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeEntriesForGradebookColumn
GradeEntryList getGradeEntriesForGradebookColumn(Id gradebookColumnId) throws OperationFailedException, PermissionDeniedException Gets aGradeEntryListfor the gradebook column. In plenary mode, the returned list contains all known grade entries or an error results. Otherwise, the returned list may contain only those grade entries that are accessible through this session. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Parameters:
gradebookColumnId- a gradebook columnId- Returns:
- the returned
GradeEntrylist - Throws:
NullArgumentException-gradebookColumnIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeEntriesForGradebookColumnOnDate
GradeEntryList getGradeEntriesForGradebookColumnOnDate(Id gradebookColumnId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aGradeEntryListfor the given gradebook column and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known grade entries or an error results. Otherwise, the returned list may contain only those grade entries that are accessible through this session. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Parameters:
gradebookColumnId- a gradebook columnIdfrom- start of date rangeto- end of date range- Returns:
- the returned
GradeEntrylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-gradebookColumnId, from, or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeEntriesForResource
GradeEntryList getGradeEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets aGradeEntryListfor the given key key resource. In plenary mode, the returned list contains all known grade entries or an error results. Otherwise, the returned list may contain only those grade entries that are accessible through this session. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Parameters:
resourceId- a key resourceId- Returns:
- the returned
GradeEntrylist - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeEntriesForResourceOnDate
GradeEntryList getGradeEntriesForResourceOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aGradeEntryListfor the given key resource and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known grade entries or an error results. Otherwise, the returned list may contain only those grade entries that are accessible through this session. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Parameters:
resourceId- a resourceIdfrom- start of date rangeto- end of date range- Returns:
- the returned
GradeEntrylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, from, or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeEntriesForGradebookColumnAndResource
GradeEntryList getGradeEntriesForGradebookColumnAndResource(Id gradebookColumnId, Id resourceId) throws OperationFailedException, PermissionDeniedException Gets aGradeEntryListfor the gradebook column and key resource. In plenary mode, the returned list contains all known grade entries or an error results. Otherwise, the returned list may contain only those grade entries that are accessible through this session. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Parameters:
gradebookColumnId- a gradebook columnIdresourceId- a key resourceId- Returns:
- the returned
GradeEntrylist - Throws:
NullArgumentException-gradebookColumnIdorresourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeEntriesForGradebookColumnAndResourceOnDate
GradeEntryList getGradeEntriesForGradebookColumnAndResourceOnDate(Id gradebookColumnId, Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aGradeEntryListfor the given gradebook column, resource, and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known grade entries or an error results. Otherwise, the returned list may contain only those grade entries that are accessible through this session. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Parameters:
gradebookColumnId- a gradebook columnIdresourceId- a key resourceIdfrom- start of date rangeto- end of date range- Returns:
- the returned
GradeEntrylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-gradebookColumnId, resource, from, or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeEntriesByGrader
GradeEntryList getGradeEntriesByGrader(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets aGradeEntryListfor the given grader. In plenary mode, the returned list contains all known grade entries or an error results. Otherwise, the returned list may contain only those grade entries that are accessible through this session. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Parameters:
resourceId- a resourceId- Returns:
- the returned
GradeEntrylist - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeEntries
Gets all grade entries. In plenary mode, the returned list contains all known grade entries or an error results. Otherwise, the returned list may contain only those grade entries that are accessible through this session. In effective mode, grade entries are returned that are currently effective. In any effective mode, effective grade entries and those currently expired are returned.- Returns:
- a
GradeEntryList - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-