[xwiki-devs] [VOTE] Change default published date for XWikiDocument#getDate() instead of instead of #getCreationDate()

Denis Gervalle dgl at softec.lu
Tue Mar 22 07:58:46 UTC 2011


+0 like Sergiu

Denis

On Fri, Mar 18, 2011 at 18:10, Sergiu Dumitriu <sergiu at xwiki.com> wrote:

> On 03/17/2011 07:31 PM, Thomas Mortagne wrote:
> > Hi devs,
> >
> > I was looking at http://jira.xwiki.org/jira/browse/XWIKI-5336 and
> > basically I'm like Jens, I don't understand why we are using creation
> > date in feed plugin.
> >
> > So I'm proposing to change it for date (last version date).
> >
> > FYI I'm planning to change
> >
> >      protected Date getDefaultPublishedDate(Document doc, Map<String,
> > Object>  params, XWikiContext context)
> >      {
> >          return doc.getCreationDate();
> >      }
> >
> > to
> >
> >      protected Date getDefaultPublishedDate(Document doc, Map<String,
> > Object>  params, XWikiContext context)
> >      {
> >          return doc.getDate();
> >      }
> >
> > in com.xpn.xwiki.plugin.feed.SyndEntryDocumentSource
> >
> > WDYT ?
>
> It depends on what the feed is supposed to show.
>
> If it's a feed of "new items", it should (I'm 60% for of this) use the
> creation date. For example the feed of new blog posts, the feed of new
> users, etc.
>
> If it's a feed of changes in the wiki, then it should use the
> modification date.
>
> So I'm +0 for changing the default date, I'd rather make this
> configurable, as a parameter to the feed generation method.
>
> + since most feeds exposed by XWiki are about changes, and the Blog
> currently doesn't use the feed plugin, so it won't be affected.
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
> _______________________________________________
> devs mailing list
> devs at xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs
>



-- 
Denis Gervalle
SOFTEC sa - CEO
eGuilde sarl - CTO



More information about the devs mailing list