← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1382: Replaced DataAnalysisServiceProvider with the generic ServiceProvider.

 

------------------------------------------------------------
revno: 1382
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-02-02 14:35:59 +0100
message:
  Replaced DataAnalysisServiceProvider with the generic ServiceProvider.
removed:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataanalysis/DataAnalysisServiceProvider.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/provider/
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/provider/DefaultDataAnalysisServiceProvider.java
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/dataanalysis/GetAnalysisAction.java
  dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/META-INF/dhis/beans.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataanalysis/DataAnalysisServiceProvider.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataanalysis/DataAnalysisServiceProvider.java	2009-12-24 14:47:25 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataanalysis/DataAnalysisServiceProvider.java	1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-package org.hisp.dhis.dataanalysis;
-
-public interface DataAnalysisServiceProvider
-{
-    DataAnalysisService provide( String key );
-}

=== removed directory 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/provider'
=== removed file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/provider/DefaultDataAnalysisServiceProvider.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/provider/DefaultDataAnalysisServiceProvider.java	2009-12-24 14:47:25 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/provider/DefaultDataAnalysisServiceProvider.java	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-package org.hisp.dhis.dataanalysis.provider;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.hisp.dhis.dataanalysis.DataAnalysisService;
-import org.hisp.dhis.dataanalysis.DataAnalysisServiceProvider;
-
-public class DefaultDataAnalysisServiceProvider
-    implements DataAnalysisServiceProvider
-{
-    private Map<String, DataAnalysisService> dataAnalysisServices = new HashMap<String, DataAnalysisService>();
-    
-    public void setDataAnalysisServices( Map<String, DataAnalysisService> dataAnalysisServices )
-    {
-        this.dataAnalysisServices = dataAnalysisServices;
-    }
-
-    public DataAnalysisService provide( String key )
-    {
-        return dataAnalysisServices.get( key );
-    }
-}

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml	2010-02-01 15:30:27 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml	2010-02-02 13:35:59 +0000
@@ -356,9 +356,9 @@
       ref="org.hisp.dhis.dataanalysis.jdbc.DataAnalysisStore"/>  
   </bean>
   
-  <bean id="org.hisp.dhis.dataanalysis.DataAnalysisServiceProvider"
-	class="org.hisp.dhis.dataanalysis.provider.DefaultDataAnalysisServiceProvider">
-	<property name="dataAnalysisServices">
+  <bean id="dataAnalysisServiceProvider"
+	class="org.hisp.dhis.common.ServiceProvider">
+	<property name="services">
 		<map>
 			<entry>
 				<key><value>stddevoutlier</value></key>

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/dataanalysis/GetAnalysisAction.java'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/dataanalysis/GetAnalysisAction.java	2009-12-24 14:47:25 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/dataanalysis/GetAnalysisAction.java	2010-02-02 13:35:59 +0000
@@ -33,8 +33,8 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.hisp.dhis.common.ServiceProvider;
 import org.hisp.dhis.dataanalysis.DataAnalysisService;
-import org.hisp.dhis.dataanalysis.DataAnalysisServiceProvider;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.dataset.DataSet;
@@ -65,9 +65,9 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private DataAnalysisServiceProvider serviceProvider;
+    private ServiceProvider<DataAnalysisService> serviceProvider;
 
-    public void setServiceProvider( DataAnalysisServiceProvider serviceProvider )
+    public void setServiceProvider( ServiceProvider<DataAnalysisService> serviceProvider )
     {
         this.serviceProvider = serviceProvider;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/META-INF/dhis/beans.xml	2009-12-24 14:47:25 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/META-INF/dhis/beans.xml	2010-02-02 13:35:59 +0000
@@ -258,7 +258,7 @@
     class="org.hisp.dhis.validationrule.action.dataanalysis.GetAnalysisAction"
     scope="prototype">
 	<property name="serviceProvider"
-	  ref="org.hisp.dhis.dataanalysis.DataAnalysisServiceProvider"/>
+	  ref="dataAnalysisServiceProvider"/>
     <property name="dataElementService"
       ref="org.hisp.dhis.dataelement.DataElementService" />
     <property name="selectionTreeManager"