Interface AssessmentLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving assessments.
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 bank view: All assessment methods in this session
operate, retrieve and pertain to assessments defined explicitly in the
current bank. Using an isolated view is useful for managing
Assessmentswith theAssessmentAdminSession. - federated bank view: All assessment methods in this session operate, retrieve and pertain to all assessments defined in this bank and any other assessments implicitly available in this bank through bank inheritence.
The methods useFederatedBankView() and
useIsolatedBankView() behave as a radio group and one should be selected
before invoking any lookup methods.
Assessments may have a record indicated by their respective types. The
record is accessed via the Assessment . The returns may not be
cast directly from the returns in the lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performAssessmentlookups.getAssessment(Id assessmentId) Gets theAssessmentspecified by itsId.Gets allAssessments.getAssessmentsByGenusType(Type assessmentGenusType) Gets anAssessmentListcorresponding to the given assessment genusTypewhich does not include assessments of types derived from the specifiedType.In plenary mode, the returned list contains all known assessments or an error results.getAssessmentsByIds(IdList assessmentIds) Gets anAssessmentListcorresponding to the givenIdList.In plenary mode, the returned list contains all of the assessments 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.getAssessmentsByParentGenusType(Type assessmentGenusType) Gets anAssessmentListcorresponding to the given assessment genusTypeand include any additional assessments with genus types derived from the specifiedType.In plenary mode, the returned list contains all known assessments or an error results.getAssessmentsByRecordType(Type assessmentRecordType) Gets anAssessmentListcorresponding to the given assessment recordType.getBank()Gets theBankassociated with this session.Gets theBankIdassociated with this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as assessment, 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 theAssessmentreturns 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
-
getBankId
Id getBankId()Gets theBankIdassociated with this session.- Returns:
- the
Bank Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getBank
Gets theBankassociated with this session.- Returns:
- the
Bankassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupAssessments
boolean canLookupAssessments()Tests if this user can performAssessmentlookups. 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.
-
useComparativeAssessmentView
void useComparativeAssessmentView()The returns from the lookup methods may omit or translate elements based on this session, such as assessment, 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.
-
usePlenaryAssessmentView
void usePlenaryAssessmentView()A complete view of theAssessmentreturns 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.
-
useFederatedBankView
void useFederatedBankView()Federates the view for methods in this session. A federated view will include assessments in banks which are children of this bank in the bank hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedBankView
void useIsolatedBankView()Isolates the view for methods in this session. An isolated view restricts lookups to this bank only.- Compliance:
mandatory- This method is must be implemented.
-
getAssessment
Assessment getAssessment(Id assessmentId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theAssessmentspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedAssessmentmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aAssessmentand retained for compatibility.- Parameters:
assessmentId-Idof theAssessment- Returns:
- the assessment
- Throws:
NotFoundException-assessmentIdnot foundNullArgumentException-assessmentIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method is must be implemented.
-
getAssessmentsByIds
AssessmentList getAssessmentsByIds(IdList assessmentIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anAssessmentListcorresponding to the givenIdList.In plenary mode, the returned list contains all of the assessments 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, inaccessibleAssessmentsmay be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
assessmentIds- the list ofIdsto retrieve- Returns:
- the returned
Assessmentlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-assessmentIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- assessment failure- Compliance:
mandatory- This method must be implemented.
-
getAssessmentsByGenusType
AssessmentList getAssessmentsByGenusType(Type assessmentGenusType) throws OperationFailedException, PermissionDeniedException Gets anAssessmentListcorresponding to the given assessment genusTypewhich does not include assessments of types derived from the specifiedType.In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments that are accessible through this session.- Parameters:
assessmentGenusType- an assessment genus type- Returns:
- the returned
Assessmentlist - Throws:
NullArgumentException-assessmentGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getAssessmentsByParentGenusType
AssessmentList getAssessmentsByParentGenusType(Type assessmentGenusType) throws OperationFailedException, PermissionDeniedException Gets anAssessmentListcorresponding to the given assessment genusTypeand include any additional assessments with genus types derived from the specifiedType.In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments that are accessible through this session.- Parameters:
assessmentGenusType- an assessment genus type- Returns:
- the returned
Assessmentlist - Throws:
NullArgumentException-assessmentGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getAssessmentsByRecordType
AssessmentList getAssessmentsByRecordType(Type assessmentRecordType) throws OperationFailedException, PermissionDeniedException Gets anAssessmentListcorresponding to the given assessment recordType. The set of assessments implementing the given record type is returned. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments that are accessible through this session.- Parameters:
assessmentRecordType- an assessment record type- Returns:
- the returned
Assessmentlist - Throws:
NullArgumentException-assessmentRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getAssessments
Gets allAssessments. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments that are accessible through this session.- Returns:
- a list of
Assessments - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-