use of net.parostroj.timetable.output2.template.TemplateWriterFactory in project grafikon by jub77.
the class GPdfOutputFactory method createOutput.
@Override
public Output createOutput(String type) throws OutputException {
try {
if (!OUTPUT_TYPES.contains(type)) {
throw new OutputException("Unknown type: " + type);
}
TemplateWriterFactory templateFactory = () -> factory.getTemplate(type, this.getCharset());
TemplateTransformerFactory transformerFactory = () -> (is, os, params) -> transformer.write(os, is, getResolver(params));
return new TemplateOutput(getLocale(), templateFactory, transformerFactory);
} catch (Exception e) {
throw new OutputException(e);
}
}
Aggregations