public class CliCore extends Object
ExecutableCliCommand
s to a
CliCommands
-object.Modifier and Type | Field and Description |
---|---|
static int |
COMMAND_EXECUTION_ERROR |
static int |
COMMAND_INVALID |
protected CliCommands |
commands |
static int |
DATABASE_ERROR |
static int |
OPTION_INVALID |
static int |
OPTION_MISSING |
static int |
STATUS_OK |
Constructor and Description |
---|
CliCore() |
Modifier and Type | Method and Description |
---|---|
int |
getStatus() |
int |
perform(Properties cliConfig)
Performs a cli command
|
boolean |
processCommand(String[] args)
Parses the given command line arguments and sets the state for this
CliCore . |
void |
setContext(org.springframework.context.ApplicationContext platformContext) |
public static final int STATUS_OK
public static final int DATABASE_ERROR
public static final int COMMAND_EXECUTION_ERROR
public static final int COMMAND_INVALID
public static final int OPTION_INVALID
public static final int OPTION_MISSING
protected CliCommands commands
public int perform(Properties cliConfig)
cliConfig
- the properties read from "/conf/appNG.properties"public void setContext(org.springframework.context.ApplicationContext platformContext)
public boolean processCommand(String[] args) throws com.beust.jcommander.ParameterException
CliCore
. Must be called before
perform(Properties)
. Only if this method returns true
, it is reasonable to call
perform(Properties)
.args
- the command line argumentstrue
if the given arguments have been parsed to an ExecutableCliCommand
and
perform(Properties)
should be called, false
otherwisecom.beust.jcommander.ParameterException
getStatus()
public int getStatus()
Copyright © 2011–2020 aiticon GmbH. All rights reserved.