Interface AssessmentEntryAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
All Known Subinterfaces:
AssessmentEntryBatchAdminSession

public interface AssessmentEntryAdminSession extends OsidSession

This session creates, updates, and deletes AssessmentEntries . 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 an AssessmentEntry , an AssessmentEntryForm is requested using getAssessmentEntryFormForCreate() specifying the desired award, student, and record Types or none if no record Types are needed. The returned AssessmentEntryForm 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 AssessmentEntryForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each AssessmentEntryForm corresponds to an attempted transaction.

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

The delete operations delete AssessmentEntries . To unmap an AssessmentEntry from the current CourseCatalog , the AssessmentEntryCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the AssessmentEntryForm itself thus removing it from all known CourseCatalog catalogs.

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

  • Method Details

    • getCourseCatalogId

      Id getCourseCatalogId()
      Gets the CourseCatalog Id associated with this session.
      Returns:
      the CourseCatalog Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCourseCatalog

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

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

      boolean canCreateAssessmentEntryWithRecordTypes(Type[] assessmentEntryRecordTypes)
      Tests if this user can create a single Porgram using the desired record types. While CourseChronicleManager.getAssessmentEntryRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific AssessmentEntry . Providing an empty array tests if an AssessmentEntry can be created with no records.
      Parameters:
      assessmentEntryRecordTypes - array of assessment entry record types
      Returns:
      true if AssessmentEntry creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - assessmentEntryRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentEntryFormForCreate

      AssessmentEntryForm getAssessmentEntryFormForCreate(Id assessmentId, Id resourceId, Type[] assessmentEntryRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the assessment entry form for creating new assessment entries. A new form should be requested for each create transaction.
      Parameters:
      assessmentId - an assessment Id
      resourceId - a student Id
      assessmentEntryRecordTypes - array of assessment entry record types
      Returns:
      the assessment entry form
      Throws:
      NotFoundException - assessmentId or resourceId is not found
      NullArgumentException - assessmentId, resourceId , or assessmentEntryRecordTypes 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.
    • createAssessmentEntry

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

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

      AssessmentEntryForm getAssessmentEntryFormForUpdate(Id assessmentEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the assessment entry form for updating an existing assessment entry. A new assessment entry form should be requested for each update transaction.
      Parameters:
      assessmentEntryId - the Id of the AssessmentEntry
      Returns:
      the assessment entry form
      Throws:
      NotFoundException - assessmentEntryId is not found
      NullArgumentException - assessmentEntryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateAssessmentEntry

      void updateAssessmentEntry(AssessmentEntryForm assessmentEntryForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing assessment entry.
      Parameters:
      assessmentEntryForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - assessmentEntryForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - assessmentEntryForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - assessmentEntryForm did not originate from getAssessmentEntryFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteAssessmentEntries

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

      boolean canDeleteAssessmentEntry(Id assessmentEntryId)
      Tests if this user can delete a specified AssessmentEntry . A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting the AssessmentEntry will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer a delete operation to an unauthorized user for this assessment entry.
      Parameters:
      assessmentEntryId - the Id of the AssessmentEntry
      Returns:
      false if deletion of this AssessmentEntry is not authorized, true otherwise
      Throws:
      NullArgumentException - assessmentEntryId is null
      Compliance:
      mandatory - This method must be implemented.
      Notes:
      If - the {@code assessmentEntryId} is not found, then it is acceptable to return false to indicate the lack of a delete available.
    • deleteAssessmentEntry

      void deleteAssessmentEntry(Id assessmentEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes an AssessmentEntry .
      Parameters:
      assessmentEntryId - the Id of the AssessmentEntry to remove
      Throws:
      NotFoundException - assessmentEntryId not found
      NullArgumentException - assessmentEntryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageAssessmentEntryAliases

      boolean canManageAssessmentEntryAliases()
      Tests if this user can manage Id aliases for AssessmentEntries . 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 AssessmentEntry aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasAssessmentEntry

      void aliasAssessmentEntry(Id assessmentEntryId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an Id to an AssessmentEntry for the purpose of creating compatibility. The primary Id of the AssessmentEntry is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another assessment entry, it is reassigned to the given assessment entry Id .
      Parameters:
      assessmentEntryId - the Id of an AssessmentEntry
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is in use as a primary Id
      NotFoundException - assessmentEntryId not found
      NullArgumentException - assessmentEntryId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.