← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5586: Maintenance, included org unit data mart tables in index recreate function

 

------------------------------------------------------------
revno: 5586
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-12-25 17:03:13 +0100
message:
  Maintenance, included org unit data mart tables in index recreate function
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessService.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/maintenance/PerformMaintenanceAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties


--
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/completeness/DataSetCompletenessService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessService.java	2011-10-29 14:16:54 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessService.java	2011-12-25 16:03:13 +0000
@@ -91,6 +91,11 @@
         Collection<Integer> organisationUnitIds, int dataSetId );
 
     /**
+     * Delete all data set completeness registrations.
+     */
+    void deleteDataSetCompleteness();
+    
+    /**
      * Creates an index on the aggregateddatasetcompleteness table.
      */
     void createIndex();

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java	2011-12-06 17:41:41 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java	2011-12-25 16:03:13 +0000
@@ -295,6 +295,11 @@
 
         return results;
     }
+    
+    public void deleteDataSetCompleteness()
+    {
+        completenessStore.deleteDataSetCompleteness();
+    }
 
     // -------------------------------------------------------------------------
     // Index

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/maintenance/PerformMaintenanceAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/maintenance/PerformMaintenanceAction.java	2011-05-05 21:15:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/maintenance/PerformMaintenanceAction.java	2011-12-25 16:03:13 +0000
@@ -30,8 +30,9 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.aggregation.AggregatedDataValueService;
+import org.hisp.dhis.aggregation.AggregatedOrgUnitDataValueService;
 import org.hisp.dhis.common.DeleteNotAllowedException;
-import org.hisp.dhis.completeness.DataSetCompletenessStore;
+import org.hisp.dhis.completeness.DataSetCompletenessService;
 import org.hisp.dhis.maintenance.MaintenanceService;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
@@ -58,11 +59,11 @@
         this.maintenanceService = maintenanceService;
     }
     
-    private DataSetCompletenessStore completenessStore;
+    private DataSetCompletenessService completenessService;
 
-    public void setCompletenessStore( DataSetCompletenessStore completenessStore )
+    public void setCompletenessService( DataSetCompletenessService completenessService )
     {
-        this.completenessStore = completenessStore;
+        this.completenessService = completenessService;
     }
 
     private AggregatedDataValueService aggregatedDataValueService;
@@ -72,6 +73,13 @@
         this.aggregatedDataValueService = aggregatedDataValueService;
     }
     
+    private AggregatedOrgUnitDataValueService aggregatedOrgUnitDataValueService;
+    
+    public void setAggregatedOrgUnitDataValueService( AggregatedOrgUnitDataValueService aggregatedOrgUnitDataValueService )
+    {
+        this.aggregatedOrgUnitDataValueService = aggregatedOrgUnitDataValueService;
+    }
+
     private PeriodService periodService;
 
     public void setPeriodService( PeriodService periodService )
@@ -138,8 +146,11 @@
             aggregatedDataValueService.dropIndex( true, true );
             aggregatedDataValueService.createIndex( true, true );
             
-            completenessStore.dropIndex();
-            completenessStore.createIndex(); //TODO respect layering
+            aggregatedOrgUnitDataValueService.dropIndex( true, true );
+            aggregatedOrgUnitDataValueService.createIndex( true, true );
+            
+            completenessService.dropIndex();
+            completenessService.createIndex();
             
             log.info( "Rebuilt data mart indexes" );
         }
@@ -153,7 +164,7 @@
         
         if ( dataSetCompleteness )
         {
-            completenessStore.deleteDataSetCompleteness();
+            completenessService.deleteDataSetCompleteness();
             
             log.info( "Cleared data completeness" );
         }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml	2011-11-25 18:01:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml	2011-12-25 16:03:13 +0000
@@ -41,8 +41,9 @@
   <bean id="org.hisp.dhis.dataadmin.action.maintenance.PerformMaintenanceAction" class="org.hisp.dhis.dataadmin.action.maintenance.PerformMaintenanceAction"
     scope="prototype">
     <property name="maintenanceService" ref="org.hisp.dhis.maintenance.MaintenanceService" />
-    <property name="completenessStore" ref="org.hisp.dhis.completeness.DataSetCompletenessStore" />
+    <property name="completenessService" ref="compulsoryDataCompletenessService" />
     <property name="aggregatedDataValueService" ref="org.hisp.dhis.aggregation.AggregatedDataValueService" />
+	<property name="aggregatedOrgUnitDataValueService" ref="org.hisp.dhis.aggregation.AggregatedOrgUnitDataValueService" />
     <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
   </bean>
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2011-12-14 08:10:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2011-12-25 16:03:13 +0000
@@ -167,6 +167,7 @@
 F_VALIDATIONCRITERIA_DELETE=Delete Validation Criteria
 F_VALIDATIONCRITERIA_UPDATE=Update Validation Criteria
 F_SEND_MESSAGE=Send message
+F_DV_ADMIN=Administrate Data Visualizer
 
 #-- User module ---------------------------------------------------------------#