Interface GradeSystemLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
The session defines methods for retrieving Grades and
GradeSystems . A Grade represents a qualified ranking defined in some
grade system.
Two views are defined in this session:
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete set or is an error condition
- federated gradebook view: lookups include grade systems from this gradebook and other gradebooks which are children of this gradebook in the gradebook hierarchy
- isolated gradebook view: lookups include only those grade systems defined in this gradebook
Grades and grade systems may have an additional records indicated by their respective record types. The record may not be accessed through a cast of the object.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performGradeSystemlookups.Gets theGradebookassociated with this session.Gets theGradeSystemIdassociated with this session.getGradeSystem(Id gradeSystemId) Gets theGradeSystemspecified by itsId.getGradeSystemByGrade(Id gradeId) Gets theGradeSystemby aGradeId.Gets allGradeSystems.getGradeSystemsByGenusType(Type gradeSystemGenusType) Gets aGradeSystemListcorresponding to the given grade system genusTypewhich does not include systems of genus types derived from the specifiedType.getGradeSystemsByIds(IdList gradeSystemIds) Gets aGradeSystemListcorresponding to the givenIdList.getGradeSystemsByParentGenusType(Type gradeSystemGenusType) Gets aGradeSystemListcorresponding to the given grade system genusTypeand include any additional systems with genus types derived from the specifiedType.getGradeSystemsByRecordType(Type gradeSystemRecordType) Gets aGradeSystemListcontaining the given grade recordType.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 theGradeSystemreturns 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 theGradeSystemIdassociated with this session.- Returns:
- the
GradeSystem 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.
-
canLookupGradeSystems
boolean canLookupGradeSystems()Tests if this user can performGradeSystemlookups. 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.
-
useComparativeGradeSystemView
void useComparativeGradeSystemView()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.
-
usePlenaryGradeSystemView
void usePlenaryGradeSystemView()A complete view of theGradeSystemreturns 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.
-
getGradeSystem
GradeSystem getGradeSystem(Id gradeSystemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theGradeSystemspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedGradeSystemmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aGradeSystemand retained for compatibility.- Parameters:
gradeSystemId-Idof theGradeSystem- Returns:
- the grade system
- Throws:
NotFoundException-gradeSystemIdnot foundNullArgumentException-gradeSystemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getGradeSystemByGrade
GradeSystem getGradeSystemByGrade(Id gradeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theGradeSystemby aGradeId.- Parameters:
gradeId-Idof aGrade- Returns:
- the grade system
- Throws:
NotFoundException-gradeIdnot foundNullArgumentException-gradeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getGradeSystemsByIds
GradeSystemList getGradeSystemsByIds(IdList gradeSystemIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aGradeSystemListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the systems 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, inaccessibleGradeSystemsmay be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
gradeSystemIds- the list ofIdsto retrieve- Returns:
- the returned
GradeSystemlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-gradeSystemIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeSystemsByGenusType
GradeSystemList getGradeSystemsByGenusType(Type gradeSystemGenusType) throws OperationFailedException, PermissionDeniedException Gets aGradeSystemListcorresponding to the given grade system genusTypewhich does not include systems of genus types derived from the specifiedType. In plenary mode, the returned list contains all known systems or an error results. Otherwise, the returned list may contain only those systems that are accessible through this session.- Parameters:
gradeSystemGenusType- a grade system genus type- Returns:
- the returned
GradeSystemlist - Throws:
NullArgumentException-gradeSystemGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeSystemsByParentGenusType
GradeSystemList getGradeSystemsByParentGenusType(Type gradeSystemGenusType) throws OperationFailedException, PermissionDeniedException Gets aGradeSystemListcorresponding to the given grade system genusTypeand include any additional systems with genus types derived from the specifiedType. In plenary mode, the returned list contains all known systems or an error results. Otherwise, the returned list may contain only those systems that are accessible through this session.- Parameters:
gradeSystemGenusType- a grade system genus type- Returns:
- the returned
GradeSystemlist - Throws:
NullArgumentException-gradeSystemGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeSystemsByRecordType
GradeSystemList getGradeSystemsByRecordType(Type gradeSystemRecordType) throws OperationFailedException, PermissionDeniedException Gets aGradeSystemListcontaining the given grade recordType. In plenary mode, the returned list contains all known systems or an error results. Otherwise, the returned list may contain only those systems that are accessible through this session.- Parameters:
gradeSystemRecordType- a grade system record type- Returns:
- the returned
GradeSystemlist - Throws:
NullArgumentException-gradeSystemGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeSystems
Gets allGradeSystems. In plenary mode, the returned list contains all known grade systems or an error results. Otherwise, the returned list may contain only those grade systems that are accessible through this session.- Returns:
- a
GradeSystemList - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-