=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamart/DataMartService.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamart/DataMartService.java 2011-08-13 10:41:20 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamart/DataMartService.java 2011-12-19 14:21:03 +0000 @@ -80,11 +80,13 @@ * @param indicatorIds the indicator identifiers. * @param periodIds the period identifiers. * @param organisationUnitIds the organisation unit identifiers. + * @param organisationUnitGroupIds the organisation unit group identifiers. * @param relatives the RelativePeriods. * @param completeExport indicates whether this is a complete export. */ void export( Collection dataElementIds, Collection indicatorIds, - Collection periodIds, Collection organisationUnitIds, RelativePeriods relatives, boolean completeExport ); + Collection periodIds, Collection organisationUnitIds, Collection organisationUnitGroupIds, + RelativePeriods relatives, boolean completeExport ); // ---------------------------------------------------------------------- // DataMartExport === modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/engine/DefaultDataMartEngine.java' --- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/engine/DefaultDataMartEngine.java 2011-12-11 16:07:13 +0000 +++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/engine/DefaultDataMartEngine.java 2011-12-19 14:21:03 +0000 @@ -186,6 +186,16 @@ final int cpuCores = SystemUtils.getCpuCores(); Clock clock = new Clock().startClock().logTime( "Data mart export process started, number of CPU cores: " + cpuCores ); + + // --------------------------------------------------------------------- + // Replace null with empty collection + // --------------------------------------------------------------------- + + dataElementIds = dataElementIds != null ? dataElementIds : new ArrayList(); + indicatorIds = indicatorIds != null ? indicatorIds : new ArrayList(); + periodIds = periodIds != null ? periodIds : new ArrayList(); + organisationUnitIds = organisationUnitIds != null ? organisationUnitIds : new ArrayList(); + organisationUnitGroupIds = organisationUnitGroupIds != null ? organisationUnitGroupIds : new ArrayList(); // --------------------------------------------------------------------- // Get objects === modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/impl/DefaultDataMartService.java' --- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/impl/DefaultDataMartService.java 2011-12-11 01:24:32 +0000 +++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/impl/DefaultDataMartService.java 2011-12-19 14:21:03 +0000 @@ -97,8 +97,7 @@ getIdentifiers( Indicator.class, dataMartExport.getIndicators() ), getIdentifiers( Period.class, allPeriods ), getIdentifiers( OrganisationUnit.class, dataMartExport.getOrganisationUnits() ), - null, - false, new OutputHolderState() ); + null, false, new OutputHolderState() ); } @@ -111,11 +110,12 @@ public void export( Collection dataElementIds, Collection indicatorIds, Collection periodIds, Collection organisationUnitIds, RelativePeriods relatives ) { - export( dataElementIds, indicatorIds, periodIds, organisationUnitIds, relatives, false ); + export( dataElementIds, indicatorIds, periodIds, organisationUnitIds, null, relatives, false ); } public void export( Collection dataElementIds, Collection indicatorIds, - Collection periodIds, Collection organisationUnitIds, RelativePeriods relatives, boolean completeExport ) + Collection periodIds, Collection organisationUnitIds, Collection organisationUnitGroupIds, + RelativePeriods relatives, boolean completeExport ) { if ( relatives != null ) { === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java 2011-12-19 13:10:25 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java 2011-12-19 14:21:03 +0000 @@ -185,7 +185,7 @@ if ( params.minorVersionGreaterOrEqual( "1.2" ) ) { - indicator.setCode( values.get( FIELD_CODE ) ); + indicator.setCode( values.get( FIELD_CODE ) ); } indicator.setDescription( values.get( FIELD_DESCRIPTION ) ); === modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataMartTask.java' --- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataMartTask.java 2011-11-25 10:09:59 +0000 +++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataMartTask.java 2011-12-19 14:21:03 +0000 @@ -149,7 +149,7 @@ Collection periodIds = ConversionUtils.getIdentifiers( Period.class, periodService.reloadPeriods( periods ) ); - dataMartService.export( dataElementIds, indicatorIds, periodIds, organisationUnitIds, null, true ); + dataMartService.export( dataElementIds, indicatorIds, periodIds, organisationUnitIds, null, null, true ); completenessService.exportDataSetCompleteness( dataSetIds, periodIds, organisationUnitIds ); } }