Interface CourseCourseCatalogAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CourseCourseCatalogAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignCourses

      boolean canAssignCourses()
      Tests if this user can alter course/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.
    • canAssignCourseToCourseCatalog

      boolean canAssignCourseToCourseCatalog(Id courseCatalogId)
      Tests if this user can alter course/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 course 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.
    • getAssignableCourseCatalogIdsForCourse

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

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

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

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