***  This class provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.deployment
Class CLIOptionsConfig

com.sas.services.deployment.CLIOptionsConfig

public final class CLIOptionsConfig

Command line options used to specify general purpose configuration controls.
Configuration Command Line Options
OptionDescription
isPrompting Name of the option used to specify whether the user should be prompted to specify options when using System.in <true | false>

If no prompts should be used when options are specified via System.in specify a value of false. If the user should be interactively be prompted for options specify a value of true.

Since:
9.2

Constructor Summary
CLIOptionsConfig()
          Constructs a default instance.
 
Method Summary
 org.apache.commons.cli.Option createOptionIsPrompting()
          Creates the command line option used to designate whether the user should be prompted to specify options if options are being passed into the application using System.in.
 java.lang.String getNameOfOptionIsPrompting()
          Gets the command line option "isPrompting" used to specify whether the user should be prompted for options if passing options via System.in.
static java.lang.String getOptionValueFromSystemIn(java.lang.String optionName, java.lang.String promptMessage, java.lang.String charsetName)
          Obtains the value of the specified option using "-optionName " from the input stream.
 

Constructor Detail

CLIOptionsConfig

public CLIOptionsConfig()
Constructs a default instance.

Since:
9.2
Method Detail

getNameOfOptionIsPrompting

public java.lang.String getNameOfOptionIsPrompting()
Gets the command line option "isPrompting" used to specify whether the user should be prompted for options if passing options via System.in.

Returns:
Command line option "isPrompting" used to designate whether or not the user should be prompted for options if passing options via System.in. A non-null reference is always returned.
Since:
9.2

createOptionIsPrompting

public org.apache.commons.cli.Option createOptionIsPrompting()
Creates the command line option used to designate whether the user should be prompted to specify options if options are being passed into the application using System.in.

Returns:
Option used to designate whether the user should be prompted to specify options if options are being passed into the application using System.in. A non-null reference is always returned.
Since:
9.2

getOptionValueFromSystemIn

public static java.lang.String getOptionValueFromSystemIn(java.lang.String optionName,
                                                          java.lang.String promptMessage,
                                                          java.lang.String charsetName)
                                                   throws ServiceException
Obtains the value of the specified option using "-optionName " from the input stream.

Parameters:
optionName - The name of the option.
promptMessage - Message to be output on stdout to prompt for the option or null if a prompt will not be used.
charsetName - Name of the character set being used to write to stdin. If a null character set name is specified, then the default encoding will be used.
Returns:
Value of the option obtained from the input stream or null if the option is undefined.
Throws:
ServiceException - if an exception occurs.

***  This class provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.