Example usage for org.apache.commons.cli OptionBuilder withDescription

List of usage examples for org.apache.commons.cli OptionBuilder withDescription

Introduction

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

Prototype

public static OptionBuilder withDescription(String newDescription) 

Source Link

Document

The next Option created will have the specified description

Usage

From source file:org.apache.sqoop.shell.DisableLinkFunction.java

@SuppressWarnings("static-access")
public DisableLinkFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_PROMPT_LINK_ID))
            .withLongOpt(Constants.OPT_LID).isRequired().hasArg().create(Constants.OPT_LID_CHAR));
}

From source file:org.apache.sqoop.shell.EnableJobFunction.java

@SuppressWarnings("static-access")
public EnableJobFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_PROMPT_JOB_ID))
            .withLongOpt(Constants.OPT_JID).isRequired().hasArg().create('j'));
}

From source file:org.apache.sqoop.shell.EnableLinkFunction.java

@SuppressWarnings("static-access")
public EnableLinkFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_PROMPT_LINK_ID))
            .withLongOpt(Constants.OPT_LID).isRequired().hasArg().create(Constants.OPT_LID_CHAR));
}

From source file:org.apache.sqoop.shell.ShowConnectorFunction.java

@SuppressWarnings("static-access")
public ShowConnectorFunction() {
    this.addOption(
            OptionBuilder.withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_ALL_CONNECTORS))
                    .withLongOpt(Constants.OPT_ALL).create(Constants.OPT_ALL_CHAR));
    this.addOption(OptionBuilder.hasArg().withArgName("cid")
            .withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_CONNECTOR_CID))
            .withLongOpt(Constants.OPT_CID).create(Constants.OPT_CID_CHAR));
}

From source file:org.apache.sqoop.shell.ShowJobFunction.java

@SuppressWarnings("static-access")
public ShowJobFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_ALL_JOBS))
            .withLongOpt(Constants.OPT_ALL).create(Constants.OPT_ALL_CHAR));
    this.addOption(OptionBuilder.hasArg().withArgName(Constants.OPT_JID)
            .withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_JOB_JID))
            .withLongOpt(Constants.OPT_JID).create(Constants.OPT_JID_CHAR));
}

From source file:org.apache.sqoop.shell.ShowLinkFunction.java

@SuppressWarnings("static-access")
public ShowLinkFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_ALL_LINKS))
            .withLongOpt(Constants.OPT_ALL).create(Constants.OPT_ALL_CHAR));
    this.addOption(OptionBuilder.hasArg().withArgName(Constants.OPT_FROM)
            .withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_LINK_LID))
            .withLongOpt(Constants.OPT_FROM).create(Constants.OPT_LID_CHAR));
}

From source file:org.apache.sqoop.shell.ShowServerFunction.java

@SuppressWarnings("static-access")
public ShowServerFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_ALL_SERVERS))
            .withLongOpt(Constants.OPT_ALL).create(Constants.OPT_ALL_CHAR));
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_SERVER_HOST))
            .withLongOpt(Constants.OPT_HOST).create(Constants.OPT_HOST_CHAR));
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_SERVER_PORT))
            .withLongOpt(Constants.OPT_PORT).create(Constants.OPT_PORT_CHAR));
    this.addOption(
            OptionBuilder.withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_SERVER_WEBAPP))
                    .withLongOpt(Constants.OPT_WEBAPP).create(Constants.OPT_WEBAPP_CHAR));
}

From source file:org.apache.sqoop.shell.ShowSubmissionFunction.java

@SuppressWarnings("static-access")
public ShowSubmissionFunction() {
    this.addOption(
            OptionBuilder.withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_ALL_SUBMISSIONS))
                    .withLongOpt(Constants.OPT_DETAIL).create(Constants.OPT_DETAIL_CHAR));
    this.addOption(OptionBuilder.hasArg().withArgName(Constants.OPT_JID)
            .withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_ALL_SUBMISSIONS_JOB_ID))
            .withLongOpt(Constants.OPT_JID).create(Constants.OPT_JID_CHAR));
}

From source file:org.apache.sqoop.shell.ShowVersionFunction.java

@SuppressWarnings("static-access")
public ShowVersionFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_ALL_VERSIONS))
            .withLongOpt(Constants.OPT_ALL).create(Constants.OPT_ALL_CHAR));
    this.addOption(
            OptionBuilder.withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_SERVER_VERSION))
                    .withLongOpt(Constants.OPT_SERVER).create(Constants.OPT_SERVER_CHAR));
    this.addOption(
            OptionBuilder.withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_CLIENT_VERSION))
                    .withLongOpt(Constants.OPT_CLIENT).create(Constants.OPT_CLIENT_CHAR));
    this.addOption(
            OptionBuilder.withDescription(resourceString(Constants.RES_SHOW_PROMPT_DISPLAY_REST_API_VERSION))
                    .withLongOpt(Constants.OPT_REST_API).create(Constants.OPT_API_CHAR));
}

From source file:org.apache.sqoop.shell.StartJobFunction.java

@SuppressWarnings("static-access")
public StartJobFunction() {
    this.addOption(OptionBuilder.hasArg().withArgName(Constants.OPT_JID)
            .withDescription(resourceString(Constants.RES_PROMPT_JOB_ID)).withLongOpt(Constants.OPT_JID)
            .create(Constants.OPT_JID_CHAR));
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_PROMPT_SYNCHRONOUS))
            .withLongOpt(Constants.OPT_SYNCHRONOUS).create(Constants.OPT_SYNCHRONOUS_CHAR));
}