| Modifier and Type | Field and Description |
|---|---|
static String[] |
CLI_PARAM_AUTHORIZATION_TOKEN |
static String[] |
CLI_PARAM_DEFAULT_DATE_FOREIGN_KEY |
static String[] |
CLI_PARAM_EXECUTE |
static String[] |
CLI_PARAM_FTP_HOST |
static String[] |
CLI_PARAM_FTP_PORT |
static String[] |
CLI_PARAM_HELP |
static String[] |
CLI_PARAM_HOST |
static String[] |
CLI_PARAM_HTTP_PORT |
static String[] |
CLI_PARAM_HTTP_PROXY_HOST |
static String[] |
CLI_PARAM_HTTP_PROXY_PASSWORD |
static String[] |
CLI_PARAM_HTTP_PROXY_PORT |
static String[] |
CLI_PARAM_HTTP_PROXY_USERNAME |
static String[] |
CLI_PARAM_INSECURE |
static String[] |
CLI_PARAM_PASSWORD |
static String[] |
CLI_PARAM_PROJECT |
static String[] |
CLI_PARAM_PROTO |
static String |
CLI_PARAM_SCRIPT |
static String[] |
CLI_PARAM_TIMEZONE |
static String[] |
CLI_PARAM_USERNAME |
static String[] |
CLI_PARAM_VERSION |
static org.apache.commons.cli.Option[] |
Options |
| Constructor and Description |
|---|
GdcDI(org.apache.commons.cli.CommandLine ln,
Properties defaults) |
| Modifier and Type | Method and Description |
|---|---|
static String |
commandsHelp()
Returns the help for commands
|
void |
execute(File scriptFile)
Executes the commands in file
|
void |
execute(String commandsStr)
Executes the commands in String
|
static void |
main(String[] args)
The main CLI processor
|
protected CliParams |
parse(org.apache.commons.cli.CommandLine ln,
Properties defaults)
Parse and validate the cli arguments
|
protected static List<Command> |
parseCmd(String cmd)
Parses the commands
|
boolean |
processCommand(Command c,
CliParams cli,
ProcessingContext ctx)
Processes single command
|
public static String[] CLI_PARAM_HELP
public static String[] CLI_PARAM_USERNAME
public static String[] CLI_PARAM_PASSWORD
public static String[] CLI_PARAM_HOST
public static String[] CLI_PARAM_FTP_HOST
public static String[] CLI_PARAM_PROJECT
public static String[] CLI_PARAM_PROTO
public static String[] CLI_PARAM_INSECURE
public static String[] CLI_PARAM_EXECUTE
public static String[] CLI_PARAM_VERSION
public static String[] CLI_PARAM_DEFAULT_DATE_FOREIGN_KEY
public static String[] CLI_PARAM_HTTP_PROXY_HOST
public static String[] CLI_PARAM_HTTP_PROXY_PORT
public static String[] CLI_PARAM_HTTP_PORT
public static String[] CLI_PARAM_FTP_PORT
public static String[] CLI_PARAM_HTTP_PROXY_USERNAME
public static String[] CLI_PARAM_HTTP_PROXY_PASSWORD
public static String[] CLI_PARAM_TIMEZONE
public static String[] CLI_PARAM_AUTHORIZATION_TOKEN
public static String CLI_PARAM_SCRIPT
public static org.apache.commons.cli.Option[] Options
public GdcDI(org.apache.commons.cli.CommandLine ln,
Properties defaults)
protected CliParams parse(org.apache.commons.cli.CommandLine ln, Properties defaults) throws InvalidArgumentException
ln - parsed command lineInvalidArgumentException - in case of nonexistent or incorrect cli argspublic void execute(String commandsStr)
commandsStr - commands stringpublic void execute(File scriptFile) throws IOException
scriptFile - file with commandsIOException - in case of an IO issuepublic static String commandsHelp()
public static void main(String[] args)
args - command line argumentprotected static List<Command> parseCmd(String cmd) throws InvalidCommandException
cmd - commands stringInvalidCommandException - in case there is an invalid commandpublic boolean processCommand(Command c, CliParams cli, ProcessingContext ctx) throws ProcessingException
processCommand in interface Executorc - command to be processedcli - parameters (commandline params)ctx - processing contextProcessingException - in case of issues during the command processingCopyright © 2014. All rights reserved.