if (commandName == null)
{
commandName = "dsconfig";
}
CommandBuilder commandBuilder =
new CommandBuilder(commandName, handler.getSubCommand().getName());
commandBuilder.append(handler.getCommandBuilder());
if ((factory != null) && (factory.getContextCommandBuilder() != null))
{
commandBuilder.append(factory.getContextCommandBuilder());
}
if (verboseArgument.isPresent())
{
commandBuilder.addArgument(verboseArgument);
}
if (scriptFriendlyArgument.isPresent())
{
commandBuilder.addArgument(scriptFriendlyArgument);
}
commandBuilder.addArgument(noPromptArgument);
if (propertiesFileArgument.isPresent())
{
commandBuilder.addArgument(propertiesFileArgument);
}
if (noPropertiesFileArgument.isPresent())
{
commandBuilder.addArgument(noPropertiesFileArgument);
}
return commandBuilder;
}