[
https://issues.apache.org/jira/browse/JSPWIKI-528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Greg Kable updated JSPWIKI-528:
-------------------------------
Attachment: jspwiki-528-AbstractFilteredPlugin.patch
Patch 6 - jspwiki-528-AbstractFilteredPlugin.patch
Changes to AbstractFilteredPlugin:
- Changed filterCollection to return a List instead of a Collection
- Added new API filterCollectionSorted which returns a SortedSet in page name
order
- Added new API filterCollection( Collection, Collection ) which allows you to
get the result in an arbitrary order by passing in a custom Collection for the
result. For example, pass in a new TreeSet( DEFAULT_PAGETIME_COMPARATOR ) to
get the pages in reverse time order.
- Added throw new IllegalArgumentException if the above are passed incorrect
objects.
- Addedd javadoc @throws to document above behaviour
- Deprecated wikitizeCollection( Collection<String> links, String separator,
int numItems ) - the separator wasn't used.
- Added wikitizeCollection( Collection<T> links, int numItems ) which works
with collections of Strings, WikiPages or WikiPaths
Changes to IndexPlugin:
- Use new filterCollectionSorted and wikitizeCollection APIs
Changes to ReferredPagesPlugin
- Use new filterCollectionSorted for the ordered list of pages
Changes to ReferringPagesPlugin
- Use new filterCollectionSorted and wikitizeCollection APIs
Changes to UndefinedPagesPlugin
- Use new filterCollectionSorted and wikitizeCollection APIs
NOTE - there are more changes here as deeper APIs get refactored but they'll be
in a subsequent patch.
> Rationalise the use of Collections, particularly with regard to pages
> ---------------------------------------------------------------------
>
> Key: JSPWIKI-528
> URL: https://issues.apache.org/jira/browse/JSPWIKI-528
> Project: JSPWiki
> Issue Type: Improvement
> Reporter: Greg Kable
> Priority: Minor
> Fix For: 3.0
>
> Attachments: jspwiki-528-AbstractFilteredPlugin.patch,
> jspwiki-528-AttachmentHandler.patch, jspwiki-528-LinkCollector.patch,
> jspwiki-528-SearchProviders.patch, jspwiki-528-Weblog.patch,
> jspwiki-528-workflow.Step.patch
>
>
> Most of the APIs return Collection rather than a finer interface and in many
> cases these collections are repeatedly repacked and resorted unnecessarily. I
> will go through all APIs that return collections of pages and make them
> return a finer interface - probably List for unordered collections and
> SortedSet for ordered collections. This will make the use of these
> collections much clearer for further development and give us some opportunity
> for future optimisations.
> This is likely to be a very wide set of changes across lots of different
> classes so I'll submit separate patches for each class.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.