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

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


            Feed feed = convertSyndFeed(syndFeed);

            for (Object o : syndFeed.getEntries()) {
                SyndEntry syndEntry = (SyndEntry)o;
                FeedEntry fe = convertSyndEntry(syndEntry);

                // Append some information on the title
                fe.setTitlePrefix("(" + feed.getTitle() + ") ");
                //fe.setTitleSuffix(" (" + fe.getAuthor() + ")");

                // Linking it in our model makes it persistable/cachable
                feed.getFeedEntries().add(fe);
View Full Code Here


        return feed;
    }

    private FeedEntry convertSyndEntry(SyndEntry syndEntry) {
        log.debug("converting SyndEntry: " + syndEntry.getTitle());
        FeedEntry feedEntry = new FeedEntry();
        feedEntry.setLink(syndEntry.getLink());
        feedEntry.setTitle(syndEntry.getTitle());
        feedEntry.setPublishedDate(syndEntry.getPublishedDate());
        feedEntry.setUpdatedDate(syndEntry.getUpdatedDate());
        feedEntry.setAuthor(syndEntry.getAuthor());

        if (syndEntry.getDescription() != null) {
            SyndContent description = syndEntry.getDescription();

            // TODO: Hardcode 'html', otherwise the ROME stuff craps out and kills Firefox feed renderer...
            feedEntry.setDescriptionType("html");
            feedEntry.setDescriptionValue(description.getValue());
        }

        return feedEntry;
    }
View Full Code Here

            List<FeedEntryDTO> entries = new ArrayList<FeedEntryDTO>();

            if (feedURL.equals("http://foo")) {

                FeedEntry feOne = new FeedEntry();
                feOne.setTitle("One");
                feOne.setPublishedDate(new Date());

                FeedEntry feTwo = new FeedEntry();
                feTwo.setTitle("Two");
                feTwo.setPublishedDate(new Date());

                Feed feed = new Feed();
                feed.setTitle("Foo");
                feed.getFeedEntries().add(feOne);
                feed.getFeedEntries().add(feTwo);

                entries.add(new FeedEntryDTO(feed, feOne));
                entries.add(new FeedEntryDTO(feed, feTwo));

            } else if (feedURL.equals("http://bar")) {

                FeedEntry feOne = new FeedEntry();
                feOne.setTitle("One");
                feOne.setPublishedDate(new Date());

                Feed feed = new Feed();
                feed.setTitle("Bar");
                feed.getFeedEntries().add(feOne);
View Full Code Here

                WikiDocument newTopic = nodeDAO.findWikiDocument(newId);

                assert newTopic.getAreaNumber().equals(100l);

                FeedDAO feedDAO = (FeedDAO)getInstance(FeedDAO.class);
                FeedEntry fe = feedDAO.findFeedEntry(newTopic);
                assert fe.getTitle().equals("[Seam Users] New Topic");

                assert newTopic.getHeaderMacrosString().contains("forumPosting");
                assert newTopic.getFooterMacrosString().contains("forumReplies");
                assert newTopic.getContent().equals("This is a new topic.");
                assert !newTopic.isNameAsTitle();
View Full Code Here

                WikiDocument newTopic = nodeDAO.findWikiDocument(newId);

                assert newTopic.getAreaNumber().equals(100l);

                FeedDAO feedDAO = (FeedDAO)getInstance(FeedDAO.class);
                FeedEntry fe = feedDAO.findFeedEntry(newTopic);
                assert fe.getTitle().equals("[Seam Users] New Topic");

                assert newTopic.getHeaderMacrosString().contains("forumStickyPosting");
                assert newTopic.getFooterMacrosString().contains("forumReplies");
                assert newTopic.getContent().equals("This is a new topic.");
                assert !newTopic.isNameAsTitle();
View Full Code Here

                WikiDocument newTopic = nodeDAO.findWikiDocument(newId);

                assert newTopic.getAreaNumber().equals(100l);

                FeedDAO feedDAO = (FeedDAO)getInstance(FeedDAO.class);
                FeedEntry fe = feedDAO.findFeedEntry(newTopic);
                assert fe.getTitle().equals("[Seam Users] New Topic");

                assert newTopic.getHeaderMacrosString().contains("forumPosting");
                assert newTopic.getFooterMacrosString().contains("forumReplies");
                assert newTopic.getContent().equals("This is a new topic.");
                assert !newTopic.isNameAsTitle();
View Full Code Here

        setParentNode(oldParent); // Reset old parent afterwards

        if (outcome != null) {

            if (documentHome.getInstance().isEnableCommentsOnFeeds()) {
                FeedEntry feedEntry =
                        ((FeedEntryManager) Component.getInstance(getFeedEntryManagerName())).createFeedEntry(getInstance());
                feedDAO.createFeedEntry(documentHome.getParentNode(), documentHome.getInstance(), feedEntry, false);

                getEntityManager().flush();
            }
View Full Code Here

        // Create feed entries (needs identifiers assigned, so we run after persist())
        if (outcome != null && isPushOnFeeds()) {
            getLog().debug("creating feed entries on parent dirs - and on site feed: " + isPushOnSiteFeed());
            if (isPushOnSiteFeed()) isOnSiteFeed = true;

            FeedEntry feedEntry =
                    ((FeedEntryManager)Component.getInstance(getFeedEntryManagerName())).createFeedEntry(getInstance());
            feedDAO.createFeedEntry(getParentNode(), getInstance(), feedEntry, isPushOnSiteFeed());

            getEntityManager().flush();
            setPushOnFeeds(false);
View Full Code Here

        // Update feed entries
        if (isPushOnFeeds()) {
            if (isPushOnSiteFeed()) isOnSiteFeed = true;

            FeedEntry feedEntry = feedDAO.findFeedEntry(getInstance());
            if (feedEntry == null) {
                getLog().debug("creating feed entries on parent dirs - and on site feed: " + isPushOnSiteFeed());
                feedEntry = ((FeedEntryManager)Component.getInstance(getFeedEntryManagerName())).createFeedEntry(getInstance());
                feedDAO.createFeedEntry(getParentNode(), getInstance(), feedEntry, isPushOnSiteFeed());
            } else {
View Full Code Here

TOP

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

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.