edu.jhu.oose.collegechef.controller
Class RecipeResult

java.lang.Object
  extended by edu.jhu.oose.collegechef.controller.RateableCommentablePage
      extended by edu.jhu.oose.collegechef.controller.RecipeResult

public class RecipeResult
extends RateableCommentablePage

Backing bean for the recipe page


Constructor Summary
RecipeResult()
          Default constructor for a RecipeResult object
 
Method Summary
 java.lang.String getChefId()
          Method to get the ID of the chef
 java.util.List<Equipment> getEquipment()
          Method to get the equipment list
 java.lang.String getHeaderText()
          Method to view the recipe header
 java.util.List<Ingredient> getIngredients()
          Method to get the ingredients list
 boolean getIsChefViewingOwnRecipe()
          Method to determine if the chef is viewing their own recipe
 Recipe getRecipe()
          Method to return the Recipe associated with this object
 java.lang.String getRecipeId()
          Method to get the ID of the requirement
 boolean getRenderRatingOption()
          This method is called by recipe.xhtml to determine whether or not to render the panel to rate the recipe.
 java.util.List<Recipe> getSuppRecipes()
          Method to get the supplemental recipes list
 void init()
          Finds the recipe based on the recipeId
 void setRecipeId(java.lang.String recipeId)
          Method to set the recipe ID
 void sortRequirements()
          Method to separate the requirements into an Ingredients and Equipment list
 java.lang.String storeSelectedChef()
          Stores the selected chef to be viewed into the session map.
 
Methods inherited from class edu.jhu.oose.collegechef.controller.RateableCommentablePage
addComment, addRating, getHasChefAlreadyRated, getIsChefLoggedIn, getNewComment, getNewRating, getNumComments, getRatingSelectItems, setNewComment, setNewRating
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecipeResult

public RecipeResult()
Default constructor for a RecipeResult object

Method Detail

getRecipe

public Recipe getRecipe()
Method to return the Recipe associated with this object

Returns:
the Recipe associated with this object

getIsChefViewingOwnRecipe

public boolean getIsChefViewingOwnRecipe()
Method to determine if the chef is viewing their own recipe

Returns:
whether or not the chef is viewing their own recipe

getRenderRatingOption

public boolean getRenderRatingOption()
This method is called by recipe.xhtml to determine whether or not to render the panel to rate the recipe.

Returns:
whether or not the panel should be displayed

sortRequirements

public void sortRequirements()
Method to separate the requirements into an Ingredients and Equipment list


getIngredients

public java.util.List<Ingredient> getIngredients()
Method to get the ingredients list

Returns:
the ingredients list

getEquipment

public java.util.List<Equipment> getEquipment()
Method to get the equipment list

Returns:
the equipment list

getSuppRecipes

public java.util.List<Recipe> getSuppRecipes()
Method to get the supplemental recipes list

Returns:
the supplemental recipes list

getHeaderText

public java.lang.String getHeaderText()
Method to view the recipe header

Returns:
the name of the recipe

getChefId

public java.lang.String getChefId()
Method to get the ID of the chef

Returns:
the chef's ID

getRecipeId

public java.lang.String getRecipeId()
Method to get the ID of the requirement

Returns:
the requirement's ID

setRecipeId

public void setRecipeId(java.lang.String recipeId)
Method to set the recipe ID

Parameters:
recipeId - the recipe ID

init

@PostConstruct
public void init()
Finds the recipe based on the recipeId


storeSelectedChef

public java.lang.String storeSelectedChef()
Stores the selected chef to be viewed into the session map. See storeSelectedRecipe()

Returns:
the string mapped to the navigation rule for going to a chef's page