Package de.foellix.aql.helper
Class CLIHelper
java.lang.Object
de.foellix.aql.helper.CLIHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidChecks if the AQL-System or tool using is, is run from the correct location.static StringescapeChars(String str) Escapes "$" symbolsstatic booleanevaluateConfig(String config) static intevaluateLogLevel(String debug) static intevaluateLogLevel(String debug, boolean setImmediately) static booleanevaluateRules(String rules) static longevaluateTimeout(String readTimeout) Return the timeout in secondsstatic intevaluateTimeoutMode(String readTimeoutMode) Helps dealing with timeouts set in config and via launch parameter.static javafx.stage.StagegetStage()Get stage for offering the Configuration wizardstatic StringremoveQuotesFromFileString(String fileString) static StringReplaces %QUOTE% with Quotes (").static String[]replaceNeedlesWithQuotes(String[] args) Replaces %QUOTE% with Quotes (").static StringReplaces Quotes (") with %QUOTE%.static voidsetStage(javafx.stage.Stage stage) Sets an alternative stage for offering the Configuration wizard
-
Field Details
-
initialConfigAvailable
public static boolean initialConfigAvailable -
lastConfigFileHashLoaded
-
-
Constructor Details
-
CLIHelper
public CLIHelper()
-
-
Method Details
-
evaluateLogLevel
-
evaluateLogLevel
-
evaluateConfig
-
evaluateRules
-
evaluateTimeout
Return the timeout in seconds- Parameters:
readTimeout- Examples: 100s, 5m, 1h- Returns:
- the timeout in seconds
-
evaluateTimeoutMode
Helps dealing with timeouts set in config and via launch parameter. Returns the timeout mode which might be max, min or override.- Parameters:
readTimeoutMode- the launch parameter read.- Returns:
- the mode detected. Returns -1 if no mode selection was given.
-
checkResources
public static void checkResources()Checks if the AQL-System or tool using is, is run from the correct location. If not, it terminates the execution. -
getStage
public static javafx.stage.Stage getStage()Get stage for offering the Configuration wizard- Returns:
- the stage offered
-
setStage
public static void setStage(javafx.stage.Stage stage) Sets an alternative stage for offering the Configuration wizard- Parameters:
stage- the stage offered
-
replaceQuotesWithNeedles
Replaces Quotes (") with %QUOTE%.- Parameters:
arg-- Returns:
-
replaceNeedlesWithQuotes
Replaces %QUOTE% with Quotes (").- Parameters:
arg-- Returns:
-
replaceNeedlesWithQuotes
Replaces %QUOTE% with Quotes (").- Parameters:
args-- Returns:
-
removeQuotesFromFileString
-
escapeChars
Escapes "$" symbols- Parameters:
str- String with "$" symbols- Returns:
- same String but "$" is replaced by "\$"
-