wt.folder
Class FolderHierarchy.FolderHierarchyCollationKeyFactory

java.lang.Object
  extended bywt.util.CollationKeyFactory
      extended bywt.folder.FolderHierarchy.FolderHierarchyCollationKeyFactory
Enclosing class:
FolderHierarchy

public static class FolderHierarchy.FolderHierarchyCollationKeyFactory
extends CollationKeyFactory


Field Summary
 
Fields inherited from class wt.util.CollationKeyFactory
 
Constructor Summary
FolderHierarchy.FolderHierarchyCollationKeyFactory()
          Construct a collation key factory for the current WTContext's locale.
FolderHierarchy.FolderHierarchyCollationKeyFactory(Locale locale)
          Construct a collation key factory for the given locale.
 
Method Summary
 String getCollationString(Object obj)
          Get a collation string for the given object.
 
Methods inherited from class wt.util.CollationKeyFactory
getKey, getLocale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FolderHierarchy.FolderHierarchyCollationKeyFactory

public FolderHierarchy.FolderHierarchyCollationKeyFactory()
Construct a collation key factory for the current WTContext's locale.

Supported API: true
Extendable: false


FolderHierarchy.FolderHierarchyCollationKeyFactory

public FolderHierarchy.FolderHierarchyCollationKeyFactory(Locale locale)
Construct a collation key factory for the given locale.

Parameters:
locale - desired locale

Supported API: true
Extendable: false
Method Detail

getCollationString

public String getCollationString(Object obj)
Get a collation string for the given object. Prepends a 1 to the getName value for folders and a 2 for foldered objects. This sorts the folders to the top of the list. If it can't get a "getName" on the object then it will try to use the identity.

Overrides:
getCollationString in class CollationKeyFactory
Parameters:
obj - the object that will be part of the sorted results

Supported API: true
Extendable: false
Returns:
string collation key source string