Methods Summary |
---|
public void | addCLValue(java.lang.String name, java.lang.String value)add CL option to optionsMap. If option name already exists, it
will be replaced.
optionsMap.put(name, new Value(value, OptionValueFrom.CommandLine));
|
public void | addDefaultValue(java.lang.String name, java.lang.String value)add Default option to optionsMap. If option name already exists, it
will be replaced.
optionsMap.put(name, new Value(value, OptionValueFrom.Default));
|
public void | addEnvValue(java.lang.String name, java.lang.String value)add Environment option to optionsMap. If option name already exists, it
will be replaced.
optionsMap.put(name, new Value(value, OptionValueFrom.Environment));
|
public void | addOptionValue(java.lang.String name, java.lang.String value)add option to optionsMap. If option name already exists, it
will be replaced.
optionsMap.put(name, new Value(value, OptionValueFrom.Other));
|
public void | addOptionValue(java.lang.String name, java.lang.String value, com.sun.enterprise.cli.framework.OptionsMap$OptionValueFrom ovf)add option to optionsMap. If option name already exists, it
will be replaced.
optionsMap.put(name, new Value(value, ovf));
|
public void | addPrefValue(java.lang.String name, java.lang.String value)
optionsMap.put(name, new Value(value, OptionValueFrom.PrefFile));
|
public boolean | containsName(java.lang.String name)
return optionsMap.containsKey(name);
|
public java.util.Map | getCLOptions()return all the command line options
return getOptions(OptionValueFrom.CommandLine);
|
public java.util.Map | getDefaultOptions()return all the options with the default values
return getOptions(OptionValueFrom.Default);
|
public java.util.Map | getEnvOptions()return all the environment options
return getOptions(OptionValueFrom.Environment);
|
public java.lang.String | getOption(java.lang.String name)return option value
if (!optionsMap.containsKey(name)) return null;
return optionsMap.get(name).getValue();
|
public java.util.Map | getOptions()return all options
Map<String, String> tempOptions = new HashMap<String, String>();
final Iterator<String> optionNames = optionsMap.keySet().iterator();
while (optionNames.hasNext())
{
final String optionKey = (String) optionNames.next();
tempOptions.put(optionKey, optionsMap.get(optionKey).getValue());
}
return tempOptions;
|
private java.util.Map | getOptions(com.sun.enterprise.cli.framework.OptionsMap$OptionValueFrom ovf)
Map<String, String> tempOptions = new HashMap<String, String>();
final Iterator<String> optionNames = optionsMap.keySet().iterator();
while (optionNames.hasNext())
{
final String optionKey = (String) optionNames.next();
if (optionsMap.get(optionKey).getOptionValueFrom() == ovf)
{
tempOptions.put(optionKey, optionsMap.get(optionKey).getValue());
}
}
return tempOptions;
|
public java.util.Map | getOtherOptions()return all the options that are set by thecommand module
return getOptions(OptionValueFrom.Other);
|
public java.util.Set | nameSet()
return optionsMap.keySet();
|
public void | remove(java.lang.String name)remove the entry from optionsMay
optionsMap.remove(name);
|
public java.lang.String | toString()
final Iterator optionNames = optionsMap.keySet().iterator();
StringBuffer strbuf = new StringBuffer();
while (optionNames.hasNext())
{
final String optionKey = (String) optionNames.next();
strbuf.append("<"+optionKey+","+optionsMap.get(optionKey).getValue()+">");
strbuf.append("\n");
}
return strbuf.toString();
|