Interface CanonicalUnitProcessorCatalogueAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CanonicalUnitProcessorCatalogueAssignmentSession extends OsidSession

This session provides methods to re-assign CanonicalUnitProcessor to Catalogue mappings. A CanonicalUnitProcessor may appear in multiple Catalogue objects and removing the last reference to a CanonicalUnitProcessor is the equivalent of deleting it. Each Catalogue may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a CanonicalUnitProcessor to another Catalogue is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignCanonicalUnitProcessors

      boolean canAssignCanonicalUnitProcessors()
      Tests if this user can alter canonical unit processor/catalogue 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.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignCanonicalUnitProcessorsToCatalogue

      boolean canAssignCanonicalUnitProcessorsToCatalogue(Id catalogueId)
      Tests if this user can alter canonical unit processor/catalogue 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:
      catalogueId - the Id of the Catalogue
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - catalogueId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableCatalogueIds

      IdList getAssignableCatalogueIds(Id catalogueId) throws OperationFailedException
      Gets a list of catalogues including and under the given catalogue node in which any canonical unit processor can be assigned.
      Parameters:
      catalogueId - the Id of the Catalogue
      Returns:
      list of assignable catalogue Ids
      Throws:
      NullArgumentException - catalogueId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableCatalogueIdsForCanonicalUnitProcessor

      IdList getAssignableCatalogueIdsForCanonicalUnitProcessor(Id catalogueId, Id canonicalUnitProcessorId) throws OperationFailedException
      Gets a list of catalogues including and under the given catalogue node in which a specific canonical unit processor can be assigned.
      Parameters:
      catalogueId - the Id of the Catalogue
      canonicalUnitProcessorId - the Id of the CanonicalUnitProcessor
      Returns:
      list of assignable catalogue Ids
      Throws:
      NullArgumentException - catalogueId or canonicalUnitProcessorId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignCanonicalUnitProcessorToCatalogue

      void assignCanonicalUnitProcessorToCatalogue(Id canonicalUnitProcessorId, Id catalogueId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing CanonicalUnitProcessor to an Catalogue .
      Parameters:
      canonicalUnitProcessorId - the Id of the CanonicalUnitProcessor
      catalogueId - the Id of the Catalogue
      Throws:
      AlreadyExistsException - canonicalUnitProcessorId already assigned to catalogueId
      NotFoundException - canonicalUnitProcessorId or catalogueId not found
      NullArgumentException - canonicalUnitProcessorId or catalogueId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignCanonicalUnitProcessorFromCatalogue

      void unassignCanonicalUnitProcessorFromCatalogue(Id canonicalUnitProcessorId, Id catalogueId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a CanonicalUnitProcessor from a Catalogue .
      Parameters:
      canonicalUnitProcessorId - the Id of the CanonicalUnitProcessor
      catalogueId - the Id of the Catalogue
      Throws:
      NotFoundException - canonicalUnitProcessorId or catalogueId not found or canonicalUnitProcessorId not assigned to catalogueId
      NullArgumentException - canonicalUnitProcessorId or catalogueId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignCanonicalUnitProcessorToCatalogue

      void reassignCanonicalUnitProcessorToCatalogue(Id canonicalUnitProcessorId, Id fromCatalogueId, Id toCatalogueId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a CanonicalUnitProcessor from one Catalogue to another. Mappings to other Catalogues are unaffected.
      Parameters:
      canonicalUnitProcessorId - the Id of the CanonicalUnitProcessor
      fromCatalogueId - the Id of the current Catalogue
      toCatalogueId - the Id of the destination Catalogue
      Throws:
      AlreadyExistsException - canonicalUnitProcessorId already assigned to toCatalogueId
      NotFoundException - canonicalUnitProcessorId, fromCatalogueId , or toCatalogueId not found or canonicalUnitProcessorId , not mapped to fromCatalogueId
      NullArgumentException - canonicalUnitProcessorId, fromCatalogueId , or toCatalogueId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.