Interface EnrollmentCourseCatalogAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface EnrollmentCourseCatalogAssignmentSession extends OsidSession

This session provides methods to re-assign Enrollments to CourseCatalogs . An Enrollment may appear in multiple CourseCatalogs and removing the last reference to an Enrollment is the equivalent of deleting it. Each CourseCatalog may have its own authorizations governing who is allowed to operate on it.

Adding a reference of an Enrollment to another CourseCatalog is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignEnrollments

      boolean canAssignEnrollments()
      Tests if this user can alter enrollment/course catalog mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignEnrollmentToCourseCatalog

      boolean canAssignEnrollmentToCourseCatalog(Id courseCatalogId)
      Tests if this user can alter enrollment/course catalog mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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.
      Parameters:
      courseCatalogId - the Id of the CourseCatalog
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - courseCatalogId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableCourseCatalogIds

      IdList getAssignableCourseCatalogIds(Id courseCatalogId) throws OperationFailedException
      Gets a list of course catalogs including and under the given course catalog node in which any enrollment can be assigned.
      Parameters:
      courseCatalogId - the Id of the CourseCatalog
      Returns:
      list of assignable course catalog Ids
      Throws:
      NullArgumentException - courseCatalogId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableCourseCatalogIdsForEnrollment

      IdList getAssignableCourseCatalogIdsForEnrollment(Id courseCatalogId, Id enrollmentId) throws OperationFailedException
      Gets a list of course catalogs including and under the given course catalog node in which a specific enrollment can be assigned.
      Parameters:
      courseCatalogId - the Id of the CourseCatalog
      enrollmentId - the Id of the Enrollment
      Returns:
      list of assignable course catalog Ids
      Throws:
      NullArgumentException - courseCatalogId or enrollmentId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignEnrollmentToCatalog

      void assignEnrollmentToCatalog(Id enrollmentId, Id courseCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Enrollment to a CourseCatalog .
      Parameters:
      enrollmentId - the Id of the Enrollment
      courseCatalogId - the Id of the CourseCatalog
      Throws:
      AlreadyExistsException - enrollmentId is already assigned to courseCatalogId
      NotFoundException - enrollmentId or courseCatalogId not found
      NullArgumentException - enrollmentId or courseCatalogId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignEnrollmentFromCourseCatalog

      void unassignEnrollmentFromCourseCatalog(Id enrollmentId, Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes an Enrollment from a CourseCatalog .
      Parameters:
      enrollmentId - the Id of the Enrollment
      courseCatalogId - the Id of the CourseCatalog
      Throws:
      NotFoundException - enrollmentId or courseCatalogId not found or enrollmentId not assigned to courseCatalogId
      NullArgumentException - enrollmentId or courseCatalogId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignEnrollmeentToCourseCatalog

      void reassignEnrollmeentToCourseCatalog(Id enrollmentId, Id fromCourseCatalogId, Id toCourseCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves an Enrollment from one CourseCatalog to another. Mappings to other CourseCatalogs are unaffected.
      Parameters:
      enrollmentId - the Id of the Enrollment
      fromCourseCatalogId - the Id of the current CourseCatalog
      toCourseCatalogId - the Id of the destination CourseCatalog
      Throws:
      AlreadyExistsException - enrollmentId already assigned to toCourseCatalogId
      NotFoundException - enrollmentId, fromCourseCatalogId , or toCourseCatalogId not found or enrollmentId , not mapped to fromCourseCatalogId
      NullArgumentException - enrollmentId, fromCourseCatalogId , or toCourseCatalogId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.