dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04327
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1421: Minor fix
------------------------------------------------------------
revno: 1421
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-02-11 17:08:18 +0100
message:
Minor fix
modified:
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportParams.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/exporter/DefaultDhis14XMLExportService.java
dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/DataValueExportAction.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/ExportParams.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportParams.java 2010-02-10 17:00:47 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportParams.java 2010-02-11 16:08:18 +0000
@@ -101,8 +101,6 @@
private I18nFormat format;
- private String fileBaseName;
-
// -------------------------------------------------------------------------
// Constructur
// -------------------------------------------------------------------------
@@ -443,14 +441,4 @@
{
this.olapUrls = olapUrls;
}
-
- public String getFileBaseName()
- {
- return fileBaseName;
- }
-
- public void setFileBaseName( String fileBaseName )
- {
- this.fileBaseName = fileBaseName;
- }
}
=== 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-02-10 17:00:47 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/exporter/DefaultDhis14XMLExportService.java 2010-02-11 16:08:18 +0000
@@ -73,7 +73,7 @@
implements ExportService
{
private static final String ENCODING = "ISO-8859-1";
- private static final String ZIP_EXT = ".xml";
+ private static final String ZIP_ENTRY_NAME = "Export.xml";
private static final String ROOT_NAME = "root";
private static final String[] ROOT_PROPERTIES = { "xmlns:xsd", "http://www.w3.org/2001/XMLSchema",
"xmlns:od", "urn:schemas-microsoft-com:officedata" };
@@ -143,7 +143,7 @@
ZipOutputStream zipOut = new ZipOutputStream( out );
- zipOut.putNextEntry( new ZipEntry( params.getFileBaseName() + ZIP_EXT ) );
+ zipOut.putNextEntry( new ZipEntry( ZIP_ENTRY_NAME ) );
XMLWriter writer = XMLFactory.getPlainXMLWriter( zipOut );
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/DataValueExportAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/DataValueExportAction.java 2010-02-10 17:00:47 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/DataValueExportAction.java 2010-02-11 16:08:18 +0000
@@ -249,7 +249,6 @@
params.setIncludeDataValues( true );
params.setIncludeCompleteDataSetRegistrations( true );
params.setAggregatedData( aggregatedData );
- params.setFileBaseName( getFileBaseName( params ) );
// ---------------------------------------------------------------------
// Export
@@ -268,7 +267,7 @@
// Supportive methods
// -------------------------------------------------------------------------
- private String getFileBaseName( ExportParams params )
+ private String getFileName( ExportParams params )
{
String fileName = FILE_PREFIX + FILE_SEPARATOR +
getMediumDateString( getMediumDate( startDate ) ) + FILE_SEPARATOR +
@@ -284,14 +283,11 @@
fileName += FILE_SEPARATOR + fileNameEncode( dataSetService.getDataSet( params.getDataSets().iterator().next() ).getName() );
}
+ fileName += FILE_EXTENSION;
+
return fileName;
}
- private String getFileName( ExportParams params )
- {
- return getFileBaseName( params ) + FILE_EXTENSION;
- }
-
private String fileNameEncode( String in )
{
if ( in == null )