Interface TermCourseCatalogAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface TermCourseCatalogAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignTerms

      boolean canAssignTerms()
      Tests if this user can alter term/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.
    • canAssignTermsToCourseCatalog

      boolean canAssignTermsToCourseCatalog(Id courseCatalogId)
      Tests if this user can alter term/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 term 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.
    • getAssignableCourseCatalogIdsForTerm

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

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

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

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