final ExportCommand cmd = context.getExportCommand(ExportOptions.ONE_ROW_PER_FORMAT);
cmd.setDestination(destination);
cmd.setProfiles(profiles);
if (cli.hasOption(CommandLineParam.ALL_FILTER.toString())) {
cmd.setFilter(new CommandLineFilter(cli.getOptionValues(
CommandLineParam.ALL_FILTER.toString()), FilterType.ALL));
}
if (cli.hasOption(CommandLineParam.ANY_FILTER.toString())) {
cmd.setFilter(new CommandLineFilter(cli.getOptionValues(
CommandLineParam.ANY_FILTER.toString()), FilterType.ANY));
}
return cmd;
}