← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1940: Edit codestyle.

 

------------------------------------------------------------
revno: 1940
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-06-01 17:24:17 +0700
message:
  Edit codestyle.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/GenerateMinMaxValuesAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/GetMinMaxValidationParamsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/SelectLevelAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/SelectOrganisationUnitGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/SetupTreeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/UnselectAllAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/UnselectLevelAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/UnselectOrganisationUnitGroupAction.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/minMaxValidation.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-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/GenerateMinMaxValuesAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/GenerateMinMaxValuesAction.java	2010-04-29 04:33:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/GenerateMinMaxValuesAction.java	2010-06-01 10:24:17 +0000
@@ -46,142 +46,148 @@
  * @version $Id$
  */
 
-public class GenerateMinMaxValuesAction implements Action {
-	// -------------------------------------------------------------------------------------------------
-	// Dependencies
-	// -------------------------------------------------------------------------------------------------
-
-	private OrganisationUnitSelectionManager organisationUnitSelectionManager;
-
-	private DataSetService dataSetService;
-
-//	private PeriodService periodService;
-
-	private MinMaxValuesGenerationService minMaxValuesGenerationService;
-
-	private MinMaxDataElementService minMaxDataElementService;
-
-	private SystemSettingManager systemSettingManager;
-
-	// -------------------------------------------------------------------------------------------------
-	// Input
-	// -------------------------------------------------------------------------------------------------
-
-	private Integer[] dataSetIds;
-	
-	private String message;
-
-	private I18n i18n;
-
-	// -------------------------------------------------------------------------------------------------
-	// Setters
-	// -------------------------------------------------------------------------------------------------
-
-	public void setOrganisationUnitSelectionManager(
-			OrganisationUnitSelectionManager organisationUnitSelectionManager) {
-		this.organisationUnitSelectionManager = organisationUnitSelectionManager;
-	}
-
-	public void setSystemSettingManager(
-			SystemSettingManager systemSettingManager) {
-		this.systemSettingManager = systemSettingManager;
-	}
-
-	public void setDataSetService(DataSetService dataSetService) {
-		this.dataSetService = dataSetService;
-	}
-
-//	public void setPeriodService(PeriodService periodService) {
-//		this.periodService = periodService;
-//	}
-
-	public void setMessage(String message) {
-		this.message = message;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-
-	public void setI18n(I18n i18n) {
-		this.i18n = i18n;
-	}
-
-	public void setMinMaxValuesGenerationService(
-			MinMaxValuesGenerationService minMaxValuesGenerationService) {
-		this.minMaxValuesGenerationService = minMaxValuesGenerationService;
-	}
-
-	public void setMinMaxDataElementService(
-			MinMaxDataElementService minMaxDataElementService) {
-		this.minMaxDataElementService = minMaxDataElementService;
-	}
-
-	public void setDataSetIds(Integer[] dataSetIds) {
-		this.dataSetIds = dataSetIds;
-	}
-
-	// -------------------------------------------------------------------------------------------------
-	// Action implementation
-	// -------------------------------------------------------------------------------------------------
-
-	@Override
-	public String execute() throws Exception {
-
-		Collection<OrganisationUnit> orgUnits = organisationUnitSelectionManager
-				.getSelectedOrganisationUnits();
-
-		if (dataSetIds == null) {
-			message = i18n.getString("not_choose_dataset");
-			return INPUT;
-		}
-		
-		if (orgUnits == null) {
-			message = i18n.getString("not_choose_organisation");
-			return INPUT;
-		}
-		
-		// Get factor
-		Double factor = (Double) systemSettingManager
-				.getSystemSetting(SystemSettingManager.KEY_FACTOR_OF_DEVIATION, 2.0);
-
-		for (Integer dataSetId : dataSetIds) {
-			// Get dataset
-			DataSet dataSet = dataSetService.getDataSet(dataSetId);
-
-			for (OrganisationUnit orgUnit : orgUnits) {
-				if (orgUnit.getDataSets().contains(dataSet)) {
-
-					// Get min/max values for dataelements into dataset
-					Collection<MinMaxDataElement> minMaxDataElements = (Collection<MinMaxDataElement>) minMaxValuesGenerationService
-							.getMinMaxValues(orgUnit,
-									dataSet.getDataElements(), factor);
-
-					// Save min / max value
-					for (MinMaxDataElement minMaxDataElement : minMaxDataElements) {
-						MinMaxDataElement minMaxValue = minMaxDataElementService
-								.getMinMaxDataElement(minMaxDataElement
-										.getSource(), minMaxDataElement
-										.getDataElement(), minMaxDataElement
-										.getOptionCombo());
-
-						if (minMaxValue != null) {
-							minMaxValue.setMax(minMaxDataElement.getMax());
-							minMaxValue.setMin(minMaxDataElement.getMin());
-							minMaxDataElementService
-									.updateMinMaxDataElement(minMaxValue);
-						} else {
-							minMaxDataElement.setGenerated(true);
-							minMaxDataElementService
-									.addMinMaxDataElement(minMaxDataElement);
-						}
-					}
-				}
-			}
-		}
-
-		message = i18n.getString("generate_values_success");
-
-		return SUCCESS;
-	}
+public class GenerateMinMaxValuesAction
+    implements Action
+{
+    // -------------------------------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------------------------------
+
+    private OrganisationUnitSelectionManager organisationUnitSelectionManager;
+
+    private DataSetService dataSetService;
+
+    private MinMaxValuesGenerationService minMaxValuesGenerationService;
+
+    private MinMaxDataElementService minMaxDataElementService;
+
+    private SystemSettingManager systemSettingManager;
+
+    // -------------------------------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------------------------------
+
+    private Integer[] dataSetIds;
+
+    private String message;
+
+    private I18n i18n;
+
+    // -------------------------------------------------------------------------------------------------
+    // Setters
+    // -------------------------------------------------------------------------------------------------
+
+    public void setOrganisationUnitSelectionManager( OrganisationUnitSelectionManager organisationUnitSelectionManager )
+    {
+        this.organisationUnitSelectionManager = organisationUnitSelectionManager;
+    }
+
+    public void setSystemSettingManager( SystemSettingManager systemSettingManager )
+    {
+        this.systemSettingManager = systemSettingManager;
+    }
+
+    public void setDataSetService( DataSetService dataSetService )
+    {
+        this.dataSetService = dataSetService;
+    }
+
+    public void setMessage( String message )
+    {
+        this.message = message;
+    }
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public void setI18n( I18n i18n )
+    {
+        this.i18n = i18n;
+    }
+
+    public void setMinMaxValuesGenerationService( MinMaxValuesGenerationService minMaxValuesGenerationService )
+    {
+        this.minMaxValuesGenerationService = minMaxValuesGenerationService;
+    }
+
+    public void setMinMaxDataElementService( MinMaxDataElementService minMaxDataElementService )
+    {
+        this.minMaxDataElementService = minMaxDataElementService;
+    }
+
+    public void setDataSetIds( Integer[] dataSetIds )
+    {
+        this.dataSetIds = dataSetIds;
+    }
+
+    // -------------------------------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------------------------------
+
+    @Override
+    public String execute()
+        throws Exception
+    {
+
+        Collection<OrganisationUnit> orgUnits = organisationUnitSelectionManager.getSelectedOrganisationUnits();
+
+        if ( dataSetIds == null )
+        {
+            message = i18n.getString( "not_choose_dataset" );
+            return INPUT;
+        }
+
+        if ( orgUnits == null )
+        {
+            message = i18n.getString( "not_choose_organisation" );
+            return INPUT;
+        }
+
+        // Get factor
+        Double factor = (Double) systemSettingManager.getSystemSetting( SystemSettingManager.KEY_FACTOR_OF_DEVIATION,
+            2.0 );
+
+        for ( Integer dataSetId : dataSetIds )
+        {
+            // Get dataset
+            DataSet dataSet = dataSetService.getDataSet( dataSetId );
+
+            for ( OrganisationUnit orgUnit : orgUnits )
+            {
+                if ( orgUnit.getDataSets().contains( dataSet ) )
+                {
+
+                    // Get min/max values for dataelements into dataset
+                    Collection<MinMaxDataElement> minMaxDataElements = (Collection<MinMaxDataElement>) minMaxValuesGenerationService
+                        .getMinMaxValues( orgUnit, dataSet.getDataElements(), factor );
+
+                    // Save min / max value
+                    for ( MinMaxDataElement minMaxDataElement : minMaxDataElements )
+                    {
+                        MinMaxDataElement minMaxValue = minMaxDataElementService.getMinMaxDataElement(
+                            minMaxDataElement.getSource(), minMaxDataElement.getDataElement(), minMaxDataElement
+                                .getOptionCombo() );
+
+                        if ( minMaxValue != null )
+                        {
+                            minMaxValue.setMax( minMaxDataElement.getMax() );
+                            minMaxValue.setMin( minMaxDataElement.getMin() );
+                            minMaxDataElementService.updateMinMaxDataElement( minMaxValue );
+                        }
+                        else
+                        {
+                            minMaxDataElement.setGenerated( true );
+                            minMaxDataElementService.addMinMaxDataElement( minMaxDataElement );
+                        }
+                    }
+                }
+            }
+        }
+
+        message = i18n.getString( "generate_values_success" );
+
+        return SUCCESS;
+    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/GetMinMaxValidationParamsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/GetMinMaxValidationParamsAction.java	2010-04-13 02:28:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/GetMinMaxValidationParamsAction.java	2010-06-01 10:24:17 +0000
@@ -45,86 +45,95 @@
  * @version $Id$
  * 
  */
-public class GetMinMaxValidationParamsAction implements Action {
-
-	// -------------------------------------------------------------------------
-	// Dependencies
-	// -------------------------------------------------------------------------
-
-	private DataSetService dataSetService;
-
-	public void setDataSetService(DataSetService dataSetService) {
-		this.dataSetService = dataSetService;
-	}
-
-	private OrganisationUnitService organisationUnitService;
-
-	public void setOrganisationUnitService(
-			OrganisationUnitService organisationUnitService) {
-		this.organisationUnitService = organisationUnitService;
-	}
-
-	private SelectionTreeManager selectionTreeManager;
-
-	public void setSelectionTreeManager(
-			SelectionTreeManager selectionTreeManager) {
-		this.selectionTreeManager = selectionTreeManager;
-	}
-
-	private OrganisationUnitGroupService organisationUnitGroupService;
-
-	public void setOrganisationUnitGroupService(
-			OrganisationUnitGroupService organisationUnitGroupService) {
-		this.organisationUnitGroupService = organisationUnitGroupService;
-	}
-
-	// -------------------------------------------------------------------------
-	// Output
-	// -------------------------------------------------------------------------
-
-	private Collection<DataSet> dataSets;
-
-	public Collection<DataSet> getDataSets() {
-		return dataSets;
-	}
-
-	private List<OrganisationUnitLevel> levels;
-
-	public List<OrganisationUnitLevel> getLevels() {
-		return levels;
-	}
-
-	private String message;
-
-	public String getMessage() {
-		return message;
-	}
-
-	public void setMessage(String message) {
-		this.message = message;
-	}
-
-	private Collection<OrganisationUnitGroup> orgunitGroups;
-
-	public Collection<OrganisationUnitGroup> getOrgunitGroups() {
-		return orgunitGroups;
-	}
-
-	// -------------------------------------------------------------------------
-	// Action implementation
-	// -------------------------------------------------------------------------
-
-	public String execute() throws Exception {
-
-		selectionTreeManager.clearSelectedOrganisationUnits();
-
-		levels = organisationUnitService.getOrganisationUnitLevels();
-
-		dataSets = dataSetService.getAllDataSets();
-
-		orgunitGroups = organisationUnitGroupService
-				.getAllOrganisationUnitGroups();
-
-		return SUCCESS;
-	}
+public class GetMinMaxValidationParamsAction
+    implements Action
+{
+
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private DataSetService dataSetService;
+
+    public void setDataSetService( DataSetService dataSetService )
+    {
+        this.dataSetService = dataSetService;
+    }
+
+    private OrganisationUnitService organisationUnitService;
+
+    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+    {
+        this.organisationUnitService = organisationUnitService;
+    }
+
+    private SelectionTreeManager selectionTreeManager;
+
+    public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager )
+    {
+        this.selectionTreeManager = selectionTreeManager;
+    }
+
+    private OrganisationUnitGroupService organisationUnitGroupService;
+
+    public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
+    {
+        this.organisationUnitGroupService = organisationUnitGroupService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
+    private Collection<DataSet> dataSets;
+
+    public Collection<DataSet> getDataSets()
+    {
+        return dataSets;
+    }
+
+    private List<OrganisationUnitLevel> levels;
+
+    public List<OrganisationUnitLevel> getLevels()
+    {
+        return levels;
+    }
+
+    private String message;
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public void setMessage( String message )
+    {
+        this.message = message;
+    }
+
+    private Collection<OrganisationUnitGroup> orgunitGroups;
+
+    public Collection<OrganisationUnitGroup> getOrgunitGroups()
+    {
+        return orgunitGroups;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+        throws Exception
+    {
+
+        selectionTreeManager.clearSelectedOrganisationUnits();
+
+        levels = organisationUnitService.getOrganisationUnitLevels();
+
+        dataSets = dataSetService.getAllDataSets();
+
+        orgunitGroups = organisationUnitGroupService.getAllOrganisationUnitGroups();
+
+        return SUCCESS;
+    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/SelectLevelAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/SelectLevelAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/SelectLevelAction.java	2010-06-01 10:24:17 +0000
@@ -64,7 +64,7 @@
     {
         this.level = level;
     }
-    
+
     // -------------------------------------------------------------------------
     // Action
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/SelectOrganisationUnitGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/SelectOrganisationUnitGroupAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/SelectOrganisationUnitGroupAction.java	2010-06-01 10:24:17 +0000
@@ -60,7 +60,7 @@
     {
         this.organisationUnitGroupService = organisationUnitGroupService;
     }
-    
+
     // -------------------------------------------------------------------------
     // Input & output
     // -------------------------------------------------------------------------
@@ -71,7 +71,7 @@
     {
         this.organisationUnitGroupId = organisationUnitGroupId;
     }
-    
+
     // -------------------------------------------------------------------------
     // Action
     // -------------------------------------------------------------------------
@@ -79,16 +79,16 @@
     public String execute()
     {
         OrganisationUnitGroup group = organisationUnitGroupService.getOrganisationUnitGroup( organisationUnitGroupId );
-        
+
         if ( group != null )
         {
             Collection<OrganisationUnit> units = selectionTreeManager.getSelectedOrganisationUnits();
-            
+
             units.addAll( group.getMembers() );
-            
+
             selectionTreeManager.setSelectedOrganisationUnits( units );
         }
-        
+
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/SetupTreeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/SetupTreeAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/SetupTreeAction.java	2010-06-01 10:24:17 +0000
@@ -96,7 +96,7 @@
         throws Exception
     {
         selectionTreeManager.clearSelectedOrganisationUnits();
-        
+
         if ( dataSetId != 0 )
         {
             dataSet = dataSetService.getDataSet( dataSetId );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/UnselectAllAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/UnselectAllAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/UnselectAllAction.java	2010-06-01 10:24:17 +0000
@@ -36,7 +36,7 @@
  * @version $Id$
  */
 public class UnselectAllAction
-implements Action
+    implements Action
 {
     // -------------------------------------------------------------------------
     // Dependencies
@@ -57,7 +57,7 @@
         throws Exception
     {
         selectionTreeManager.clearSelectedOrganisationUnits();
-        
+
         return SUCCESS;
-    }   
+    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/UnselectLevelAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/UnselectLevelAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/UnselectLevelAction.java	2010-06-01 10:24:17 +0000
@@ -40,81 +40,81 @@
  */
 public class UnselectLevelAction
     implements Action
-    {
-        private static final int FIRST_LEVEL = 1;
-
-        // -------------------------------------------------------------------------
-        // Dependencies
-        // -------------------------------------------------------------------------
-
-        private SelectionTreeManager selectionTreeManager;
-
-        public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager )
-        {
-            this.selectionTreeManager = selectionTreeManager;
-        }
-
-        // -------------------------------------------------------------------------
-        // Input
-        // -------------------------------------------------------------------------
-
-        private Integer level;
-
-        public void setLevel( Integer level )
-        {
-            this.level = level;
-        }
-        
-        // -------------------------------------------------------------------------
-        // Output
-        // -------------------------------------------------------------------------
-
-        private Integer selectLevel;
-
-        public Integer getSelectLevel()
-        {
-            return selectLevel;
-        }
-
-        // -------------------------------------------------------------------------
-        // Action
-        // -------------------------------------------------------------------------
-
-        public String execute()
-            throws Exception
-        {
-            Collection<OrganisationUnit> rootUnits = selectionTreeManager.getRootOrganisationUnits();
-            
-            Collection<OrganisationUnit> selectedUnits = selectionTreeManager.getSelectedOrganisationUnits();
-
-            for ( OrganisationUnit rootUnit : rootUnits )
-            {        	
-                unselectLevel( rootUnit, FIRST_LEVEL, selectedUnits );
-            }
-
-            selectionTreeManager.setSelectedOrganisationUnits( selectedUnits );
-
-            selectLevel = level;
-            
-            return SUCCESS;
-        }
-
-        // -------------------------------------------------------------------------
-        // Supportive methods
-        // -------------------------------------------------------------------------
-
-        private void unselectLevel( OrganisationUnit orgUnit, int currentLevel, Collection<OrganisationUnit> selectedUnits )
-        {
-            if ( currentLevel == level )
-            {        	
-                selectedUnits.remove( orgUnit );
-            }
-            else
+{
+    private static final int FIRST_LEVEL = 1;
+
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private SelectionTreeManager selectionTreeManager;
+
+    public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager )
+    {
+        this.selectionTreeManager = selectionTreeManager;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private Integer level;
+
+    public void setLevel( Integer level )
+    {
+        this.level = level;
+    }
+
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
+    private Integer selectLevel;
+
+    public Integer getSelectLevel()
+    {
+        return selectLevel;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action
+    // -------------------------------------------------------------------------
+
+    public String execute()
+        throws Exception
+    {
+        Collection<OrganisationUnit> rootUnits = selectionTreeManager.getRootOrganisationUnits();
+
+        Collection<OrganisationUnit> selectedUnits = selectionTreeManager.getSelectedOrganisationUnits();
+
+        for ( OrganisationUnit rootUnit : rootUnits )
+        {
+            unselectLevel( rootUnit, FIRST_LEVEL, selectedUnits );
+        }
+
+        selectionTreeManager.setSelectedOrganisationUnits( selectedUnits );
+
+        selectLevel = level;
+
+        return SUCCESS;
+    }
+
+    // -------------------------------------------------------------------------
+    // Supportive methods
+    // -------------------------------------------------------------------------
+
+    private void unselectLevel( OrganisationUnit orgUnit, int currentLevel, Collection<OrganisationUnit> selectedUnits )
+    {
+        if ( currentLevel == level )
+        {
+            selectedUnits.remove( orgUnit );
+        }
+        else
+        {
+            for ( OrganisationUnit child : orgUnit.getChildren() )
             {
-                for ( OrganisationUnit child : orgUnit.getChildren() )
-                {            	
-                    unselectLevel( child, currentLevel + 1, selectedUnits );
-                }
+                unselectLevel( child, currentLevel + 1, selectedUnits );
             }
         }
     }
+}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/UnselectOrganisationUnitGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/UnselectOrganisationUnitGroupAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/UnselectOrganisationUnitGroupAction.java	2010-06-01 10:24:17 +0000
@@ -60,7 +60,7 @@
     {
         this.organisationUnitGroupService = organisationUnitGroupService;
     }
-    
+
     // -------------------------------------------------------------------------
     // Input & output
     // -------------------------------------------------------------------------
@@ -71,7 +71,7 @@
     {
         this.organisationUnitGroupId = organisationUnitGroupId;
     }
-    
+
     // -------------------------------------------------------------------------
     // Action
     // -------------------------------------------------------------------------
@@ -79,16 +79,16 @@
     public String execute()
     {
         OrganisationUnitGroup group = organisationUnitGroupService.getOrganisationUnitGroup( organisationUnitGroupId );
-        
+
         if ( group != null )
         {
             Collection<OrganisationUnit> units = selectionTreeManager.getSelectedOrganisationUnits();
-            
+
             units.removeAll( group.getMembers() );
-            
+
             selectionTreeManager.setSelectedOrganisationUnits( units );
         }
-        
+
         return SUCCESS;
     }
 }

=== 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-05-06 14:59:11 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties	2010-06-01 10:24:17 +0000
@@ -197,3 +197,5 @@
 pruning																= Pruning
 pruning_done														= Pruning done!
 intro_prune_organisation_unit										= Pruning Organisation Units and their data.
+min_max_validation													= Min / Max Validation
+generate															= Generate
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/minMaxValidation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/minMaxValidation.vm	2010-04-29 04:33:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/minMaxValidation.vm	2010-06-01 10:24:17 +0000
@@ -73,7 +73,7 @@
     <td align="center"> </td>
        <td align="center">&nbsp;</td>
     <td align="center">&nbsp;</td>
-    <td align="left"><input type="submit" id="submitButton" style="width:10em" value="$i18n.getString( 'save' )">
+    <td align="left"><input type="submit" id="submitButton" style="width:10em" value="$i18n.getString( 'generate' )">
 	  <input type="button"" style="width:10em" onClick="window.location.href='listReportExcel.action'" value="$i18n.getString( 'cancel' )"></td>
   
   </tr>