edu.internet2.middleware.grouper.ui
Class SubjectComparatorHelper
java.lang.Object
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 it starts 'search:', then context is changed to 'search'
- Otherwise '<type>.sort.<context>', '<type>.sort.<default>', 'subject.sort.<context>',
'subject.sort.<sourceId>.<context>','subject.sort.<sourceid>',
'subject.sort.default', 'subject.display.<sourceId>' and 'subject.display.default' are looked up until a value is found
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.
- subject.pre-sort.g\:gsa=a
- subject.pre-sort.qsuob=b
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
SubjectComparatorHelper
public SubjectComparatorHelper()
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