public interface RecipeCookbookSession extends OsidSession
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:
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupRecipeCookbookMappings()
Tests if this user can perform lookups of recipe/cook book
ingredients.
|
IdList |
getCookbookIdsByRecipe(Id recipeId)
Gets the
Cookbook Ids mapped to a
Recipe. |
CookbookList |
getCookbooksByRecipe(Id recipeId)
Gets the
Cookbooks mapped to a Recipe. |
IdList |
getRecipeIdsByCookbook(Id cookbookId)
Gets the list of
Recipe Ids associated with a
Cookbook. |
IdList |
getRecipeIdsByCookbooks(IdList cookbookIds)
Gets the list of
Recipe Ids corresponding to a list of
Cookbooks. |
RecipeList |
getRecipesByCookbook(Id cookbookId)
Gets the list of
Recipes associated with a
Cookbook. |
RecipeList |
getRecipesByCookbooks(IdList cookbookIds)
Gets the list of
Recipe corresponding to a list of
Cookbooks. |
void |
useComparativeRecipeCookbookView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryRecipeCookbookView()
A complete view of the
Recipe and Cookbook
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canLookupRecipeCookbookMappings()
PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer lookup operations to unauthorized users. false if looking up mappings is not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeRecipeCookbookView()
mandatory - This method is must be implemented. void usePlenaryRecipeCookbookView()
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.mandatory - This method is must be implemented. IdList getRecipeIdsByCookbook(Id cookbookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Recipe Ids associated with a
Cookbook. cookbookId - Id of the Cookbook Ids NotFoundException - cookbookId is not
foundNullArgumentException - cookbookId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. RecipeList getRecipesByCookbook(Id cookbookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Recipes associated with a
Cookbook. cookbookId - Id of the Cookbook NotFoundException - cookbookId is not
foundNullArgumentException - cookbookId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. IdList getRecipeIdsByCookbooks(IdList cookbookIds) throws OperationFailedException, PermissionDeniedException
Recipe Ids corresponding to a list of
Cookbooks. cookbookIds - list of cook book Ids Ids NullArgumentException - cookbookIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. RecipeList getRecipesByCookbooks(IdList cookbookIds) throws OperationFailedException, PermissionDeniedException
Recipe corresponding to a list of
Cookbooks. cookbookIds - list of cook book Ids NullArgumentException - cookbookIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. IdList getCookbookIdsByRecipe(Id recipeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Cookbook Ids mapped to a
Recipe. recipeId - Id of a Recipe NotFoundException - recipeId is not
foundNullArgumentException - recipeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CookbookList getCookbooksByRecipe(Id recipeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Cookbooks mapped to a Recipe. recipeId - Id of a Recipe NotFoundException - recipeId is not
foundNullArgumentException - recipeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.