public static Exporter buildExporter(Context context) {
Exporter exporter;
String template = context.get("template", String.class);
if (StringUtils.isNotBlank(template)) {
exporter = new TemplateExporter();
} else {
exporter = new SimpleEntityExporter();
}
exporter.setWriter(getWriter(context));
return exporter;