← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7609: Removed an integrity check

 

------------------------------------------------------------
revno: 7609
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-07-14 15:44:38 +0200
message:
  Removed an integrity check
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityService.java
  dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java
  dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityServiceTest.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/dataintegrity/GetDataIntegrityAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataIntegrityForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataIntegrity.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseDataIntegrity.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-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityService.java	2012-01-28 17:42:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityService.java	2012-07-14 13:44:38 +0000
@@ -153,12 +153,6 @@
     Collection<OrganisationUnit> getOrganisationUnitsWithoutGroups();
 
     /**
-     * Gets all organisation units which are not members of one or more groups
-     * which enter into a compulsory group set.
-     */
-    Collection<OrganisationUnit> getOrganisationUnitsViolatingCompulsoryGroupSets();
-
-    /**
      * Gets all organisation units which are members of more than one group
      * which enter into an exclusive group set.
      */

=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java	2012-01-28 17:42:13 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java	2012-07-14 13:44:38 +0000
@@ -38,7 +38,6 @@
 import java.util.SortedMap;
 import java.util.TreeMap;
 
-import org.apache.commons.collections.CollectionUtils;
 import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementGroup;
@@ -69,8 +68,6 @@
 
 /**
  * @author Lars Helge Overland
- * @version $Id: DefaultDataIntegrityService.java 2010-03-18 11:52:20Z Chau Thu
- *          Tran $
  */
 @Transactional
 public class DefaultDataIntegrityService
@@ -459,29 +456,6 @@
         return organisationUnitService.getOrganisationUnitsWithoutGroups();
     }
 
-    public Collection<OrganisationUnit> getOrganisationUnitsViolatingCompulsoryGroupSets()
-    {
-        Collection<OrganisationUnitGroupSet> groupSets = organisationUnitGroupService
-            .getCompulsoryOrganisationUnitGroupSets();
-
-        Collection<OrganisationUnit> organisationUnits = organisationUnitService.getAllOrganisationUnits();
-
-        Set<OrganisationUnit> targets = new HashSet<OrganisationUnit>();
-
-        for ( OrganisationUnit unit : organisationUnits )
-        {
-            for ( OrganisationUnitGroupSet groupSet : groupSets )
-            {
-                if ( !CollectionUtils.containsAny( groupSet.getOrganisationUnitGroups(), unit.getGroups() ) )
-                {
-                    targets.add( unit );
-                }
-            }
-        }
-
-        return targets;
-    }
-
     public SortedMap<OrganisationUnit, Collection<OrganisationUnitGroup>> getOrganisationUnitsViolatingExclusiveGroupSets()
     {
         Collection<OrganisationUnitGroupSet> groupSets = organisationUnitGroupService.getAllOrganisationUnitGroupSets();

=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityServiceTest.java'
--- dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityServiceTest.java	2012-04-17 09:13:31 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityServiceTest.java	2012-07-14 13:44:38 +0000
@@ -51,7 +51,6 @@
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.period.MonthlyPeriodType;
 import org.hisp.dhis.period.QuarterlyPeriodType;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
@@ -329,15 +328,6 @@
     }
 
     @Test
-    @Ignore
-    public void testGetOrganisationUnitsViolatingCompulsoryGroupSets()
-    {
-        Collection<OrganisationUnit> expected = dataIntegrityService.getOrganisationUnitsViolatingCompulsoryGroupSets();
-        
-        assertTrue( message( expected ), equals( expected, unitD, unitE, unitF ) );
-    }
-
-    @Test
     public void testGetOrganisationUnitsViolatingExclusiveGroupSets()
     {
         SortedMap<OrganisationUnit, Collection<OrganisationUnitGroup>> expected = dataIntegrityService.getOrganisationUnitsViolatingExclusiveGroupSets();

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/dataintegrity/GetDataIntegrityAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/dataintegrity/GetDataIntegrityAction.java	2012-01-28 17:42:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/dataintegrity/GetDataIntegrityAction.java	2012-07-14 13:44:38 +0000
@@ -179,13 +179,6 @@
         return organisationUnitsWithoutGroups;
     }
 
-    private List<OrganisationUnit> organisationUnitsViolatingCompulsoryGroupSets;
-
-    public List<OrganisationUnit> getOrganisationUnitsViolatingCompulsoryGroupSets()
-    {
-        return organisationUnitsViolatingCompulsoryGroupSets;
-    }
-
     private SortedMap<OrganisationUnit, Collection<OrganisationUnitGroup>> organisationUnitsViolatingExclusiveGroupSets;
 
     public SortedMap<OrganisationUnit, Collection<OrganisationUnitGroup>> getOrganisationUnitsViolatingExclusiveGroupSets()
@@ -254,8 +247,6 @@
             .getOrphanedOrganisationUnits() );
         organisationUnitsWithoutGroups = new ArrayList<OrganisationUnit>( dataIntegrityService
             .getOrganisationUnitsWithoutGroups() );
-        organisationUnitsViolatingCompulsoryGroupSets = new ArrayList<OrganisationUnit>( dataIntegrityService
-            .getOrganisationUnitsViolatingCompulsoryGroupSets() );
         organisationUnitsViolatingExclusiveGroupSets = dataIntegrityService.getOrganisationUnitsViolatingExclusiveGroupSets();
         organisationUnitGroupsWithoutGroupSets = new ArrayList<OrganisationUnitGroup>( dataIntegrityService
             .getOrganisationUnitGroupsWithoutGroupSets() );
@@ -277,7 +268,6 @@
         Collections.sort( organisationUnitsWithCyclicReferences, IdentifiableObjectNameComparator.INSTANCE );
         Collections.sort( orphanedOrganisationUnits, IdentifiableObjectNameComparator.INSTANCE );
         Collections.sort( organisationUnitsWithoutGroups, IdentifiableObjectNameComparator.INSTANCE );
-        Collections.sort( organisationUnitsViolatingCompulsoryGroupSets, IdentifiableObjectNameComparator.INSTANCE );
         Collections.sort( organisationUnitGroupsWithoutGroupSets, IdentifiableObjectNameComparator.INSTANCE );
         Collections.sort( validationRulesWithoutGroups, IdentifiableObjectNameComparator.INSTANCE );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataIntegrityForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataIntegrityForm.vm	2012-01-28 17:42:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataIntegrityForm.vm	2012-07-14 13:44:38 +0000
@@ -27,7 +27,6 @@
 #integrityItem( $i18n.getString( "organisation_units_with_cyclic_references" ) "organisationUnitsWithCyclicReferences" )
 #integrityItem( $i18n.getString( "orphaned_organisation_units" ) "orphanedOrganisationUnits" )
 #integrityItem( $i18n.getString( "organisation_units_without_groups" ) "organisationUnitsWithoutGroups" )
-#integrityItem( $i18n.getString( "organisation_units_violating_compulsory_group_sets" ) "organisationUnitsViolatingCompulsoryGroupSets" )
 #integrityItem( $i18n.getString( "organisation_units_violation_exclusive_group_sets" ) "organisationUnitsViolatingExclusiveGroupSets" )
 #integrityItem( $i18n.getString( "organisation_unit_groups_without_group_sets" ) "organisationUnitGroupsWithoutGroupSets" )
 #integrityItem( $i18n.getString( "validation_rules_without_groups" ) "validationRulesWithoutGroups" )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataIntegrity.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataIntegrity.js	2012-01-28 17:42:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataIntegrity.js	2012-07-14 13:44:38 +0000
@@ -12,7 +12,6 @@
 	
     displayViolationList( json.dataElementsWithoutDataSet, "dataElementsWithoutDataSet" );
     displayViolationList( json.dataElementsWithoutGroups, "dataElementsWithoutGroups" );
-	displayViolationList( json.dataElementsViolatingCompulsoryGroupSets, "dataElementsViolatingCompulsoryGroupSets" );
 	displayViolationList( json.dataElementsViolatingExclusiveGroupSets, "dataElementsViolatingExclusiveGroupSets" );
 	displayViolationList( json.dataElementsInDataSetNotInForm, "dataElementsInDataSetNotInForm" );
     displayViolationList( json.dataElementsAssignedToDataSetsWithDifferentPeriodTypes, "dataElementsAssignedToDataSetsWithDifferentPeriodTypes" );
@@ -22,12 +21,10 @@
     displayViolationList( json.indicatorsWithoutGroups, "indicatorsWithoutGroups" );
     displayViolationList( json.invalidIndicatorNumerators, "invalidIndicatorNumerators" );
     displayViolationList( json.invalidIndicatorDenominators, "invalidIndicatorDenominators" );
-	displayViolationList( json.indicatorsViolatingCompulsoryGroupSets, "indicatorsViolatingCompulsoryGroupSets" );
 	displayViolationList( json.indicatorsViolatingExclusiveGroupSets, "indicatorsViolatingExclusiveGroupSets" );
     displayViolationList( json.organisationUnitsWithCyclicReferences, "organisationUnitsWithCyclicReferences" );
     displayViolationList( json.orphanedOrganisationUnits, "orphanedOrganisationUnits" );
     displayViolationList( json.organisationUnitsWithoutGroups, "organisationUnitsWithoutGroups" );
-    displayViolationList( json.organisationUnitsViolatingCompulsoryGroupSets, "organisationUnitsViolatingCompulsoryGroupSets" );
     displayViolationList( json.organisationUnitsViolatingExclusiveGroupSets, "organisationUnitsViolatingExclusiveGroupSets" );
     displayViolationList( json.organisationUnitGroupsWithoutGroupSets, "organisationUnitGroupsWithoutGroupSets" );
     displayViolationList( json.validationRulesWithoutGroups, "validationRulesWithoutGroups" );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseDataIntegrity.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseDataIntegrity.vm	2012-01-28 17:42:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseDataIntegrity.vm	2012-07-14 13:44:38 +0000
@@ -40,7 +40,6 @@
 {
     #violation( "dataElementsWithoutDataSet" $dataElementsWithoutDataSet ),
     #violation( "dataElementsWithoutGroups" $dataElementsWithoutGroups ),
-    #violation( "dataElementsViolatingCompulsoryGroupSets" $dataElementsViolatingCompulsoryGroupSets ),
     #violationWithMapList( "dataElementsViolatingExclusiveGroupSets" $dataElementsViolatingExclusiveGroupSets ),
     #violationWithMapList( "dataElementsInDataSetNotInForm" $dataElementsInDataSetNotInForm ),
     #violationWithMapList( "dataElementsAssignedToDataSetsWithDifferentPeriodTypes" $dataElementsAssignedToDataSetsWithDifferentPeriodTypes ),
@@ -49,13 +48,11 @@
     #violationWithCollection( "indicatorsWithIdenticalFormulas" $indicatorsWithIdenticalFormulas ),
     #violation( "indicatorsWithoutGroups" $indicatorsWithoutGroups ),    
     #violationWithMap( "invalidIndicatorNumerators" $invalidIndicatorNumerators ),
-    #violationWithMap( "invalidIndicatorDenominators" $invalidIndicatorDenominators ),        
-    #violation( "indicatorsViolatingCompulsoryGroupSets" $indicatorsViolatingCompulsoryGroupSets ),        
+    #violationWithMap( "invalidIndicatorDenominators" $invalidIndicatorDenominators ),    
     #violationWithMapList( "indicatorsViolatingExclusiveGroupSets" $indicatorsViolatingExclusiveGroupSets ),        
     #violation( "organisationUnitsWithCyclicReferences" $organisationUnitsWithCyclicReferences ),
     #violation( "orphanedOrganisationUnits" $orphanedOrganisationUnits ),
     #violation( "organisationUnitsWithoutGroups" $organisationUnitsWithoutGroups ),
-    #violation( "organisationUnitsViolatingCompulsoryGroupSets" $organisationUnitsViolatingCompulsoryGroupSets ),
     #violationWithMapList( "organisationUnitsViolatingExclusiveGroupSets" $organisationUnitsViolatingExclusiveGroupSets ),
     #violation( "organisationUnitGroupsWithoutGroupSets" $organisationUnitGroupsWithoutGroupSets ),
     #violation( "validationRulesWithoutGroups" $validationRulesWithoutGroups ),