com.raritantechnologies.searchApp.filters
Class DynamicResultSetSorter
java.lang.Object
com.raritantechnologies.searchApp.filters.DynamicResultSetSorter
- All Implemented Interfaces:
- IConfigurable, ISorter
- public class DynamicResultSetSorter
- extends java.lang.Object
- implements ISorter
Dynamic sorter - switches on request parameter.
XML Configuration Template:
<Sorter class="com.raritantechnologies.searchApp.filters.DynamicResultSetSorter" >
<!-- One or more UseSorter elements: -->
<UseSorter requestField="[ field that contains the data to compare ]"
matchValue="[ value that selects this Sorter ]"
isDefault="[ true|false(default) ]" >
<!-- Alternately can use an IComparator -->
<Comparator class="[ class of com.raritantechnologies.utils.comparators.IComparator ]" >
</Comparator>
<!-- The Sorter element to use -->
<Sorter class="[ class of com.raritantechnologies.searchApp.ISorter ]" >
</Sorter>
</UseSorter>
</Sorter>
|
Method Summary |
void |
initialize(org.w3c.dom.Element elem)
Initializes the object from an XML tag or element. |
void |
sort(java.util.List results,
RaritanPageContext pageContext)
Sort a list of IResult objects. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DynamicResultSetSorter
public DynamicResultSetSorter()
sort
public void sort(java.util.List results,
RaritanPageContext pageContext)
- Description copied from interface:
ISorter
- Sort a list of IResult objects.
- Specified by:
sort in interface ISorter
initialize
public void initialize(org.w3c.dom.Element elem)
- Description copied from interface:
IConfigurable
- Initializes the object from an XML tag or element.
This method is called by the Framework as part of the application initializtion.
see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory.
Configurable objects that are owned or contained by other configurable objects will be initialized
in by the parent object.
- Specified by:
initialize in interface IConfigurable