Interface ModuleCourseCatalogAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ModuleCourseCatalogAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignModules

      boolean canAssignModules()
      Tests if this user can alter module/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.
    • canAssignModulesToCourseCatalog

      boolean canAssignModulesToCourseCatalog(Id courseCatalogId)
      Tests if this user can alter module/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 module 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.
    • getAssignableCourseCatalogIdsForModule

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

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

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

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