Interface OfferingConstrainerRuleApplicationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface OfferingConstrainerRuleApplicationSession extends OsidSession

This session provides methods to apply OfferingConstrainers to CanonicalUnits to constrain the offerings for a canonical unit. A CanonicalUnit with multiple OfferingConstrainers means any positive rule evaluation across the result in an effective CanonicalUnit .

  • Method Details

    • getCatalogueId

      Id getCatalogueId()
      Gets the Catalogue Id associated with this session.
      Returns:
      the Catalogue Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCatalogue

      Gets the Catalogue associated with this session.
      Returns:
      the catalogue
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canAssignOfferingConstrainers

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

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

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

      boolean canSequenceOfferingConstrainers()
      Tests if this user can order OfferingConstrainers . A return of true does not guarantee successful authorization. A return of false indicates that it is known sequencing operations will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer sequencing operations to an unauthorized user.
      Returns:
      false if OfferingConstrainer ordering is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • moveOfferingConstrainerAhead

      void moveOfferingConstrainerAhead(Id offeringConstrainerId, Id canonicalUnitId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Reorders offering constrainers for a canonical unit by moving the specified offering constrainer in front of a reference offering constrainer.
      Parameters:
      offeringConstrainerId - the Id of an OfferingConstrainer
      canonicalUnitId - the Id of a CanonicalUnit
      referenceId - the reference offering constrainer Id
      Throws:
      NotFoundException - offeringConstrainerId, canonicalUnitId , or referenceId not found or, offeringConstrainerId or referenceId not related to canonicalUnitId
      NullArgumentException - offeringConstrainerId, canonicalUnitId , or referenceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • moveOfferingConstrainerBehind

      void moveOfferingConstrainerBehind(Id offeringConstrainerId, Id canonicalUnitId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Reorders offering constrainers for a canonical unit by moving the specified offering constrainer behind a reference offering constrainer.
      Parameters:
      offeringConstrainerId - the Id of an OfferingConstrainer
      canonicalUnitId - the Id of a CanonicalUnit
      referenceId - the reference offering constrainer Id
      Throws:
      NotFoundException - offeringConstrainerId, canonicalUnitId , or referenceId not found or, offeringConstrainerId or referenceId not related to canonicalUnitId
      NullArgumentException - offeringConstrainerId, canonicalUnitId , or referenceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • orderOfferingConstrainers

      void orderOfferingConstrainers(Id[] offeringConstrainerIds, Id canonicalUnitId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Reorders a set of offering constrainers for a canonical unit.
      Parameters:
      offeringConstrainerIds - the Ids for a set of OfferingConstrainers
      canonicalUnitId - the Id of a CanonicalUnit
      Throws:
      NotFoundException - canonicalUnitId not found or, an offeringConstrainerId not related to canonicalUnitId
      NullArgumentException - offeringConstrainerIds or canonicalUnitId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.