dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #05632
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1805: Fix bug in DefaultDeletionManager of OrganisationUnit. Add Pruning OrganisationUnit function to d...
------------------------------------------------------------
revno: 1805
committer: Quang <Quang@Quang-PC>
branch nick: trunk
timestamp: Fri 2010-04-23 17:50:13 +0700
message:
Fix bug in DefaultDeletionManager of OrganisationUnit. Add Pruning OrganisationUnit function to dataadmin homepage.
modified:
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm
--
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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java 2010-04-23 10:50:13 +0000
@@ -36,6 +36,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hisp.dhis.common.DeleteNotAllowedException;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.source.Source;
/**
@@ -69,23 +70,24 @@
@SuppressWarnings( "unchecked" )
public void execute( Object object )
{
+
Class clazz = object.getClass();
-
- if ( clazz.getSuperclass().equals( Source.class ) )
+
+ if ( object instanceof OrganisationUnit )
{
- clazz = clazz.getSuperclass(); // Set class of Source implementations to Source
+ clazz = Source.class; // Set class of Source implementations to Source
}
-
+
String className = clazz.getSimpleName();
// ---------------------------------------------------------------------
// Verify that object is allowed to be deleted
// ---------------------------------------------------------------------
-
+
String allowMethodName = ALLOW_METHOD_PREFIX + className;
String currentHandler = null;
-
+
try
{
Method allowMethod = DeletionHandler.class.getMethod( allowMethodName, new Class[] { clazz } );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties 2010-04-13 06:13:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties 2010-04-23 10:50:13 +0000
@@ -114,7 +114,7 @@
values = values
data_element = Data element
validation_rules_without_groups = Validation rules without groups
-aggregated_data_values = Aggregated data values
+aggregated_data_values = Aggrorganisation_unit_mergeegated data values
aggregated_indicator_values = Aggregated indicator values
intro_data_locking = Deny data to be entered or imported for data sets.
intro_data_browser = Browse the database and get an overview of which data sets, organisation units and periods it exist data for.
@@ -199,4 +199,5 @@
select_the_org_unit_to_be_kept = Select the Organisation Unit to be kept
prune_organisation_unit_confirmation = Are you sure to prune Organisation Unit?
pruning = Pruning
-pruning_done = Pruning done!
\ No newline at end of file
+pruning_done = Pruning done!
+intro_prune_organisation_unit = Pruning Organisation Units and their data.
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm 2010-04-07 12:27:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm 2010-04-23 10:50:13 +0000
@@ -12,6 +12,7 @@
#introListItem( "viewStatistics.action" "data_statistics" )
#introListItem( "displayLockingForm.action" "data_locking" )
#introListItem( "zeroValueStorageManagement.action" "zero_storage_management" )
+ #introListItem( "displayPruneOrganisationUnitForm.action" "prune_organisation_unit" )
#introListItem( "getMinMaxValidationParams.action" "min_max_validation" )
#introListItem( "showCache.action" "cache_statistics" )
</ul>