← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12365: Removed dependency on integration service in web api

 

------------------------------------------------------------
revno: 12365
committer: Bob Jolliffe <bobjolliffe@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-10-01 14:26:59 +0100
message:
  Removed dependency on integration service in web api
modified:
  dhis-2/dhis-web/dhis-web-api/pom.xml
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueSetController.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/pom.xml'
--- dhis-2/dhis-web/dhis-web-api/pom.xml	2013-08-22 13:19:57 +0000
+++ dhis-2/dhis-web/dhis-web-api/pom.xml	2013-10-01 13:26:59 +0000
@@ -25,10 +25,6 @@
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-service-dxf2</artifactId>
     </dependency>
-        <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-service-integration</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-service-core</artifactId>

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueSetController.java	2013-08-23 16:00:30 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueSetController.java	2013-10-01 13:26:59 +0000
@@ -52,13 +52,13 @@
 import org.hisp.dhis.dxf2.importsummary.ImportSummary;
 import org.hisp.dhis.dxf2.metadata.ImportOptions;
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
-import org.hisp.dhis.integration.IntegrationService;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
+import org.springframework.web.HttpRequestMethodNotSupportedException;
 import org.springframework.web.bind.annotation.ExceptionHandler;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -76,9 +76,6 @@
     private DataValueSetService dataValueSetService;
 
     @Autowired
-    private IntegrationService integrationService;
-    
-    @Autowired
     private OrganisationUnitService organisationUnitService;
 
     // -------------------------------------------------------------------------
@@ -195,14 +192,18 @@
     @RequestMapping(method = RequestMethod.POST, consumes = "application/sdmx+xml")
     @PreAuthorize("hasRole('ALL') or hasRole('F_DATAVALUE_ADD')")
     public void postSDMXDataValueSet( ImportOptions importOptions,
-        HttpServletResponse response, InputStream in, Model model ) throws IOException
+        HttpServletResponse response, InputStream in, Model model ) throws IOException, HttpRequestMethodNotSupportedException
     {
+        throw new HttpRequestMethodNotSupportedException( RequestMethod.POST.toString() );
+        /* TODO: reimplement without using integration service
         ImportSummary summary = integrationService.importSDMXDataValueSet( in, importOptions );
 
         log.info( "Data values set saved " + importOptions );
 
         response.setContentType( CONTENT_TYPE_XML );
         JacksonUtils.toXml( response.getOutputStream(), summary );
+        * 
+        */
     }
 
     // -------------------------------------------------------------------------