Interface AssessmentTakenLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AssessmentTakenLookupSession extends OsidSession

This session defines methods for retrieving assessments taken.

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.
  • 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 taken may have a record indicated by their respective record types. The record is accessed via the AssessmentTaken . 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.
    • canLookupAssessmentsTaken

      boolean canLookupAssessmentsTaken()
      Tests if this user can perform AssessmentTaken 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.
    • useComparativeAssessmentTakenView

      void useComparativeAssessmentTakenView()
      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.
    • usePlenaryAssessmentTakenView

      void usePlenaryAssessmentTakenView()
      A complete view of the AssessmentTaken 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.
    • getAssessmentTaken

      Gets the AssessmentTaken specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned AssessmentTaken may have a different Id than requested, such as the case where a duplicate Id was assigned to an AssessmentTaken and retained for compatibility.
      Parameters:
      assessmentTakenId - Id of the AssessmentTaken
      Returns:
      the assessment taken
      Throws:
      NotFoundException - assessmentTakenId not found
      NullArgumentException - assessmentTakenId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method is must be implemented.
    • getAssessmentsTakenByIds

      Gets an AssessmentTakenList 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 AssessmentTaken objects may be omitted from the list and may present the elements in any order including returning a unique set.
      Parameters:
      assessmentTakenIds - the list of Ids to retrieve
      Returns:
      the returned AssessmentTaken list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - assessmentTakenIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - assessment failure
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenByGenusType

      AssessmentTakenList getAssessmentsTakenByGenusType(Type assessmentTakenGenusType) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentTakenList corresponding to the given assessment taken genus Type which does not include assessments of types derived from the specified Type . In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
      Parameters:
      assessmentTakenGenusType - an assessment taken genus type
      Returns:
      the returned AssessmentTaken list
      Throws:
      NullArgumentException - assessmentTakenGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenByParentGenusType

      AssessmentTakenList getAssessmentsTakenByParentGenusType(Type assessmentTakenGenusType) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentTakenList corresponding to the given assessment taken 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 taken that are accessible through this session.
      Parameters:
      assessmentTakenGenusType - an assessment taken genus type
      Returns:
      the returned AssessmentTaken list
      Throws:
      NullArgumentException - assessmentTakenGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenByRecordType

      AssessmentTakenList getAssessmentsTakenByRecordType(Type assessmentTakenRecordType) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentTakenList corresponding to the given assessment taken record Type . The set of assessments implementing the given record type is returned. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session. In both cases, the order of the set is not specified.
      Parameters:
      assessmentTakenRecordType - an assessment taken record type
      Returns:
      the returned AssessmentTaken list
      Throws:
      NullArgumentException - assessmentTakenRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenByDate

      Gets an AssessmentTakenList started in the given date range inclusive. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session. In both cases, the order of the set is not specified.
      Parameters:
      from - start date
      to - end date
      Returns:
      the returned AssessmentTaken list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenForTaker

      AssessmentTakenList getAssessmentsTakenForTaker(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentTakenList for the given resource. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
      Parameters:
      resourceId - Id of a Resource
      Returns:
      the returned AssessmentTaken list
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenByDateForTaker

      AssessmentTakenList getAssessmentsTakenByDateForTaker(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentTakenList started in the given date range inclusive for the given resource. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
      Parameters:
      resourceId - Id of a Resource
      from - start date
      to - end date
      Returns:
      the returned AssessmentTaken list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - resourceId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenForAssessment

      AssessmentTakenList getAssessmentsTakenForAssessment(Id assessmentId) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentTakenList for the given assessment. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
      Parameters:
      assessmentId - Id of an Assessment
      Returns:
      the returned AssessmentTaken list
      Throws:
      NullArgumentException - assessmentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenByDateForAssessment

      AssessmentTakenList getAssessmentsTakenByDateForAssessment(Id assessmentId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentTakenList started in the given date range inclusive for the given assessment. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
      Parameters:
      assessmentId - Id of an Assessment
      from - start date
      to - end date
      Returns:
      the returned AssessmentTaken list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - assessmentId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenForTakerAndAssessment

      AssessmentTakenList getAssessmentsTakenForTakerAndAssessment(Id resourceId, Id assessmentId) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentTakenList for the given resource and assessment. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
      Parameters:
      resourceId - Id of a Resource
      assessmentId - Id of an Assessment
      Returns:
      the returned AssessmentTaken list
      Throws:
      NullArgumentException - resourceId or assessmentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenByDateForTakerAndAssessment

      AssessmentTakenList getAssessmentsTakenByDateForTakerAndAssessment(Id resourceId, Id assessmentId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentTakenList started in the given date range inclusive for the given resource and assessment. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
      Parameters:
      resourceId - Id of a Resource
      assessmentId - Id of an Assessment
      from - start date
      to - end date
      Returns:
      the returned AssessmentTaken list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - resourceId, assessmentId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenForAssessmentOffered

      AssessmentTakenList getAssessmentsTakenForAssessmentOffered(Id assessmentOfferedId) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentTakenList by the given assessment offered. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
      Parameters:
      assessmentOfferedId - Id of an AssessmentOffered
      Returns:
      the returned AssessmentTaken list
      Throws:
      NullArgumentException - assessmentOfferedId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenByDateForAssessmentOffered

      AssessmentTakenList getAssessmentsTakenByDateForAssessmentOffered(Id assessmentOfferedId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentTakenList started in the given date range inclusive for the given assessment offered. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
      Parameters:
      assessmentOfferedId - Id of an AssessmentOffered
      from - start date
      to - end date
      Returns:
      the returned AssessmentTaken list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - assessmentOfferedId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenForTakerAndAssessmentOffered

      AssessmentTakenList getAssessmentsTakenForTakerAndAssessmentOffered(Id resourceId, Id assessmentOfferedId) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentTakenList for the given resource and assessment offered. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
      Parameters:
      resourceId - Id of a Resource
      assessmentOfferedId - Id of an AssessmentOffered
      Returns:
      the returned AssessmentTaken list
      Throws:
      NullArgumentException - resourceId or assessmenOfferedtId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTakenByDateForTakerAndAssessmentOffered

      AssessmentTakenList getAssessmentsTakenByDateForTakerAndAssessmentOffered(Id resourceId, Id assessmentOfferedId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets an AssessmentTakenList started in the given date range inclusive for the given resource and assessment offered. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
      Parameters:
      resourceId - Id of a Resource
      assessmentOfferedId - Id of an AssessmentOffered
      from - start date
      to - end date
      Returns:
      the returned AssessmentTaken list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - resourceId, assessmentOfferedId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentsTaken

      Gets all AssessmentTaken elements. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
      Returns:
      a list of AssessmentTaken elements
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.