Interface CourseEntryCourseCatalogAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CourseEntryCourseCatalogAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignCourseEntries

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

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

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

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

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

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