Interface ResultCatalogueAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ResultCatalogueAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignResults

      boolean canAssignResults()
      Tests if this user can alter result/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.
    • canAssignResultsToCatalogue

      boolean canAssignResultsToCatalogue(Id catalogueId)
      Tests if this user can alter result/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 assignment 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 result 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.
    • getAssignableCatalogueIdsForResult

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

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

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

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