public final class ScriptUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ScriptUtils.ActionFileFilter |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,String> |
formatExportedVars(net.roboconf.core.model.beans.Instance instance)
Formats imported variables to be used in a script as environment variables.
|
static Map<String,String> |
formatImportedVars(net.roboconf.core.model.beans.Instance instance)
Formats imported variables to be used in a script as environment variables.
|
static void |
setScriptsExecutable(File fileOrDir)
Recursively sets all files and directories executable, starting from a file or base directory.
|
public static Map<String,String> formatExportedVars(net.roboconf.core.model.beans.Instance instance)
instance - the instance whose exported variables must be formattedpublic static Map<String,String> formatImportedVars(net.roboconf.core.model.beans.Instance instance)
Simple vars are formatted a simple way ("myVarName=varValue"), while imported variables must be formatted in a more complex way.
Taking the example of Apache needing workers in the example Apache-Tomcat-SQL, we chose to adopt the following style:
========================== "workers_size=3" "workers_0_name=tomcat1" "workers_0_ip=127.0.0.1" "workers_0_portAJP=8009" "workers_1_name=tomcat2" ..... "workers_2_portAJP=8010" ==========================With this way of formatting vars, the script will know everything it needs to use these vars
instance - the instance whose imports must be formattedpublic static void setScriptsExecutable(File fileOrDir)
f - a file to set executable or a base directoryCopyright © 2017. All rights reserved.