=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java 2013-10-15 12:12:59 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java 2013-10-21 14:19:10 +0000 @@ -261,6 +261,7 @@ return rulesForDataSet; } + // ------------------------------------------------------------------------- // ValidationRule CRUD operations // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/ValidationRunContext.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/ValidationRunContext.java 2013-10-16 16:00:05 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/ValidationRunContext.java 2013-10-21 14:19:10 +0000 @@ -160,8 +160,8 @@ if ( surveillanceRulesPresent ) { - Set otherDescendants = getAllOtherDescendants( sources ); - addSourcesToContext( otherDescendants, false ); + Set otherDescendants = getAllOtherDescendants( sources ); + addSourcesToContext( otherDescendants, false ); } } @@ -172,11 +172,11 @@ */ private void addPeriodsToContext ( Collection periods ) { - for ( Period period : periods ) - { - PeriodTypeExtended periodTypeX = getOrCreatePeriodTypeExtended( period.getPeriodType() ); - periodTypeX.getPeriods().add( period ); - } + for ( Period period : periods ) + { + PeriodTypeExtended periodTypeX = getOrCreatePeriodTypeExtended( period.getPeriodType() ); + periodTypeX.getPeriods().add( period ); + } } /** @@ -230,7 +230,6 @@ */ private void removeAnyUnneededPeriodTypes() { - // Start by making a defensive copy so we can delete while iterating. Set periodTypeXs = new HashSet( periodTypeExtendedMap.values() ); for ( PeriodTypeExtended periodTypeX : periodTypeXs ) { @@ -279,7 +278,7 @@ * need to add */ private void getOtherDescendantsRecursive( OrganisationUnit source, Collection sources, - Set allOtherDescendants ) + Set allOtherDescendants ) { for ( OrganisationUnit child : source.getChildren() ) { @@ -303,7 +302,6 @@ */ private void addSourcesToContext ( Collection sources, boolean ruleCheckThisSource ) { - // Get the information we need for each source. for ( OrganisationUnit source : sources ) { OrganisationUnitExtended sourceX = new OrganisationUnitExtended( source, ruleCheckThisSource ); === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapViewController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapViewController.java 2013-08-23 16:00:30 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapViewController.java 2013-10-21 14:19:10 +0000 @@ -76,10 +76,16 @@ private ContextUtils contextUtils; @RequestMapping(value = { "/{uid}/data", "/{uid}/data.png" }, method = RequestMethod.GET) - public void getMap( @PathVariable String uid, HttpServletResponse response ) throws Exception + public void getMapViewData( @PathVariable String uid, HttpServletResponse response ) throws Exception { MapView mapView = mappingService.getMapView( uid ); + if ( mapView == null ) + { + ContextUtils.notFoundResponse( response, "Map view does not exist: " + uid ); + return; + } + renderMapViewPng( mapView, response ); }