public class Cli
extends java.lang.Object
This class handles command line options.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
exportErrorMsg |
private static java.lang.String |
exportPathAbc |
private static java.lang.String |
exportPathAlda |
private static java.lang.String |
exportPathAudio |
private static java.lang.String |
exportPathLy |
private static java.lang.String |
exportPathMidi |
private static java.lang.String |
exportPathMpl |
private static java.lang.String |
exportPathMscore |
static boolean |
exportToStdout |
private static java.lang.String |
importPathAbc |
private static java.lang.String |
importPathAlda |
private static java.lang.String |
importPathLy |
private static java.lang.String |
importPathMidi |
private static java.lang.String |
importPathMpl |
private static java.lang.String |
importPathMscore |
static boolean |
isCliMode
CLI mode (command line interface) without GUI - e.g. for unit tests
|
static boolean |
isExport |
static boolean |
isImport |
static boolean |
keepAlive
Determins if the process shall stay alive (or exit) after all cli-related work is done.
|
private static java.lang.String |
soundbankPath |
static boolean |
useLocalConfig
Determins if the local config file shall be used or not.
|
static boolean |
useSoundbank |
Modifier | Constructor and Description |
---|---|
private |
Cli()
This class is only used statically so a public constructor is not needed.
|
Modifier and Type | Method and Description |
---|---|
static void |
exportFile(UiController uiController)
Imports a file due to a command line argument.
|
private static void |
help(boolean isHelpRequested,
java.lang.String message)
Prints a hepl message and exits.
|
static void |
importFile(UiController uiController)
Imports a file due to a command line argument.
|
static void |
loadSoundbank(UiController uiController)
Loads a soundbank file or URL due to a command line argument.
|
static void |
parseArguments(java.lang.String[] args)
Parses command line arguments.
|
public static boolean isCliMode
CLI mode (command line interface) without GUI - e.g. for unit tests
public static boolean useLocalConfig
Determins if the local config file shall be used or not.
public static boolean keepAlive
Determins if the process shall stay alive (or exit) after all cli-related work is done.
public static boolean useSoundbank
public static boolean isImport
public static boolean isExport
public static boolean exportToStdout
public static java.lang.String exportErrorMsg
private static java.lang.String soundbankPath
private static java.lang.String importPathMpl
private static java.lang.String importPathMidi
private static java.lang.String importPathAlda
private static java.lang.String importPathAbc
private static java.lang.String importPathLy
private static java.lang.String importPathMscore
private static java.lang.String exportPathMpl
private static java.lang.String exportPathMidi
private static java.lang.String exportPathAlda
private static java.lang.String exportPathAudio
private static java.lang.String exportPathAbc
private static java.lang.String exportPathLy
private static java.lang.String exportPathMscore
private Cli()
This class is only used statically so a public constructor is not needed.
public static void parseArguments(java.lang.String[] args)
Parses command line arguments.
args
- command line arguments.private static void help(boolean isHelpRequested, java.lang.String message)
Prints a hepl message and exits. The exit code is 0, if called with --help
. Otherwise the parameters are regarded as erroneous and the exit code is 64.
isHelpRequested
- true, if called with --help
on the command linemessage
- error messagepublic static void loadSoundbank(UiController uiController)
Loads a soundbank file or URL due to a command line argument.
uiController
- the UI controllerpublic static void importFile(UiController uiController)
Imports a file due to a command line argument.
uiController
- the UI controllerpublic static void exportFile(UiController uiController)
Imports a file due to a command line argument.
uiController
- the UI controller