dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #01189
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 345: Updated UserCredentialsDeletionHandler
------------------------------------------------------------
revno: 345
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Fri 2009-05-29 16:13:36 +0200
message:
Updated UserCredentialsDeletionHandler
modified:
dhis-2/dhis-services/dhis-service-user-hibernate/src/main/java/org/hisp/dhis/user/UserCredentialsDeletionHandler.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionHandler.java
=== modified file 'dhis-2/dhis-services/dhis-service-user-hibernate/src/main/java/org/hisp/dhis/user/UserCredentialsDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-user-hibernate/src/main/java/org/hisp/dhis/user/UserCredentialsDeletionHandler.java 2009-05-19 15:32:14 +0000
+++ dhis-2/dhis-services/dhis-service-user-hibernate/src/main/java/org/hisp/dhis/user/UserCredentialsDeletionHandler.java 2009-05-29 14:13:36 +0000
@@ -29,6 +29,7 @@
import org.hisp.dhis.datamart.DataMartExport;
import org.hisp.dhis.document.Document;
+import org.hisp.dhis.mapping.MapView;
import org.hisp.dhis.olap.OlapURL;
import org.hisp.dhis.report.Report;
import org.hisp.dhis.reporttable.ReportTable;
@@ -132,4 +133,16 @@
}
}
}
+
+ @Override
+ public void deleteMapView( MapView mapView )
+ {
+ for ( UserCredentials credentials : userStore.getAllUserCredentials() )
+ {
+ if ( credentials.getDashboardMapViews().remove( mapView ) )
+ {
+ userStore.updateUserCredentials( credentials );
+ }
+ }
+ }
}
=== 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 2009-04-23 17:07:39 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionHandler.java 2009-05-29 14:13:36 +0000
@@ -51,6 +51,7 @@
import org.hisp.dhis.indicator.IndicatorType;
import org.hisp.dhis.mapping.Map;
import org.hisp.dhis.mapping.MapLegendSet;
+import org.hisp.dhis.mapping.MapView;
import org.hisp.dhis.minmax.MinMaxDataElement;
import org.hisp.dhis.olap.OlapURL;
import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
@@ -442,4 +443,13 @@
{
return true;
}
+
+ public void deleteMapView( MapView mapView )
+ {
+ }
+
+ public boolean allowDeleteMapView( MapView mapView )
+ {
+ return true;
+ }
}
--
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.