Interface RecipeSearchSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, RecipeQuerySession

public interface RecipeSearchSession extends 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 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. The RecipeSearchOrder is supplied to a RecipeSearch to 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 query
      recipeSearch - the recipe search
      Returns:
      the recipe search results
      Throws:
      NullArgumentException - recipeQuery or recipeSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - recipeQuery or recipeSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getRecipeQueryFromInspector

      RecipeQuery getRecipeQueryFromInspector(RecipeQueryInspector recipeQueryInspector)
      Gets a recipe query from an inspector. The inspector is available from a RecipeSearchResults .
      Parameters:
      recipeQueryInspector - a recipe query inspector
      Returns:
      the recipe query
      Throws:
      NullArgumentException - recipeQueryInspector is null
      UnsupportedException - recipeQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.