org.rhq.bundle.filetemplate.recipe
Class RecipeParser

java.lang.Object
  extended by org.rhq.bundle.filetemplate.recipe.RecipeParser

public class RecipeParser
extends Object

Parses the file template recipe.

Author:
John Mazzitelli

Constructor Summary
RecipeParser()
           
 
Method Summary
protected  HashMap<String,RecipeCommand> createRecipeCommands()
           
protected  String[] extractArguments(String[] commandLine)
           
protected  Set<String> getReplacementVariables(String cmdLine)
           
 boolean isReplaceReplacementVariables()
          If the parser should replace replacement variables with their corresponding values (as found in the parser context), true is returned.
 void parseRecipe(RecipeContext context)
           
protected  void parseRecipeCommandLine(RecipeContext context, String line)
           
 String replaceReplacementVariables(RecipeContext context, String input)
           
 void setReplaceReplacementVariables(boolean flag)
           
protected  String[] splitCommandLine(String cmdLine)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecipeParser

public RecipeParser()
Method Detail

isReplaceReplacementVariables

public boolean isReplaceReplacementVariables()
If the parser should replace replacement variables with their corresponding values (as found in the parser context), true is returned. If false then the replacement variables remain as is when they are passed to their command processor objects.

Returns:
flag

setReplaceReplacementVariables

public void setReplaceReplacementVariables(boolean flag)

parseRecipe

public void parseRecipe(RecipeContext context)
                 throws Exception
Throws:
Exception

parseRecipeCommandLine

protected void parseRecipeCommandLine(RecipeContext context,
                                      String line)
                               throws Exception
Throws:
Exception

createRecipeCommands

protected HashMap<String,RecipeCommand> createRecipeCommands()

getReplacementVariables

protected Set<String> getReplacementVariables(String cmdLine)

replaceReplacementVariables

public String replaceReplacementVariables(RecipeContext context,
                                          String input)

splitCommandLine

protected String[] splitCommandLine(String cmdLine)

extractArguments

protected String[] extractArguments(String[] commandLine)


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.