Interface GradeSystemLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface GradeSystemLookupSession extends 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 Details

    • getGradebookId

      Id getGradebookId()
      Gets the GradeSystem Id associated with this session.
      Returns:
      the GradeSystem Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getGradebook

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

      boolean canLookupGradeSystems()
      Tests if this user can perform GradeSystem 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.
    • 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 the GradeSystem 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.
    • 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

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

      Gets the GradeSystem by a Grade Id .
      Parameters:
      gradeId - Id of a Grade
      Returns:
      the grade system
      Throws:
      NotFoundException - gradeId not found
      NullArgumentException - gradeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getGradeSystemsByIds

      Gets a GradeSystemList corresponding to the given IdList . In plenary mode, the returned list contains all of the systems 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 GradeSystems may be omitted from the list and may present the elements in any order including returning a unique set.
      Parameters:
      gradeSystemIds - the list of Ids to retrieve
      Returns:
      the returned GradeSystem list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - gradeSystemIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getGradeSystemsByGenusType

      GradeSystemList getGradeSystemsByGenusType(Type gradeSystemGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a GradeSystemList corresponding to the given grade system genus Type which does not include systems of genus types derived from the specified Type . 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 GradeSystem list
      Throws:
      NullArgumentException - gradeSystemGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getGradeSystemsByParentGenusType

      GradeSystemList getGradeSystemsByParentGenusType(Type gradeSystemGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a GradeSystemList corresponding to the given grade system genus Type and include any additional systems with genus types derived from the specified Type . 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 GradeSystem list
      Throws:
      NullArgumentException - gradeSystemGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getGradeSystemsByRecordType

      GradeSystemList getGradeSystemsByRecordType(Type gradeSystemRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a GradeSystemList containing the given grade record Type . 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 GradeSystem list
      Throws:
      NullArgumentException - gradeSystemGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getGradeSystems

      Gets all GradeSystems . 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 request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.