OSID Logo
OSID Specifications
recipe package
Version 3.0.0
Release Candidate Preview
Interfaceosid.recipe.IngredientForm
Implementsosid.OsidObjectForm
osid.OsidSubjugateableForm
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_ARGUMENT quantity is invalid
NO_ACCESS Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodclearQuantity
Description

Removes the quantity.

ErrorsNO_ACCESS Metadata.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_ARGUMENT unitType is invalid
NO_ACCESS Metadata.isReadOnly() is true
NULL_ARGUMENT unitType is null
CompliancemandatoryThis method must be implemented.
MethodclearUnitType
Description

Removes the unit type.

ErrorsNO_ACCESS Metadata.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_ARGUMENT stockId is invalid
NO_ACCESS Metadata.isReadOnly() is true
NULL_ARGUMENT stockId is null
CompliancemandatoryThis method must be implemented.
MethodclearStock
Description

Removes the stock.

ErrorsNO_ACCESS Metadata.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_ARGUMENT ingredientRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED hasRecordType(ingredientRecordType) is false
CompliancemandatoryThis method must be implemented.