← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1956: Removed annotations from dhis-service-importexport

 

Merge authors:
  Lars Helge Øverland (larshelge)
------------------------------------------------------------
revno: 1956 [merge]
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2010-10-29 11:01:56 +0200
message:
  Removed annotations from dhis-service-importexport
modified:
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/DefaultImportService.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/exporter/DefaultCSVExportService.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/configuration/DefaultIbatisConfigurationManager.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/importer/DefaultDhis14FileImportService.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/exporter/DefaultDhis14XMLExportService.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/importer/DefaultDhis14XMLImportService.java
  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/exporter/DefaultDXFExportService.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/hibernate/HibernateImportDataValueStore.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/hibernate/HibernateImportObjectStore.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/DefaultObjectMappingGenerator.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/pdf/exporter/ITextPDFExportService.java
  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/DefaultImportObjectService.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/xml/LocManagerXSLTLocator.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/xml/XMLPreConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dhis14/IbatisConfigurationManagerTest.java
  dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/DXFImportServiceTest.java
  dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/util/XsltUtils.java


--
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-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/DefaultImportService.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/DefaultImportService.java	2010-09-13 10:22:43 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/DefaultImportService.java	2010-10-29 08:56:13 +0000
@@ -67,12 +67,20 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    @Autowired
     private XMLPreConverter preConverter;
 
-    @Autowired
+    public void setPreConverter( XMLPreConverter preConverter )
+    {
+        this.preConverter = preConverter;
+    }
+
     private DXFConverter converter;
 
+    public void setConverter( DXFConverter converter )
+    {
+        this.converter = converter;
+    }
+
     // -------------------------------------------------------------------------
     // ImportService implementation
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/exporter/DefaultCSVExportService.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/exporter/DefaultCSVExportService.java	2010-05-18 19:22:26 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/exporter/DefaultCSVExportService.java	2010-10-29 08:56:13 +0000
@@ -40,7 +40,6 @@
 import org.hisp.dhis.importexport.ExportService;
 import org.hisp.dhis.importexport.csv.converter.ReportTableDataConverter;
 import org.hisp.dhis.reporttable.ReportTableService;
-import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Lars Helge Overland
@@ -53,9 +52,13 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    @Autowired
     private SessionFactory sessionFactory;
     
+    public void setSessionFactory( SessionFactory sessionFactory )
+    {
+        this.sessionFactory = sessionFactory;
+    }
+
     private ReportTableService reportTableService;
 
     public void setReportTableService( ReportTableService reportTableService )

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/configuration/DefaultIbatisConfigurationManager.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/configuration/DefaultIbatisConfigurationManager.java	2010-05-17 21:05:26 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/configuration/DefaultIbatisConfigurationManager.java	2010-10-29 08:56:13 +0000
@@ -76,12 +76,20 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    @Autowired
     private LocationManager locationManager;
 
-    @Autowired
+    public void setLocationManager( LocationManager locationManager )
+    {
+        this.locationManager = locationManager;
+    }
+
     private ConfigurationManager<IbatisConfiguration> configurationManager;
-    
+
+    public void setConfigurationManager( ConfigurationManager<IbatisConfiguration> configurationManager )
+    {
+        this.configurationManager = configurationManager;
+    }
+
     // -------------------------------------------------------------------------
     // IbatisConfigurationManager implementation
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/importer/DefaultDhis14FileImportService.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/importer/DefaultDhis14FileImportService.java	2010-10-28 09:17:13 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/importer/DefaultDhis14FileImportService.java	2010-10-29 08:56:13 +0000
@@ -227,9 +227,13 @@
         this.aggregatedDataValueService = aggregatedDataValueService;
     }
 
-    @Autowired
     private HibernateCacheManager cacheManager;
 
+    public void setCacheManager( HibernateCacheManager cacheManager )
+    {
+        this.cacheManager = cacheManager;
+    }
+
     private ImportAnalyser importAnalyser;
     
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/exporter/DefaultDhis14XMLExportService.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/exporter/DefaultDhis14XMLExportService.java	2010-08-31 05:47:11 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/exporter/DefaultDhis14XMLExportService.java	2010-10-29 08:56:13 +0000
@@ -83,9 +83,20 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    @Autowired
     private SessionFactory sessionFactory;
     
+    public void setSessionFactory( SessionFactory sessionFactory )
+    {
+        this.sessionFactory = sessionFactory;
+    }
+
+    private StatementManager statementManager;
+
+    public void setStatementManager( StatementManager statementManager )
+    {
+        this.statementManager = statementManager;
+    }
+
     private DataElementService dataElementService;
 
     public void setDataElementService( DataElementService dataElementService )
@@ -114,13 +125,6 @@
         this.aggregatedDataValueService = aggregatedDataValueService;
     }
 
-    private StatementManager statementManager;
-
-    public void setStatementManager( StatementManager statementManager )
-    {
-        this.statementManager = statementManager;
-    }
-
     // -------------------------------------------------------------------------
     // ExportService implementation
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/importer/DefaultDhis14XMLImportService.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/importer/DefaultDhis14XMLImportService.java	2010-06-18 15:21:28 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/importer/DefaultDhis14XMLImportService.java	2010-10-29 08:56:13 +0000
@@ -163,9 +163,13 @@
         this.expressionService = expressionService;
     }
 
-    @Autowired
     private HibernateCacheManager cacheManager;
 
+    public void setCacheManager( HibernateCacheManager cacheManager )
+    {
+        this.cacheManager = cacheManager;
+    }
+
     private ImportAnalyser importAnalyser;
 
     // -------------------------------------------------------------------------

=== 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	2010-09-17 21:30:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DXFConverter.java	2010-10-29 08:56:13 +0000
@@ -280,9 +280,13 @@
         this.objectMappingGenerator = objectMappingGenerator;
     }
 
-    @Autowired
     private HibernateCacheManager cacheManager;
 
+    public void setCacheManager( HibernateCacheManager cacheManager )
+    {
+        this.cacheManager = cacheManager;
+    }
+
     private ConverterInvoker converterInvoker;
 
     public void setConverterInvoker( ConverterInvoker converterInvoker )

=== 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	2010-09-17 21:30:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/exporter/DefaultDXFExportService.java	2010-10-29 08:56:13 +0000
@@ -125,12 +125,20 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    @Autowired
     private SessionFactory sessionFactory;
 
-    @Autowired
+    public void setSessionFactory( SessionFactory sessionFactory )
+    {
+        this.sessionFactory = sessionFactory;
+    }
+
     private StatementManager statementManager;
 
+    public void setStatementManager( StatementManager statementManager )
+    {
+        this.statementManager = statementManager;
+    }
+
     private ConceptService conceptService;
 
     public void setConceptService(ConceptService conceptService)

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/hibernate/HibernateImportDataValueStore.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/hibernate/HibernateImportDataValueStore.java	2010-05-18 19:22:26 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/hibernate/HibernateImportDataValueStore.java	2010-10-29 08:56:13 +0000
@@ -51,12 +51,20 @@
     // Dependencies
     // ----------------------------------------------------------------------
 
-    @Autowired
     private SessionFactory sessionFactory;
 
-    @Autowired
+    public void setSessionFactory( SessionFactory sessionFactory )
+    {
+        this.sessionFactory = sessionFactory;
+    }
+
     private JdbcTemplate jdbcTemplate;
 
+    public void setJdbcTemplate( JdbcTemplate jdbcTemplate )
+    {
+        this.jdbcTemplate = jdbcTemplate;
+    }
+
     // ----------------------------------------------------------------------
     // ImportDataValueStore implementation
     // ----------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/hibernate/HibernateImportObjectStore.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/hibernate/HibernateImportObjectStore.java	2010-05-18 19:22:26 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/hibernate/HibernateImportObjectStore.java	2010-10-29 08:56:13 +0000
@@ -38,7 +38,6 @@
 import org.hisp.dhis.importexport.ImportObject;
 import org.hisp.dhis.importexport.ImportObjectStatus;
 import org.hisp.dhis.importexport.ImportObjectStore;
-import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Lars Helge Overland
@@ -51,9 +50,13 @@
     // Dependencies
     // ----------------------------------------------------------------------
 
-    @Autowired
     private SessionFactory sessionFactory;
 
+    public void setSessionFactory( SessionFactory sessionFactory )
+    {
+        this.sessionFactory = sessionFactory;
+    }
+
     // ----------------------------------------------------------------------
     // ImportObjectStore implementation
     // ----------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/DefaultObjectMappingGenerator.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/DefaultObjectMappingGenerator.java	2010-09-17 21:30:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/DefaultObjectMappingGenerator.java	2010-10-29 08:56:13 +0000
@@ -33,7 +33,6 @@
 import org.amplecode.quick.BatchHandler;
 import org.amplecode.quick.BatchHandlerFactory;
 import org.hisp.dhis.concept.Concept;
-import org.hisp.dhis.concept.ConceptService;
 import org.hisp.dhis.datadictionary.DataDictionary;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategory;
@@ -74,7 +73,6 @@
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.reporttable.ReportTable;
 import org.hisp.dhis.system.util.LoggingHashMap;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
 /**
@@ -88,9 +86,13 @@
     // Dependencies
     // -------------------------------------------------------------------------
     
-    @Autowired
     private BatchHandlerFactory batchHandlerFactory;
     
+    public void setBatchHandlerFactory( BatchHandlerFactory batchHandlerFactory )
+    {
+        this.batchHandlerFactory = batchHandlerFactory;
+    }
+
     private PeriodStore periodStore;
 
     public void setPeriodStore( PeriodStore periodStore )
@@ -101,14 +103,7 @@
     // -------------------------------------------------------------------------
     // Concept
     // -------------------------------------------------------------------------
-    @Autowired
-    private ConceptService conceptService;
-
-    public void setConceptService( ConceptService conceptService )
-    {
-        this.conceptService = conceptService;
-    }
-
+    
     public Map<Object, Integer> getConceptMapping( boolean skipMapping )
     {
         BatchHandler<Concept> batchHandler = batchHandlerFactory.createBatchHandler( ConceptBatchHandler.class );

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/pdf/exporter/ITextPDFExportService.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/pdf/exporter/ITextPDFExportService.java	2010-09-01 07:30:48 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/pdf/exporter/ITextPDFExportService.java	2010-10-29 08:56:13 +0000
@@ -47,7 +47,6 @@
 import org.hisp.dhis.importexport.pdf.converter.OrganisationUnitHierarchyConverter;
 import org.hisp.dhis.indicator.IndicatorService;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Lars Helge Overland
@@ -60,9 +59,13 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    @Autowired
     private SessionFactory sessionFactory;
 
+    public void setSessionFactory( SessionFactory sessionFactory )
+    {
+        this.sessionFactory = sessionFactory;
+    }
+
     private DataElementService dataElementService;
 
     public void setDataElementService( DataElementService dataElementService )

=== 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	2010-08-31 05:47:11 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectManager.java	2010-10-29 08:56:13 +0000
@@ -150,7 +150,6 @@
 import org.hisp.dhis.source.Source;
 import org.hisp.dhis.validation.ValidationRule;
 import org.hisp.dhis.validation.ValidationRuleService;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
 /**
@@ -168,9 +167,13 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    @Autowired
     private BatchHandlerFactory batchHandlerFactory;
     
+    public void setBatchHandlerFactory( BatchHandlerFactory batchHandlerFactory )
+    {
+        this.batchHandlerFactory = batchHandlerFactory;
+    }
+
     private ObjectMappingGenerator objectMappingGenerator;
 
     public void setObjectMappingGenerator( ObjectMappingGenerator objectMappingGenerator )

=== 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	2010-07-30 12:59:39 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectService.java	2010-10-29 08:56:13 +0000
@@ -200,9 +200,13 @@
         this.dataValueService = dataValueService;
     }
     
-    @Autowired
     private HibernateCacheManager cacheManager;
-    
+
+    public void setCacheManager( HibernateCacheManager cacheManager )
+    {
+        this.cacheManager = cacheManager;
+    }
+
     // -------------------------------------------------------------------------
     // ImportObjectService implementation
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/xml/LocManagerXSLTLocator.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/xml/LocManagerXSLTLocator.java	2010-09-17 12:11:18 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/xml/LocManagerXSLTLocator.java	2010-10-29 08:56:13 +0000
@@ -56,9 +56,13 @@
 
     private static final String TRANSFORMER_MAP = "transform/transforms.xml";
 
-    @Autowired
     private LocationManager locationManager;
 
+    public void setLocationManager( LocationManager locationManager )
+    {
+        this.locationManager = locationManager;
+    }
+
     @Override
     public InputStream getTransformerByTag( String identifier )
         throws ImportException

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/xml/XMLPreConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/xml/XMLPreConverter.java	2010-09-17 12:11:18 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/xml/XMLPreConverter.java	2010-10-29 08:56:13 +0000
@@ -82,11 +82,19 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    @Autowired
     private XSLTLocator xsltLocator;
 
-    @Autowired
-    URIResolver resolver;
+    public void setXsltLocator( XSLTLocator xsltLocator )
+    {
+        this.xsltLocator = xsltLocator;
+    }
+
+    private URIResolver dhisResolver;
+
+    public void setDhisResolver( URIResolver dhisResolver )
+    {
+        this.dhisResolver = dhisResolver;
+    }
 
     public QName getDocumentRoot(BufferedInputStream xmlDataStream) throws ImportException
     {
@@ -145,7 +153,7 @@
         {
             TransformerTask tt = new TransformerTask( sheet, xsltParams );
 
-            tt.transform( source, result, resolver );
+            tt.transform( source, result, dhisResolver );
             log.debug( "Transform successful" );
 
         } catch ( Exception ex )

=== 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	2010-09-17 21:30:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/resources/META-INF/dhis/beans.xml	2010-10-29 08:56:13 +0000
@@ -44,14 +44,19 @@
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 
 	<bean id="org.hisp.dhis.importexport.ImportDataValueStore"
-		class="org.hisp.dhis.importexport.hibernate.HibernateImportDataValueStore"/>
+		class="org.hisp.dhis.importexport.hibernate.HibernateImportDataValueStore">
+		<property name="sessionFactory" ref="sessionFactory"/>
+		<property name="jdbcTemplate" ref="jdbcTemplate"/>
+	</bean>
 
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 	<!-- ImportObjectStore                                             -->
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 
 	<bean id="org.hisp.dhis.importexport.ImportObjectStore"
-		class="org.hisp.dhis.importexport.hibernate.HibernateImportObjectStore"/>
+		class="org.hisp.dhis.importexport.hibernate.HibernateImportObjectStore">
+		<property name="sessionFactory" ref="sessionFactory"/>
+	</bean>
 
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 	<!-- ImportDataValueService                                        -->
@@ -69,6 +74,7 @@
 
 	<bean id="org.hisp.dhis.importexport.ImportObjectManager"
 		class="org.hisp.dhis.importexport.service.DefaultImportObjectManager">
+		<property name="batchHandlerFactory" ref="batchHandlerFactory"/>
 		<property name="objectMappingGenerator"
 			ref="org.hisp.dhis.importexport.mapping.ObjectMappingGenerator" />
 		<property name="importObjectStore" ref="org.hisp.dhis.importexport.ImportObjectStore" />
@@ -118,6 +124,7 @@
 		<property name="chartService" ref="org.hisp.dhis.chart.ChartService"/>
 		<property name="olapURLService" ref="org.hisp.dhis.olap.OlapURLService" />
 		<property name="dataValueService" ref="org.hisp.dhis.datavalue.DataValueService" />
+		<property name="cacheManager" ref="cacheManager"/>
 	</bean>
 
 	<bean id="internal-process-ImportPreview" class="org.hisp.dhis.importexport.ImportPreviewInternalProcess"
@@ -155,6 +162,7 @@
 		<property name="converterInvoker"
 			ref="org.hisp.dhis.importexport.invoker.ConverterInvoker" />
 		<property name="expressionService" ref="org.hisp.dhis.expression.ExpressionService"/>
+		<property name="cacheManager" ref="cacheManager"/>
 	</bean>
 
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -190,6 +198,7 @@
 			ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
 		<property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
 		<property name="aggregatedDataValueService" ref="org.hisp.dhis.aggregation.AggregatedDataValueService" />
+		<property name="cacheManager" ref="cacheManager"/>
 	</bean>
 
 	<bean
@@ -210,6 +219,8 @@
 		class="org.hisp.dhis.importexport.dhis14.file.configuration.DefaultIbatisConfigurationManager">
 		<property name="configDir" value="importexport" />
 		<property name="configFile" value="ibatisConfiguration.xml" />
+		<property name="locationManager" ref="locationManager"/>
+		<property name="configurationManager" ref="configurationManager"/>
 	</bean>
 
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -253,19 +264,27 @@
                   ref="org.hisp.dhis.importexport.mapping.ObjectMappingGenerator" />
         <property name="converterInvoker"
                   ref="org.hisp.dhis.importexport.invoker.ConverterInvoker" />
+		<property name="cacheManager" ref="cacheManager"/>
     </bean>
 
     <bean id="org.hisp.dhis.importexport.ImportService"
           class="org.hisp.dhis.importexport.DefaultImportService">
+		  <property name="converter" ref="dxfv1-Converter"/>
+		  <property name="preConverter" ref="preConverter"/>
     </bean>
 
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 	<!-- XSLT based import                                                    -->
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 
-	<bean id="xsltLocator" class="org.hisp.dhis.importexport.xml.LocManagerXSLTLocator"/>
+	<bean id="xsltLocator" class="org.hisp.dhis.importexport.xml.LocManagerXSLTLocator">
+		<property name="locationManager" ref="locationManager"/>
+	</bean>
 	
-	<bean id="preConverter" class="org.hisp.dhis.importexport.xml.XMLPreConverter"/>
+	<bean id="preConverter" class="org.hisp.dhis.importexport.xml.XMLPreConverter">
+		<property name="xsltLocator" ref="xsltLocator"/>
+		<property name="dhisResolver" ref="dhisResolver"/>
+	</bean>
 
     <bean id="org.hisp.dhis.importexport.invoker.ConverterInvoker"
           class="org.hisp.dhis.importexport.invoker.DefaultConverterInvoker" />
@@ -276,6 +295,8 @@
 
 	<bean id="org.hisp.dhis.importexport.DXFExportService"
 		class="org.hisp.dhis.importexport.dxf.exporter.DefaultDXFExportService">
+		<property name="sessionFactory" ref="sessionFactory"/>
+		<property name="statementManager" ref="statementManager"/>
 		<property name="conceptService"
 			ref="org.hisp.dhis.concept.ConceptService" />
 		<property name="categoryService"
@@ -307,6 +328,7 @@
 
 	<bean id="org.hisp.dhis.importexport.PDFExportService"
 		class="org.hisp.dhis.importexport.pdf.exporter.ITextPDFExportService">
+		<property name="sessionFactory" ref="sessionFactory"/>
 		<property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
 		<property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
 		<property name="organisationUnitService"
@@ -321,11 +343,12 @@
 
 	<bean id="org.hisp.dhis.importexport.Dhis14XMLExportService"
 		class="org.hisp.dhis.importexport.dhis14.xml.exporter.DefaultDhis14XMLExportService">
+		<property name="sessionFactory" ref="sessionFactory"/>
+		<property name="statementManager" ref="statementManager"/>
 		<property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
 		<property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
 		<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
 		<property name="aggregatedDataValueService" ref="org.hisp.dhis.aggregation.AggregatedDataValueService" />
-		<property name="statementManager" ref="statementManager" />
 	</bean>
 
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -334,6 +357,7 @@
 
 	<bean id="org.hisp.dhis.importexport.CSVExportService"
 		class="org.hisp.dhis.importexport.csv.exporter.DefaultCSVExportService">
+		<property name="sessionFactory" ref="sessionFactory"/>
 		<property name="reportTableService" ref="org.hisp.dhis.reporttable.ReportTableService" />
 	</bean>
 
@@ -343,6 +367,7 @@
 
 	<bean id="org.hisp.dhis.importexport.mapping.ObjectMappingGenerator"
 		class="org.hisp.dhis.importexport.mapping.DefaultObjectMappingGenerator">
+		<property name="batchHandlerFactory" ref="batchHandlerFactory"/>
 		<property name="periodStore" ref="org.hisp.dhis.period.PeriodStore" />
 		<property name="categoryService"
 			ref="org.hisp.dhis.dataelement.DataElementCategoryService" />

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dhis14/IbatisConfigurationManagerTest.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dhis14/IbatisConfigurationManagerTest.java	2010-05-17 21:05:26 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dhis14/IbatisConfigurationManagerTest.java	2010-10-29 08:56:13 +0000
@@ -36,7 +36,6 @@
 import org.hisp.dhis.importexport.IbatisConfiguration;
 import org.hisp.dhis.importexport.IbatisConfigurationManager;
 import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Lars Helge Overland
@@ -52,7 +51,6 @@
     
     private IbatisConfigurationManager configurationManager;
 
-    @Autowired
     private LocationManager locationManager;
     
     // -------------------------------------------------------------------------
@@ -62,6 +60,8 @@
     @Override
     public void setUpTest()
     {
+        locationManager = (LocationManager) getBean( "locationManager" );
+        
         setExternalTestDir( locationManager );
         
         configurationManager = (IbatisConfigurationManager) getBean( IbatisConfigurationManager.ID );

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/DXFImportServiceTest.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/DXFImportServiceTest.java	2010-09-13 10:47:37 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/DXFImportServiceTest.java	2010-10-29 08:56:13 +0000
@@ -70,7 +70,6 @@
 import org.hisp.dhis.validation.ValidationRuleService;
 import org.junit.Ignore;
 import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * <p>dxfA.zip contains 3 objects of each meta-data type.</p>
@@ -145,7 +144,6 @@
 
     private ImportDataValueService importDataValueService;
 
-    @Autowired
     private LocationManager locationManager;
     
     // -------------------------------------------------------------------------
@@ -201,6 +199,8 @@
 
         importDataValueService = (ImportDataValueService) getBean( ImportDataValueService.ID );
 
+        locationManager = (LocationManager) getBean( "locationManager" );
+        
         setExternalTestDir( locationManager );
 
         // horrible hack to copy some files into external test dir

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/util/XsltUtils.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/util/XsltUtils.java	2010-06-03 17:23:39 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/util/XsltUtils.java	2010-10-29 08:56:13 +0000
@@ -38,9 +38,9 @@
 
 import org.hisp.dhis.DhisTest;
 import org.hisp.dhis.external.location.LocationManager;
+import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Lars Helge Overland
@@ -52,9 +52,14 @@
     private static final String TEST_INPUT = "testinput.xml";
     private static final String TEST_OUTPUT = "testoutput.xml";
     
-    @Autowired
     private LocationManager locationManager;
     
+    @Override
+    public void setUpTest()
+    {
+        locationManager = (LocationManager) getBean( "locationManager" );
+    }
+    
     @Test
     @Ignore
     public void transform()