OSID Logo
OSID Specifications
recipe package
Version 3.1.0
Interfaceosid.recipe.Ingredient
Implementsosid.OsidObject
osid.Subjugateable
Used Byosid.recipe.DirectionAdminSession
osid.recipe.IngredientList
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.

Returndecimal the quantity
Compliancemandatory This method must be implemented.
MethodgetUnitType
Description

Gets the units of the quantity.

Returnosid.type.Type the unit type
Compliancemandatory This method must be implemented.
MethodgetStockId
Description

Gets the Id of the Stock.

Returnosid.id.Id the stock Id
Compliancemandatory This method must be implemented.
MethodgetStock
Description

Get the stock.

Returnosid.inventory.Stock the stock
ErrorsOPERATION_FAILED unable to complete request
Compliancemandatory This 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.TypeingredientRecordType the type of ingredient record to retrieve
Returnosid.recipe.records.IngredientRecord the ingredient record
ErrorsNULL_ARGUMENT ingredientRecordType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure occurred
UNSUPPORTED hasRecordType(ingredientRecordType) is false
Compliancemandatory This method must be implemented.