=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportObjectManager.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportObjectManager.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportObjectManager.java 2013-10-23 09:12:37 +0000 @@ -106,8 +106,6 @@ void importCharts(); - void importCompleteDataSetRegistrations(); - void importDataValues(); } === removed file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/CompleteDataSetRegistrationConverter.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/CompleteDataSetRegistrationConverter.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/CompleteDataSetRegistrationConverter.java 1970-01-01 00:00:00 +0000 @@ -1,191 +0,0 @@ -package org.hisp.dhis.importexport.dxf.converter; - -/* - * Copyright (c) 2004-2013, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import java.util.Collection; -import java.util.Map; - -import org.amplecode.quick.BatchHandler; -import org.amplecode.staxwax.reader.XMLReader; -import org.amplecode.staxwax.writer.XMLWriter; -import org.hisp.dhis.dataset.CompleteDataSetRegistration; -import org.hisp.dhis.dataset.CompleteDataSetRegistrationService; -import org.hisp.dhis.dataset.DataSet; -import org.hisp.dhis.dataset.DataSetService; -import org.hisp.dhis.importexport.ExportParams; -import org.hisp.dhis.importexport.ImportObjectService; -import org.hisp.dhis.importexport.ImportParams; -import org.hisp.dhis.importexport.XMLConverter; -import org.hisp.dhis.importexport.importer.CompleteDataSetRegistrationImporter; -import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.organisationunit.OrganisationUnitService; -import org.hisp.dhis.period.MonthlyPeriodType; -import org.hisp.dhis.period.Period; -import org.hisp.dhis.period.PeriodService; -import org.hisp.dhis.period.PeriodType; -import org.hisp.dhis.system.util.DateUtils; - -/** - * @author Lars Helge Overland - * @version $Id$ - */ -public class CompleteDataSetRegistrationConverter - extends CompleteDataSetRegistrationImporter implements XMLConverter -{ - public static final String COLLECTION_NAME = "completeDataSetRegistrations"; - public static final String ELEMENT_NAME = "registration"; - - private static final String FIELD_DATASET = "dataSet"; - private static final String FIELD_PERIOD = "period"; - private static final String FIELD_SOURCE = "source"; - private static final String FIELD_DATE = "date"; - - // ------------------------------------------------------------------------- - // Properties - // ------------------------------------------------------------------------- - - private CompleteDataSetRegistrationService registrationService; - - private DataSetService dataSetService; - - private OrganisationUnitService organisationUnitService; - - private PeriodService periodService; - - private Map dataSetMapping; - private Map periodMapping; - private Map sourceMapping; - - private PeriodType periodType; - - // ------------------------------------------------------------------------- - // Constructor - // ------------------------------------------------------------------------- - - /** - * Constructor for write operations. - */ - public CompleteDataSetRegistrationConverter( CompleteDataSetRegistrationService completeDataSetRegistrationService, - DataSetService dataSetService, - OrganisationUnitService organisationUnitService, - PeriodService periodService ) - { - this.registrationService = completeDataSetRegistrationService; - this.dataSetService = dataSetService; - this.organisationUnitService = organisationUnitService; - this.periodService = periodService; - } - - /** - * Constructor for read operations. - * - * @param batchHandler the BatchHandler to use. - * @param importObjectService the ImportObjectService to use. - * @param params the ImportParams to use. - * @param dataSetMapping the DataSet mapping to use. - * @param periodMapping the Period mapping to use. - * @param sourceMapping the Source mapping to use. - */ - public CompleteDataSetRegistrationConverter( BatchHandler batchHandler, - ImportObjectService importObjectService, - ImportParams params, - Map dataSetMapping, - Map periodMapping, - Map sourceMapping ) - { - this.batchHandler = batchHandler; - this.importObjectService = importObjectService; - this.params = params; - this.dataSetMapping = dataSetMapping; - this.periodMapping = periodMapping; - this.sourceMapping = sourceMapping; - this.periodType = PeriodType.getPeriodTypeByName( MonthlyPeriodType.NAME ); - } - - // ------------------------------------------------------------------------- - // XMLConverter implementation - // ------------------------------------------------------------------------- - - public void write( XMLWriter writer, ExportParams params ) - { - if ( params.isIncludeCompleteDataSetRegistrations() ) - { - Collection registrations = null; - - Collection dataSets = dataSetService.getDataSets( params.getDataSets() ); - Collection units = organisationUnitService.getOrganisationUnits( params.getOrganisationUnits() ); - Collection periods = periodService.getPeriods( params.getPeriods() ); - - if ( dataSets.size() > 0 && units.size() > 0 && periods.size() > 0 ) - { - writer.openElement( COLLECTION_NAME ); - - registrations = registrationService.getCompleteDataSetRegistrations( dataSets, units, periods ); - - for ( final CompleteDataSetRegistration registration : registrations ) - { - writer.writeElement( ELEMENT_NAME, EMPTY, - FIELD_DATASET, String.valueOf( registration.getDataSet().getId() ), - FIELD_PERIOD, String.valueOf( registration.getPeriod().getId() ), - FIELD_SOURCE, String.valueOf( registration.getSource().getId() ), - FIELD_DATE, DateUtils.getMediumDateString( registration.getDate() ) ); - } - - writer.closeElement(); - } - } - } - - public void read( XMLReader reader, ImportParams params ) - { - while ( reader.moveToStartElement( ELEMENT_NAME, COLLECTION_NAME ) ) - { - final Map values = reader.readElements( ELEMENT_NAME ); - - final CompleteDataSetRegistration registration = new CompleteDataSetRegistration(); - - DataSet dataSet = new DataSet( "" ); - registration.setDataSet( dataSet ); - - Period period = periodType.createPeriod(); - registration.setPeriod( period ); - - OrganisationUnit source = new OrganisationUnit( "" ); - registration.setSource( source ); - - registration.getDataSet().setId( dataSetMapping.get( Integer.parseInt( values.get( FIELD_DATASET ) ) ) ); - registration.getPeriod().setId( periodMapping.get( Integer.parseInt( values.get( FIELD_PERIOD ) ) ) ); - registration.getSource().setId( sourceMapping.get( Integer.parseInt( values.get( FIELD_SOURCE ) ) ) ); - - registration.setDate( DateUtils.getMediumDate( values.get( FIELD_DATE ) ) ); - - importObject( registration, params ); - } - } -} === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DXFConverter.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DXFConverter.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DXFConverter.java 2013-10-23 09:12:37 +0000 @@ -55,7 +55,6 @@ import org.hisp.dhis.dataelement.DataElementGroup; import org.hisp.dhis.dataelement.DataElementGroupSet; import org.hisp.dhis.dataelement.DataElementService; -import org.hisp.dhis.dataset.CompleteDataSetRegistration; import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.dataset.DataSetService; import org.hisp.dhis.expression.ExpressionService; @@ -76,7 +75,6 @@ import org.hisp.dhis.indicator.IndicatorType; import org.hisp.dhis.jdbc.batchhandler.CategoryCategoryOptionAssociationBatchHandler; import org.hisp.dhis.jdbc.batchhandler.CategoryComboCategoryAssociationBatchHandler; -import org.hisp.dhis.jdbc.batchhandler.CompleteDataSetRegistrationBatchHandler; import org.hisp.dhis.jdbc.batchhandler.ConceptBatchHandler; import org.hisp.dhis.jdbc.batchhandler.ConstantBatchHandler; import org.hisp.dhis.jdbc.batchhandler.DataDictionaryBatchHandler; @@ -977,27 +975,6 @@ log.info( "Imported Charts" ); } - else if ( reader.isStartElement( CompleteDataSetRegistrationConverter.COLLECTION_NAME ) - && params.isDataValues() ) - { - log.debug("Starting CompleteDataSetRegistrations import"); - - state.setMessage( "importing_complete_data_set_registrations" ); - - BatchHandler batchHandler = batchHandlerFactory.createBatchHandler( - CompleteDataSetRegistrationBatchHandler.class ).init(); - - XMLConverter converter = new CompleteDataSetRegistrationConverter( batchHandler, importObjectService, - params, objectMappingGenerator.getDataSetMapping( params.skipMapping() ), objectMappingGenerator - .getPeriodMapping( params.skipMapping() ), objectMappingGenerator - .getOrganisationUnitMapping( params.skipMapping() ) ); - - converterInvoker.invokeRead( converter, reader, params ); - - batchHandler.flush(); - - log.info( "Imported CompleteDataSetRegistrations" ); - } } if ( params.isAnalysis() ) === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/exporter/DefaultDXFExportService.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/exporter/DefaultDXFExportService.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/exporter/DefaultDXFExportService.java 2013-10-23 09:12:37 +0000 @@ -52,7 +52,6 @@ import org.hisp.dhis.datadictionary.DataDictionaryService; import org.hisp.dhis.dataelement.DataElementCategoryService; import org.hisp.dhis.dataelement.DataElementService; -import org.hisp.dhis.dataset.CompleteDataSetRegistrationService; import org.hisp.dhis.dataset.DataSetService; import org.hisp.dhis.importexport.ExportParams; import org.hisp.dhis.importexport.ExportPipeThread; @@ -60,7 +59,6 @@ import org.hisp.dhis.importexport.dxf.converter.CategoryCategoryOptionAssociationConverter; import org.hisp.dhis.importexport.dxf.converter.CategoryComboCategoryAssociationConverter; import org.hisp.dhis.importexport.dxf.converter.ChartConverter; -import org.hisp.dhis.importexport.dxf.converter.CompleteDataSetRegistrationConverter; import org.hisp.dhis.importexport.dxf.converter.ConceptConverter; import org.hisp.dhis.importexport.dxf.converter.ConstantConverter; import org.hisp.dhis.importexport.dxf.converter.DataDictionaryConverter; @@ -222,14 +220,6 @@ this.chartService = chartService; } - private CompleteDataSetRegistrationService completeDataSetRegistrationService; - - public void setCompleteDataSetRegistrationService( - CompleteDataSetRegistrationService completeDataSetRegistrationService ) - { - this.completeDataSetRegistrationService = completeDataSetRegistrationService; - } - // ------------------------------------------------------------------------- // ExportService implementation // ------------------------------------------------------------------------- @@ -317,8 +307,6 @@ thread.registerXMLConverter( new ReportConverter( reportService ) ); thread.registerXMLConverter( new ReportTableConverter( reportTableService ) ); thread.registerXMLConverter( new ChartConverter( chartService ) ); - thread.registerXMLConverter( new CompleteDataSetRegistrationConverter( completeDataSetRegistrationService, - dataSetService, organisationUnitService, periodService ) ); thread.start(); === removed file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/CompleteDataSetRegistrationImporter.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/CompleteDataSetRegistrationImporter.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/CompleteDataSetRegistrationImporter.java 1970-01-01 00:00:00 +0000 @@ -1,102 +0,0 @@ -package org.hisp.dhis.importexport.importer; - -/* - * Copyright (c) 2004-2013, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import org.amplecode.quick.BatchHandler; -import org.hisp.dhis.dataset.CompleteDataSetRegistration; -import org.hisp.dhis.importexport.GroupMemberType; -import org.hisp.dhis.importexport.ImportParams; -import org.hisp.dhis.importexport.Importer; - -/** - * @author Lars Helge Overland - * @version $Id$ - */ -public class CompleteDataSetRegistrationImporter - extends AbstractImporter implements Importer -{ - protected ImportParams params; - - public CompleteDataSetRegistrationImporter() - { - } - - public CompleteDataSetRegistrationImporter( BatchHandler batchHandler, ImportParams params ) - { - this.batchHandler = batchHandler; - this.params = params; - } - - @Override - public void importObject( CompleteDataSetRegistration object, ImportParams params ) - { - read( object, GroupMemberType.NONE, params ); - } - - @Override - protected void importUnique( CompleteDataSetRegistration object ) - { - batchHandler.addObject( object ); - } - - @Override - protected void importMatching( CompleteDataSetRegistration object, CompleteDataSetRegistration match ) - { - match.setDate( object.getDate() ); - - batchHandler.updateObject( match ); - } - - @Override - protected CompleteDataSetRegistration getMatching( CompleteDataSetRegistration object ) - { - // --------------------------------------------------------------------- - // CompleteDataSetRegistration cannot be compared against existing - // registrations during preview since the elements in its composite id - // have not been mapped - // --------------------------------------------------------------------- - - if ( params.isPreview() ) - { - return null; - } - - return batchHandler.objectExists( object ) ? object : null; - } - - @Override - protected boolean isIdentical( CompleteDataSetRegistration object, CompleteDataSetRegistration existing ) - { - // --------------------------------------------------------------------- - // Matching registrations will not be overwritten - // --------------------------------------------------------------------- - - return true; - } -} === removed file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/DataEntryFormImporter.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/DataEntryFormImporter.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/DataEntryFormImporter.java 1970-01-01 00:00:00 +0000 @@ -1,107 +0,0 @@ -package org.hisp.dhis.importexport.importer; - -/* - * Copyright (c) 2004-2013, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import org.amplecode.quick.BatchHandler; -import org.hisp.dhis.dataentryform.DataEntryForm; -import org.hisp.dhis.dataentryform.DataEntryFormService; -import org.hisp.dhis.importexport.GroupMemberType; -import org.hisp.dhis.importexport.ImportParams; -import org.hisp.dhis.importexport.Importer; -import org.hisp.dhis.importexport.mapping.NameMappingUtil; - -/** - * @author Chau Thu Tran - * - * @version $ID: DataEntryFormImporter.java Dec 16, 2010 2:36:05 PM $ - */ -public class DataEntryFormImporter - extends AbstractImporter - implements Importer -{ - protected DataEntryFormService dataEntryFormService; - - // ------------------------------------------------------------------------- - // Constructor - // ------------------------------------------------------------------------- - - public DataEntryFormImporter( ) - { - } - - public DataEntryFormImporter( BatchHandler batchHandler, DataEntryFormService dataEntryFormService ) - { - this.batchHandler = batchHandler; - this.dataEntryFormService = dataEntryFormService; - } - - // ------------------------------------------------------------------------- - // Override methods - // ------------------------------------------------------------------------- - - @Override - public void importObject( DataEntryForm object, ImportParams params ) - { - NameMappingUtil.addDataEntryFormMapping( object.getId(), object.getName() ); - - read( object, GroupMemberType.NONE, params ); - } - - @Override - protected void importUnique( DataEntryForm object ) - { - batchHandler.addObject( object ); - } - - @Override - protected void importMatching( DataEntryForm object, DataEntryForm match ) - { - match.setName( object.getName() ); - match.setHtmlCode( object.getHtmlCode() ); - - dataEntryFormService.updateDataEntryForm( match ); - } - - @Override - protected DataEntryForm getMatching( DataEntryForm object ) - { - return dataEntryFormService.getDataEntryFormByName( object.getName() ); - } - - @Override - protected boolean isIdentical( DataEntryForm object, DataEntryForm existing ) - { - if ( object.getName().equals( existing.getName() ) ) - { - return true; - } - - return false; - } -} === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectManager.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectManager.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectManager.java 2013-10-23 09:12:37 +0000 @@ -52,7 +52,6 @@ import org.hisp.dhis.dataelement.DataElementGroup; import org.hisp.dhis.dataelement.DataElementGroupSet; import org.hisp.dhis.dataelement.DataElementService; -import org.hisp.dhis.dataset.CompleteDataSetRegistration; import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.dataset.DataSetService; import org.hisp.dhis.datavalue.DataValue; @@ -71,7 +70,6 @@ import org.hisp.dhis.importexport.ImportType; import org.hisp.dhis.importexport.Importer; import org.hisp.dhis.importexport.importer.ChartImporter; -import org.hisp.dhis.importexport.importer.CompleteDataSetRegistrationImporter; import org.hisp.dhis.importexport.importer.ConstantImporter; import org.hisp.dhis.importexport.importer.DataDictionaryImporter; import org.hisp.dhis.importexport.importer.DataElementCategoryComboImporter; @@ -104,7 +102,6 @@ import org.hisp.dhis.indicator.IndicatorType; import org.hisp.dhis.jdbc.batchhandler.CategoryCategoryOptionAssociationBatchHandler; import org.hisp.dhis.jdbc.batchhandler.CategoryComboCategoryAssociationBatchHandler; -import org.hisp.dhis.jdbc.batchhandler.CompleteDataSetRegistrationBatchHandler; import org.hisp.dhis.jdbc.batchhandler.ConstantBatchHandler; import org.hisp.dhis.jdbc.batchhandler.DataDictionaryBatchHandler; import org.hisp.dhis.jdbc.batchhandler.DataDictionaryDataElementBatchHandler; @@ -1008,38 +1005,6 @@ } @Transactional - public void importCompleteDataSetRegistrations() - { - BatchHandler batchHandler = batchHandlerFactory.createBatchHandler( - CompleteDataSetRegistrationBatchHandler.class ).init(); - - Collection importObjects = importObjectStore.getImportObjects( CompleteDataSetRegistration.class ); - - Map dataSetMapping = objectMappingGenerator.getDataSetMapping( false ); - Map periodMapping = objectMappingGenerator.getPeriodMapping( false ); - Map sourceMapping = objectMappingGenerator.getOrganisationUnitMapping( false ); - - Importer importer = new CompleteDataSetRegistrationImporter( batchHandler, params ); - - for ( ImportObject importObject : importObjects ) - { - CompleteDataSetRegistration registration = (CompleteDataSetRegistration) importObject.getObject(); - - registration.getDataSet().setId( dataSetMapping.get( registration.getDataSet().getId() ) ); - registration.getPeriod().setId( periodMapping.get( registration.getPeriod().getId() ) ); - registration.getSource().setId( sourceMapping.get( registration.getSource().getId() ) ); - - importer.importObject( registration, params ); - } - - batchHandler.flush(); - - importObjectStore.deleteImportObjects( CompleteDataSetRegistration.class ); - - log.info( "Imported CompleteDataSetRegistrations" ); - } - - @Transactional public void importDataValues() { Integer importedObjects = 0; === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectService.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectService.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectService.java 2013-10-23 09:12:37 +0000 @@ -670,7 +670,6 @@ importObjectManager.importReports(); importObjectManager.importReportTables(); importObjectManager.importCharts(); - importObjectManager.importCompleteDataSetRegistrations(); importObjectManager.importDataValues(); NameMappingUtil.clearMapping(); === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-services/dhis-service-importexport/src/main/resources/META-INF/dhis/beans.xml 2013-10-13 16:22:18 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/resources/META-INF/dhis/beans.xml 2013-10-23 09:12:37 +0000 @@ -235,7 +235,6 @@ - === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/TabularInitializeAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/TabularInitializeAction.java 2013-10-23 08:37:56 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/TabularInitializeAction.java 2013-10-23 09:12:37 +0000 @@ -29,7 +29,6 @@ */ import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.List;