|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jclouds.scriptbuilder.ScriptBuilder
public class ScriptBuilder
Creates a shell script.
Constructor Summary | |
---|---|
ScriptBuilder()
|
Method Summary | |
---|---|
void |
accept(StatementVisitor visitor)
|
ScriptBuilder |
addEnvironmentVariableScope(String scopeName,
Map<String,String> variables)
Exports a variable inside the script |
ScriptBuilder |
addStatement(Statement statement)
|
static Statement |
call(String fn,
String... args)
|
static Statement |
findPid(String pid)
|
static Statement |
forget(String instanceName,
String script,
String logDir)
|
Iterable<String> |
functionDependencies(OsFamily family)
|
String |
render(OsFamily osFamily)
builds the shell script, by adding the following shell declaration line variable exports case/switch |
static Map<String,String> |
resolveFunctionDependenciesForStatements(Map<String,String> knownFunctions,
Iterable<Statement> statements,
OsFamily osFamily)
|
ScriptBuilder |
unsetEnvironmentVariable(String name)
Unsets a variable to ensure it is set within the script. |
static void |
writeFunctions(Map<String,String> functionsToWrite,
OsFamily osFamily,
StringBuilder builder)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptBuilder()
Method Detail |
---|
public ScriptBuilder addStatement(Statement statement)
public ScriptBuilder unsetEnvironmentVariable(String name)
public ScriptBuilder addEnvironmentVariableScope(String scopeName, Map<String,String> variables)
public static Statement forget(String instanceName, String script, String logDir)
public static Statement findPid(String pid)
public static Statement call(String fn, String... args)
public String render(OsFamily osFamily)
render
in interface Statement
osFamily
- whether to write a cmd or bash script.public static void writeFunctions(Map<String,String> functionsToWrite, OsFamily osFamily, StringBuilder builder)
public static Map<String,String> resolveFunctionDependenciesForStatements(Map<String,String> knownFunctions, Iterable<Statement> statements, OsFamily osFamily)
public Iterable<String> functionDependencies(OsFamily family)
functionDependencies
in interface Statement
public void accept(StatementVisitor visitor)
accept
in interface AcceptsStatementVisitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |