← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15460: minor fixes

 

------------------------------------------------------------
revno: 15460
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-05-28 18:54:51 +0200
message:
  minor fixes
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramValidationSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeGroupSchemaDescriptor.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultObjectBridge.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventreport/EventReport.hbm.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/eventreport/EventReport.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java	2014-05-27 12:12:46 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java	2014-05-28 16:54:51 +0000
@@ -393,29 +393,29 @@
 
         if ( other.getClass().isInstance( this ) )
         {
-            EventReport report = (EventReport) other;
+            EventReport eventReport = (EventReport) other;
 
-            dataType = report.getDataType();
-            program = report.getProgram();
-            programStage = report.getProgramStage();
-            startDate = report.getStartDate();
-            endDate = report.getEndDate();
-            totals = report.isTotals();
-            subtotals = report.isSubtotals();
-            hideEmptyRows = report.isHideEmptyRows();
-            countType = report.getCountType();
-            showHierarchy = report.isShowHierarchy();
-            displayDensity = report.getDisplayDensity();
-            fontSize = report.getFontSize();
+            dataType = eventReport.getDataType();
+            program = eventReport.getProgram();
+            programStage = eventReport.getProgramStage();
+            startDate = eventReport.getStartDate();
+            endDate = eventReport.getEndDate();
+            totals = eventReport.isTotals();
+            subtotals = eventReport.isSubtotals();
+            hideEmptyRows = eventReport.isHideEmptyRows();
+            countType = eventReport.getCountType();
+            showHierarchy = eventReport.isShowHierarchy();
+            displayDensity = eventReport.getDisplayDensity();
+            fontSize = eventReport.getFontSize();
 
             columnDimensions.clear();
-            columnDimensions.addAll( report.getColumnDimensions() );
+            columnDimensions.addAll( eventReport.getColumnDimensions() );
 
             rowDimensions.clear();
-            rowDimensions.addAll( report.getRowDimensions() );
+            rowDimensions.addAll( eventReport.getRowDimensions() );
 
             filterDimensions.clear();
-            filterDimensions.addAll( report.getFilterDimensions() );
+            filterDimensions.addAll( eventReport.getFilterDimensions() );
         }
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramSchemaDescriptor.java	2014-05-28 11:48:43 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramSchemaDescriptor.java	2014-05-28 16:54:51 +0000
@@ -54,7 +54,7 @@
         Schema schema = new Schema( Program.class, SINGULAR, PLURAL );
         schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
-        schema.setOrder( 150 );
+        schema.setOrder( 151 );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_PROGRAM_PUBLIC_ADD" ) ) );
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PRIVATE, Lists.newArrayList( "F_PROGRAM_PRIVATE_ADD" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageSchemaDescriptor.java	2014-05-28 11:48:43 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageSchemaDescriptor.java	2014-05-28 16:54:51 +0000
@@ -53,7 +53,7 @@
     {
         Schema schema = new Schema( ProgramStage.class, SINGULAR, PLURAL );
         schema.setApiEndpoint( API_ENDPOINT );
-        schema.setOrder( 149 );
+        schema.setOrder( 150 );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_PROGRAMSTAGE_ADD" ) ) );
         schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_PROGRAMSTAGE_DELETE" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramValidationSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramValidationSchemaDescriptor.java	2014-05-28 11:48:43 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramValidationSchemaDescriptor.java	2014-05-28 16:54:51 +0000
@@ -80,7 +80,7 @@
     public Schema getSchema()
     {
         Schema schema = new Schema( ProgramValidation.class, SINGULAR, PLURAL );
-        schema.setOrder( 151 );
+        schema.setOrder( 152 );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_PROGRAM_VALIDATION" ) ) );
         schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_PROGRAM_VALIDATION" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeGroupSchemaDescriptor.java	2014-05-28 11:48:43 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeGroupSchemaDescriptor.java	2014-05-28 16:54:51 +0000
@@ -53,7 +53,7 @@
     {
         Schema schema = new Schema( TrackedEntityAttributeGroup.class, SINGULAR, PLURAL );
         schema.setApiEndpoint( API_ENDPOINT );
-        schema.setOrder( 148 );
+        schema.setOrder( 149 );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE,
             Lists.newArrayList( "F_TRACKED_ENTITY_ATTRIBUTE_PUBLIC_ADD", "F_TRACKED_ENTITY_ATTRIBUTE_PRIVATE_ADD" ) ) );

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultObjectBridge.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultObjectBridge.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultObjectBridge.java	2014-05-28 16:54:51 +0000
@@ -36,6 +36,7 @@
 import java.util.Map;
 import java.util.Set;
 
+import com.google.common.collect.Maps;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.common.IdentifiableObject;
@@ -44,6 +45,7 @@
 import org.hisp.dhis.dxf2.timer.Timer;
 import org.hisp.dhis.period.PeriodStore;
 import org.hisp.dhis.period.PeriodType;
+import org.hisp.dhis.schema.SchemaService;
 import org.hisp.dhis.system.deletion.DeletionManager;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserCredentials;
@@ -74,6 +76,9 @@
     @Autowired
     private DeletionManager deletionManager;
 
+    @Autowired
+    private SchemaService schemaService;
+
     //-------------------------------------------------------------------------------------------------------
     // Internal and Semi-Public maps
     //-------------------------------------------------------------------------------------------------------
@@ -118,12 +123,12 @@
         Timer timer = new SystemNanoTimer();
         timer.start();
 
-        masterMap = new HashMap<Class<?>, Set<?>>();
-        periodTypeMap = new HashMap<String, PeriodType>();
-        uidMap = new HashMap<Class<? extends IdentifiableObject>, Map<String, IdentifiableObject>>();
-        codeMap = new HashMap<Class<? extends IdentifiableObject>, Map<String, IdentifiableObject>>();
-        nameMap = new HashMap<Class<? extends IdentifiableObject>, Map<String, IdentifiableObject>>();
-        usernameMap = new HashMap<String, UserCredentials>();
+        masterMap = Maps.newHashMap();
+        periodTypeMap = Maps.newHashMap();
+        uidMap = Maps.newHashMap();
+        codeMap = Maps.newHashMap();
+        nameMap = Maps.newHashMap();
+        usernameMap = Maps.newHashMap();
 
         populatePeriodTypeMap( PeriodType.class );
         populateUsernameMap( UserCredentials.class );

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/META-INF/dhis/beans.xml	2014-05-27 12:12:46 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/META-INF/dhis/beans.xml	2014-05-28 16:54:51 +0000
@@ -66,6 +66,11 @@
     <constructor-arg name="importerClass" type="java.lang.Class" value="org.hisp.dhis.dataelement.CategoryOptionGroup" />
   </bean>
 
+  <bean id="categoryOptionGroupSetImporter" class="org.hisp.dhis.dxf2.metadata.importers.DefaultIdentifiableObjectImporter"
+    scope="prototype">
+    <constructor-arg name="importerClass" type="java.lang.Class" value="org.hisp.dhis.dataelement.CategoryOptionGroupSet" />
+  </bean>
+
   <bean id="categoryOptionComboImporter" class="org.hisp.dhis.dxf2.metadata.importers.DefaultIdentifiableObjectImporter" scope="prototype">
     <constructor-arg name="importerClass" type="java.lang.Class" value="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo" />
   </bean>

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventreport/EventReport.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventreport/EventReport.hbm.xml	2014-05-11 15:39:09 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventreport/EventReport.hbm.xml	2014-05-28 16:54:51 +0000
@@ -35,7 +35,7 @@
 
     <many-to-one name="relatives" unique="true" class="org.hisp.dhis.period.RelativePeriods" column="relativeperiodsid"
       cascade="all-delete-orphan" foreign-key="fk_report_relativeperiodsid" />
-    
+
     <list name="organisationUnitLevels" table="eventreport_orgunitlevels">
       <cache usage="read-write" />
       <key column="eventreportid" foreign-key="fk_eventreport_orgunitlevels_eventreportid" />
@@ -50,14 +50,14 @@
       <many-to-many column="orgunitgroupid" class="org.hisp.dhis.organisationunit.OrganisationUnitGroup"
         foreign-key="fk_eventreport_itemorgunitgroups_orgunitgroupid" />
     </list>
-    
+
     <list name="attributeDimensions" table="eventreport_attributedimensions" cascade="all, delete-orphan">
       <key column="eventreportid" foreign-key="fk_eventreport_attributedimensions_eventreportid" />
       <list-index column="sort_order" base="0" />
       <many-to-many column="trackedentityattributedimensionid" class="org.hisp.dhis.trackedentity.TrackedEntityAttributeDimension"
         foreign-key="fk_eventreport_attributedimensions_attributedimensionid" />
     </list>
-    
+
     <list name="dataElementDimensions" table="eventreport_dataelementdimensions" cascade="all, delete-orphan">
       <key column="eventreportid" foreign-key="fk_eventreport_dataelementdimensions_eventreportid" />
       <list-index column="sort_order" base="0" />
@@ -73,16 +73,16 @@
 
     <many-to-one name="program" class="org.hisp.dhis.program.Program"
       column="programid" not-null="true" foreign-key="fk_eventreport_programid" />
-    
+
     <many-to-one name="programStage" class="org.hisp.dhis.program.ProgramStage"
       column="programstageid" foreign-key="fk_eventreport_programstageid" />
-    
+
     <property name="startDate" />
-    
+
     <property name="endDate" />
-    
+
     <property name="dataType" not-null="true" />
-    
+
     <list name="columnDimensions" table="eventreport_columns">
       <cache usage="read-write" />
       <key column="eventreportid" foreign-key="fk_eventreport_columns_eventreportid" />