public final class Misc
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
combinePaths(java.util.List<java.lang.String> paths)
Given a list of strings, concatenate them to form a file system
path
|
protected static boolean |
isURL(java.lang.String pathString)
Given a string, check if it is a URL - URL, according to our definition is
the presence of two consecutive forward slashes //
|
static java.lang.String |
substitute(Config config,
java.lang.String pathString)
Given a static config map, substitute occurrences of ${HERON_*} variables
in the provided path string
|
static java.lang.String |
substitute(java.lang.String heronHome,
java.lang.String pathString)
Given a string representing heron home, substitute occurrences of
${HERON_HOME} in the provided path.
|
static java.lang.String |
substitute(java.lang.String heronHome,
java.lang.String configPath,
java.lang.String pathString)
Given strings representing heron home and heron conf, substitute occurrences of
${HERON_HOME} and ${HERON_CONF} in the provided path.
|
static java.lang.String |
substituteSandbox(java.lang.String heronSandboxHome,
java.lang.String pathString)
Given a string representing heron sandbox home, substitute occurrences of
${HERON_SANDBOX_HOME} in the provided path.
|
static java.lang.String |
substituteSandbox(java.lang.String heronSandboxHome,
java.lang.String configPath,
java.lang.String pathString)
Given strings representing heron home and heron conf, substitute occurrences of
${HERON_SANDBOX_HOME} and ${HERON_SANDBOX_CONF} in the provided path.
|
public static java.lang.String substitute(java.lang.String heronHome, java.lang.String pathString)
heronHome
- string representing a path to heron homepathString
- string representing a path including ${HERON_HOME}public static java.lang.String substitute(java.lang.String heronHome, java.lang.String configPath, java.lang.String pathString)
heronHome
- string representing a path heron homeconfigPath
- string representing a path to heron confpathString
- string representing a path including ${HERON_HOME}/${HERON_CONF}public static java.lang.String substituteSandbox(java.lang.String heronSandboxHome, java.lang.String pathString)
heronSandboxHome
- string representing a path to heron sandbox homepathString
- string representing a path including ${HERON_SANDBOX_HOME}public static java.lang.String substituteSandbox(java.lang.String heronSandboxHome, java.lang.String configPath, java.lang.String pathString)
heronSandboxHome
- string representing a path heron sandbox homeconfigPath
- string representing a path to heron confpathString
- string representing a path including ${HERON_SANDBOX_HOME}/${HERON_SANDBOX_CONF}protected static boolean isURL(java.lang.String pathString)
pathString
- string representing a pathpublic static java.lang.String substitute(Config config, java.lang.String pathString)
config
- a static map config object of key value pairspathString
- string representing a path including ${HERON_*} variablesprotected static java.lang.String combinePaths(java.util.List<java.lang.String> paths)
paths
- a list of strings to be included in the path