dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30762
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15641: removed Model from getObject/getObjectList in AbstractCrudController, not in use anymore
------------------------------------------------------------
revno: 15641
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-06-11 22:34:56 +0200
message:
removed Model from getObject/getObjectList in AbstractCrudController, not in use anymore
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.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/webapi/controller/AbstractCrudController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java 2014-06-11 20:27:54 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java 2014-06-11 20:34:56 +0000
@@ -62,7 +62,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
-import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -122,7 +121,7 @@
@RequestMapping( method = RequestMethod.GET )
public @ResponseBody RootNode getObjectList(
- @RequestParam Map<String, String> parameters, Model model, HttpServletResponse response, HttpServletRequest request )
+ @RequestParam Map<String, String> parameters, HttpServletResponse response, HttpServletRequest request )
{
List<String> fields = Lists.newArrayList( contextService.getParameterValues( "fields" ) );
List<String> filters = Lists.newArrayList( contextService.getParameterValues( "filter" ) );
@@ -196,15 +195,14 @@
@RequestMapping( value = "/{uid}/{property}", method = RequestMethod.GET )
public @ResponseBody RootNode getObjectProperty( @PathVariable( "uid" ) String uid,
@PathVariable( "property" ) String propertyName, @RequestParam Map<String, String> parameters,
- Model model, HttpServletRequest request, HttpServletResponse response ) throws Exception
+ HttpServletRequest request, HttpServletResponse response ) throws Exception
{
- return getObjectInternal( uid, parameters, model, request, response,
- Lists.<String>newArrayList(), Lists.newArrayList( propertyName ) );
+ return getObjectInternal( uid, parameters, Lists.<String>newArrayList(), Lists.newArrayList( propertyName ) );
}
@RequestMapping( value = "/{uid}", method = RequestMethod.GET )
public @ResponseBody RootNode getObject( @PathVariable( "uid" ) String uid, @RequestParam Map<String, String> parameters,
- Model model, HttpServletRequest request, HttpServletResponse response ) throws Exception
+ HttpServletRequest request, HttpServletResponse response ) throws Exception
{
List<String> fields = Lists.newArrayList( contextService.getParameterValues( "fields" ) );
List<String> filters = Lists.newArrayList( contextService.getParameterValues( "filter" ) );
@@ -214,11 +212,10 @@
fields.add( ":all" );
}
- return getObjectInternal( uid, parameters, model, request, response, filters, fields );
+ return getObjectInternal( uid, parameters, filters, fields );
}
private RootNode getObjectInternal( String uid, Map<String, String> parameters,
- Model model, HttpServletRequest request, HttpServletResponse response,
List<String> filters, List<String> fields ) throws Exception
{
WebOptions options = new WebOptions( parameters );
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java 2014-06-11 20:27:54 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java 2014-06-11 20:34:56 +0000
@@ -47,14 +47,13 @@
import org.hisp.dhis.user.UserGroupService;
import org.hisp.dhis.user.UserService;
import org.hisp.dhis.webapi.controller.AbstractCrudController;
+import org.hisp.dhis.webapi.utils.ContextUtils;
import org.hisp.dhis.webapi.webdomain.WebMetaData;
import org.hisp.dhis.webapi.webdomain.WebOptions;
-import org.hisp.dhis.webapi.utils.ContextUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -97,17 +96,17 @@
@Override
@PreAuthorize( "hasRole('ALL') or hasRole('F_USER_VIEW')" )
- public RootNode getObjectList( @RequestParam Map<String, String> parameters, Model model, HttpServletResponse response, HttpServletRequest request )
+ public RootNode getObjectList( @RequestParam Map<String, String> parameters, HttpServletResponse response, HttpServletRequest request )
{
- return super.getObjectList( parameters, model, response, request );
+ return super.getObjectList( parameters, response, request );
}
@Override
@PreAuthorize( "hasRole('ALL') or hasRole('F_USER_VIEW')" )
- public RootNode getObject( @PathVariable( "uid" ) String uid, @RequestParam Map<String, String> parameters, Model model,
+ public RootNode getObject( @PathVariable( "uid" ) String uid, @RequestParam Map<String, String> parameters,
HttpServletRequest request, HttpServletResponse response ) throws Exception
{
- return super.getObject( uid, parameters, model, request, response );
+ return super.getObject( uid, parameters, request, response );
}
@Override