Interface CourseRegistrationCourseCatalogAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CourseRegistrationCourseCatalogAssignmentSession extends OsidSession

This session provides methods to re-assign CourseRegistra tions to CourseCatalog mappings. A CourseRegistr ation may appear in multiple CourseCatalog catalogs and removing the last reference to a CourseRegistr ation 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 a CourseRegistr ation to another CourseCatalog is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignCourseRegistrations

      boolean canAssignCourseRegistrations()
      Tests if this user can alter course registration/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. T his 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.
    • canAssignCourseRegistrationToCourseCatalog

      boolean canAssignCourseRegistrationToCourseCatalog(Id courseCatalogId)
      Tests if this user can alter course registration/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. T his is intended as a hint to an application that may opt not to offer assignment 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 course registration 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.
    • getAssignableCourseCatalogIdsForCourseRegistration

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

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

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

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