public class DockerGenUtils extends Object
| Constructor and Description |
|---|
DockerGenUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteDirectory(String path)
Deletes a given directory.
|
static String |
extractBalxName(String balxFilePath)
Extract the ballerina file name from a given file path
|
static boolean |
isBlank(String str)
Checks if a String is empty ("") or null.
|
static void |
printDebug(String msg)
Prints a debug message.
|
static void |
printError(String msg)
Prints an Error message.
|
static String |
resolveValue(String variable)
Resolve variable value from environment variable if $env{} is used.
|
static void |
writeToFile(String context,
String targetFilePath)
Write content to a File.
|
public static String extractBalxName(String balxFilePath)
balxFilePath - balx file path.public static void printError(String msg)
msg - message to be printedpublic static void printDebug(String msg)
msg - message to be printedpublic static boolean isBlank(String str)
str - the String to check, may be nullpublic static void writeToFile(String context, String targetFilePath) throws IOException
context - context of the filetargetFilePath - target file pathIOException - If an error occurs when writing to a filepublic static void deleteDirectory(String path) throws DockerPluginException
path - path to directoryDockerPluginException - if an error occurs while deletingpublic static String resolveValue(String variable) throws DockerPluginException
variable - variable valueDockerPluginExceptionCopyright © 2018 WSO2. All rights reserved.