OSID Logo
OSID Specifications
recipe package
Version 3.0.0
Interfaceosid.recipe.IngredientForm
Implementsosid.OsidObjectForm
osid.OsidSubjugateableForm
Implemented Byosid.recipe.batch.IngredientBatchForm
Used Byosid.recipe.DirectionAdminSession
Description

This is the form for creating and updating Ingredients . Like all OsidForm objects, various data elements may be set here for use in the create and update methods in the DirectionAdminSession . For each data element that may be set, metadata may be examined to provide display hints or data constraints.

MethodgetQuantityMetadata
Description

Gets the metadata for the quantity.

Returnosid.Metadatametadata for the quantity
CompliancemandatoryThis method must be implemented.
MethodsetQuantity
Description

Sets the quantity.

Parameterscardinalquantitythe new quantity
ErrorsINVALID_ARGUMENTquantity is invalid
NO_ACCESSMetadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodclearQuantity
Description

Removes the quantity.

ErrorsNO_ACCESSMetadata.isRequired() is true or Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodgetUnitTypeMetadata
Description

Gets the metadata for the unit type.

Returnosid.Metadatametadata for the unit type
CompliancemandatoryThis method must be implemented.
MethodsetUnitType
Description

Sets the unit type.

Parametersosid.type.TypeunitTypethe new unit type
ErrorsINVALID_ARGUMENTunitType is invalid
NO_ACCESSMetadata.isReadOnly() is true
NULL_ARGUMENTunitType is null
CompliancemandatoryThis method must be implemented.
MethodclearUnitType
Description

Removes the unit type.

ErrorsNO_ACCESSMetadata.isRequired() is true or Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodgetStockMetadata
Description

Gets the metadata for the stock.

Returnosid.Metadatametadata for the stock
CompliancemandatoryThis method must be implemented.
MethodsetStock
Description

Sets the stock.

Parametersosid.id.IdstockIdthe new stock
ErrorsINVALID_ARGUMENTstockId is invalid
NO_ACCESSMetadata.isReadOnly() is true
NULL_ARGUMENTstockId is null
CompliancemandatoryThis method must be implemented.
MethodclearStock
Description

Removes the stock.

ErrorsNO_ACCESSMetadata.isRequired() is true or Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodgetIngredientFormRecord
Description

Gets the IngredientFormRecord corresponding to the given ingredient record Type .

Parametersosid.type.TypeingredientRecordTypean ingredient record type
Returnosid.recipe.records.IngredientFormRecordthe ingredient form record
ErrorsNULL_ARGUMENTingredientRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTEDhasRecordType(ingredientRecordType) is false
CompliancemandatoryThis method must be implemented.