Interface RecipeSearchSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, RecipeQuerySession
This session provides methods for searching among Recipe
objects. The search query is constructed using the RecipeQuery .
getRecipesByQuery() is the basic search method and returns a list
of Recipes . A more advanced search may be performed with
getRecipesBySearch() .It accepts a RecipeSearch in addition to
the query for the purpose of specifying additional options affecting the
entire search, such as ordering. getRecipesBySearch() returns a
RecipeSearchResults that can be used to access the resulting
RecipeList or be used to perform a search within the result set
through RecipeSearch .
This session defines views that offer differing behaviors for searching.
- federated cookbook view: searches include recipes in cookbooks of which this cookbook is an ancestor in the cookbook hierarchy
- isolated cookbook view: searches are restricted to recipes in this cookbooks
Recipes may have a query record indicated by their respective record
types. The query record is accessed via the RecipeQuery .
-
Method Summary
Modifier and TypeMethodDescriptiongetRecipeQueryFromInspector(RecipeQueryInspector recipeQueryInspector) Gets a recipe query from an inspector.getRecipesBySearch(RecipeQuery recipeQuery, RecipeSearch recipeSearch) Gets the search results matching the given search query using the given search.Gets a recipe search.Gets a recipe search order.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.Methods inherited from interface RecipeQuerySession
canSearchRecipes, getCookbook, getCookbookId, getRecipeQuery, getRecipesByQuery, useFederatedCookbookView, useIsolatedCookbookViewModifier and TypeMethodDescriptionbooleanTests if this user can performRecipelookups.Gets theCookbookassociated with this session.Gets theCookbookIdassociated with this session.Gets a recipe query.getRecipesByQuery(RecipeQuery recipeQuery) Gets a list ofRecipesmatching the given recipe query.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.
-
Method Details
-
getRecipeSearch
RecipeSearch getRecipeSearch()Gets a recipe search.- Returns:
- the recipe search
- Compliance:
mandatory- This method must be implemented.
-
getRecipeSearchOrder
RecipeSearchOrder getRecipeSearchOrder()Gets a recipe search order. TheRecipeSearchOrderis supplied to aRecipeSearchto specify the ordering of results.- Returns:
- the recipe search order
- Compliance:
mandatory- This method must be implemented.
-
getRecipesBySearch
RecipeSearchResults getRecipesBySearch(RecipeQuery recipeQuery, RecipeSearch recipeSearch) throws OperationFailedException, PermissionDeniedException Gets the search results matching the given search query using the given search.- Parameters:
recipeQuery- the recipe queryrecipeSearch- the recipe search- Returns:
- the recipe search results
- Throws:
NullArgumentException-recipeQueryorrecipeSearchisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-recipeQueryorrecipeSearchis not of this service- Compliance:
mandatory- This method must be implemented.
-
getRecipeQueryFromInspector
Gets a recipe query from an inspector. The inspector is available from aRecipeSearchResults.- Parameters:
recipeQueryInspector- a recipe query inspector- Returns:
- the recipe query
- Throws:
NullArgumentException-recipeQueryInspectorisnullUnsupportedException-recipeQueryInspectoris not of this service- Compliance:
mandatory- This method must be implemented.
-