Interface ProgramEntryCourseCatalogAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ProgramEntryCourseCatalogAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignProgramEntries

      boolean canAssignProgramEntries()
      Tests if this user can alter program 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.
    • canAssignProgramEntryToCourseCatalog

      boolean canAssignProgramEntryToCourseCatalog(Id courseCatalogId)
      Tests if this user can alter program 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 program 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.
    • getAssignableCourseCatalogIdsForProgramEntry

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

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

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

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