------------------------------------------------------------
revno: 239
committer: Lars Helge Oeverland [email protected]
branch nick: trunk
timestamp: Thu 2009-04-23 20:11:33 +0200
message:
Added an ImportService interface to make the design of the import-export
module more comprehensible
added:
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportService.java
modified:
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportExportServiceManager.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportInternalProcess.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/importer/DefaultDhis14XMLImportService.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/importer/DefaultDXFImportService.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ixf/importer/DefaultIXFImportService.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/manager/DefaultImportExportServiceManager.java
docs/Technical Architecture DHIS 2.doc
=== modified file
'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportExportServiceManager.java'
---
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportExportServiceManager.java
2009-03-03 16:46:36 +0000
+++
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportExportServiceManager.java
2009-04-23 18:11:33 +0000
@@ -37,7 +37,7 @@
{
Collection<String> getImportFormats();
- ImportInternalProcess getImportService( String format );
+ ImportService getImportService( String format );
Collection<String> getExportFormats();
=== modified file
'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportInternalProcess.java'
---
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportInternalProcess.java
2009-03-03 16:46:36 +0000
+++
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportInternalProcess.java
2009-04-23 18:11:33 +0000
@@ -40,7 +40,7 @@
* @version $Id: ImportInternalProcess.java 6443 2008-11-22 10:12:11Z larshelg
$
*/
public abstract class ImportInternalProcess
- extends AbstractStatementInternalProcess implements SerialToGroup
+ extends AbstractStatementInternalProcess implements ImportService,
SerialToGroup
{
private static final String PROCESS_GROUP = "ImportProcessGroup";
private static final Log log = LogFactory.getLog(
ImportInternalProcess.class );
@@ -86,7 +86,5 @@
log.info( "Import process completed: " + TimeUtils.getHMS() );
TimeUtils.stop();
- }
-
- public abstract void importData( ImportParams params, InputStream
inputStream );
+ }
}
=== added file
'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportService.java'
---
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportService.java
1970-01-01 00:00:00 +0000
+++
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportService.java
2009-04-23 18:11:33 +0000
@@ -0,0 +1,39 @@
+package org.hisp.dhis.importexport;
+
+/*
+ * Copyright (c) 2004-2007, 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.io.InputStream;
+
+/**
+ * @author Lars Helge Overland
+ * @version $Id: ExportService.java 4646 2008-02-26 14:54:29Z larshelg $
+ */
+public interface ImportService
+{
+ void importData( ImportParams params, InputStream inputStream );
+}
=== 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
2009-03-03 16:46:36 +0000
+++
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/importer/DefaultDhis14FileImportService.java
2009-04-23 18:11:33 +0000
@@ -242,10 +242,9 @@
}
//
-------------------------------------------------------------------------
- // ImportInternalProcess implementation
+ // ImportService implementation
//
-------------------------------------------------------------------------
- @Override
public void importData( ImportParams params, InputStream inputStream )
{
if ( params.isPreview() )
=== 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
2009-03-26 07:54:33 +0000
+++
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/importer/DefaultDhis14XMLImportService.java
2009-04-23 18:11:33 +0000
@@ -189,10 +189,9 @@
}
//
-------------------------------------------------------------------------
- // DXFImportService implementation
+ // ImportService implementation
//
-------------------------------------------------------------------------
- @Override
public void importData( ImportParams params, InputStream inputStream )
{
if ( !( params.isPreview() || params.isAnalysis() ) )
=== modified file
'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/importer/DefaultDXFImportService.java'
---
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/importer/DefaultDXFImportService.java
2009-03-26 07:54:33 +0000
+++
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/importer/DefaultDXFImportService.java
2009-04-23 18:11:33 +0000
@@ -309,10 +309,9 @@
}
//
-------------------------------------------------------------------------
- // DXFImportService implementation
+ // ImportService implementation
//
-------------------------------------------------------------------------
- @Override
public void importData( ImportParams params, InputStream inputStream )
{
if ( params.isPreview() )
=== modified file
'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ixf/importer/DefaultIXFImportService.java'
---
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ixf/importer/DefaultIXFImportService.java
2009-03-26 07:54:33 +0000
+++
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ixf/importer/DefaultIXFImportService.java
2009-04-23 18:11:33 +0000
@@ -146,10 +146,9 @@
}
//
-------------------------------------------------------------------------
- // IXFImportService implementation
+ // ImportService implementation
//
-------------------------------------------------------------------------
- @Override
public void importData( ImportParams params, InputStream inputStream )
{
if ( params.isPreview() )
=== modified file
'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/manager/DefaultImportExportServiceManager.java'
---
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/manager/DefaultImportExportServiceManager.java
2009-03-03 16:46:36 +0000
+++
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/manager/DefaultImportExportServiceManager.java
2009-04-23 18:11:33 +0000
@@ -32,7 +32,7 @@
import org.hisp.dhis.importexport.ExportService;
import org.hisp.dhis.importexport.ImportExportServiceManager;
-import org.hisp.dhis.importexport.ImportInternalProcess;
+import org.hisp.dhis.importexport.ImportService;
/**
* @author Lars Helge Overland
@@ -45,9 +45,9 @@
// Properties
//
-------------------------------------------------------------------------
- private Map<String, ImportInternalProcess> importServices;
+ private Map<String, ImportService> importServices;
- public void setImportServices( Map<String, ImportInternalProcess>
importServices )
+ public void setImportServices( Map<String, ImportService> importServices )
{
this.importServices = importServices;
}
@@ -68,7 +68,7 @@
return importServices.keySet();
}
- public ImportInternalProcess getImportService( String format )
+ public ImportService getImportService( String format )
{
return importServices.get( format );
}
=== modified file 'docs/Technical Architecture DHIS 2.doc'
Binary files docs/Technical Architecture DHIS 2.doc 2009-04-23 17:16:55
+0000 and docs/Technical Architecture DHIS 2.doc 2009-04-23 18:11:33 +0000
differ
--
Trunk
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.
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp