Example usage for org.apache.commons.cli Option Option

List of usage examples for org.apache.commons.cli Option Option

Introduction

In this page you can find the example usage for org.apache.commons.cli Option Option.

Prototype

public Option(String opt, String longOpt, boolean hasArg, String description) throws IllegalArgumentException 

Source Link

Document

Creates an Option using the specified parameters.

Usage

From source file:com.alibaba.rocketmq.tools.command.broker.SendMsgStatusCommand.java

@Override
public Options buildCommandlineOptions(Options options) {
    Option opt = new Option("b", "brokerName", true, "Broker Name");
    opt.setRequired(true);//  ww w  .j  a  va  2 s .  c  om
    options.addOption(opt);

    opt = new Option("s", "messageSize", true, "Message Size, Default: 128");
    opt.setRequired(false);
    options.addOption(opt);

    opt = new Option("c", "count", true, "send message count, Default: 50");
    opt.setRequired(false);
    options.addOption(opt);

    return options;
}

From source file:com.netscape.cmstools.tps.profile.ProfileMappingShowCLI.java

public void createOptions() {
    Option option = new Option(null, "output", true, "Output file to store profile mapping properties.");
    option.setArgName("file");
    options.addOption(option);/*  w w  w  .  ja  va  2s .  c om*/
}

From source file:com.netscape.cmstools.tps.profile.ProfileModifyCLI.java

public void createOptions() {
    Option option = new Option(null, "action", true,
            "Action: update (default), submit, cancel, approve, reject, enable, disable.");
    option.setArgName("action");
    options.addOption(option);// ww  w  .  ja  v  a2 s  . c  om

    option = new Option(null, "input", true, "Input file containing profile properties.");
    option.setArgName("file");
    options.addOption(option);
}

From source file:com.netscape.cmstools.tps.authenticator.AuthenticatorShowCLI.java

public void createOptions() {
    Option option = new Option(null, "output", true, "Output file to store authenticator properties.");
    option.setArgName("file");
    options.addOption(option);//  www. j  a  va  2  s . c o m
}

From source file:com.netscape.cmstools.tps.connector.ConnectorAddCLI.java

public void createOptions() {
    Option option = new Option(null, "input", true, "Input file containing connector properties.");
    option.setArgName("file");
    option.setRequired(true);//from  w w  w . j ava2  s.  c o  m
    options.addOption(option);
}

From source file:com.netscape.cmstools.tps.token.TokenFindCLI.java

public void createOptions() {
    Option option = new Option(null, "token", true, "Token ID");
    option.setArgName("token ID");
    options.addOption(option);/*from   w  ww. j  a v a2  s.  c  o m*/

    option = new Option(null, "user", true, "User ID");
    option.setArgName("user ID");
    options.addOption(option);

    option = new Option(null, "type", true, "Token type");
    option.setArgName("type");
    options.addOption(option);

    option = new Option(null, "status", true, "Token status");
    option.setArgName("status");
    options.addOption(option);

    option = new Option(null, "start", true, "Page start");
    option.setArgName("start");
    options.addOption(option);

    option = new Option(null, "size", true, "Page size");
    option.setArgName("size");
    options.addOption(option);
}

From source file:com.netscape.cmstools.logging.AuditModifyCLI.java

public void createOptions() {
    Option option = new Option(null, "action", true, "Action: enable, disable.");
    option.setArgName("action");
    options.addOption(option);//  w w w.j a va2 s. com

    option = new Option(null, "input", true, "Input file containing audit configuration.");
    option.setArgName("file");
    options.addOption(option);

    option = new Option(null, "output", true, "Output file to store audit configuration.");
    option.setArgName("file");
    options.addOption(option);
}

From source file:com.netscape.cmstools.pkcs12.PKCS12CertFindCLI.java

public void createOptions() {
    Option option = new Option(null, "pkcs12-file", true, "PKCS #12 file");
    option.setArgName("path");
    options.addOption(option);/*  ww w .j  a  va 2s . c  o m*/

    option = new Option(null, "pkcs12-password", true, "PKCS #12 password");
    option.setArgName("password");
    options.addOption(option);

    option = new Option(null, "pkcs12-password-file", true, "PKCS #12 password file");
    option.setArgName("path");
    options.addOption(option);

    options.addOption("v", "verbose", false, "Run in verbose mode.");
    options.addOption(null, "debug", false, "Run in debug mode.");
    options.addOption(null, "help", false, "Show help message.");
}

From source file:com.alibaba.rocketmq.tools.command.consumer.UpdateSubGroupSubCommand.java

@Override
public Options buildCommandlineOptions(Options options) {
    Option opt = new Option("b", "brokerAddr", true, "create subscription group to which broker");
    opt.setRequired(false);//from ww  w.j  a  va  2  s. co  m
    options.addOption(opt);

    opt = new Option("c", "clusterName", true, "create subscription group to which cluster");
    opt.setRequired(false);
    options.addOption(opt);

    opt = new Option("g", "groupName", true, "consumer group name");
    opt.setRequired(true);
    options.addOption(opt);

    opt = new Option("s", "consumeEnable", true, "consume enable");
    opt.setRequired(false);
    options.addOption(opt);

    opt = new Option("m", "consumeFromMinEnable", true, "from min offset");
    opt.setRequired(false);
    options.addOption(opt);

    opt = new Option("d", "consumeBroadcastEnable", true, "broadcast");
    opt.setRequired(false);
    options.addOption(opt);

    opt = new Option("q", "retryQueueNums", true, "retry queue nums");
    opt.setRequired(false);
    options.addOption(opt);

    opt = new Option("r", "retryMaxTimes", true, "retry max times");
    opt.setRequired(false);
    options.addOption(opt);

    opt = new Option("i", "brokerId", true, "consumer from which broker id");
    opt.setRequired(false);
    options.addOption(opt);

    opt = new Option("w", "whichBrokerWhenConsumeSlowly", true, "which broker id when consume slowly");
    opt.setRequired(false);
    options.addOption(opt);

    return options;
}

From source file:com.netscape.cmstools.key.KeyRequestFindCLI.java

public void createOptions() {
    Option option = new Option(null, "status", true, "Request status");
    option.setArgName("status");
    options.addOption(option);/*ww w. j a  v a2s .c  o  m*/

    option = new Option(null, "type", true, "Request type");
    option.setArgName("type");
    options.addOption(option);

    option = new Option(null, "client", true, "Client ID");
    option.setArgName("client ID");
    options.addOption(option);

    option = new Option(null, "maxResults", true, "Maximum results");
    option.setArgName("max results");
    options.addOption(option);

    option = new Option(null, "maxTime", true, "Maximum time");
    option.setArgName("max time");
    options.addOption(option);

    option = new Option(null, "start", true, "Page to start");
    option.setArgName("starting page");
    options.addOption(option);

    option = new Option(null, "pageSize", true, "Page size");
    option.setArgName("page size");
    options.addOption(option);
}