← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 672: Modified get map values action.

 

------------------------------------------------------------
revno: 672
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Fri 2009-09-11 12:20:03 +0200
message:
  Modified get map values action.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapValuesAction.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/jsonAggregatedMapValues.vm


--
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.
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapValuesAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapValuesAction.java	2009-08-21 08:34:37 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapValuesAction.java	2009-09-11 10:20:03 +0000
@@ -30,7 +30,7 @@
 import java.util.Collection;
 
 import org.hisp.dhis.aggregation.AggregatedMapValue;
-import org.hisp.dhis.datamart.DataMartStore;
+import org.hisp.dhis.mapping.MappingService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -44,12 +44,12 @@
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
-
-    private DataMartStore dataMartStore;
-
-    public void setDataMartStore( DataMartStore dataMartStore )
+    
+    private MappingService mappingService;
+
+    public void setMappingService( MappingService mappingService )
     {
-        this.dataMartStore = dataMartStore;
+        this.mappingService = mappingService;
     }
 
     // -------------------------------------------------------------------------
@@ -70,13 +70,13 @@
         this.periodId = periodId;
     }
 
-    private int level;
+    private String mapLayerPath;    
 
-    public void setLevel( int level )
+    public void setMapLayerPath( String mapLayerPath )
     {
-        this.level = level;
+        this.mapLayerPath = mapLayerPath;
     }
-    
+
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -91,10 +91,11 @@
     // -------------------------------------------------------------------------
     // Action implemenation
     // -------------------------------------------------------------------------
+    
     public String execute()
         throws Exception
     {
-        object = dataMartStore.getAggregatedMapValues( indicatorId, periodId, level );
+        object = mappingService.getAggregatedMapValues( indicatorId, periodId, mapLayerPath );
         
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml	2009-09-09 15:59:40 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml	2009-09-11 10:20:03 +0000
@@ -66,8 +66,8 @@
   <bean id="org.hisp.dhis.mapping.action.GetMapValuesAction"
     class="org.hisp.dhis.mapping.action.GetMapValuesAction"
     scope="prototype">
-    <property name="dataMartStore"
-      ref="org.hisp.dhis.datamart.DataMartStore"/>
+    <property name="mappingService"
+      ref="org.hisp.dhis.mapping.MappingService"/>
   </bean>
 	
   <bean id="org.hisp.dhis.mapping.action.SetMapSourceTypeUserSettingAction"

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/jsonAggregatedMapValues.vm'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/jsonAggregatedMapValues.vm	2009-09-11 09:43:24 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/jsonAggregatedMapValues.vm	2009-09-11 10:20:03 +0000
@@ -3,6 +3,7 @@
   {
     "organisationUnitId": "$!{value.organisationUnitId}",
     "orgUnit": "$!{value.organisationUnitName}",
+    "orgUnit": "$!{value.featureId}",
     "value": "$!{value.value}"
   },
 #end