------------------------------------------------------------ revno: 13183 committer: Lars Helge Ă˜verland <larshe...@gmail.com> branch nick: dhis2 timestamp: Mon 2013-12-09 19:33:36 +0100 message: OrganisationUnitController, getEntitiesWithinRange, using fixed properties instead of map modified: dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/organisationunit/OrganisationUnitController.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/organisationunit/OrganisationUnitController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/organisationunit/OrganisationUnitController.java 2013-11-04 16:58:07 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/organisationunit/OrganisationUnitController.java 2013-12-09 18:33:36 +0000 @@ -257,19 +257,13 @@ @RequestMapping(value = "/withinRange", method = RequestMethod.GET, produces = { "*/*", "application/json" }) - public void getEntitiesWithinRange( @RequestParam Map<String, String> parameters, + public void getEntitiesWithinRange( @RequestParam Double longitude, @RequestParam Double latitude, + @RequestParam Double distance, @RequestParam(required = false) String orgUnitGroupSetId, Model model, HttpServletRequest request, HttpServletResponse response ) throws Exception { - WebOptions options = new WebOptions( parameters ); - - Double longitude = Double.parseDouble( options.getOptions().get( "longitude" ) ); - Double latitude = Double.parseDouble( options.getOptions().get( "latitude" ) ); - Double distance = Double.parseDouble( options.getOptions().get( "distance" ) ); - String orgUnitGroupSetId = options.getOptions().get( "orgUnitGroupSetId" ); - List<OrganisationUnit> entityList = new ArrayList<OrganisationUnit>( organisationUnitService.getWithinCoordinateArea( longitude, latitude, distance ) ); - for( OrganisationUnit orgunit : entityList ) + for ( OrganisationUnit orgunit : entityList ) { Set<AttributeValue> attributeValues = orgunit.getAttributeValues(); attributeValues.clear();
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp