OSID Logo
OSID Specifications
recipe package
Version 3.1.0
Interfaceosid.recipe.RecipeCookbookAssignmentSession
Implementsosid.OsidSession
Used Byosid.recipe.RecipeManager
osid.recipe.RecipeProxyManager
Description

This session provides methods to re-assign Recipes to Cookbook mappings. A Recipe may appear in multiple Cookbook objects and removing the last reference to a Recipe is the equivalent of deleting it. Each Cookbook may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a Recipe to another Cookbook is not a copy operation (eg: does not change its Id).

MethodcanAssignRecipes
Description

Tests if this user can alter recipe/cookbook mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 ingredient is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanAssignRecipesToCookbook
Description

Tests if this user can alter recipe/cookbook mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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.

Parametersosid.id.IdcookbookId the Id of the Cookbook
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT cookbookId is null
Compliancemandatory This method must be implemented.
MethodgetAssignableCookbookIds
Description

Gets a list of cookbooks including and under the given cookbook node in which any recipe can be assigned.

Parametersosid.id.IdcookbookId the Id of the Cookbook
Returnosid.id.IdList list of assignable cookbook Ids
ErrorsNULL_ARGUMENT cookbookId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetAssignableCookbookIdsForRecipe
Description

Gets a list of cookbooks including and under the given cookbook node in which a specific recipe can be assigned.

Parametersosid.id.IdcookbookId the Id of the Cookbook
osid.id.IdrecipeId the Id of the Recipe
Returnosid.id.IdList list of assignable cookbook Ids
ErrorsNULL_ARGUMENT cookbookId or recipeId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodassignRecipeToCookbook
Description

Adds an existing Recipe to a Cookbook.

Parametersosid.id.IdrecipeId the Id of the Recipe
osid.id.IdcookbookId the Id of the Cookbook
ErrorsALREADY_EXISTS recipeId is not assigned to cookbookId
NOT_FOUND recipeId or cookbookId not found
NULL_ARGUMENT recipeId or cookbookId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignRecipeFromCookbook
Description

Removes a Recipe from a Cookbook.

Parametersosid.id.IdrecipeId the Id of the Recipe
osid.id.IdcookbookId the Id of the Cookbook
ErrorsNOT_FOUND recipeId or cookbookId not found or recipeId not assigned to cookbookId
NULL_ARGUMENT recipeId or cookbookId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodreassignRecipeToCookbook
Description

Moves a Recipe from one Cookbook to another. Mappings to other Cookbooks are unaffected.

Parametersosid.id.IdrecipeId the Id of the Recipe
osid.id.IdfromCookbookId the Id of the current Cookbook
osid.id.IdtoCookbookId the Id of the destination Cookbook
ErrorsALREADY_EXISTS recipeId already assigned to toCookbookId
NOT_FOUND recipeId, fromCookbookId, or toCookbookId not found or recipeId not mapped to fromCookbookId
NULL_ARGUMENT recipeId, fromCookbookId, or toCookbookId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.