OSID Logo
OSID Specifications
recipe package
Version 3.1.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.Metadata metadata for the quantity
Compliancemandatory This method must be implemented.
MethodsetQuantity
Description

Sets the quantity.

Parameterscardinalquantity the new quantity
ErrorsINVALID_ARGUMENT quantity is invalid
NO_ACCESS Metadata.isReadOnly() is true
Compliancemandatory This method must be implemented.
MethodclearQuantity
Description

Removes the quantity.

ErrorsNO_ACCESS Metadata.isRequired() is true or Metadata.isReadOnly() is true
Compliancemandatory This method must be implemented.
MethodgetUnitTypeMetadata
Description

Gets the metadata for the unit type.

Returnosid.Metadata metadata for the unit type
Compliancemandatory This method must be implemented.
MethodsetUnitType
Description

Sets the unit type.

Parametersosid.type.TypeunitType the new unit type
ErrorsINVALID_ARGUMENT unitType is invalid
NO_ACCESS Metadata.isReadOnly() is true
NULL_ARGUMENT unitType is null
Compliancemandatory This method must be implemented.
MethodclearUnitType
Description

Removes the unit type.

ErrorsNO_ACCESS Metadata.isRequired() is true or Metadata.isReadOnly() is true
Compliancemandatory This method must be implemented.
MethodgetStockMetadata
Description

Gets the metadata for the stock.

Returnosid.Metadata metadata for the stock
Compliancemandatory This method must be implemented.
MethodsetStock
Description

Sets the stock.

Parametersosid.id.IdstockId the new stock
ErrorsINVALID_ARGUMENT stockId is invalid
NO_ACCESS Metadata.isReadOnly() is true
NULL_ARGUMENT stockId is null
Compliancemandatory This method must be implemented.
MethodclearStock
Description

Removes the stock.

ErrorsNO_ACCESS Metadata.isRequired() is true or Metadata.isReadOnly() is true
Compliancemandatory This method must be implemented.
MethodgetIngredientFormRecord
Description

Gets the IngredientFormRecord corresponding to the given ingredient record Type.

Parametersosid.type.TypeingredientRecordType an ingredient record type
Returnosid.recipe.records.IngredientFormRecord the ingredient form 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.