public class WikiDocumentFeedEntryManager extends FeedEntryManager<WikiDocument, WikiDocumentFeedEntry> {
@RaiseEvent("FeedEntry.created")
public WikiDocumentFeedEntry createFeedEntry(WikiDocument document) {
WikiDocumentFeedEntry fe = new WikiDocumentFeedEntry();
fe.setLink(wikiURLRenderer.renderURL(document, true));
fe.setTitle(getFeedEntryTitle(document));
fe.setAuthor(document.getCreatedBy().getFullname());
fe.setUpdatedDate(fe.getPublishedDate());
// Do NOT use text/html, the fabulous Sun "Rome" software will
// render type="HTML" (uppercase!) which kills the Firefox feed renderer!
fe.setDescriptionType("html");
String descriptionValue = "";
if (document.macroPresent(WikiDocument.MACRO_DISABLE_CONTENT_MARKUP)) {
descriptionValue = renderPlainText(document.getFeedDescription());
} else {
descriptionValue = renderWikiText(document.getAreaNumber(), document.getFeedDescription());
}
fe.setDescriptionValue(descriptionValue);
fe.setDocument(document);
return fe;
}