Interface CourseProgramAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CourseProgramAssignmentSession extends OsidSession

This session provides methods to assign Courses to Programs . A Course may appear in multiple Programs .

  • 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.
    • canAssignCourses

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

      boolean canAssignCourseToProgram(Id programId)
      Tests if this user can alter program/course 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:
      programId - the Id of the Program
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - programId is null
      Compliance:
      mandatory - This method must be implemented.
    • assignCourseToProgram

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

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