Interface OfferingConstrainerCatalogueAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface OfferingConstrainerCatalogueAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignOfferingConstrainers

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

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

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

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

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

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