Interface PriceEnabler

All Superinterfaces:
Browsable, Extensible, Identifiable, Operable, OsidEnabler, OsidObject, OsidRule, Temporal

public interface PriceEnabler extends OsidEnabler

A PriceEnabler describes the rules for making a Price effective.

  • Method Details

    • hasQuantityRange

      boolean hasQuantityRange()
      Tests if this price is restricted by quantity.
      Returns:
      true if this price has a quantity range, false if this price is the same for any quantity
      Compliance:
      mandatory - This method must be implemented.
    • getMinimumQuantity

      long getMinimumQuantity()
      Gets the minium quantity for this price.
      Returns:
      the quantity
      Throws:
      IllegalStateException - hasQuantityRange() is false
      Compliance:
      mandatory - This method must be implemented.
    • getMaximumQuantity

      long getMaximumQuantity()
      Gets the maximum quantity for this price.
      Returns:
      the quantity
      Throws:
      IllegalStateException - hasQuantityRange() is false
      Compliance:
      mandatory - This method must be implemented.
    • getPriceEnablerRecord

      PriceEnablerRecord getPriceEnablerRecord(Type priceEnablerRecordType) throws OperationFailedException
      Gets the price enabler record corresponding to the given PriceEnabler record Type. This method is used to retrieve an object implementing the requested record. The priceEnablerRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(priceEnablerRecordType) is true.
      Parameters:
      priceEnablerRecordType - the type of price enabler record to retrieve
      Returns:
      the price enabler record
      Throws:
      NullArgumentException - priceEnablerRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(priceEnablerRecordType) is false
      Compliance:
      mandatory - This method must be implemented.