Package com.axway.apim.lib
Class CLIOptions
- java.lang.Object
-
- com.axway.apim.lib.CLIOptions
-
- Direct Known Subclasses:
CoreCLIOptions,StandardExportCLIOptions,StandardImportCLIOptions
public abstract class CLIOptions extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringexecutable
-
Constructor Summary
Constructors Modifier Constructor Description protectedCLIOptions()protectedCLIOptions(String[] args)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddHelpAndVersion()voidaddOption(org.apache.commons.cli.Option option)abstract voidaddOptions()protected StringgetAppName()protected StringgetBinaryName()EnvironmentPropertiesgetEnvProperties()abstract ParametersgetParams()StringgetValue(String key)booleanhasOption(String key)voidparse()Parse will use all declared options to create the cmd AND additionally it uses internalOptions to create internalCmd.voidprintUsage(String message, String[] args)voidshowReturnCodes()This is called automatically by the constructor to see the list of return-Codes.
-
-
-
Field Detail
-
executable
protected String executable
-
-
Constructor Detail
-
CLIOptions
protected CLIOptions()
-
CLIOptions
protected CLIOptions(String[] args)
-
-
Method Detail
-
getParams
public abstract Parameters getParams() throws AppException
- Throws:
AppException
-
addOptions
public abstract void addOptions()
-
addHelpAndVersion
public void addHelpAndVersion()
-
hasOption
public boolean hasOption(String key)
-
parse
public void parse() throws AppExceptionParse will use all declared options to create the cmd AND additionally it uses internalOptions to create internalCmd. Both is used to create the ultimately required CommandParameters which contains a full set of options.- Throws:
AppException
-
getAppName
protected String getAppName()
-
addOption
public void addOption(org.apache.commons.cli.Option option)
-
getBinaryName
protected String getBinaryName()
- Returns:
- name of the binary to call (.sh, .bat or .exe when using choco)
-
showReturnCodes
public void showReturnCodes()
This is called automatically by the constructor to see the list of return-Codes.
-
getEnvProperties
public EnvironmentProperties getEnvProperties()
-
-