incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r190852 - /incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/tree/CMSTreeLoader.java
Date Thu, 16 Jun 2005 01:48:46 GMT
Author: taylor
Date: Wed Jun 15 18:48:45 2005
New Revision: 190852

URL: http://svn.apache.org/viewcvs?rev=190852&view=rev
Log:
allow override of sort

Modified:
    incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/tree/CMSTreeLoader.java

Modified: incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/tree/CMSTreeLoader.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/tree/CMSTreeLoader.java?rev=190852&r1=190851&r2=190852&view=diff
==============================================================================
--- incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/tree/CMSTreeLoader.java
(original)
+++ incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/tree/CMSTreeLoader.java
Wed Jun 15 18:48:45 2005
@@ -138,7 +138,7 @@
     	{
             // first get folders
 	    	Collection subFolders = cms.getFolders(node.getName());
-	        Collections.sort((List)subFolders, cmsComparator);
+	        Collections.sort((List)subFolders, portlet.getComparator("FOLDER_DOMAIN"));
 	        Iterator folders = subFolders.iterator();
 	        while (folders.hasNext())
 	        {
@@ -149,7 +149,7 @@
 
             // then get documents
             Collection issueLevel = cms.getDocuments(node.getName());
-            Collections.sort((List)issueLevel, cmsComparator);
+            Collections.sort((List)issueLevel, portlet.getComparator("FOLDER_DOMAIN"));
             Iterator issues = issueLevel.iterator();
             while (issues.hasNext())
             {
@@ -198,11 +198,7 @@
 	
 	
 	public static Comparator cmsComparator = new CmsObjectComparator();
-	
-	public static Comparator getComparator() {
-		return cmsComparator;
-	}
-    
+	    
     private static class CmsObjectComparator implements Comparator
     {
         public int compare(Object o1, Object o2)



Mime
View raw message