@Override public void toTestDocument(OutputStream out) throws InvalidTemplateException, IOException { TemplateContext<E> context = contextFactory.createTemplateContext(this); prepareDocument(); document.updateDynamicContent(context); document.writeAsOpenXML(out); }
@Override public void toDocument(E data, OutputStream out) throws IOException, InvalidTemplateException { prepareDocument(); TemplateContext<E> context = contextFactory.createTemplateContext(this); context.bind(data); document.updateDynamicContent(context); document.writeAsOpenXML(out); }
@Override public void validate() throws InvalidTemplateException { prepareDocument(); document.validate(contextFactory.createTemplateContext(this)); }
@Override public List<String> listContentIds() { prepareDocument(); return document.listContentIds(); }