Package org.jboss.seam.wiki.core.model

Examples of org.jboss.seam.wiki.core.model.WikiDocumentFeedEntry


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;
    }
View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.model.WikiDocumentFeedEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.