Interface AssessmentOfferedLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving assessments offered.
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 offered may have a record indicated by their respective
types. The record is accessed via the AssessmentOffered . The
returns may not be cast directly from the returns in the lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performAssessmentOfferedlookups.getAssessmentOffered(Id assessmentOfferedId) Gets theAssessmentOfferedspecified by itsId.Gets allAssessmentOfferedelements.getAssessmentsOfferedByDate(DateTime start, DateTime end) Gets anAssessmentOfferedListthat have designated start times where the start times fall in the given range inclusive.getAssessmentsOfferedByGenusType(Type assessmentOfferedGenusType) Gets anAssessmentOfferedListcorresponding to the given assessment offered genusTypewhich does not include assessments of types derived from the specifiedType.getAssessmentsOfferedByIds(IdList assessmentOfferedIds) Gets anAssessmentOfferedListcorresponding 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.getAssessmentsOfferedByParentGenusType(Type assessmentOfferedGenusType) Gets anAssessmentOfferedListcorresponding to the given assessment offered genusTypeand include any additional assessments with genus types derived from the specifiedType.getAssessmentsOfferedByRecordType(Type assessmentRecordType) Gets anAssessmentOfferedListcorresponding to the given assessment offered recordType.getAssessmentsOfferedForAssessment(Id assessmentId) Gets anAssessmentOfferedListby the given assessment.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 theAssessmentOfferedreturns 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.
-
canLookupAssessmentsOffered
boolean canLookupAssessmentsOffered()Tests if this user can performAssessmentOfferedlookups. 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.
-
useComparativeAssessmentOfferedView
void useComparativeAssessmentOfferedView()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.
-
usePlenaryAssessmentOfferedView
void usePlenaryAssessmentOfferedView()A complete view of theAssessmentOfferedreturns 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.
-
getAssessmentOffered
AssessmentOffered getAssessmentOffered(Id assessmentOfferedId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theAssessmentOfferedspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedAssessmentOfferedmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anAssessmentOfferedand retained for compatibility.- Parameters:
assessmentOfferedId-Idof theAssessmentOffered- Returns:
- the assessment offered
- Throws:
NotFoundException-assessmentOfferedIdnot foundNullArgumentException-assessmentOfferedIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method is must be implemented.
-
getAssessmentsOfferedByIds
AssessmentOfferedList getAssessmentsOfferedByIds(IdList assessmentOfferedIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anAssessmentOfferedListcorresponding 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, inaccessibleAssessmentOfferedobjects may be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
assessmentOfferedIds- the list ofIdsto retrieve- Returns:
- the returned
AssessmentOfferedlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-assessmentOfferedIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- assessment failure- Compliance:
mandatory- This method must be implemented.
-
getAssessmentsOfferedByGenusType
AssessmentOfferedList getAssessmentsOfferedByGenusType(Type assessmentOfferedGenusType) throws OperationFailedException, PermissionDeniedException Gets anAssessmentOfferedListcorresponding to the given assessment offered genusTypewhich does not include assessments of types derived from the specifiedType. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.- Parameters:
assessmentOfferedGenusType- an assessment offered genus type- Returns:
- the returned
AssessmentOfferedlist - Throws:
NullArgumentException-assessmentOfferedGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getAssessmentsOfferedByParentGenusType
AssessmentOfferedList getAssessmentsOfferedByParentGenusType(Type assessmentOfferedGenusType) throws OperationFailedException, PermissionDeniedException Gets anAssessmentOfferedListcorresponding to the given assessment offered 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 offered that are accessible through this session.- Parameters:
assessmentOfferedGenusType- an assessment offered genus type- Returns:
- the returned
AssessmentOfferedlist - Throws:
NullArgumentException-assessmentOfferedGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getAssessmentsOfferedByRecordType
AssessmentOfferedList getAssessmentsOfferedByRecordType(Type assessmentRecordType) throws OperationFailedException, PermissionDeniedException Gets anAssessmentOfferedListcorresponding to the given assessment offered recordType. The set of assessments implementing the given record type is returned. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.- Parameters:
assessmentRecordType- an assessment offered record type- Returns:
- the returned
AssessmentOfferedlist - Throws:
NullArgumentException-assessmentOfferedRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getAssessmentsOfferedByDate
AssessmentOfferedList getAssessmentsOfferedByDate(DateTime start, DateTime end) throws OperationFailedException, PermissionDeniedException Gets anAssessmentOfferedListthat have designated start times where the start times fall in the given range inclusive. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.- Parameters:
start- start of time rangeend- end of time range- Returns:
- the returned
AssessmentOfferedlist - Throws:
InvalidArgumentException-endis less thanstartOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getAssessmentsOfferedForAssessment
AssessmentOfferedList getAssessmentsOfferedForAssessment(Id assessmentId) throws OperationFailedException, PermissionDeniedException Gets anAssessmentOfferedListby the given assessment. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.- Parameters:
assessmentId-Idof anAssessment- Returns:
- the returned
AssessmentOfferedlist - Throws:
NullArgumentException-assessmentIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getAssessmentsOffered
AssessmentOfferedList getAssessmentsOffered() throws OperationFailedException, PermissionDeniedExceptionGets allAssessmentOfferedelements. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.- Returns:
- a list of
AssessmentOfferedelements - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-