An ordered set of stages and steps that an app declares to guide an account through configuring itself after setup. A recipe is loaded from an app's controllers.xml and started with RecipeManager.startRecipe, which creates a Project and drives the account admin through the recipe's stages by creating a Task for each TaskRecipeStep encountered. The recipe's own name is the app instance id that provides it, not the title field on this class. Configured in XML under the element name "recipe".
Group: Recipes
Properties
| Property | Returns | Description |
|---|---|---|
| firstStage | RecipeStage | The first stage in this recipe, in configured order. |
| firstStep | RecipeStep | The first step of this recipe's first stage, which is where RecipeManager.startRecipe begins execution. |
| steps | List<RecipeStep> | Every step across all of this recipe's stages, in stage and step order. |
| taskSteps | List<TaskRecipeStep> | Every TaskRecipeStep across all of this recipe's stages, in stage and step order. |
| title | String | Display title for this recipe, shown to the account admin working through it. |
Methods
getTitle() · copy() · withTitle(String title) · withStage(RecipeStage stage) · getTaskSteps() · getSteps() · getFirstStage() · getFirstStep() · step(String taskName)
getTitle()
Returns: String
Display title for this recipe, shown to the account admin working through it.
copy()
Returns: Recipe
Creates an independent copy of this recipe, including a copy of every stage.
withTitle(String title)
Returns: Recipe
Returns a copy of this recipe with the given title.
| Parameter | Description |
|---|---|
title | the title to set on the copy |
withStage(RecipeStage stage)
Returns: Recipe
Appends the given stage to this recipe, mutating it in place rather than returning a copy.
| Parameter | Description |
|---|---|
stage | the stage to add |
getTaskSteps()
Returns: List<TaskRecipeStep>
Every TaskRecipeStep across all of this recipe's stages, in stage and step order.
getSteps()
Returns: List<RecipeStep>
Every step across all of this recipe's stages, in stage and step order.
getFirstStage()
Returns: RecipeStage
The first stage in this recipe, in configured order.
getFirstStep()
Returns: RecipeStep
The first step of this recipe's first stage, which is where RecipeManager.startRecipe begins execution.
step(String taskName)
Returns: RecipeStep
Looks up a step in this recipe, across all stages, by its id. Only valid after init has run.
| Parameter | Description |
|---|---|
taskName | the id of the step to find |