Interface Ingredient
- All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, Subjugateable
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.
-
Method Summary
Modifier and TypeMethodDescriptiongetIngredientRecord(Type ingredientRecordType) Gets the ingredient record corresponding to the givenIngredientrecordType.Gets the quantity of items.getStock()Get the stock.Gets theIdof theStock.Gets the units of the quantity.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.
-
Method Details
-
getQuantity
BigDecimal getQuantity()Gets the quantity of items.- Returns:
- the quantity
- Compliance:
mandatory- This method must be implemented.
-
getUnitType
Type getUnitType()Gets the units of the quantity.- Returns:
- the unit type
- Compliance:
mandatory- This method must be implemented.
-
getStockId
Id getStockId()Gets theIdof theStock.- Returns:
- the stock
Id - Compliance:
mandatory- This method must be implemented.
-
getStock
Get the stock.- Returns:
- the stock
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getIngredientRecord
IngredientRecord getIngredientRecord(Type ingredientRecordType) throws OperationFailedException, PermissionDeniedException Gets the ingredient record corresponding to the givenIngredientrecordType. This method is used to retrieve an object implementing the requested record. TheingredientRecordTypemay be theTypereturned ingetRecordType(ingredientRecordType)istrue.- Parameters:
ingredientRecordType- the type of ingredient record to retrieve- Returns:
- the ingredient record
- Throws:
NullArgumentException-ingredientRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurredUnsupportedException-hasRecordType(ingredientRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-