use of org.olat.modules.fo.archiver.formatters.ForumFormatter in project openolat by klemens.
the class DialogCourseNode method doArchiveElement.
/**
* Archive a single dialog element with files and forum
* @param element
* @param exportDirectory
*/
public void doArchiveElement(DialogElement element, ZipOutputStream exportStream, Locale locale) {
DialogElementsManager depm = CoreSpringFactory.getImpl(DialogElementsManager.class);
String exportDirName = Formatter.makeStringFilesystemSave(getShortTitle()) + "_" + element.getForum().getKey() + "_" + Formatter.formatDatetimeFilesystemSave(new Date());
VFSContainer forumContainer = depm.getDialogContainer(element);
for (VFSItem item : forumContainer.getItems(new VFSLeafFilter())) {
ZipUtil.addToZip(item, exportDirName, exportStream);
}
ForumArchiveManager fam = ForumArchiveManager.getInstance();
ForumFormatter ff = new ForumStreamedRTFFormatter(exportStream, exportDirName, false, locale);
fam.applyFormatter(ff, element.getForum().getKey(), null);
}
Aggregations