OSID Logo
OSID Specifications
recipe package
Version 3.0.0
Release Candidate Preview
Interfaceosid.recipe.Ingredient
Implementsosid.OsidObject
osid.Subjugateable
Description

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.

MethodgetQuantity
Description

Gets the quantity of items.

Returndecimalthe quantity
CompliancemandatoryThis method must be implemented.
MethodgetUnitType
Description

Gets the units of the quantity.

Returnosid.type.Typethe unit type
CompliancemandatoryThis method must be implemented.
MethodgetStockId
Description

Gets the Id of the Stock.

Returnosid.id.Idthe stock Id
CompliancemandatoryThis method must be implemented.
MethodgetStock
Description

Get the stock.

Returnosid.inventory.Stockthe stock
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetIngredientRecord
Description

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 .

Parametersosid.type.TypeingredientRecordTypethe type of ingredient record to retrieve
Returnosid.recipe.records.IngredientRecordthe ingredient record
ErrorsNULL_ARGUMENT ingredientRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED hasRecordType(ingredientRecordType) is false
CompliancemandatoryThis method must be implemented.