← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20131: Defined order of startup routines

 

------------------------------------------------------------
revno: 20131
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-09-14 13:56:00 +0200
message:
  Defined order of startup routines
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java
  dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-services/dhis-service-reporting/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/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-14 10:15:27 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-09-14 11:56:00 +0000
@@ -543,7 +543,9 @@
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public ValueType getValueType()
     {
-        return optionSet != null ? optionSet.getValueType() : valueType;
+        //TODO
+        //return optionSet != null ? optionSet.getValueType() : valueType;
+        return valueType;
     }
 
     public void setValueType( ValueType valueType )

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java	2015-09-11 13:17:50 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java	2015-09-14 11:56:00 +0000
@@ -92,18 +92,16 @@
         executeSql( "update dataelement set valuetype='INTEGER_ZERO_OR_POSITIVE' where valuetype='int' and numbertype='zeroPositiveInt'" );
         executeSql( "update dataelement set valuetype='PERCENTAGE' where valuetype='int' and numbertype='percentage'" );
         executeSql( "update dataelement set valuetype='UNIT_INTERVAL' where valuetype='int' and numbertype='unitInterval'" );
+        executeSql( "update dataelement set valuetype='NUMBER' where valuetype='int' and numbertype is null" );
 
         executeSql( "alter table dataelement drop column numbertype" );
 
-        executeSql( "update dataelement set valuetype='NUMBER' where valuetype='int'" );
-
         executeSql( "update dataelement set valuetype='TEXT' where valuetype='string' and texttype='text'" );
         executeSql( "update dataelement set valuetype='LONG_TEXT' where valuetype='string' and texttype='longText'" );
+        executeSql( "update dataelement set valuetype='TEXT' where valuetype='string' and texttype is null" );
 
         executeSql( "alter table dataelement drop column texttype" );
 
-        executeSql( "update dataelement set valuetype='TEXT' where valuetype='string'" );
-
         executeSql( "update dataelement set valuetype='DATE' where valuetype='date'" );
         executeSql( "update dataelement set valuetype='DATETIME' where valuetype='datetime'" );
         executeSql( "update dataelement set valuetype='BOOLEAN' where valuetype='bool'" );

=== 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	2015-09-14 09:13:10 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml	2015-09-14 11:56:00 +0000
@@ -1317,13 +1317,7 @@
     <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
     <property name="categoryService" ref="org.hisp.dhis.dataelement.DataElementCategoryService" />
     <property name="name" value="DataElementDefaultDimensionPopulator" />
-    <property name="runlevel" value="2" />
-  </bean>
-
-  <bean id="org.hisp.dhis.startup.TableAlteror" class="org.hisp.dhis.startup.TableAlteror">
-    <property name="name" value="TableAlteror" />
     <property name="runlevel" value="3" />
-    <property name="skipInTests" value="true" />
   </bean>
 
   <bean id="org.hisp.dhis.common.IdentityPopulator" class="org.hisp.dhis.common.IdentityPopulator">
@@ -1361,67 +1355,6 @@
         <value>optionset</value>
         <value>optionvalue</value>
         <value>validationcriteria</value>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="org.hisp.dhis.startup.TableCreator" class="org.hisp.dhis.startup.TableCreator">
-    <property name="name" value="TableCreator" />
-    <property name="runlevel" value="5" />
-  </bean>
-
-  <bean id="org.hisp.dhis.startup.MapViewUpgrader" class="org.hisp.dhis.startup.MapViewUpgrader">
-    <property name="statementManager" ref="statementManager" />
-    <property name="batchHandlerFactory" ref="batchHandlerFactory" />
-    <property name="name" value="MapViewUpgrader" />
-    <property name="runlevel" value="7" />
-    <property name="skipInTests" value="true" />
-  </bean>
-
-  <bean id="org.hisp.dhis.startup.FavoriteDataItemUpgrader" class="org.hisp.dhis.startup.FavoriteDataItemUpgrader">
-    <property name="name" value="FavoriteDataItemUpgrader" />
-    <property name="runlevel" value="7" />
-    <property name="skipInTests" value="true" />
-  </bean>
-
-  <bean id="org.hisp.dhis.dataentryform.DataEntryFormUpgrader" class="org.hisp.dhis.dataentryform.DataEntryFormUpgrader">
-    <property name="name" value="FavoriteDataItemUpgrader" />
-    <property name="dataEntryFormService" ref="org.hisp.dhis.dataentryform.DataEntryFormService" />
-    <property name="runlevel" value="7" />
-    <property name="skipInTests" value="true" />
-  </bean>
-
-  <bean id="org.hisp.dhis.startup.ExpressionUpgrader" class="org.hisp.dhis.startup.ExpressionUpgrader">
-    <property name="name" value="ExpressionUpgrader" />
-    <property name="runlevel" value="8" />
-    <property name="skipInTests" value="true" />
-  </bean>
-
-  <bean id="org.hisp.dhis.startup.ConfigurationPopulator" class="org.hisp.dhis.startup.ConfigurationPopulator">
-    <property name="name" value="ConfigurationPopulator" />
-    <property name="runlevel" value="9" />
-    <property name="skipInTests" value="true" />
-  </bean>
-
-  <bean id="org.hisp.dhis.startup.I18nLocalePopulator" class="org.hisp.dhis.startup.I18nLocalePopulator">
-    <property name="name" value="I18nLocalePopulator" />
-    <property name="runlevel" value="9" />
-    <property name="skipInTests" value="true" />
-  </bean>
-
-  <bean id="org.hisp.dhis.trackedentity.startup.TableAlteror" class="org.hisp.dhis.trackedentity.startup.TableAlteror">
-    <property name="statementManager" ref="statementManager" />
-    <property name="name" value="TrackedEntityTableAlteror" />
-    <property name="runlevel" value="4" />
-    <property name="skipInTests" value="true" />
-  </bean>
-
-  <bean id="org.hisp.dhis.common.TrackerIdentityPopulator" class="org.hisp.dhis.common.IdentityPopulator">
-    <property name="name" value="TrackerIdentityPopulator" />
-    <property name="runlevel" value="3" />
-    <property name="skipInTests" value="true" />
-    <property name="tables">
-      <list>
         <value>trackedentity</value>
         <value>trackedentityinstance</value>
         <value>trackedentityattribute</value>
@@ -1444,6 +1377,63 @@
     </property>
   </bean>
 
+  <bean id="org.hisp.dhis.startup.TableCreator" class="org.hisp.dhis.startup.TableCreator">
+    <property name="name" value="TableCreator" />
+    <property name="runlevel" value="5" />
+  </bean>
+
+  <bean id="org.hisp.dhis.startup.TableAlteror" class="org.hisp.dhis.startup.TableAlteror">
+    <property name="name" value="TableAlteror" />
+    <property name="runlevel" value="6" />
+    <property name="skipInTests" value="true" />
+  </bean>
+
+  <bean id="org.hisp.dhis.trackedentity.startup.TableAlteror" class="org.hisp.dhis.trackedentity.startup.TableAlteror">
+    <property name="statementManager" ref="statementManager" />
+    <property name="name" value="TrackedEntityTableAlteror" />
+    <property name="runlevel" value="7" />
+    <property name="skipInTests" value="true" />
+  </bean>
+
+  <bean id="org.hisp.dhis.startup.MapViewUpgrader" class="org.hisp.dhis.startup.MapViewUpgrader">
+    <property name="statementManager" ref="statementManager" />
+    <property name="batchHandlerFactory" ref="batchHandlerFactory" />
+    <property name="name" value="MapViewUpgrader" />
+    <property name="runlevel" value="8" />
+    <property name="skipInTests" value="true" />
+  </bean>
+
+  <bean id="org.hisp.dhis.startup.FavoriteDataItemUpgrader" class="org.hisp.dhis.startup.FavoriteDataItemUpgrader">
+    <property name="name" value="FavoriteDataItemUpgrader" />
+    <property name="runlevel" value="9" />
+    <property name="skipInTests" value="true" />
+  </bean>
+
+  <bean id="org.hisp.dhis.dataentryform.DataEntryFormUpgrader" class="org.hisp.dhis.dataentryform.DataEntryFormUpgrader">
+    <property name="name" value="FavoriteDataItemUpgrader" />
+    <property name="dataEntryFormService" ref="org.hisp.dhis.dataentryform.DataEntryFormService" />
+    <property name="runlevel" value="10" />
+    <property name="skipInTests" value="true" />
+  </bean>
+
+  <bean id="org.hisp.dhis.startup.ExpressionUpgrader" class="org.hisp.dhis.startup.ExpressionUpgrader">
+    <property name="name" value="ExpressionUpgrader" />
+    <property name="runlevel" value="11" />
+    <property name="skipInTests" value="true" />
+  </bean>
+
+  <bean id="org.hisp.dhis.startup.ConfigurationPopulator" class="org.hisp.dhis.startup.ConfigurationPopulator">
+    <property name="name" value="ConfigurationPopulator" />
+    <property name="runlevel" value="12" />
+    <property name="skipInTests" value="true" />
+  </bean>
+
+  <bean id="org.hisp.dhis.startup.I18nLocalePopulator" class="org.hisp.dhis.startup.I18nLocalePopulator">
+    <property name="name" value="I18nLocalePopulator" />
+    <property name="runlevel" value="13" />
+    <property name="skipInTests" value="true" />
+  </bean>
+
   <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
     <property name="targetObject" ref="org.hisp.dhis.system.startup.StartupRoutineExecutor" />
     <property name="targetMethod" value="addStartupRoutines" />
@@ -1451,15 +1441,14 @@
       <list>
         <list>
           <ref bean="org.hisp.dhis.startup.InitTableAlteror" />
+          <ref bean="org.hisp.dhis.period.PeriodTypePopulator" />
+          <ref bean="org.hisp.dhis.dataelement.DataElementDefaultDimensionPopulator" />
+          <ref bean="org.hisp.dhis.common.IdentityPopulator" />
+          <ref bean="org.hisp.dhis.startup.TableCreator" />
           <ref bean="org.hisp.dhis.startup.TableAlteror" />
           <ref bean="org.hisp.dhis.trackedentity.startup.TableAlteror" />
           <ref bean="org.hisp.dhis.startup.MapViewUpgrader" />
           <ref bean="org.hisp.dhis.startup.FavoriteDataItemUpgrader" />
-          <ref bean="org.hisp.dhis.common.IdentityPopulator" />
-          <ref bean="org.hisp.dhis.common.TrackerIdentityPopulator" />
-          <ref bean="org.hisp.dhis.period.PeriodTypePopulator" />
-          <ref bean="org.hisp.dhis.startup.TableCreator" />
-          <ref bean="org.hisp.dhis.dataelement.DataElementDefaultDimensionPopulator" />
           <ref bean="org.hisp.dhis.dataentryform.DataEntryFormUpgrader" />
           <ref bean="org.hisp.dhis.startup.ExpressionUpgrader" />
           <ref bean="org.hisp.dhis.startup.ConfigurationPopulator" />

=== 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	2015-08-30 14:21:41 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2015-09-14 11:56:00 +0000
@@ -196,11 +196,11 @@
     </property>
   </bean>
 
-  <!-- Scheduled tasks -->
+  <!-- Startup routine definitions -->
 
   <bean id="org.hisp.dhis.common.ReportingIdentityPopulator" class="org.hisp.dhis.common.IdentityPopulator">
     <property name="name" value="ReportingIdentityPopulator" />
-    <property name="runlevel" value="3" />
+    <property name="runlevel" value="4" />
     <property name="skipInTests" value="true" />
     <property name="tables">
       <list>