← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1316: Removed exclusive property of OrganisationUnitGroupSet object. OrgunitGroupSet is now by default ...

 

------------------------------------------------------------
revno: 1316
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-01-19 22:48:28 +0100
message:
  Removed exclusive property of OrganisationUnitGroupSet object. OrgunitGroupSet is now by default exclusive. This will improve analysis usage.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitStore.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/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java
  dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dimension/DefaultDimensionService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitGroupService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSetPopulator.java
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnitGroupSet.hbm.xml
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/converter/AbstractGroupSetConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/GroupSetConverter.java
  dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GroupSetBatchHandler.java
  dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroup/ValidateOrganisationUnitGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroupset/AddGroupSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroupset/UpdateGroupSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnitGroupSet.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.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/organisationunit/OrganisationUnitGroupService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupService.java	2009-09-07 15:53:27 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupService.java	2010-01-19 21:48:28 +0000
@@ -142,9 +142,10 @@
     OrganisationUnitGroupSet getOrganisationUnitGroupSet( int id );
 
     /**
+     * Returns the OrganisationUnitGroupSets with the given identifiers.
      * 
-     * @param identifiers
-     * @return
+     * @param identifiers the identifiers.
+     * @return the OrganisationUnitGroupSets with the given identifiers.
      */
     Collection<OrganisationUnitGroupSet> getOrganisationUnitGroupSets( Collection<Integer> identifiers );
     
@@ -175,38 +176,6 @@
     Collection<OrganisationUnitGroupSet> getCompulsoryOrganisationUnitGroupSets();
 
     /**
-     * Returns all exclusive OrganisationUnitGroupSets.
-     * 
-     * @return a collection of all exclusive OrganisationUnitGroupSets, or an
-     *         empty collection if there are no exclusive
-     *         OrganisationUnitGroupSets.
-     */
-    Collection<OrganisationUnitGroupSet> getExclusiveOrganisationUnitGroupSets();
-
-    /**
-     * Returns a collection of all exclusive OrganisationUnitGroupSets
-     * containing a given OrganisationUnitGroup.
-     * 
-     * @param organisationUnitGroup the OrganisationUnitGroup to look for.
-     * @return a collection of all exclusive OrganisationUnitGroupSets
-     *         containing the given OrganisationUnitGroup, or an empty
-     *         collection if no such OrganisationUnitGroupSet exists.
-     */
-    Collection<OrganisationUnitGroupSet> getExclusiveOrganisationUnitGroupSetsContainingGroup(
-        OrganisationUnitGroup organisationUnitGroup );
-    
-    /**
-     * Returns the OrganisationUnitGroup of which the given OrganisationUnit is
-     * a member of within the OrganisationUnitGroupSet. This will return the first
-     * group found so the given group set should be exclusive.
-     * 
-     * @param groupSet the OrganisationUnitGroupSet.
-     * @param unit the OrganisationUNit.
-     * @return an OrganisationUnitGroup.
-     */
-    OrganisationUnitGroup getOrganisationUnitGroup( OrganisationUnitGroupSet groupSet, OrganisationUnit unit );
-    
-    /**
      * Returns a Collection of compulsory OrganisationUnitGroupSets whichs groups 
      * the given OrganisationUnit is not a member of.
      * 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java	2010-01-15 11:32:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java	2010-01-19 21:48:28 +0000
@@ -52,8 +52,6 @@
 
     private boolean compulsory;
 
-    private boolean exclusive;
-
     // -------------------------------------------------------------------------
     // Constructors
     // -------------------------------------------------------------------------
@@ -62,12 +60,11 @@
     {
     }
 
-    public OrganisationUnitGroupSet( String name, String description, boolean compulsory, boolean exclusive )
+    public OrganisationUnitGroupSet( String name, String description, boolean compulsory )
     {
         this.name = name;
         this.description = description;
         this.compulsory = compulsory;
-        this.exclusive = exclusive;
     }
 
     // -------------------------------------------------------------------------
@@ -184,16 +181,6 @@
         this.compulsory = compulsory;
     }
 
-    public boolean isExclusive()
-    {
-        return exclusive;
-    }
-
-    public void setExclusive( boolean exclusive )
-    {
-        this.exclusive = exclusive;
-    }
-
     public Set<OrganisationUnitGroup> getOrganisationUnitGroups()
     {
         return organisationUnitGroups;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitStore.java	2009-10-01 09:24:46 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitStore.java	2010-01-19 21:48:28 +0000
@@ -86,6 +86,12 @@
      */
     Collection<OrganisationUnit> getRootOrganisationUnits();
 
+    /**
+     * Updates the parent id of the organisation unit with the given id.
+     * 
+     * @param organisationUnitId the child organisation unit identifier.
+     * @param parentId the parent organisation unit identifier.
+     */
     void updateOrganisationUnitParent( int organisationUnitId, int parentId );
     
     // -------------------------------------------------------------------------
@@ -126,19 +132,61 @@
     // OrganisationUnitLevel
     // -------------------------------------------------------------------------
 
+    /**
+     * Adds an OrganisationUnitLevel.
+     * 
+     * @param level the OrganisationUnitLevel to add.
+     * @return the generated identifier.
+     */
     int addOrganisationUnitLevel( OrganisationUnitLevel level );
     
+    /**
+     * Updates an OrganisationUnitLevel.
+     * 
+     * @param level the OrganisationUnitLevel to update.
+     */
     void updateOrganisationUnitLevel( OrganisationUnitLevel level );
     
+    /**
+     * Gets an OrganisationUnitLevel.
+     * 
+     * @param id the identifier of the OrganisationUnitLevel.
+     * @return the OrganisationUnitLevel with the given identifier.
+     */
     OrganisationUnitLevel getOrganisationUnitLevel( int id );
     
+    /**
+     * Deletes an OrganisationUnitLevel.
+     * 
+     * @param level the OrganisationUnitLevel to delete.
+     */
     void deleteOrganisationUnitLevel( OrganisationUnitLevel level );
     
+    /**
+     * Deletes all OrganisationUnitLevels.
+     */
     void deleteOrganisationUnitLevels();
     
+    /**
+     * Gets all OrganisationUnitLevels.
+     * 
+     * @return a Collection of all OrganisationUnitLevels.
+     */
     Collection<OrganisationUnitLevel> getOrganisationUnitLevels();
     
+    /**
+     * Gets the OrganisationUnitLevel at the given level.
+     * 
+     * @param level the level.
+     * @return the OrganisationUnitLevel at the given level.
+     */
     OrganisationUnitLevel getOrganisationUnitLevelByLevel( int level );
     
+    /**
+     * Gets the OrganisationUnitLevel with the given name.
+     * 
+     * @param name the name of the OrganisationUnitLevel to get.
+     * @return the OrganisationUnitLevel with the given name.
+     */
     OrganisationUnitLevel getOrganisationUnitLevelByName( String name );
 }

=== 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	2009-12-02 15:08:11 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java	2010-01-19 21:48:28 +0000
@@ -437,7 +437,7 @@
 
     public Collection<OrganisationUnit> getOrganisationUnitsViolatingExclusiveGroupSets()
     {
-        Collection<OrganisationUnitGroupSet> groupSets = organisationUnitGroupService.getExclusiveOrganisationUnitGroupSets();
+        Collection<OrganisationUnitGroupSet> groupSets = organisationUnitGroupService.getAllOrganisationUnitGroupSets();
         
         Collection<OrganisationUnit> organisationUnits = organisationUnitService.getAllOrganisationUnits();
         
@@ -469,7 +469,7 @@
 
     public Collection<OrganisationUnitGroup> getOrganisationUnitGroupsWithoutGroupSets()
     {
-        Collection<OrganisationUnitGroupSet> groupSets = organisationUnitGroupService.getExclusiveOrganisationUnitGroupSets();
+        Collection<OrganisationUnitGroupSet> groupSets = organisationUnitGroupService.getAllOrganisationUnitGroupSets();
         
         Collection<OrganisationUnitGroup> groups = organisationUnitGroupService.getAllOrganisationUnitGroups();
         

=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java	2010-01-19 13:51:49 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java	2010-01-19 21:48:28 +0000
@@ -205,15 +205,15 @@
     {
         resourceTableStore.deleteGroupSetStructures();
 
-        Collection<OrganisationUnitGroupSet> exclusiveGroupSets = organisationUnitGroupService
-            .getExclusiveOrganisationUnitGroupSets();
+        Collection<OrganisationUnitGroupSet> groupSets = organisationUnitGroupService
+            .getAllOrganisationUnitGroupSets();
 
         BatchHandler<GroupSetStructure> batchHandler = batchHandlerFactory
             .createBatchHandler( GroupSetStructureBatchHandler.class );
 
         batchHandler.init();
 
-        for ( OrganisationUnitGroupSet groupSet : exclusiveGroupSets )
+        for ( OrganisationUnitGroupSet groupSet : groupSets )
         {
             Collection<OrganisationUnitGroup> groups = groupSet.getOrganisationUnitGroups();
 
@@ -377,7 +377,7 @@
         Collections.sort( units, new OrganisationUnitNameComparator() );
 
         List<OrganisationUnitGroupSet> groupSets = new ArrayList<OrganisationUnitGroupSet>(
-            organisationUnitGroupService.getExclusiveOrganisationUnitGroupSets() );
+            organisationUnitGroupService.getAllOrganisationUnitGroupSets() );
 
         Collections.sort( groupSets, new OrganisationUnitGroupSetNameComparator() );
 

=== 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	2009-12-02 15:08:11 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityServiceTest.java	2010-01-19 21:48:28 +0000
@@ -203,8 +203,11 @@
         organisationUnitGroupService.addOrganisationUnitGroup( unitGroupB );
         organisationUnitGroupService.addOrganisationUnitGroup( unitGroupC );
         
-        unitGroupSetA = new OrganisationUnitGroupSet( "GroupSetA", "GroupSetA", true, false );
-        unitGroupSetB = new OrganisationUnitGroupSet( "GroupSetB", "GroupSetB", false, true );
+        unitGroupSetA = createOrganisationUnitGroupSet( 'A' );
+        unitGroupSetB = createOrganisationUnitGroupSet( 'B' );
+        
+        unitGroupSetA.setCompulsory( true );        
+        unitGroupSetB.setCompulsory( false );
         
         unitGroupSetA.getOrganisationUnitGroups().add( unitGroupA );    
         

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dimension/DefaultDimensionService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dimension/DefaultDimensionService.java	2009-11-24 11:01:39 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dimension/DefaultDimensionService.java	2010-01-19 21:48:28 +0000
@@ -131,7 +131,7 @@
         
         return dataElements;
     }
-
+    
     // -------------------------------------------------------------------------
     // Supportive methods
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitGroupService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitGroupService.java	2009-11-26 14:02:44 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitGroupService.java	2010-01-19 21:48:28 +0000
@@ -29,7 +29,6 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashSet;
 
 import org.hisp.dhis.common.GenericIdentifiableObjectStore;
 import org.hisp.dhis.system.util.Filter;
@@ -182,39 +181,6 @@
         return groupSets;
     }
 
-    public Collection<OrganisationUnitGroupSet> getExclusiveOrganisationUnitGroupSets()
-    {
-        Collection<OrganisationUnitGroupSet> groupSets = new ArrayList<OrganisationUnitGroupSet>();
-        
-        for ( OrganisationUnitGroupSet groupSet : getAllOrganisationUnitGroupSets() )
-        {
-            if ( groupSet.isExclusive() )
-            {
-                groupSets.add( groupSet );
-            }
-        }
-        
-        return groupSets;
-    }
-
-    public Collection<OrganisationUnitGroupSet> getExclusiveOrganisationUnitGroupSetsContainingGroup(
-        OrganisationUnitGroup organisationUnitGroup )
-    {
-        HashSet<OrganisationUnitGroupSet> result = new HashSet<OrganisationUnitGroupSet>();
-
-        Collection<OrganisationUnitGroupSet> exclusiveGroupSets = getExclusiveOrganisationUnitGroupSets();
-
-        for ( OrganisationUnitGroupSet groupSet : exclusiveGroupSets )
-        {
-            if ( groupSet.getOrganisationUnitGroups().contains( organisationUnitGroup ) )
-            {
-                result.add( groupSet );
-            }
-        }
-
-        return result;
-    }
-    
     public OrganisationUnitGroup getOrganisationUnitGroup( OrganisationUnitGroupSet groupSet, OrganisationUnit unit )
     {
         for ( OrganisationUnitGroup group : groupSet.getOrganisationUnitGroups() )

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSetPopulator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSetPopulator.java	2009-12-11 06:31:36 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSetPopulator.java	2010-01-19 21:48:28 +0000
@@ -65,7 +65,6 @@
             type.setName( "Type" );
             type.setDescription( "Type of organisation unit, examples are PHU, chiefdom and district" );
             type.setCompulsory( true );
-            type.setExclusive( true );
             
             organisationUnitGroupService.addOrganisationUnitGroupSet( type );
         }
@@ -78,7 +77,6 @@
             ownership.setName( "Ownership" );
             ownership.setDescription( "Ownership of organisation unit, examples are private and public" );
             ownership.setCompulsory( true );
-            ownership.setExclusive( true );
             
             organisationUnitGroupService.addOrganisationUnitGroupSet( ownership );
         }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnitGroupSet.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnitGroupSet.hbm.xml	2009-11-03 14:25:59 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnitGroupSet.hbm.xml	2010-01-19 21:48:28 +0000
@@ -15,7 +15,6 @@
 
     <property name="description"/>
     <property name="compulsory"/>
-    <property name="exclusive"/>
     
     <set name="organisationUnitGroups" table="orgunitgroupsetmembers">
       <key column="orgunitgroupsetid"/>

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.java	2009-11-03 14:25:59 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.java	2010-01-19 21:48:28 +0000
@@ -799,7 +799,6 @@
         OrganisationUnitGroupSet organisationUnitGroupSet1 = new OrganisationUnitGroupSet();
         organisationUnitGroupSet1.setName( "ougs1" );
         organisationUnitGroupSet1.setCompulsory( true );
-        organisationUnitGroupSet1.setExclusive( false );
         organisationUnitGroupSet1.getOrganisationUnitGroups().add( organisationUnitGroup1 );
         organisationUnitGroupSet1.getOrganisationUnitGroups().add( organisationUnitGroup2 );
         organisationUnitGroupSet1.getOrganisationUnitGroups().add( organisationUnitGroup3 );
@@ -823,7 +822,6 @@
         OrganisationUnitGroupSet organisationUnitGroupSet2 = new OrganisationUnitGroupSet();
         organisationUnitGroupSet2.setName( "ougs2" );
         organisationUnitGroupSet2.setCompulsory( true );
-        organisationUnitGroupSet2.setExclusive( false );
         organisationUnitGroupSet2.getOrganisationUnitGroups().add( organisationUnitGroup4 );
 
         int id2 = organisationUnitGroupService.addOrganisationUnitGroupSet( organisationUnitGroupSet2 );
@@ -862,7 +860,6 @@
         OrganisationUnitGroupSet organisationUnitGroupSet1 = new OrganisationUnitGroupSet();
         organisationUnitGroupSet1.setName( ougs1 );
         organisationUnitGroupSet1.setCompulsory( true );
-        organisationUnitGroupSet1.setExclusive( true );
         organisationUnitGroupSet1.getOrganisationUnitGroups().add( organisationUnitGroup1 );
         organisationUnitGroupSet1.getOrganisationUnitGroups().add( organisationUnitGroup2 );
         organisationUnitGroupSet1.getOrganisationUnitGroups().add( organisationUnitGroup3 );
@@ -870,7 +867,6 @@
         OrganisationUnitGroupSet organisationUnitGroupSet2 = new OrganisationUnitGroupSet();
         organisationUnitGroupSet2.setName( ougs2 );
         organisationUnitGroupSet2.setCompulsory( false );
-        organisationUnitGroupSet2.setExclusive( false );
         organisationUnitGroupSet2.getOrganisationUnitGroups().add( organisationUnitGroup4 );
 
         organisationUnitGroupService.addOrganisationUnitGroupSet( organisationUnitGroupSet1 );
@@ -885,14 +881,6 @@
         Collection<OrganisationUnitGroupSet> compulsorySets = organisationUnitGroupService
             .getCompulsoryOrganisationUnitGroupSets();
         assertEquals( compulsorySets.size(), 1 );
-
-        Collection<OrganisationUnitGroupSet> exclusiveSets = organisationUnitGroupService
-            .getExclusiveOrganisationUnitGroupSets();
-        assertEquals( exclusiveSets.size(), 1 );
-
-        Collection<OrganisationUnitGroupSet> containingSets = organisationUnitGroupService
-            .getExclusiveOrganisationUnitGroupSetsContainingGroup( organisationUnitGroup1 );
-        assertEquals( containingSets.size(), 1 );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/converter/AbstractGroupSetConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/converter/AbstractGroupSetConverter.java	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/converter/AbstractGroupSetConverter.java	2010-01-19 21:48:28 +0000
@@ -53,7 +53,6 @@
         match.setName( object.getName() );
         match.setDescription( object.getDescription() );
         match.setCompulsory( object.isCompulsory() );
-        match.setExclusive( object.isExclusive() );
         
         organisationUnitGroupService.updateOrganisationUnitGroupSet( match );
     }
@@ -77,10 +76,6 @@
         {
             return false;
         }
-        if ( object.isExclusive() != existing.isExclusive() )
-        {
-            return false;
-        }
         
         return true;
     }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/GroupSetConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/GroupSetConverter.java	2009-08-12 21:06:37 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/GroupSetConverter.java	2010-01-19 21:48:28 +0000
@@ -57,7 +57,6 @@
     private static final String FIELD_NAME = "name";
     private static final String FIELD_DESCRIPTION = "description";
     private static final String FIELD_COMPULSORY = "compulsory";
-    private static final String FIELD_EXCLUSIVE = "exclusive";
     
     // -------------------------------------------------------------------------
     // Constructor
@@ -108,7 +107,6 @@
                 writer.writeElement( FIELD_NAME, groupSet.getName() );
                 writer.writeElement( FIELD_DESCRIPTION, groupSet.getDescription() );
                 writer.writeElement( FIELD_COMPULSORY, String.valueOf( groupSet.isCompulsory() ) );
-                writer.writeElement( FIELD_EXCLUSIVE, String.valueOf( groupSet.isExclusive() ) );
                 
                 writer.closeElement();
             }
@@ -129,7 +127,6 @@
             groupSet.setName( values.get( FIELD_NAME ) );
             groupSet.setDescription( values.get( FIELD_DESCRIPTION ) );
             groupSet.setCompulsory( Boolean.parseBoolean( values.get( FIELD_COMPULSORY ) ) );
-            groupSet.setExclusive( Boolean.parseBoolean( values.get( FIELD_EXCLUSIVE ) ) );
             
             NameMappingUtil.addGroupSetMapping( groupSet.getId(), groupSet.getName() );
             

=== modified file 'dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GroupSetBatchHandler.java'
--- dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GroupSetBatchHandler.java	2009-08-12 21:06:37 +0000
+++ dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GroupSetBatchHandler.java	2010-01-19 21:48:28 +0000
@@ -89,7 +89,6 @@
         statementBuilder.setColumn( "name" );
         statementBuilder.setColumn( "description" );
         statementBuilder.setColumn( "compulsory" );
-        statementBuilder.setColumn( "exclusive" );
     }
     
     protected void setValues( OrganisationUnitGroupSet groupSet )
@@ -97,6 +96,5 @@
         statementBuilder.setValue( groupSet.getName() );
         statementBuilder.setValue( groupSet.getDescription() );
         statementBuilder.setValue( groupSet.isCompulsory() );
-        statementBuilder.setValue( groupSet.isExclusive() );
     }
 }

=== modified file 'dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java'
--- dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java	2009-11-19 19:16:46 +0000
+++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java	2010-01-19 21:48:28 +0000
@@ -596,7 +596,6 @@
         groupSet.setName( "OrganisationUnitGroupSet" + uniqueCharacter );
         groupSet.setDescription( "Description" + uniqueCharacter );
         groupSet.setCompulsory( true );
-        groupSet.setExclusive( true );
 
         return groupSet;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroup/ValidateOrganisationUnitGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroup/ValidateOrganisationUnitGroupAction.java	2009-09-09 06:44:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroup/ValidateOrganisationUnitGroupAction.java	2010-01-19 21:48:28 +0000
@@ -34,7 +34,6 @@
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 
 import com.opensymphony.xwork2.ActionSupport;
@@ -144,63 +143,10 @@
             }
         }
 
-        // ---------------------------------------------------------------------
-        // When updating a group which is a member of an exclusive group set,
-        // any selected units can not be a member of another group in the
-        // group set.
-        // ---------------------------------------------------------------------
-
-        if ( id == null )
-        {
-            message = "Everything's ok";
-
-            return SUCCESS;
-        }
-
-        OrganisationUnitGroup organisationUnitGroup = organisationUnitGroupService.getOrganisationUnitGroup( id
-            .intValue() );
-
-        Collection<OrganisationUnitGroupSet> exclusiveGroupSets = organisationUnitGroupService
-            .getExclusiveOrganisationUnitGroupSetsContainingGroup( organisationUnitGroup );
-
-        // TODO move to service layer
+        // TODO validate exclusivity
         
-        if ( exclusiveGroupSets != null && exclusiveGroupSets.size() > 0 )
-        {
-            for ( OrganisationUnitGroupSet groupSet : exclusiveGroupSets )
-            {
-                for ( OrganisationUnitGroup group : groupSet.getOrganisationUnitGroups() )
-                {
-                    for ( OrganisationUnit unit : getSelectedOrganisationUnits() )
-                    {
-                        if ( group.getMembers().contains( unit ) && group.getId() != id )
-                        {
-                            message = unit.getShortName() + " "
-                                + i18n.getString( "can_not_be_a_member_because_member_of" ) + " " + group.getName()
-                                + " " + i18n.getString( "which_is_a_member_of_the_same_exclusive_group_set" ) + " "
-                                + groupSet.getName() + " " + i18n.getString( "as_the_current_group" );
-
-                            return INPUT;
-                        }
-                    }
-                }
-            }
-        }
-
         message = "Everything's ok";
 
         return SUCCESS;
     }
-    
-    private Collection<OrganisationUnit> getSelectedOrganisationUnits()
-    {
-        Collection<OrganisationUnit> units = new ArrayList<OrganisationUnit>();
-        
-        for ( String id : groupMembers )
-        {
-            units.add( organisationUnitService.getOrganisationUnit( Integer.parseInt( id ) ) );
-        }
-        
-        return units;
-    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroupset/AddGroupSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroupset/AddGroupSetAction.java	2009-08-20 08:17:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroupset/AddGroupSetAction.java	2010-01-19 21:48:28 +0000
@@ -80,13 +80,6 @@
         this.compulsory = compulsory;
     }
 
-    private boolean exclusive;
-
-    public void setExclusive( boolean exclusive )
-    {
-        this.exclusive = exclusive;
-    }
-
     private Collection<String> selectedGroups;
 
     public void setSelectedGroups( Collection<String> selectedGroups )
@@ -101,7 +94,7 @@
     public String execute()
         throws Exception
     {
-        OrganisationUnitGroupSet groupSet = new OrganisationUnitGroupSet( name, description, compulsory, exclusive );
+        OrganisationUnitGroupSet groupSet = new OrganisationUnitGroupSet( name, description, compulsory );
 
         Set<OrganisationUnitGroup> selectedMembers = new HashSet<OrganisationUnitGroup>();
 
@@ -109,8 +102,7 @@
         {
             for ( String groupId : selectedGroups )
             {
-                selectedMembers.add( organisationUnitGroupService
-                    .getOrganisationUnitGroup( Integer.parseInt( groupId ) ) );
+                selectedMembers.add( organisationUnitGroupService.getOrganisationUnitGroup( Integer.parseInt( groupId ) ) );
             }
         }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroupset/UpdateGroupSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroupset/UpdateGroupSetAction.java	2009-08-20 08:17:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroupset/UpdateGroupSetAction.java	2010-01-19 21:48:28 +0000
@@ -87,13 +87,6 @@
         this.compulsory = compulsory;
     }
 
-    private boolean exclusive;
-
-    public void setExclusive( boolean exclusive )
-    {
-        this.exclusive = exclusive;
-    }
-
     private Collection<String> selectedGroups;
 
     public void setSelectedGroups( Collection<String> selectedGroups )
@@ -113,7 +106,6 @@
         groupSet.setName( name );
         groupSet.setDescription( description );
         groupSet.setCompulsory( compulsory );
-        groupSet.setExclusive( exclusive );
 
         Set<OrganisationUnitGroup> selectedMembers = new HashSet<OrganisationUnitGroup>();
 
@@ -121,8 +113,7 @@
         {
             for ( String groupId : selectedGroups )
             {
-                selectedMembers.add( organisationUnitGroupService
-                    .getOrganisationUnitGroup( Integer.parseInt( groupId ) ) );
+                selectedMembers.add( organisationUnitGroupService.getOrganisationUnitGroup( Integer.parseInt( groupId ) ) );
             }
         }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm	2010-01-19 21:48:28 +0000
@@ -29,16 +29,6 @@
 	</tr>
 	
 	<tr>
-		<td><label for="exclusive" style="width:100%">$i18n.getString( "exclusive" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-		<td>
-			<select id="exclusive" name="exclusive" style="width:20em">
-				<option value="true" selected="selected">$i18n.getString( "yes" )</option>
-				<option value="false">$i18n.getString( "no" )</option>
-			</select>
-		</td>
-	</tr>
-	
-	<tr>
 		<td colspan="2" style="height:15px"></td>
 	</tr>
 </table>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnitGroupSet.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnitGroupSet.js	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnitGroupSet.js	2010-01-19 21:48:28 +0000
@@ -29,18 +29,7 @@
     {
     	setFieldValue( 'compulsoryField', i18n_no );
     }
-    
-    var exclusive = getElementValue( unitElement, 'exclusive' );
-    
-    if ( exclusive == "true" )
-    {
-    	setFieldValue( 'exclusiveField', i18n_yes );
-    }
-    else
-    {
-    	setFieldValue( 'exclusiveField', i18n_no );
-    }
-    
+        
     setFieldValue( 'memberCountField', getElementValue( unitElement, 'memberCount' ) );
     
     showDetails();
@@ -72,8 +61,7 @@
     
     var params = 'name=' + getFieldValue( 'name' ) +
         '&description=' + getFieldValue( 'description' ) +
-        '&compulsory=' + getFieldValue( 'compulsory' ) +
-        '&exclusive=' + getFieldValue( 'exclusive' ) + '&';
+        '&compulsory=' + getFieldValue( 'compulsory' ) + '&';
         
     var selectedGroups = document.getElementById( 'selectedGroups' );
     
@@ -131,8 +119,7 @@
     var params = 'id=' + getFieldValue( 'id' ) +
     	'&name=' + getFieldValue( 'name' ) +
         '&description=' + getFieldValue( 'description' ) +
-        '&compulsory=' + getFieldValue( 'compulsory' ) +
-        '&exclusive=' + getFieldValue( 'exclusive' ) + '&';
+        '&compulsory=' + getFieldValue( 'compulsory' ) + '&';
     
     var selectedGroups = document.getElementById( 'selectedGroups' );
     

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm	2010-01-19 21:48:28 +0000
@@ -30,16 +30,6 @@
 	</tr>
 	
 	<tr>
-		<td><label for="exclusive">$i18n.getString( "exclusive" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-		<td>
-			<select id="exclusive" name="exclusive" style="width:20em">
-				<option value="true" #if( $organisationUnitGroupSet.exclusive ) selected="selected" #end>$i18n.getString( "yes" )</option>
-				<option value="false" #if( !$organisationUnitGroupSet.exclusive ) selected="selected" #end>$i18n.getString( "no" )</option>
-			</select>
-		</td>
-	</tr>
-	
-	<tr>
 		<td colspan="2" style="height:15px"></td>
 	</tr>
 </table>