dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16837
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6514: Minor fix
------------------------------------------------------------
revno: 6514
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-04-07 11:08:59 +0200
message:
Minor fix
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MetaDataController.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-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MetaDataController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MetaDataController.java 2012-04-02 17:23:48 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MetaDataController.java 2012-04-07 09:08:59 +0000
@@ -27,10 +27,24 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+import java.util.zip.ZipOutputStream;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.bind.JAXBException;
+
import org.hisp.dhis.api.utils.ContextUtils;
import org.hisp.dhis.common.view.ExportView;
import org.hisp.dhis.dxf2.importsummary.ImportSummary;
-import org.hisp.dhis.dxf2.metadata.*;
+import org.hisp.dhis.dxf2.metadata.DXF2;
+import org.hisp.dhis.dxf2.metadata.ExportOptions;
+import org.hisp.dhis.dxf2.metadata.ExportService;
+import org.hisp.dhis.dxf2.metadata.ImportOptions;
+import org.hisp.dhis.dxf2.metadata.ImportService;
import org.hisp.dhis.dxf2.utils.JacksonUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
@@ -40,15 +54,6 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.bind.JAXBException;
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipOutputStream;
-
/**
* @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
*/
@@ -71,7 +76,7 @@
@PreAuthorize( "hasRole('ALL') or hasRole('F_METADATA_EXPORT')" )
public String export( ExportOptions exportOptions, Model model )
{
- DXF2 dxf2 = exportService.getMetaDataWithExportOptions( exportOptions );
+ DXF2 dxf2 = exportService.getMetaData( exportOptions );
model.addAttribute( "model", dxf2 );
model.addAttribute( "view", "export" );
@@ -83,7 +88,7 @@
@PreAuthorize( "hasRole('ALL') or hasRole('F_METADATA_EXPORT')" )
public void exportZippedXML( ExportOptions exportOptions, HttpServletResponse response ) throws IOException, JAXBException
{
- DXF2 dxf2 = exportService.getMetaDataWithExportOptions( exportOptions );
+ DXF2 dxf2 = exportService.getMetaData( exportOptions );
response.setContentType( ContextUtils.CONTENT_TYPE_ZIP );
response.addHeader( "Content-Disposition", "attachment; filename=\"export.xml.zip\"" );
@@ -99,7 +104,7 @@
@PreAuthorize( "hasRole('ALL') or hasRole('F_METADATA_EXPORT')" )
public void exportZippedJSON( ExportOptions exportOptions, HttpServletResponse response ) throws IOException, JAXBException
{
- DXF2 dxf2 = exportService.getMetaDataWithExportOptions( exportOptions );
+ DXF2 dxf2 = exportService.getMetaData( exportOptions );
response.setContentType( ContextUtils.CONTENT_TYPE_ZIP );
response.addHeader( "Content-Disposition", "attachment; filename=\"export.json.zip\"" );