Interface OfferingCatalogueAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface OfferingCatalogueAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignOfferings

      boolean canAssignOfferings()
      Tests if this user can alter offering/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.
    • canAssignOfferingsToCatalogue

      boolean canAssignOfferingsToCatalogue(Id catalogueId)
      Tests if this user can alter offering/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 offering 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.
    • getAssignableCatalogueIdsForOffering

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

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

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

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