Interface GradeSystemTransformAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface GradeSystemTransformAdminSession extends OsidSession

This session creates, updates, and deletes GradeSystemTransforms . The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create a GradeSystemTransform , a GradeSystemTransformForm is requested using getGradeSystemTransformFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned GradeSystemTransformForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the GradeSystemTransformForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each GradeSystemTransformForm corresponds to an attempted transaction.

For updates, GradeSystemTransformForms are requested to the GradeSystemTransformForm Id that is to be updated using getGradeSystemTransformFormForUpdate() . Similarly, the GradeSystemTransformForm has metadata about the data that can be updated and it can perform validation before submitting the update. The GradeSystemTransformForm can only be used once for a successful update and cannot be reused.

The delete operations delete GradeSystemTransforms .

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

  • Method Details

    • getGradebookId

      Id getGradebookId()
      Gets the Gradebook Id associated with this session.
      Returns:
      the Gradebook 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.
    • canCreateGradeSystemTransforms

      boolean canCreateGradeSystemTransforms()
      Tests if this user can create GradeSystemTransforms . A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a GradeSystemTransform will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
      Returns:
      false if GradeSystemTransform creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateGradeSystemTransformWithRecordTypes

      boolean canCreateGradeSystemTransformWithRecordTypes(Type[] gradeSystemTransformRecordTypes)
      Tests if this user can create a single GradeSystemTransform using the desired record types. While GradingTransformManager.getGradeSystemTransformRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific GradeSystemTransform . Providing an empty array tests if a GradeSystemTransform can be created with no records.
      Parameters:
      gradeSystemTransformRecordTypes - array of grade system transform record types
      Returns:
      true if GradeSystemTransform creation using the specified Types is supported, false otherwise
      Throws:
      NullArgumentException - gradeSystemTransformRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getGradeSystemTransformFormForCreate

      GradeSystemTransformForm getGradeSystemTransformFormForCreate(Id sourceGradeSystemId, Id targetGradeSystemId, Type[] gradeSystemTransformRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the grade system transform form for creating new grade system transforms. A new form should be requested for each create transaction.
      Parameters:
      sourceGradeSystemId - the Id for the source GradeSystem
      targetGradeSystemId - the Id for the source GradeSystem
      gradeSystemTransformRecordTypes - array of grade system transform record types
      Returns:
      the grade system transform form
      Throws:
      NotFoundException - sourceHradeSystemId or targetGradeSystemId not found
      NullArgumentException - sourceGradeSystemId, targetGradeSystemId , gradeSystemTransformRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - unable to get form for requested record types
      Compliance:
      mandatory - This method must be implemented.
    • createGradeSystemTransform

      GradeSystemTransform createGradeSystemTransform(GradeSystemTransformForm gradeSystemTransformForm) throws OperationFailedException, PermissionDeniedException
      Creates a new GradeSystemTransform .
      Parameters:
      gradeSystemTransformForm - the form for this GradeSystemTransform
      Returns:
      the new GradeSystemTransform
      Throws:
      IllegalStateException - gradeSystemTransformForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - gradeSystemTransformForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - gradeSystemTransformForm did not originate from getGradeSystemTransformFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateGradeSystemTransforms

      boolean canUpdateGradeSystemTransforms()
      Tests if this user can update GradeSystemTransforms . A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a GradeSystemTransform will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
      Returns:
      false if GradeSystemTransform modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getGradeSystemTransformFormForUpdate

      GradeSystemTransformForm getGradeSystemTransformFormForUpdate(Id gradeSystemTransformId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the grade system form for updating an existing grade system transform. A new grade system transform form should be requested for each update transaction.
      Parameters:
      gradeSystemTransformId - the Id of the GradeSystemTransform
      Returns:
      the grade system transform form
      Throws:
      NotFoundException - gradeSystemTransformId is not found
      NullArgumentException - gradeSystemTransformId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateGradeSystemTransform

      void updateGradeSystemTransform(GradeSystemTransformForm gradeSystemTransformForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing grade system transform.
      Parameters:
      gradeSystemTransformForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - gradeSystemTransformForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - gradeSystemTransformForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - gradeSystemTransformForm did not originate from getGradeSystemTransformFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteGradeSystemTransforms

      boolean canDeleteGradeSystemTransforms()
      Tests if this user can delete grade system transforms. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a GradeSystemTransform will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
      Returns:
      false if GradeSystemTransform deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteGradeSystemTransform

      void deleteGradeSystemTransform(Id gradeSystemTransformId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes a GradeSystemTransform .
      Parameters:
      gradeSystemTransformId - the Id of the GradeSystemTransform to remove
      Throws:
      NotFoundException - gradeSystemTransformId not found
      NullArgumentException - gradeSystemTransformId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageGradeSystemTransformAliases

      boolean canManageGradeSystemTransformAliases()
      Tests if this user can manage Id aliases for GradeSystemTransforms . A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
      Returns:
      false if GradeSystemTransform aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasGradeSystemTransform

      void aliasGradeSystemTransform(Id gradeSystemTransformId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an Id to a GradeSystemTransform for the purpose of creating compatibility. The primary Id of the GradeSystemTransform is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another grade system transform, it is reassigned to the given grade system transform Id .
      Parameters:
      gradeSystemTransformId - the Id of a GradeSystemTransform
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - gradeSystemTransformId not found
      NullArgumentException - gradeSystemTransformId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • addGradeMap

      void addGradeMap(Id gradeSystemTransformId, Id sourceGradeId, Id targetGradeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds a direct grade mapping to a transform.
      Parameters:
      gradeSystemTransformId - the Id of a GradeSystemTransform
      sourceGradeId - the source grade Id
      targetGradeId - the target grade Id
      Throws:
      AlreadyExistsException - sourceGradeId is already mapped
      NotFoundException - gradeSystemTransformId, sourceGradeId or targetGradeId not found
      NullArgumentException - gradeSystemTransformId, sourceGradeId or targetGradeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • removeGradeMap

      void removeGradeMap(Id gradeSystemTransformId, Id sourceGradeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a direct grade mapping from a transform.
      Parameters:
      gradeSystemTransformId - the Id of a GradeSystemTransform
      sourceGradeId - the source grade Id
      Throws:
      NotFoundException - no mapping in gradeSystemTransformId for sourceGradeId
      NullArgumentException - gradeSystemTransformId or sourceGradeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.