Interface LessonCourseCatalogAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface LessonCourseCatalogAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignLessons

      boolean canAssignLessons()
      Tests if this user can alter lesson/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.
    • canAssignLessonsToCourseCatalog

      boolean canAssignLessonsToCourseCatalog(Id courseCatalogId)
      Tests if this user can alter lesson/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.
      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 lesson 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.
    • getAssignableCourseCatalogIdsForLesson

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

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

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

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