Interface AssessmentOfferedLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AssessmentOfferedLookupSession extends 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 Assessments with the AssessmentAdminSession .
  • 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 Details

    • getBankId

      Id getBankId()
      Gets the Bank Id associated with this session.
      Returns:
      the Bank Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getBank

      Gets the Bank associated with this session.
      Returns:
      the Bank associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canLookupAssessmentsOffered

      boolean canLookupAssessmentsOffered()
      Tests if this user can perform AssessmentOffered lookups. 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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Returns:
      false if lookup methods are not authorized, true otherwise
      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 the AssessmentOffered returns 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 the AssessmentOffered specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned AssessmentOffered may have a different Id than requested, such as the case where a duplicate Id was assigned to an AssessmentOffered and retained for compatibility.
      Parameters:
      assessmentOfferedId - Id of the AssessmentOffered
      Returns:
      the assessment offered
      Throws:
      NotFoundException - assessmentOfferedId not found
      NullArgumentException - assessmentOfferedId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method is must be implemented.
    • getAssessmentsOfferedByIds

      AssessmentOfferedList getAssessmentsOfferedByIds(IdList assessmentOfferedIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets an AssessmentOfferedList corresponding to the given IdList .In plenary mode, the returned list contains all of the assessments specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible AssessmentOffered objects may be omitted from the list and may present the elements in any order including returning a unique set.
      Parameters:
      assessmentOfferedIds - the list of Ids to retrieve
      Returns:
      the returned AssessmentOffered list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - assessmentOfferedIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - assessment failure
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsOfferedByGenusType

      AssessmentOfferedList getAssessmentsOfferedByGenusType(Type assessmentOfferedGenusType) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentOfferedList corresponding to the given assessment offered genus Type which does not include assessments of types derived from the specified Type . 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 AssessmentOffered list
      Throws:
      NullArgumentException - assessmentOfferedGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsOfferedByParentGenusType

      AssessmentOfferedList getAssessmentsOfferedByParentGenusType(Type assessmentOfferedGenusType) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentOfferedList corresponding to the given assessment offered genus Type and include any additional assessments with genus types derived from the specified Type . 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 AssessmentOffered list
      Throws:
      NullArgumentException - assessmentOfferedGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsOfferedByRecordType

      AssessmentOfferedList getAssessmentsOfferedByRecordType(Type assessmentRecordType) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentOfferedList corresponding to the given assessment offered record Type . 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 AssessmentOffered list
      Throws:
      NullArgumentException - assessmentOfferedRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsOfferedByDate

      Gets an AssessmentOfferedList that 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 range
      end - end of time range
      Returns:
      the returned AssessmentOffered list
      Throws:
      InvalidArgumentException - end is less than start
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsOfferedForAssessment

      AssessmentOfferedList getAssessmentsOfferedForAssessment(Id assessmentId) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentOfferedList by 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 - Id of an Assessment
      Returns:
      the returned AssessmentOffered list
      Throws:
      NullArgumentException - assessmentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsOffered

      Gets all AssessmentOffered elements. 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 AssessmentOffered elements
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.