dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25683
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12780: Minor
------------------------------------------------------------
revno: 12780
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-10-21 16:19:10 +0200
message:
Minor
modified:
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/ValidationRunContext.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapViewController.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-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<OrganisationUnit> otherDescendants = getAllOtherDescendants( sources );
- addSourcesToContext( otherDescendants, false );
+ Set<OrganisationUnit> otherDescendants = getAllOtherDescendants( sources );
+ addSourcesToContext( otherDescendants, false );
}
}
@@ -172,11 +172,11 @@
*/
private void addPeriodsToContext ( Collection<Period> 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<PeriodTypeExtended> periodTypeXs = new HashSet<PeriodTypeExtended>( periodTypeExtendedMap.values() );
for ( PeriodTypeExtended periodTypeX : periodTypeXs )
{
@@ -279,7 +278,7 @@
* need to add
*/
private void getOtherDescendantsRecursive( OrganisationUnit source, Collection<OrganisationUnit> sources,
- Set<OrganisationUnit> allOtherDescendants )
+ Set<OrganisationUnit> allOtherDescendants )
{
for ( OrganisationUnit child : source.getChildren() )
{
@@ -303,7 +302,6 @@
*/
private void addSourcesToContext ( Collection<OrganisationUnit> 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 );
}