Hi all,
Hello,
I would like to change the feed plugin so that the content of the fetched
documents can be easily changed.
Currently, the content of the document containing a fetched article is
hardcoded to "#includeSheet('XWiki.FeedEntryClassSheet')".
I think that any code using the feed plugin should be able to set its own
sheet or whatever content is needed.
There are a couple of options to be analyzed:
1. regarding the content of the feed article document:
a) any feed article includes a sheet
b) any feed article contains some content, not necessarily a sheet
inclusion.
b) sounds better as it englobes uses case of a)
2. regarding the way the content is set:
a) through a String variable in the feed API, that can be set by the user
through a call like xwiki.feed.setDefaultFeedDocContent("some content"),
which defaults to the current value, for compatibility with the code
already using the feed plugin.
b) through an optional parameter to the updateFeed function(s) such that,
each time the feeds are fetched the content can be specified
b) sounds better to me, provided it keeps the default fetching api (which
would set the content to an include of the traditionnal
XWiki.FeedArticleClassSheet), and new API would take the content as a
param. The use case being here sharing the feed plugin between XWatch and
possible other Wiki apps, we definitely want to be able to have differents
sheet/content regarding which is retrieving entries.
3. regarding the 'scope' of this default
content for the feed entry
document:
a) it is specific to a feed aggregator and is set in the aggregator class
b) it is specific to an update operation (as mentioned on 2.b)
c) it is specific to the feed plugin and all documents through that plugin
instance will have the same content (as specified on 2.a)
WDYT?
That makes me +1 for 1.b, 2.b and 3.b :)
Jérôme.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs