public final class CliParser extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CliParser.ARGUMENT
A collection of static final strings that represent the possible command line arguments.
|
| Constructor and Description |
|---|
CliParser() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAdditionalZipExtensions()
Returns the additional Extensions if specified; otherwise null is returned.
|
String |
getApplicationName()
Returns the application name specified on the command line.
|
String |
getConnectionString()
Returns the database connection string if specified; otherwise null is returned.
|
String |
getConnectionTimeout()
Returns the connection timeout.
|
String |
getDatabaseDriverName()
Returns the database driver name if specified; otherwise null is returned.
|
String |
getDatabaseDriverPath()
Returns the database driver path if specified; otherwise null is returned.
|
String |
getDatabasePassword()
Returns the database database password if specified; otherwise null is returned.
|
String |
getDatabaseUser()
Returns the database database user name if specified; otherwise null is returned.
|
String |
getDataDirectory()
Get the value of dataDirectory.
|
String[] |
getExcludeList()
Retrieves the list of excluded file patterns specified by the 'exclude' argument.
|
String |
getNexusUrl()
Returns the url to the nexus server if one was specified.
|
String |
getPathToMono()
Returns the path to Mono for .NET Assembly analysis on non-windows systems.
|
File |
getPropertiesFile()
Returns the properties file specified on the command line.
|
String |
getProxyPassword()
Returns the proxy password.
|
String |
getProxyPort()
Returns the proxy port.
|
String |
getProxyServer()
Returns the proxy server.
|
String |
getProxyUsername()
Returns the proxy username.
|
String |
getReportDirectory()
Returns the directory to write the reports to specified on the command line.
|
String |
getReportFormat()
Returns the output format specified on the command line.
|
String[] |
getScanFiles()
Retrieves the file command line parameter(s) specified for the 'scan' argument.
|
String |
getSuppressionFile()
Returns the path to the suppression file.
|
String |
getVerboseLog()
Returns the path to the verbose log file.
|
boolean |
isArchiveDisabled()
Returns true if the disableArchive command line argument was specified.
|
boolean |
isAssemblyDisabled()
Returns true if the disableAssembly command line argument was specified.
|
boolean |
isAutoUpdate()
Checks if the auto update feature has been disabled.
|
boolean |
isCentralDisabled()
Returns true if the disableCentral command line argument was specified.
|
boolean |
isGetHelp()
Determines if the 'help' command line argument was passed in.
|
boolean |
isGetVersion()
Determines if the 'version' command line argument was passed in.
|
boolean |
isJarDisabled()
Returns true if the disableJar command line argument was specified.
|
boolean |
isNexusDisabled()
Returns true if the disableNexus command line argument was specified.
|
boolean |
isNexusUsesProxy()
Returns true if the Nexus Analyzer should use the configured proxy to connect to Nexus; otherwise false is returned.
|
boolean |
isNuspecDisabled()
Returns true if the disableNuspec command line argument was specified.
|
boolean |
isPythonDistributionDisabled()
Returns true if the disablePyDist command line argument was specified.
|
boolean |
isPythonPackageDisabled()
Returns true if the disablePyPkg command line argument was specified.
|
boolean |
isRunScan()
Determines if the 'scan' command line argument was passed in.
|
boolean |
isUpdateOnly()
Checks if the update only flag has been set.
|
void |
parse(String[] args)
Parses the arguments passed in and captures the results for later use.
|
void |
printHelp()
Displays the command line help message to the standard output.
|
void |
printVersionInfo()
Prints the manifest information to standard output.
|
public void parse(String[] args) throws FileNotFoundException, org.apache.commons.cli.ParseException
args - the command line argumentsFileNotFoundException - is thrown when a 'file' argument does not point to a file that exists.org.apache.commons.cli.ParseException - is thrown when a Parse Exception occurs.public boolean isGetVersion()
public boolean isGetHelp()
public boolean isRunScan()
public boolean isJarDisabled()
public boolean isArchiveDisabled()
public boolean isNuspecDisabled()
public boolean isAssemblyDisabled()
public boolean isPythonDistributionDisabled()
public boolean isPythonPackageDisabled()
public boolean isNexusDisabled()
public boolean isCentralDisabled()
public String getNexusUrl()
public boolean isNexusUsesProxy()
public void printHelp()
public String[] getScanFiles()
public String[] getExcludeList()
public String getReportDirectory()
public String getPathToMono()
public String getReportFormat()
public String getApplicationName()
public String getConnectionTimeout()
public String getProxyServer()
public String getProxyPort()
public String getProxyUsername()
public String getProxyPassword()
public String getDataDirectory()
public File getPropertiesFile()
public String getVerboseLog()
public String getSuppressionFile()
public void printVersionInfo()
Prints the manifest information to standard output.
public boolean isAutoUpdate()
true if auto-update is allowed; otherwise falsepublic boolean isUpdateOnly()
true if the update only flag has been set; otherwise false.public String getDatabaseDriverName()
public String getDatabaseDriverPath()
public String getConnectionString()
public String getDatabaseUser()
public String getDatabasePassword()
public String getAdditionalZipExtensions()
Copyright© 2012-15 Jeremy Long. All Rights Reserved.