OSID Logo
OSID Specifications
recipe package
Version 3.0.0
Release Candidate Preview
Interfaceosid.recipe.RecipeCookbookSession
Implementsosid.OsidSession
Description

This session provides methods to retrieve Recipe to Cookbook ingredients. A Recipe may appear in multiple Cookbook objects. Each cook book may have its own authorizations governing who is allowed to look at it.

This lookup session defines several views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
MethodcanLookupRecipeCookbookMappings
Description

Tests if this user can perform lookups of recipe/cook book ingredients. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returnboolean false if looking up mappings is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeRecipeCookbookView
Description

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryRecipeCookbookView
Description

A complete view of the Recipe and Cookbook returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

CompliancemandatoryThis method is must be implemented.
MethodgetRecipeIdsByCookbook
Description

Gets the list of Recipe Ids associated with a Cookbook.

Parametersosid.id.IdcookbookId Id of the Cookbook
Returnosid.id.IdListlist of related recipe Ids
ErrorsNOT_FOUND cookbookId is not found
NULL_ARGUMENT cookbookId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRecipesByCookbook
Description

Gets the list of Recipes associated with a Cookbook.

Parametersosid.id.IdcookbookId Id of the Cookbook
Returnosid.recipe.RecipeListlist of related recipes
ErrorsNOT_FOUND cookbookId is not found
NULL_ARGUMENT cookbookId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRecipeIdsByCookbooks
Description

Gets the list of Recipe Ids corresponding to a list of Cookbooks.

Parametersosid.id.IdListcookbookIdslist of cook book Ids
Returnosid.id.IdListlist of recipe Ids
ErrorsNULL_ARGUMENT cookbookIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRecipesByCookbooks
Description

Gets the list of Recipe corresponding to a list of Cookbooks.

Parametersosid.id.IdListcookbookIdslist of cook book Ids
Returnosid.recipe.RecipeListlist of recipes
ErrorsNULL_ARGUMENT cookbookIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCookbookIdsByRecipe
Description

Gets the Cookbook Ids mapped to a Recipe.

Parametersosid.id.IdrecipeId Id of a Recipe
Returnosid.id.IdListlist of cook books
ErrorsNOT_FOUND recipeId is not found
NULL_ARGUMENT recipeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCookbooksByRecipe
Description

Gets the Cookbooks mapped to a Recipe.

Parametersosid.id.IdrecipeId Id of a Recipe
Returnosid.recipe.CookbookListlist of cook books
ErrorsNOT_FOUND recipeId is not found
NULL_ARGUMENT recipeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.