mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
use ScmClientConfig instance
This commit is contained in:
@@ -191,6 +191,7 @@ public class App
|
||||
name = "--config",
|
||||
usage = "optionConfig",
|
||||
metaVar = "metaVar_config",
|
||||
handler = ConfigOptionHandler.class,
|
||||
aliases = { "-c" }
|
||||
)
|
||||
private ServerConfig config;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user