incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r159086 - incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/tree/CMSTreeLoader.java
Date Sat, 26 Mar 2005 01:07:18 GMT
Author: taylor
Date: Fri Mar 25 17:07:18 2005
New Revision: 159086

URL: http://svn.apache.org/viewcvs?view=rev&rev=159086
Log:
bad practice: don't initialize associated objects  in static initalize

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?view=diff&r1=159085&r2=159086
==============================================================================
--- 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
Fri Mar 25 17:07:18 2005
@@ -30,12 +30,18 @@
 import org.apache.webapp.admin.TreeControlNode;
 import org.apache.portals.graffito.portlets.util.ServiceAccessor;
 
-public class CMSTreeLoader {
+public class CMSTreeLoader 
+{
 	
 	public final static String PORTLET_URL = "portlet_url";
 		
-	private static ContentModelService cms = (ContentModelService)ServiceAccessor.getService("cmsModelImpl");
-
+	private ContentModelService cms; 
+        
+    public CMSTreeLoader(ContentModelService cms)
+    {
+        this.cms = cms;
+    }
+    
     public TreeControlNode createFolderNode(Folder folder) throws ContentManagementException
     {
         TreeControlNode node = 



Mime
View raw message