← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6181: Removed support for aggregation engine in data set report and charts. Removed aggregation strateg...

 

------------------------------------------------------------
revno: 6181
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-03-05 17:37:17 +0100
message:
  Removed support for aggregation engine in data set report and charts. Removed aggregation strategy system setting
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java
  dhis-2/dhis-services/dhis-service-reporting/pom.xml
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/MapViewContentProvider.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/impl/DefaultDataSetReportService.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/ReportTableManager.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetGeneralSettingsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemGeneralSettings.vm
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapViewsByFeatureTypeAction.java
  dhis-2/dhis-web/dhis-web-mapping/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
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2012-03-05 16:37:17 +0000
@@ -57,7 +57,6 @@
     final String KEY_GOOGLE_MAPS_API_KEY = "googleMapsAPIKey";
     final String KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED = "dataEntryFormCompleted";
     final String KEY_FACTOR_OF_DEVIATION = "factorDeviation";
-    final String KEY_AGGREGATION_STRATEGY = "aggregationStrategy";
     final String KEY_COMPLETENESS_OFFSET = "completenessOffset";
     final String KEY_PATIENT_EXCEL_TEMPLATE_FILE_NAME = "patientExcelTemplateFileName";
     final String KEY_DATAMART_TASK = "keyDataMartTask";
@@ -76,9 +75,6 @@
     final int DEFAULT_ORGUNITGROUPSET_AGG_LEVEL = 3;    
     final String DEFAULT_GOOGLE_MAPS_API_KEY = "ABQIAAAAut6AhySExnYIXm5s2OFIkxRKNzJ-_9njnryRTbvC6CtrS4sRvRREWnxwlZUa630pLuPf3nD9i4fq9w";
     
-    final String AGGREGATION_STRATEGY_REAL_TIME = "real_time";
-    final String AGGREGATION_STRATEGY_BATCH = "batch";
-    final String DEFAULT_AGGREGATION_STRATEGY = AGGREGATION_STRATEGY_REAL_TIME;
     final int DEFAULT_COMPLETENESS_OFFSET = 15;
     
     final HashSet<String> DEFAULT_SCHEDULED_PERIOD_TYPES = new HashSet<String>() { {
@@ -99,8 +95,6 @@
     
     List<String> getFlags();
     
-    List<String> getAggregationStrategies();
-    
     String getSystemIdentifier();
     
     String getFlagImage();

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java	2012-03-05 16:37:17 +0000
@@ -28,15 +28,12 @@
  */
 
 import java.io.Serializable;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
 import org.apache.commons.lang.StringUtils;
 import org.hisp.dhis.common.GenericIdentifiableObjectStore;
-import org.hisp.dhis.setting.SystemSetting;
-import org.hisp.dhis.setting.SystemSettingManager;
 import org.springframework.transaction.annotation.Transactional;
 
 /**
@@ -129,11 +126,6 @@
         return flags;
     }
 
-    public List<String> getAggregationStrategies()
-    {
-        return Arrays.asList( AGGREGATION_STRATEGY_REAL_TIME, AGGREGATION_STRATEGY_BATCH );
-    }
-
     public String getSystemIdentifier()
     {
         return (String) getSystemSetting( KEY_SYSTEM_IDENTIFIER );

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/pom.xml'
--- dhis-2/dhis-services/dhis-service-reporting/pom.xml	2012-02-20 12:01:56 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/pom.xml	2012-03-05 16:37:17 +0000
@@ -27,10 +27,6 @@
     </dependency>
     <dependency>
       <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-service-aggregationengine-default</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-service-core</artifactId>
     </dependency>
     <dependency>

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java	2012-03-05 16:37:17 +0000
@@ -34,8 +34,6 @@
 import static org.hisp.dhis.chart.Chart.TYPE_PIE;
 import static org.hisp.dhis.chart.Chart.TYPE_STACKED_BAR;
 import static org.hisp.dhis.chart.Chart.TYPE_STACKED_COLUMN;
-import static org.hisp.dhis.setting.SystemSettingManager.AGGREGATION_STRATEGY_REAL_TIME;
-import static org.hisp.dhis.setting.SystemSettingManager.KEY_AGGREGATION_STRATEGY;
 import static org.hisp.dhis.reporttable.ReportTable.getIdentifier;
 import static org.hisp.dhis.system.util.ConversionUtils.getArray;
 
@@ -66,7 +64,6 @@
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.minmax.MinMaxDataElement;
 import org.hisp.dhis.minmax.MinMaxDataElementService;
-import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
@@ -168,13 +165,6 @@
         this.reportTableManager = reportTableManager;
     }
 
-    private SystemSettingManager systemSettingManager;
-
-    public void setSystemSettingManager( SystemSettingManager systemSettingManager )
-    {
-        this.systemSettingManager = systemSettingManager;
-    }
-
     // -------------------------------------------------------------------------
     // ChartService implementation
     // -------------------------------------------------------------------------
@@ -626,17 +616,8 @@
 
     private CategoryDataset[] getCategoryDataSet( Chart chart )
     {
-        Map<String, Double> valueMap = null;
-        
-        if ( AGGREGATION_STRATEGY_REAL_TIME.equals( systemSettingManager.getSystemSetting( KEY_AGGREGATION_STRATEGY, AGGREGATION_STRATEGY_REAL_TIME ) ) )
-        {
-            valueMap = reportTableManager.getAggregatedValueMapRealTime( chart ); // Temp fix
-        }
-        else
-        {
-            valueMap = reportTableManager.getAggregatedValueMap( chart );
-        }        
-        
+        Map<String, Double> valueMap = reportTableManager.getAggregatedValueMap( chart );
+                
         DefaultCategoryDataset regularDataSet = new DefaultCategoryDataset();
         DefaultCategoryDataset regressionDataSet = new DefaultCategoryDataset();
         

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/MapViewContentProvider.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/MapViewContentProvider.java	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/MapViewContentProvider.java	2012-03-05 16:37:17 +0000
@@ -27,10 +27,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.setting.SystemSettingManager.AGGREGATION_STRATEGY_BATCH;
-import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_AGGREGATION_STRATEGY;
-import static org.hisp.dhis.setting.SystemSettingManager.KEY_AGGREGATION_STRATEGY;
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -72,13 +68,6 @@
         this.dashboardService = dashboardService;
     }
 
-    private SystemSettingManager systemSettingManager;
-
-    public void setSystemSettingManager( SystemSettingManager systemSettingManager )
-    {
-        this.systemSettingManager = systemSettingManager;
-    }
-
     private String key;
 
     public void setKey( String key )
@@ -102,14 +91,6 @@
 
             List<MapView> mapViews = new ArrayList<MapView>( dashboardContent.getMapViews() );
 
-            String aggregationStrategy = (String) systemSettingManager.getSystemSetting( KEY_AGGREGATION_STRATEGY,
-                DEFAULT_AGGREGATION_STRATEGY );
-
-            if ( aggregationStrategy.equals( AGGREGATION_STRATEGY_BATCH ) )
-            {
-                FilterUtils.filter( mapViews, new MapViewFixedDateTypeFilter() );
-            }
-
             Collections.sort( mapViews, new MapViewNameComparator() );
 
             content.put( key, mapViews );

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/impl/DefaultDataSetReportService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/impl/DefaultDataSetReportService.java	2012-02-10 17:32:13 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/impl/DefaultDataSetReportService.java	2012-03-05 16:37:17 +0000
@@ -31,9 +31,6 @@
 import static org.hisp.dhis.dataentryform.DataEntryFormService.IDENTIFIER_PATTERN;
 import static org.hisp.dhis.dataentryform.DataEntryFormService.INDICATOR_PATTERN;
 import static org.hisp.dhis.dataentryform.DataEntryFormService.INPUT_PATTERN;
-import static org.hisp.dhis.setting.SystemSettingManager.AGGREGATION_STRATEGY_REAL_TIME;
-import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_AGGREGATION_STRATEGY;
-import static org.hisp.dhis.setting.SystemSettingManager.KEY_AGGREGATION_STRATEGY;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -46,7 +43,6 @@
 import java.util.regex.Matcher;
 
 import org.hisp.dhis.aggregation.AggregatedDataValueService;
-import org.hisp.dhis.aggregation.AggregationService;
 import org.hisp.dhis.common.Grid;
 import org.hisp.dhis.common.GridHeader;
 import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
@@ -64,7 +60,6 @@
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.system.filter.AggregatableDataElementFilter;
@@ -95,13 +90,6 @@
         this.dataValueService = dataValueService;
     }
 
-    private AggregationService aggregationService;
-
-    public void setAggregationService( AggregationService aggregationService )
-    {
-        this.aggregationService = aggregationService;
-    }
-
     private AggregatedDataValueService aggregatedDataValueService;
 
     public void setAggregatedDataValueService( AggregatedDataValueService aggregatedDataValueService )
@@ -109,13 +97,6 @@
         this.aggregatedDataValueService = aggregatedDataValueService;
     }
 
-    private SystemSettingManager systemSettingManager;
-
-    public void setSystemSettingManager( SystemSettingManager systemSettingManager )
-    {
-        this.systemSettingManager = systemSettingManager;
-    }
-
     // -------------------------------------------------------------------------
     // DataSetReportService implementation
     // -------------------------------------------------------------------------
@@ -134,10 +115,6 @@
     public List<Grid> getSectionDataSetReport( DataSet dataSet, Period period, OrganisationUnit unit,
         boolean selectedUnitOnly, I18nFormat format, I18n i18n )
     {
-        String aggregationStrategy = (String) systemSettingManager.getSystemSetting( KEY_AGGREGATION_STRATEGY,
-            DEFAULT_AGGREGATION_STRATEGY );
-        boolean realTime = aggregationStrategy.equals( AGGREGATION_STRATEGY_REAL_TIME );
-
         List<Section> sections = new ArrayList<Section>( dataSet.getSections() );
         Collections.sort( sections, new SectionOrderComparator() );
 
@@ -205,9 +182,7 @@
                     }
                     else
                     {
-                        value = realTime ? aggregationService.getAggregatedDataValue( dataElement, optionCombo, period
-                            .getStartDate(), period.getEndDate(), unit ) : aggregatedDataValueService
-                            .getAggregatedValue( dataElement, optionCombo, period, unit );
+                        value = aggregatedDataValueService.getAggregatedValue( dataElement, optionCombo, period, unit );
                     }
 
                     grid.addValue( value );
@@ -217,9 +192,7 @@
                 {
                     for ( DataElementCategoryOption categoryOption : categoryCombo.getCategoryOptions() )
                     {
-                        Double value = realTime ? aggregationService.getAggregatedDataValue( dataElement, period
-                            .getStartDate(), period.getEndDate(), unit, categoryOption ) : aggregatedDataValueService
-                            .getAggregatedValue( dataElement, categoryOption, period, unit );
+                        Double value = aggregatedDataValueService.getAggregatedValue( dataElement, categoryOption, period, unit );
 
                         grid.addValue( value );
                     }
@@ -227,9 +200,7 @@
 
                 if ( categoryCombo.doTotal() && !selectedUnitOnly ) // Total
                 {
-                    Double value = realTime ? aggregationService.getAggregatedDataValue( dataElement, null, period
-                        .getStartDate(), period.getEndDate(), unit ) : aggregatedDataValueService.getAggregatedValue(
-                        dataElement, period, unit );
+                    Double value = aggregatedDataValueService.getAggregatedValue( dataElement, period, unit );
 
                     grid.addValue( value );
                 }
@@ -248,9 +219,6 @@
         Collections.sort( dataElements, IdentifiableObjectNameComparator.INSTANCE );
         FilterUtils.filter( dataElements, new AggregatableDataElementFilter() );
 
-        String aggregationStrategy = (String) systemSettingManager.getSystemSetting( KEY_AGGREGATION_STRATEGY,
-            DEFAULT_AGGREGATION_STRATEGY );
-
         // ---------------------------------------------------------------------
         // Get category option combos
         // ---------------------------------------------------------------------
@@ -306,9 +274,7 @@
                 }
                 else
                 {
-                    value = aggregationStrategy.equals( AGGREGATION_STRATEGY_REAL_TIME ) ? 
-                        aggregationService.getAggregatedDataValue( dataElement, optionCombo, period.getStartDate(), period.getEndDate(), unit ) : 
-                        aggregatedDataValueService.getAggregatedValue( dataElement, optionCombo, period, unit );
+                    value = aggregatedDataValueService.getAggregatedValue( dataElement, optionCombo, period, unit );
                 }
 
                 grid.addValue( value );
@@ -328,9 +294,7 @@
 
             grid.addValue( indicator.getName() );
             
-            Double value = aggregationStrategy.equals( AGGREGATION_STRATEGY_REAL_TIME ) ?
-                aggregationService.getAggregatedIndicatorValue( indicator, period.getStartDate(), period.getEndDate(), unit ) :
-                aggregatedDataValueService.getAggregatedValue( indicator, period, unit );
+            Double value = aggregatedDataValueService.getAggregatedValue( indicator, period, unit );
             
             grid.addValue( value );
             
@@ -363,9 +327,6 @@
     private Map<String, String> getAggregatedValueMap( DataSet dataSet, OrganisationUnit unit, Period period,
         boolean selectedUnitOnly, I18nFormat format )
     {
-        String aggregationStrategy = (String) systemSettingManager.getSystemSetting( KEY_AGGREGATION_STRATEGY,
-            DEFAULT_AGGREGATION_STRATEGY );
-
         Collection<DataElement> dataElements = new ArrayList<DataElement>( dataSet.getDataElements() );
 
         FilterUtils.filter( dataElements, new AggregatableDataElementFilter() );
@@ -385,9 +346,7 @@
                 }
                 else
                 {
-                    Double aggregatedValue = aggregationStrategy.equals( AGGREGATION_STRATEGY_REAL_TIME ) ? 
-                        aggregationService.getAggregatedDataValue( dataElement, categoryOptionCombo, period.getStartDate(), period.getEndDate(), unit ) : 
-                        aggregatedDataValueService.getAggregatedValue( dataElement, categoryOptionCombo, period, unit );
+                    Double aggregatedValue = aggregatedDataValueService.getAggregatedValue( dataElement, categoryOptionCombo, period, unit );
 
                     value = format.formatValue( aggregatedValue );
                 }
@@ -398,9 +357,7 @@
                 }
             }
             
-            Double aggregatedValue = aggregationStrategy.equals( AGGREGATION_STRATEGY_REAL_TIME ) ? 
-                aggregationService.getAggregatedDataValue( dataElement, null, period.getStartDate(), period.getEndDate(), unit ) : 
-                aggregatedDataValueService.getAggregatedValue( dataElement, period, unit );
+            Double aggregatedValue = aggregatedDataValueService.getAggregatedValue( dataElement, period, unit );
                 
             String value = format.formatValue( aggregatedValue );
             
@@ -426,16 +383,11 @@
     private Map<Integer, String> getAggregatedIndicatorValueMap( DataSet dataSet, OrganisationUnit unit, Period period,
         I18nFormat format )
     {
-        String aggregationStrategy = (String) systemSettingManager.getSystemSetting( KEY_AGGREGATION_STRATEGY,
-            DEFAULT_AGGREGATION_STRATEGY );
-
         Map<Integer, String> map = new TreeMap<Integer, String>();
 
         for ( Indicator indicator : dataSet.getIndicators() )
         {
-            Double aggregatedValue = aggregationStrategy.equals( AGGREGATION_STRATEGY_REAL_TIME ) ? 
-                aggregationService.getAggregatedIndicatorValue( indicator, period.getStartDate(), period.getEndDate(), unit ) : 
-                aggregatedDataValueService.getAggregatedValue( indicator, period, unit );
+            Double aggregatedValue = aggregatedDataValueService.getAggregatedValue( indicator, period, unit );
 
             String value = format.formatValue( aggregatedValue );
 

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java	2012-03-05 16:37:17 +0000
@@ -32,8 +32,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.amplecode.quick.StatementManager;
-import org.hisp.dhis.aggregation.AggregationService;
 import org.hisp.dhis.chart.Chart;
 import org.hisp.dhis.common.NameableObject;
 import org.hisp.dhis.dataelement.DataElement;
@@ -68,20 +66,6 @@
         this.jdbcTemplate = jdbcTemplate;
     }
 
-    private AggregationService aggregationService;
-
-    public void setAggregationService( AggregationService aggregationService )
-    {
-        this.aggregationService = aggregationService;
-    }
-
-    private StatementManager statementManager;
-
-    public void setStatementManager( StatementManager statementManager )
-    {
-        this.statementManager = statementManager;
-    }
-
     // -------------------------------------------------------------------------
     // ReportTableManager implementation
     // -------------------------------------------------------------------------
@@ -317,54 +301,4 @@
         
         return map;
     }
-    
-    /**
-     * TODO Temporary fix, we will phase out support for aggregation engine
-     */
-    public Map<String, Double> getAggregatedValueMapRealTime( Chart chart )
-    {
-        statementManager.initialise();
-        
-        Map<String, Double> map = new HashMap<String, Double>();
-
-        if ( chart.hasDataElements() )
-        {
-            for ( DataElement dataElement : chart.getDataElements() )
-            {
-                for ( OrganisationUnit organisationUnit : chart.getOrganisationUnits() )
-                {
-                    for ( Period period : chart.getRelativePeriods() )
-                    {
-                        String id = getIdentifier( getIdentifier( DataElement.class, dataElement.getId() ),
-                            getIdentifier( Period.class, period.getId() ),
-                            getIdentifier( OrganisationUnit.class, organisationUnit.getId() ) );
-
-                        map.put( id, aggregationService.getAggregatedDataValue( dataElement, null, period.getStartDate(), period.getEndDate(), organisationUnit ) );
-                    }
-                }
-            }
-        }
-        
-        if ( chart.hasIndicators() )
-        {
-            for ( Indicator indicator : chart.getIndicators() )
-            {
-                for ( OrganisationUnit organisationUnit : chart.getOrganisationUnits() )
-                {
-                    for ( Period period : chart.getRelativePeriods() )
-                    {
-                        String id = getIdentifier( getIdentifier( Indicator.class, indicator.getId() ),
-                            getIdentifier( Period.class, period.getId() ),
-                            getIdentifier( OrganisationUnit.class, organisationUnit.getId() ) );
-                        
-                        map.put( id, aggregationService.getAggregatedIndicatorValue( indicator, period.getStartDate(), period.getEndDate(), organisationUnit ) );
-                    }
-                }
-            }
-        }
-        
-        statementManager.destroy();
-        
-        return map;
-    }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/ReportTableManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/ReportTableManager.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/ReportTableManager.java	2012-03-05 16:37:17 +0000
@@ -53,12 +53,4 @@
      * @param chart the Chart for which to create the value map.
      */
     Map<String, Double> getAggregatedValueMap( Chart chart );
-
-    /**
-     * Generates a map with a key identifying the dimensions of each value based
-     * on real-time aggregation.
-     * 
-     * @param chart the Chart for which to create the value map.
-     */
-    Map<String, Double> getAggregatedValueMapRealTime( Chart chart );
 }

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2012-03-05 10:43:47 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2012-03-05 16:37:17 +0000
@@ -9,8 +9,6 @@
 
   <bean id="org.hisp.dhis.reporttable.jdbc.ReportTableManager" class="org.hisp.dhis.reporttable.jdbc.JDBCReportTableManager">
 	<property name="jdbcTemplate" ref="jdbcTemplate" />
-    <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
-	<property name="statementManager" ref="statementManager" />
   </bean>
 
   <bean id="org.hisp.dhis.reporttable.ReportTableStore" class="org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore">
@@ -59,7 +57,6 @@
     <property name="minMaxDataElementService" ref="org.hisp.dhis.minmax.MinMaxDataElementService" />
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
 	<property name="reportTableManager" ref="org.hisp.dhis.reporttable.jdbc.ReportTableManager" />
-    <property name="systemSettingManager" ref="org.hisp.dhis.setting.SystemSettingManager" />
   </bean>
 
   <!-- Document -->
@@ -136,9 +133,7 @@
 
   <bean id="org.hisp.dhis.datasetreport.DataSetReportService" class="org.hisp.dhis.datasetreport.impl.DefaultDataSetReportService">
     <property name="dataValueService" ref="org.hisp.dhis.datavalue.DataValueService" />
-    <property name="systemSettingManager" ref="org.hisp.dhis.setting.SystemSettingManager" />
     <property name="aggregatedDataValueService" ref="org.hisp.dhis.aggregation.AggregatedDataValueService" />
-    <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
   </bean>
 
   <!-- Dashboard -->
@@ -176,7 +171,6 @@
   <bean id="mapViewContentProvider" class="org.hisp.dhis.dashboard.provider.MapViewContentProvider">
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
     <property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService" />
-    <property name="systemSettingManager" ref="org.hisp.dhis.setting.SystemSettingManager" />
     <property name="key" value="mapViews" />
   </bean>
 

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java	2012-03-05 16:37:17 +0000
@@ -80,7 +80,6 @@
         map.put( KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART, systemSettingManager.getSystemSetting( KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART, false ) );
         map.put( KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED, systemSettingManager.getSystemSetting( KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED, false ) );
         map.put( KEY_FACTOR_OF_DEVIATION, systemSettingManager.getSystemSetting( KEY_FACTOR_OF_DEVIATION, DEFAULT_FACTOR_OF_DEVIATION ) );
-        map.put( KEY_AGGREGATION_STRATEGY, systemSettingManager.getSystemSetting( KEY_AGGREGATION_STRATEGY, DEFAULT_AGGREGATION_STRATEGY ) );
         map.put( KEY_COMPLETENESS_OFFSET, systemSettingManager.getSystemSetting( KEY_COMPLETENESS_OFFSET, DEFAULT_COMPLETENESS_OFFSET ) );
         
         invocation.getStack().push( map );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetGeneralSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetGeneralSettingsAction.java	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetGeneralSettingsAction.java	2012-03-05 16:37:17 +0000
@@ -37,7 +37,6 @@
 import org.hisp.dhis.configuration.ConfigurationService;
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.user.UserGroup;
@@ -57,13 +56,6 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private SystemSettingManager systemSettingManager;
-
-    public void setSystemSettingManager( SystemSettingManager systemSettingManager )
-    {
-        this.systemSettingManager = systemSettingManager;
-    }
-
     private ConfigurationService configurationService;
 
     public void setConfigurationService( ConfigurationService configurationService )
@@ -151,8 +143,6 @@
 
     public String execute()
     {
-        aggregationStrategies = systemSettingManager.getAggregationStrategies();
-
         configuration = configurationService.getConfiguration();
 
         feedbackRecipients = configurationService.getConfiguration().getFeedbackRecipients();

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.java	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.java	2012-03-05 16:37:17 +0000
@@ -27,7 +27,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.setting.SystemSettingManager.KEY_AGGREGATION_STRATEGY;
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_COMPLETENESS_OFFSET;
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED;
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_FACTOR_OF_DEVIATION;
@@ -94,13 +93,6 @@
     // Output
     // -------------------------------------------------------------------------
 
-    private String aggregationStrategy;
-
-    public void setAggregationStrategy( String aggregationStrategy )
-    {
-        this.aggregationStrategy = aggregationStrategy;
-    }
-
     private Integer infrastructuralDataElements;
 
     public void setInfrastructuralDataElements( Integer infrastructuralDataElements )
@@ -177,7 +169,6 @@
 
     public String execute()
     {
-        systemSettingManager.saveSystemSetting( KEY_AGGREGATION_STRATEGY, aggregationStrategy );
         systemSettingManager.saveSystemSetting( KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART, omitIndicatorsZeroNumeratorDataMart );
         systemSettingManager.saveSystemSetting( KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED, disableDataEntryWhenCompleted );
         systemSettingManager.saveSystemSetting( KEY_FACTOR_OF_DEVIATION, factorDeviation );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml	2012-03-05 16:37:17 +0000
@@ -7,7 +7,6 @@
 
   <bean id="org.hisp.dhis.settings.action.system.GetGeneralSettingsAction" class="org.hisp.dhis.settings.action.system.GetGeneralSettingsAction"
     scope="prototype">
-    <property name="systemSettingManager" ref="org.hisp.dhis.setting.SystemSettingManager" />
     <property name="configurationService" ref="org.hisp.dhis.configuration.ConfigurationService" />
     <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
 	<property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemGeneralSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemGeneralSettings.vm	2011-10-07 11:48:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemGeneralSettings.vm	2012-03-05 16:37:17 +0000
@@ -2,7 +2,6 @@
 	jQuery(document).ready(function() {
 		jQuery("input[type=button]").click(function() {
 			jQuery.postUTF8( 'setSystemGeneralSettings.action', {
-				aggregationStrategy: getFieldValue( 'aggregationStrategy' ),
 				infrastructuralDataElements: getFieldValue( 'infrastructuralDataElements' ),
 				infrastructuralPeriodType: getFieldValue( 'infrastructuralPeriodType' ),
 				feedbackRecipients: getFieldValue( 'feedbackRecipients' ),
@@ -21,15 +20,6 @@
 
 <h3>$i18n.getString( "general_settings" )</h3>
 
-<!-- aggregation_strategy -->
-<h4>$i18n.getString( "aggregation_strategy" )</h4>
-
-<p><select id="aggregationStrategy" name="aggregationStrategy" style="width:30em">
-	#foreach( $strategy in $aggregationStrategies )
-	<option value="$strategy" #if( $aggregationStrategy == $strategy )selected="selected"#end>$i18n.getString( $strategy )</option>
-	#end
-</select></p>
-
 <!-- infrastructural_data_elements -->
 <h4>$i18n.getString( "infrastructural_data_elements" )</h4>
 

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapViewsByFeatureTypeAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapViewsByFeatureTypeAction.java	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapViewsByFeatureTypeAction.java	2012-03-05 16:37:17 +0000
@@ -27,10 +27,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.setting.SystemSettingManager.AGGREGATION_STRATEGY_BATCH;
-import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_AGGREGATION_STRATEGY;
-import static org.hisp.dhis.setting.SystemSettingManager.KEY_AGGREGATION_STRATEGY;
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -38,9 +34,6 @@
 import org.hisp.dhis.mapping.MapView;
 import org.hisp.dhis.mapping.MappingService;
 import org.hisp.dhis.mapping.comparator.MapViewNameComparator;
-import org.hisp.dhis.setting.SystemSettingManager;
-import org.hisp.dhis.system.filter.MapViewFixedDateTypeFilter;
-import org.hisp.dhis.system.util.FilterUtils;
 
 import com.opensymphony.xwork2.Action;
 
@@ -62,13 +55,6 @@
         this.mappingService = mappingService;
     }
 
-    private SystemSettingManager systemSettingManager;
-
-    public void setSystemSettingManager( SystemSettingManager systemSettingManager )
-    {
-        this.systemSettingManager = systemSettingManager;
-    }
-
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -99,14 +85,6 @@
     {
         object = new ArrayList<MapView>( mappingService.getMapViewsByFeatureType( featureType ) );
 
-        String aggregationStrategy = (String) systemSettingManager.getSystemSetting( KEY_AGGREGATION_STRATEGY,
-            DEFAULT_AGGREGATION_STRATEGY );
-
-        if ( aggregationStrategy.equals( AGGREGATION_STRATEGY_BATCH ) )
-        {
-            FilterUtils.filter( object, new MapViewFixedDateTypeFilter() );
-        }
-
         Collections.sort( object, new MapViewNameComparator() );
 
         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	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml	2012-03-05 16:37:17 +0000
@@ -210,7 +210,6 @@
     <bean id="org.hisp.dhis.mapping.action.GetMapViewsByFeatureTypeAction"
         class="org.hisp.dhis.mapping.action.GetMapViewsByFeatureTypeAction" scope="prototype">
         <property name="mappingService" ref="org.hisp.dhis.mapping.MappingService" />
-        <property name="systemSettingManager" ref="org.hisp.dhis.setting.SystemSettingManager" />
     </bean>
 
 	<bean id="org.hisp.dhis.mapping.action.AddMapViewToDashboardAction"