public class CommandLineProcessor extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CommandLineProcessor.DatasourceType |
static class |
CommandLineProcessor.RequestType |
static class |
CommandLineProcessor.ResourceType |
Modifier | Constructor and Description |
---|---|
protected |
CommandLineProcessor(String[] args)
Parses the command line and handles the situation where it isn't a valid import or export or rest request
|
Modifier and Type | Method and Description |
---|---|
static String |
getErrorMessage() |
static Exception |
getException()
Returns information about any exception encountered (if one was generated)
|
protected String |
getOptionValue(String option,
boolean required,
boolean emptyOk)
Returns the option value from the command line
|
protected IUnifiedRepository |
getRepository()
Why does this return a web service? Going directly to the IUnifiedRepository requires the following:
PentahoSessionHolder setup including password and tenant ID.
|
protected CommandLineProcessor.RequestType |
getRequestType() |
static void |
main(String[] args)
How this class is executed from the command line.
|
protected static void |
printHelp() |
void |
setRepository(IUnifiedRepository repository) |
protected CommandLineProcessor(String[] args) throws org.apache.commons.cli.ParseException
args
- the command line argumentsorg.apache.commons.cli.ParseException
- indicates that neither (or both) an import and/or export have been requestpublic static void main(String[] args) throws Exception
args
- Exception
public static Exception getException()
Exception
that was generated, or null
if none was generatedprotected CommandLineProcessor.RequestType getRequestType()
public void setRepository(IUnifiedRepository repository)
protected IUnifiedRepository getRepository() throws org.apache.commons.cli.ParseException
org.apache.commons.cli.ParseException
protected String getOptionValue(String option, boolean required, boolean emptyOk) throws org.apache.commons.cli.ParseException
option
- the option whose value should be returned (NOTE: null
will be returned if the option was not
provided)required
- indicates if the option is requiredemptyOk
- indicates if a blank value is acceptablenull
if none was providedorg.apache.commons.cli.ParseException
- indicates the required or non-blank value was not providedpublic static String getErrorMessage()
protected static void printHelp()
Copyright © 2002–2017 Pentaho Corporation. All rights reserved.