edu.internet2.middleware.grouper.ui
Class SubjectComparatorHelper

java.lang.Object
  extended by edu.internet2.middleware.grouper.ui.SubjectComparatorHelper
All Implemented Interfaces:
GrouperComparatorHelper, Serializable

public class SubjectComparatorHelper
extends Object
implements GrouperComparatorHelper

Implementation of ComparatorHelper used to sort Subjects. Can also sort SubjectAsMaps, Members, Memberships, MembershipAsMaps which can all be shown as Subjects. The context affects sorting thus:

If the sort field contains spaces, the field is 'split' and each sub part is assumed to be separate attribute to sort on.

In order to sort subjects with the same type together, you can configure, in media.properties a pre-sort string e.g.

will sort all groups before QuickStart subjects.

Version:
$Id: SubjectComparatorHelper.java,v 1.7 2008-07-21 04:43:47 mchyzer Exp $
Author:
Gary Brown.
See Also:
Serialized Form

Constructor Summary
SubjectComparatorHelper()
           
 
Method Summary
 String getComparisonString(Object obj, ResourceBundle config, String context)
          Determine the correct String for sorting
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubjectComparatorHelper

public SubjectComparatorHelper()
Method Detail

getComparisonString

public String getComparisonString(Object obj,
                                  ResourceBundle config,
                                  String context)
Description copied from interface: GrouperComparatorHelper
Determine the correct String for sorting

Specified by:
getComparisonString in interface GrouperComparatorHelper
Returns:
a String, based on context, used to sort this object