=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/comparator/MapLegendComparator.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/comparator/MapLegendComparator.java 2010-03-25 16:43:52 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/comparator/MapLegendComparator.java 2010-03-25 17:25:47 +0000 @@ -31,20 +31,16 @@ import org.hisp.dhis.mapping.MapLegend; - /** * @author Tran Thanh Tri * @version $Id$ */ - -public class MapLegendComparator - implements Comparator +public class MapLegendComparator + implements Comparator { - - @Override - public int compare( MapLegend o1, MapLegend o2 ) - { - return o1.getStartValue().compareTo( o2.getStartValue() ); - } - + @Override + public int compare( MapLegend o1, MapLegend o2 ) + { + return o1.getStartValue().compareTo( o2.getStartValue() ); + } } === modified file 'dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/MapLegendSetDeletionHandler.java' --- dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/MapLegendSetDeletionHandler.java 2009-04-23 17:16:55 +0000 +++ dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/MapLegendSetDeletionHandler.java 2010-03-25 17:25:47 +0000 @@ -59,6 +59,18 @@ } @Override + public void deleteMapLegend( MapLegend mapLegend ) + { + for ( MapLegendSet legendSet : mappingService.getAllMapLegendSets() ) + { + if ( legendSet.getMapLegends().remove( mapLegend ) ) + { + mappingService.updateMapLegendSet( legendSet ); + } + } + } + + @Override public void deleteIndicator( Indicator indicator ) { for ( MapLegendSet legendSet : mappingService.getAllMapLegendSets() ) === modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionHandler.java' --- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionHandler.java 2010-02-22 09:19:15 +0000 +++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionHandler.java 2010-03-25 17:25:47 +0000 @@ -51,6 +51,7 @@ import org.hisp.dhis.indicator.IndicatorGroupSet; import org.hisp.dhis.indicator.IndicatorType; import org.hisp.dhis.mapping.Map; +import org.hisp.dhis.mapping.MapLegend; import org.hisp.dhis.mapping.MapLegendSet; import org.hisp.dhis.mapping.MapOrganisationUnitRelation; import org.hisp.dhis.mapping.MapView; @@ -445,6 +446,15 @@ return true; } + public void deleteMapLegend( MapLegend mapLegend ) + { + } + + public boolean allowDeleteMapLegend( MapLegend mapLegend ) + { + return true; + } + public void deleteMapLegendSet( MapLegendSet mapLegendSet ) { } === modified file 'dhis-2/dhis-web/dhis-web-mapping/pom.xml' --- dhis-2/dhis-web/dhis-web-mapping/pom.xml 2010-03-25 11:32:49 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/pom.xml 2010-03-25 17:25:47 +0000 @@ -75,6 +75,9 @@ xercesImpl +<<<<<<< TREE + +======= @@ -86,6 +89,7 @@ jdk15 +>>>>>>> MERGE-SOURCE @@ -169,8 +173,7 @@ batik-xml 1.7 - - +