Interface Ingredient

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, Subjugateable

public interface Ingredient extends OsidObject, Subjugateable

An Ingredient represents an item used in a Recipe. Ingredients reference an inventory Stock item that represents a class of Items defined in the Inventory OSID. An Ingreient specifies the quantity required.

  • Method Details

    • getQuantity

      BigDecimal getQuantity()
      Gets the quantity of items.
      Returns:
      the quantity
      Compliance:
      mandatory - This method must be implemented.
    • getUnitType

      Type getUnitType()
      Gets the units of the quantity.
      Returns:
      the unit type
      Compliance:
      mandatory - This method must be implemented.
    • getStockId

      Id getStockId()
      Gets the Id of the Stock.
      Returns:
      the stock Id
      Compliance:
      mandatory - This method must be implemented.
    • getStock

      Stock getStock() throws OperationFailedException
      Get the stock.
      Returns:
      the stock
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getIngredientRecord

      IngredientRecord getIngredientRecord(Type ingredientRecordType) throws OperationFailedException, PermissionDeniedException
      Gets the ingredient record corresponding to the given Ingredient record Type. This method is used to retrieve an object implementing the requested record. The ingredientRecordType may be the Type returned in getRecordType(ingredientRecordType) is true.
      Parameters:
      ingredientRecordType - the type of ingredient record to retrieve
      Returns:
      the ingredient record
      Throws:
      NullArgumentException - ingredientRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - hasRecordType(ingredientRecordType) is false
      Compliance:
      mandatory - This method must be implemented.