Interface RegistrationCourseCatalogAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RegistrationCourseCatalogAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignRegistrations

      boolean canAssignRegistrations()
      Tests if this user can alter registration/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.
    • canAssignRegistrationToCourseCatalog

      boolean canAssignRegistrationToCourseCatalog(Id courseCatalogId)
      Tests if this user can alter registration/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 registration 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.
    • getAssignableCourseCtalogIdsForRegistration

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

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

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

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