Andreas Schaefer a écrit :
Hi
I tried to use get this working but I turned out that there are some
basic flaws in the FeedPlugin/Api. First many of the "getBlogFeed"
method use the Collections.EMPTY_MAP but this one is immutable but the
Feed Plugin still wants to add Metadata making it fail with an
UnsupportedOperationException.
Maybe Marius can provide some help on it.
Collections.EMPTY_MAP is used to fill a "missing" parameter when a
method is overloaded. Use the signature that specifies the parameter:
public SyndEntrySourceApi getSyndEntryArticleSource()
public SyndEntrySourceApi getSyndEntryArticleSource(Map params)
> Secondly the Feed Plugin expects the document
class to be of type
> 'XWiki.ArticleClass' but for a Blog it is 'Blog.BlogPostClass' making
> it fail to create entries on the SyncedFeed.
Right the blog was changed since then.
These two issues should not be too difficult to patch.
Do you need some help or can you provide a patch that I could review ?
Ludovic
> Cheers - Andy Schaefer
>
> On Aug 4, 2009, at 3:49 AM, Ludovic Dubost wrote:
>
>> Hi Andreas,
>>
>> The RSS feeds should be reworked anyway since there is now in the feed
>> plugin some functions to generate RSS feeds, even for Blogs.
>> It would be much better to use that instead of the manual RSS feeds
>> generated in wiki pages.
>>
>> If you are interested you could work on this rework as it is not
>> planned
>> yet.
>>
>> See
>>
https://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main…
>>
>> /**
>> * Instantiates the default article feed.
>> *
>> * @param query the HQL query used for retrieving the articles
>> * @param count the maximum number of articles to retrieve
>> * @param start the start index
>> * @param metadata feed meta data (includes the author,
>> description,
>> copyright, encoding, url, title)
>> * @return a new feed
>> * @see #getArticleFeed(String, int, int, Map)
>> */
>> public SyndFeed getBlogFeed(String query, int count, int start, Map
>> metadata)
>> {
>> if (query == null) {
>> XWikiRequest request = getXWikiContext().getRequest();
>> String category = request.getParameter("category");
>> if (category == null || category.equals("")) {
>> query =
>> ", BaseObject as obj where obj.name=doc.fullName
>> and
>> obj.className='XWiki.ArticleClass' and
>> obj.name<>'XWiki.ArticleClassTemplate' order by doc.creationDate
>> desc";
>> } else {
>> query =
>> ", BaseObject as obj, DBStringListProperty as prop
>> join prop.list list where obj.name=doc.fullName and
>> obj.className='XWiki.ArticleClass' and
>> obj.name<>'XWiki.ArticleClassTemplate' and obj.id=prop.id.id and
>> prop.id.name='category' and list = '"
>> + category + "' order by doc.creationDate
>> desc";
>> }
>> }
>> SyndFeed blogFeed = getArticleFeed(query, count, start,
>> fillBlogFeedMetadata(metadata));
>> if (blogFeed != null) {
>> blogFeed.setImage(getDefaultFeedImage());
>> }
>> return blogFeed;
>> }
>>
>>
>> Ludovic
>>
>> Andreas Schaefer a écrit :
>>
>>> Hi
>>>
>>> I just attached the 7th draft of the Blog 2.0 Wiki Syntax upgrade
>>> to this JIRA report:
>>>
>>>
http://jira.xwiki.org/jira/browse/XABLOG-50
>>>
>>> This one includes the upgrades of the Panels to the 2.0 syntax. The
>>> only thing remaining are the RSS feeds and these cannot be upgraded
>>> now because the XHTML renderer does add the macro content as
>>> comment to the top of the output AHEAD of the <?xml> which is not
>>> allowed by the XML specification. So far I could not find a way to
>>> suppress that. I tried to create a XML renderer macro but got
>>> nowhere with it.
>>>
>>> My own Blog:
http://madplanet.com/xwiki/bin/view/Blog/ uses the
>>> latest (7th) draft of the blog upgrade.
>>>
>>> Cheers
>>>
>>> Andreas Schaefer
>>> CEO of
Madplanet.com Inc.
>>> EMail: andreas.schaefer(a)madplanet.com
>>> schaefera(a)me.com
>>> Twitter: andy_mpc
>>> AIM: schaefera(a)me.com
>>> _______________________________________________
>>> devs mailing list
>>> devs(a)xwiki.org
>>>
http://lists.xwiki.org/mailman/listinfo/devs
>>>
>>>
>>>
>> --
>> Ludovic Dubost
>> Blog:
http://blog.ludovic.org/
>> XWiki:
http://www.xwiki.com
>> Skype: ldubost GTalk: ldubost
>>
>> _______________________________________________
>> devs mailing list
>> devs(a)xwiki.org
>>
http://lists.xwiki.org/mailman/listinfo/devs
>>
> _______________________________________________
> devs mailing list
> devs(a)xwiki.org
>
http://lists.xwiki.org/mailman/listinfo/devs
>