|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.rhq.bundle.filetemplate.recipe.RecipeContext
public class RecipeContext
Contains information that is gleened from a recipe during and after it is parsed.
| Constructor Summary | |
|---|---|
RecipeContext(String recipe)
|
|
| Method Summary | |
|---|---|
void |
addCommand(String exe,
List<String> exeArgs)
Adds a command that the recipe wants invoked. |
void |
addDeployFile(String filename,
String directory)
|
void |
addFile(String source,
String destination)
|
void |
addRealizedFile(String file)
|
void |
addReplacementVariables(Set<String> replacementVariables)
|
void |
addReplacementVariableValue(String name,
String value)
Adds the given name/value pair to the set of replacement variable values associated with this context. |
void |
addScript(String exe,
List<String> exeArgs)
Adds a script that the recipe wants invoked. |
void |
assignDefaultValueToReplacementVariable(String replacementVariable,
String defaultValue)
If a replacement varaible is known to have a default value, call this to set that default value. |
Map<String,String> |
getDeployFiles()
Returns all the files that are to be deployed. |
org.rhq.core.util.updater.DeploymentProperties |
getDeploymentProperties()
Returns the deployment properties as defined in the recipe. |
Map<String,String> |
getFiles()
Returns all the files that are strictly to be copied to some location. |
RecipeParser |
getParser()
If this context is currently in use by a parser, this will be the reference to that parser. |
Set<String> |
getRealizedFiles()
Returns the pathnames of all files that are to be realized (meaning, those that should have replacement variables replaced). |
String |
getRecipe()
The full recipe that this context represents. |
Map<String,String> |
getReplacementVariableDefaultValues()
Returns a map keyed on replacement variables whose values are the default values for the replacement variables. |
Set<String> |
getReplacementVariables()
The names of all replacement variables that are found in the recipe. |
org.rhq.core.domain.configuration.Configuration |
getReplacementVariableValues()
If known, the returned value will contain values that are to be used to replace replacement variables found in the recipe. |
Set<String> |
getScriptFiles()
Returns a set of all the names of scripts found in the recipe. |
boolean |
isUnknownRecipe()
Returns true if the recipe content does not look like a valid type that can be at least attempted to be parsed. |
void |
setParser(RecipeParser parser)
|
void |
setReplacementVariableValues(org.rhq.core.domain.configuration.Configuration configuration)
|
void |
setUnknownRecipe(boolean unknownRecipe)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RecipeContext(String recipe)
| Method Detail |
|---|
public RecipeParser getParser()
public void setParser(RecipeParser parser)
public boolean isUnknownRecipe()
public void setUnknownRecipe(boolean unknownRecipe)
public String getRecipe()
public org.rhq.core.util.updater.DeploymentProperties getDeploymentProperties()
public Map<String,String> getDeployFiles()
public void addDeployFile(String filename,
String directory)
public Map<String,String> getFiles()
public void addFile(String source,
String destination)
public Set<String> getRealizedFiles()
public void addRealizedFile(String file)
public Set<String> getReplacementVariables()
public void addReplacementVariables(Set<String> replacementVariables)
public void assignDefaultValueToReplacementVariable(String replacementVariable,
String defaultValue)
replacementVariable - the variable whose default is being setdefaultValue - the value of the default for the given replacement variablepublic Map<String,String> getReplacementVariableDefaultValues()
getReplacementVariables() will have an associated entry
in the returned map (that is, not all variables have a default value).
public org.rhq.core.domain.configuration.Configuration getReplacementVariableValues()
public void setReplacementVariableValues(org.rhq.core.domain.configuration.Configuration configuration)
public void addReplacementVariableValue(String name,
String value)
name - value - public Set<String> getScriptFiles()
public void addScript(String exe,
List<String> exeArgs)
exe - the script executableexeArgs - the arguments to pass to the script
public void addCommand(String exe,
List<String> exeArgs)
cmd - the main executable that this command wants to executeexeArgs - the arguments to pass to the command executablepublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||