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