List of usage examples for org.apache.commons.cli Option setArgName
public void setArgName(String argName)
From source file:org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher.java
static Options getCommandLineOptions() { Options options = new Options(); Option opt1 = new Option("c", "composite", true, "URI for the composite"); opt1.setArgName("compositeURI"); options.addOption(opt1);// w w w .j a v a2 s .c o m Option opt2 = new Option("n", "node", true, "URI for the node configuration"); opt2.setArgName("nodeConfigurationURI"); options.addOption(opt2); Option opt3 = new Option("config", "configuration", true, "Configuration"); opt3.setArgName("equinoxConfiguration"); options.addOption(opt3); Option opt4 = new Option("t", "ttl", true, "Time to live"); opt4.setArgName("timeToLiveInMilliseconds"); // opt4.setType(long.class); options.addOption(opt4); Option opt5 = new Option("b", "bundles", false, "OSGi bundles"); opt4.setArgName("osgiBundles"); options.addOption(opt5); return options; }
From source file:org.apache.tuscany.sca.node.launcher.NodeLauncher.java
static Options getCommandLineOptions() { Options options = new Options(); Option opt1 = new Option("c", "composite", true, "URI for the composite"); opt1.setArgName("compositeURI"); options.addOption(opt1);/*from w ww. j a v a 2 s . c om*/ Option opt2 = new Option("n", "node", true, "URI for the node configuration"); opt2.setArgName("nodeConfigurationURI"); options.addOption(opt2); Option opt3 = new Option("t", "ttl", true, "Time to live"); opt3.setArgName("timeToLiveInMilliseconds"); options.addOption(opt3); Option opt4 = new Option("s", "service", true, "Service to invoke (componentName/serviceName#operation(arg0,...,argN)"); options.addOption(opt4); return options; }
From source file:org.blue.star.plugins.check_ftp.java
public void add_command_arguments(Options options) { Option f = new Option("f", "File", true, "File to retrieve"); f.setArgName("File"); options.addOption(f);/*from w w w. j av a2 s . com*/ Option d = new Option("d", "Directory", true, "Directory Location of File"); d.setArgName("Directory"); options.addOption(d); Option u = new Option("u", "Username", true, "Username required to connect to remote FTP"); u.setArgName("Username"); options.addOption(u); Option p = new Option("p", "Password", true, "Password required to connect to remote FTP"); p.setArgName("Password"); options.addOption(p); Option P = new Option("P", "Port", true, "Port of remote FTP Service"); P.setArgName("Port"); options.addOption(P); Option m = new Option("m", "Passive Mode", false, "Utilise PASV mode for FTP session"); m.setArgName("Passive Mode"); options.addOption(m); Option V = new Option("V", "Version", false, "Print Version Information"); V.setArgName("Version"); options.addOption(V); Option h = new Option("h", "Help", false, "Display Help Information for this Plugin"); h.setArgName("Help"); options.addOption(h); }
From source file:org.blue.star.plugins.check_jmx.java
public void add_command_arguments(Options options) { Option H = new Option("H", "Host", true, "The Hostname that your MBean Server resides on."); H.setArgName("MBeanServer Host"); options.addOption(H);/*from www .jav a 2 s. c o m*/ Option P = new Option("P", "Port", true, "The Port your MBean Server listens on (default:1099)."); P.setArgName("Port"); options.addOption(P); Option J = new Option("J", "JNDI Name", true, "The JNDI name of your RMI Adaptor (default:jmx/rmi/RMIAdaptor)"); J.setArgName("JNDI Name"); options.addOption(J); Option M = new Option("M", "MBean", true, "The name of the MBean to lookup."); M.setArgName("MBean name"); options.addOption(M); Option A = new Option("A", "Attribute", true, "The Attribute of the specified MBean you wish to check."); A.setArgName("Attribute"); options.addOption(A); Option e = new Option("e", "Expect", true, "The expected value of the named MBean attribute."); e.setArgName("Expect"); options.addOption(e); Option D = new Option("D", "Domain", true, "A domain to check for on the specified MBean Server."); D.setArgName("Domain"); options.addOption(D); Option w = new Option("w", "Warning", true, "An Integer value for the specified attribute, that will cause a warning exit."); w.setArgName("Warning"); options.addOption(w); Option c = new Option("c", "Critical", true, "An Integer value for the specified attribute that will cause a critical exit."); c.setArgName("Critical"); options.addOption(c); Option C = new Option("C", "Count", true, "An Integer value for checking the number of MBeans within the MBean Server"); C.setArgName("Count"); options.addOption(C); // To be Considered.... /*Option U = new Option("U","Uptime",true,"Specify the uptime of your server. Valid options = <int>(s|m|h|d)"); U.setArgName("Uptime"); options.addOption(U);*/ }
From source file:org.blue.star.plugins.check_local_time.java
public void add_command_arguments(Options options) { Option w = new Option("w", "Warning", true, "Warning Threshold in Seconds."); w.setArgName("Warning"); options.addOption(w);/*from w w w . j a v a2s. c o m*/ Option c = new Option("c", "Critical", true, "Critical Threshold in Seconds"); c.setArgName("Critical"); options.addOption(c); Option P = new Option("P", "Port", true, "Port of remote NTP Service"); P.setArgName("Port"); options.addOption(P); Option n = new Option("n", "NTP Version", false, "Use NTP version of choice (3 or 4)"); n.setArgName("NTP Version"); options.addOption(n); Option C = new Option("C", "Check Count", true, "The number of NTP checks to perform (default=4)"); C.setArgName("Check Count"); options.addOption(C); Option V = new Option("V", "Version", false, "Print Version Information"); V.setArgName("Version"); options.addOption(V); Option h = new Option("h", "Help", false, "Display Help Information for this Plugin"); h.setArgName("Help"); options.addOption(h); }
From source file:org.blue.star.plugins.check_ping.java
public void add_command_arguments(Options options) { Option p = new Option("p", "packets", true, "number of ICMP ECHO packets to send (Default: " + DEFAULT_MAX_PACKETS + ")"); p.setArgName("packets"); options.addOption(p);/* ww w .ja v a 2 s.c o m*/ Option w = new Option("w", "warning", true, "warning threshold pair (round trip average, % packets lost)"); w.setArgName("<wrta>,<wpl>%"); options.addOption(w); Option c = new Option("c", "critical", true, "critical threshold pair (round trip average, % packets lost)"); c.setArgName("<crta>,<cpl>%"); options.addOption(c); OptionGroup group = new OptionGroup(); group.addOption(new Option("4", "use-ipv4", false, "Use IPv4 connection")); group.addOption(new Option("6", "use-ipv6", false, "Use IPv6 connection")); options.addOptionGroup(group); options.addOption("i", "interface", true, "Select the interface name to use."); }
From source file:org.blue.star.plugins.check_salesforce_api.java
public void add_command_arguments(Options options) { Option U = new Option("u", "User Name", true, "The Sales Force User Name."); U.setArgName("User Name"); options.addOption(U);/*from w w w .j a v a2 s.c om*/ Option P = new Option("p", "Password", true, "The Sales Force Password."); P.setArgName("Password"); options.addOption(P); Option W = new Option("w", "Sales Force API Url", true, "The Sales Force API Url. Typically this is not needed."); W.setArgName("Sales Force API Url"); options.addOption(W); }
From source file:org.blue.star.plugins.check_salesforce_schema.java
public void add_command_arguments(Options options) { Option U = new Option("u", "User Name", true, "The Sales Force User Name."); U.setArgName("User Name"); options.addOption(U);//from w w w . j av a 2 s . c om Option P = new Option("p", "Password", true, "The Sales Force Password."); P.setArgName("Password"); options.addOption(P); Option W = new Option("w", "Sales Force API Url", true, "The Sales Force API Url. Typically this is not needed because the Service Locator returns the correct Url."); W.setArgName("Sales Force API Url"); options.addOption(W); Option K = new Option("k", "Keep Baseline", true, "If Set this will keep the base.xml " + "file as the standard schema to always check against. This is useful in " + "production environments where the schema is only supposed to change when " + "new code is checked in. In that event just delete base.xml and the " + "check will recreate with the latest schema."); P.setArgName("Keep Base"); options.addOption(K); }
From source file:org.blue.star.plugins.utils_h.java
public static void addStandardOptions(Options options) { options.addOption("n", "nohtml", false, ""); options.addOption("L", "link", false, "show HTML in the plugin output (obsoleted by urlize)"); options.addOption("V", "version", false, "Print version information"); options.addOption("v", "verbose", false, "Increase the information displayed"); options.addOption("h", "help", false, "Print detailed help screen"); Option t = new Option("t", "timeout", true, "Milli-Seconds before connection times out (default: " + utils_h.timeout_interval + ")"); t.setArgName("Timeout"); options.addOption(t);//ww w . j ava 2 s . c o m //options.addOption( "c", "critical", true, "Specificy value which cause CRITICAL exit value"); //options.addOption( "w", "warning", true, "Spcificy value which cause WARNING exit value"); Option H = new Option("H", "hostname", true, "Specify hostname we are acting upon"); H.setArgName("Hostname"); options.addOption(H); }
From source file:org.bonitasoft.platform.setup.PlatformSetupApplication.java
private Options createOptions() { Options options = new Options(); Option systemPropertyOption = new Option("D", "specify system property to override configuration from database.properties"); systemPropertyOption.setArgName("property=value"); systemPropertyOption.setValueSeparator('='); systemPropertyOption.setArgs(2);//from ww w. j av a 2 s . co m options.addOption(systemPropertyOption); options.addOption("f", "force", false, "Force push even if critical folders will be deleted"); return options; }