incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Kable <gr...@serapsys.com>
Subject Re: [jira] Commented: (JSPWIKI-528) Rationalise the use of Collections, particularly with regard to pages
Date Mon, 11 May 2009 07:20:39 GMT
> Andrew Jaquith commented on JSPWIKI-528:
> ----------------------------------------
> Also, I chose a different idiom for the method signatures
> that indicate when Lists should be sorted. Instead of
> creating a method ContentManager.getAllPagesSorted(
> String space ) as suggested in the patch, I created an
> alternate method getAllPages(String,Comparator<WikiPage>)
> that makes the sort request explicit (via the Comparator)
> and is also customizable. In addition, to allowed returned
> Lists to be sorted simply using Collections,sort(), WikiPage
> now extends Comparable<WikiPage>, as does JCRWikiPage.

Just spotted a problem...

Since my patches add multiple ways of sorting pages, including a plugin 
parameter, the logical place to do that is in AbstractFilteredPlugin. 
If it's not done there, we'll end up with a ton of cut and paste code to 
find and use the correct comparator.

Does anybody have any objection to me adding a filterAndSortCollection 
method to AbstractFilteredPlugin?

Thanks,
	Greg

Mime
View raw message