← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10884: minor refactor

 

------------------------------------------------------------
revno: 10884
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2013-05-19 11:37:00 +0700
message:
  minor refactor
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/EventController.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/event/EventController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/EventController.java	2013-05-18 10:23:59 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/EventController.java	2013-05-19 04:37:00 +0000
@@ -30,7 +30,6 @@
 import org.hisp.dhis.api.utils.ContextUtils;
 import org.hisp.dhis.dxf2.event.EventService;
 import org.hisp.dhis.dxf2.importsummary.ImportSummaries;
-import org.hisp.dhis.dxf2.metadata.ImportOptions;
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -47,7 +46,7 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping(value = EventController.RESOURCE_PATH)
+@RequestMapping( value = EventController.RESOURCE_PATH )
 public class EventController
 {
     public static final String RESOURCE_PATH = "/events";
@@ -59,10 +58,9 @@
     // Controller
     // -------------------------------------------------------------------------
 
-    @RequestMapping(method = RequestMethod.POST, consumes = "application/xml")
-    @PreAuthorize("hasRole('ALL') or hasRole('F_PATIENT_DATAVALUE_ADD')")
-    public void postDxf2ProgramInstance( ImportOptions importOptions,
-        HttpServletResponse response, InputStream inputStream ) throws IOException
+    @RequestMapping( method = RequestMethod.POST, consumes = "application/xml" )
+    @PreAuthorize( "hasRole('ALL') or hasRole('F_PATIENT_DATAVALUE_ADD')" )
+    public void postXmlEvents( HttpServletResponse response, InputStream inputStream ) throws IOException
     {
         ImportSummaries importSummaries = eventService.saveEventsXml( inputStream );
 
@@ -78,8 +76,7 @@
 
     @RequestMapping( method = RequestMethod.POST, consumes = "application/json" )
     @PreAuthorize( "hasRole('ALL') or hasRole('F_PATIENT_DATAVALUE_ADD')" )
-    public void postJsonProgramInstance( ImportOptions importOptions,
-        HttpServletResponse response, InputStream inputStream ) throws IOException
+    public void postJsonEvents( HttpServletResponse response, InputStream inputStream ) throws IOException
     {
         ImportSummaries importSummaries = eventService.saveEventsJson( inputStream );