Hi Marius
> Andreas Schaefer a écrit :
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)
I noticed that but the problem is that later these maps are used to
add values to it and that subsequently fails because these maps are
immutable. I had to use an empty map to make it work and so maybe we
should do that there as well.
> 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.
Can you try something like
http://tinyurl.com/cps7oa ?
The FeedPlugin has two problems. A default query is not working
because it looks for XWiki.ArticleClass which I changed but also it
uses the XWiki.ArticleClass to define the properties to read out the
values and that fails with a NPE. I had to change the Source
Parameters in order to make it work. I will have a closer look at the
Feed Plugin and provide a patch when I could make it work.
Cheers - Andy