use ScmClientConfig instance

This commit is contained in:
Sebastian Sdorra
2011-05-18 21:34:52 +02:00
parent 468d50b04f
commit c18c210e4d
3 changed files with 6 additions and 20 deletions

View File

@@ -191,6 +191,7 @@ public class App
name = "--config",
usage = "optionConfig",
metaVar = "metaVar_config",
handler = ConfigOptionHandler.class,
aliases = { "-c" }
)
private ServerConfig config;

View File

@@ -61,7 +61,6 @@ public class ConfigOptionHandler extends OptionHandler<ServerConfig>
Setter<? super ServerConfig> setter)
{
super(parser, option, setter);
loadClientConfig();
}
//~--- methods --------------------------------------------------------------
@@ -80,7 +79,7 @@ public class ConfigOptionHandler extends OptionHandler<ServerConfig>
public int parseArguments(Parameters parameters) throws CmdLineException
{
String name = parameters.getParameter(0);
ServerConfig config = clientConfig.getConfig(name);
ServerConfig config = ScmClientConfig.getInstance().getConfig(name);
setter.addValue(config);
@@ -100,22 +99,4 @@ public class ConfigOptionHandler extends OptionHandler<ServerConfig>
{
return "metaVar_config";
}
//~--- methods --------------------------------------------------------------
/**
* Method description
*
*/
private void loadClientConfig()
{
// todo
clientConfig = new ScmClientConfig();
}
//~--- fields ---------------------------------------------------------------
/** Field description */
private ScmClientConfig clientConfig;
}

View File

@@ -29,8 +29,12 @@
VAL = value
optionConfig = Configuration name
optionServerUrl = SCM-Manager URL
optionUsername = Username
optionPassword = Password
optionHelpText = Shows this help
metaVar_config = configname
metaVar_arg = subcommand arguments
metaVar_command = subcommand