Hi all,
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.
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
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?