← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 713: some modification in data lock api and services and data lock web module

 

------------------------------------------------------------
revno: 713
committer: brajesh2murari@xxxxxxxxx
branch nick: trunk
timestamp: Tue 2009-09-15 09:20:33 +0530
message:
  some modification in data lock api and services and data lock web module
removed:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/OrgunitwiseGetDataSetsAction.java
  dhis-2/dhis-web/dhis-web-portal/pom.xml
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/datalock/DataSetLockService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/datalock/DataSetLockStore.java
  dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/DefaultDataSetLockService.java
  dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/hibernate/HibernateDataSetLockStore.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/DefineLockOnDataSetOrgunitAndPeriod.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml
  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/javascript/locking.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/oust.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/lockingForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/selectionedTreeInFrame.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DelDataSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UnselectAllAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UnselectLevelAction.java
  dhis-2/dhis-web/pom.xml


--
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/datalock/DataSetLockService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datalock/DataSetLockService.java	2009-09-14 17:07:34 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datalock/DataSetLockService.java	2009-09-15 03:50:33 +0000
@@ -75,20 +75,20 @@
     DataSetLock getDataSetLock( int id );
 
     /**
-     * Returns a DataSetLocks with the given DataSet.
+     * Returns a Collection of DataSetLocks with the given DataSet.
      * 
      * @param name The dataSetLock.
-     * @return A DataSetLock with the given DataSet.
+     * @return A Collection of DataSetLock with the given DataSet.
      */
-    DataSetLock getDataSetLockByDataSet( DataSet dataSet );
+    Collection<DataSetLock> getDataSetLockByDataSet( DataSet dataSet );
 
     /**
-     * Returns the DataSetLock with the given period.
+     * Returns Collection of DataSetLock with the given period.
      * 
      * @param period The DataSetLock.
-     * @return The DataSetLock with the given DataSetLock.
+     * @return Collection of DataSetLock with the given DataSetLock.
      */
-    DataSetLock getDataSetLockByPeriod( Period period );
+    Collection<DataSetLock> getDataSetLockByPeriod( Period period );
     
     /**
      * Returns the DataSetLock with the given dataSet and period.

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datalock/DataSetLockStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datalock/DataSetLockStore.java	2009-09-10 13:17:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datalock/DataSetLockStore.java	2009-09-15 03:50:33 +0000
@@ -75,20 +75,20 @@
     DataSetLock getDataSetLock( int id );
 
     /**
-     * Returns a DataSetLocks with the given DataSet.
+     * Returns a Collection of DataSetLocks with the given DataSet.
      * 
      * @param name The dataSetLock.
-     * @return A DataSetLock with the given DataSet.
+     * @return A Collection of DataSetLock with the given DataSet.
      */
-    DataSetLock getDataSetLockByDataSet( DataSet dataSet );
+    Collection<DataSetLock> getDataSetLockByDataSet( DataSet dataSet );
 
     /**
-     * Returns the DataSetLock with the given period.
+     * Returns a Collection of DataSetLock with the given period.
      * 
      * @param period The DataSetLock.
-     * @return The DataSetLock with the given DataSetLock.
+     * @return A Collection of DataSetLock with the given DataSetLock.
      */
-    DataSetLock getDataSetLockByPeriod( Period period );
+    Collection<DataSetLock> getDataSetLockByPeriod( Period period );
     
     /**
      * Returns the DataSetLock with the given dataSet and period.

=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/DefaultDataSetLockService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/DefaultDataSetLockService.java	2009-09-14 16:07:07 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/DefaultDataSetLockService.java	2009-09-15 03:50:33 +0000
@@ -88,12 +88,12 @@
         return dataSetLockStore.getDataSetLock( id );
     }
 
-    public DataSetLock getDataSetLockByDataSet( DataSet dataSet )
+    public Collection<DataSetLock> getDataSetLockByDataSet( DataSet dataSet )
     {
         return dataSetLockStore.getDataSetLockByDataSet( dataSet );
     }
    
-    public DataSetLock getDataSetLockByPeriod( Period period )
+    public Collection<DataSetLock> getDataSetLockByPeriod( Period period )
     {
         return dataSetLockStore.getDataSetLockByPeriod( period );
     }

=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/hibernate/HibernateDataSetLockStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/hibernate/HibernateDataSetLockStore.java	2009-09-14 17:19:29 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/hibernate/HibernateDataSetLockStore.java	2009-09-15 03:50:33 +0000
@@ -29,6 +29,7 @@
 import java.util.Collection;
 
 import org.hibernate.Criteria;
+import org.hibernate.Query;
 import org.hibernate.Session;
 import org.hibernate.SessionFactory;
 import org.hibernate.criterion.Restrictions;
@@ -138,31 +139,33 @@
         return (DataSetLock) session.get( DataSetLock.class, id );
     }
 
-    public DataSetLock getDataSetLockByDataSet( DataSet dataSet )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( DataSetLock.class );
+    @SuppressWarnings("unchecked")
+	public Collection<DataSetLock> getDataSetLockByDataSet( DataSet dataSet )
+    {   	
+    	Session session = sessionFactory.getCurrentSession();
+    	
+    	Criteria criteria = session.createCriteria( DataSetLock.class );
         criteria.add( Restrictions.eq( "dataSet", dataSet ) );
-
-        return (DataSetLock) criteria.uniqueResult();
+        return criteria.list();
     }
 
-    public DataSetLock getDataSetLockByPeriod( Period period )
+    @SuppressWarnings("unchecked")
+	public Collection<DataSetLock> getDataSetLockByPeriod( Period period )
     {
-        Session session = sessionFactory.getCurrentSession();
-
+    	Session session = sessionFactory.getCurrentSession();
+        
         Period storedPeriod = reloadPeriod( period );
 
         if ( storedPeriod == null )
         {
-            return null;
+           return null;
         }
 
         Criteria criteria = session.createCriteria( DataSetLock.class );
+        //criteria.createAlias( "period", "ds" );
         criteria.add( Restrictions.eq( "period", storedPeriod ) );
 
-        return (DataSetLock) criteria.uniqueResult();
+        return criteria.list();
     }
 
     public DataSetLock getDataSetLockByDataSetAndPeriod( DataSet dataSet, Period period )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/DefineLockOnDataSetOrgunitAndPeriod.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/DefineLockOnDataSetOrgunitAndPeriod.java	2009-09-14 16:13:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/DefineLockOnDataSetOrgunitAndPeriod.java	2009-09-15 03:50:33 +0000
@@ -95,7 +95,7 @@
     // -------------------------------------------------------------------------
 
     private Integer lockedDataSets;
-
+    
     public void setLockedDataSets( Integer lockedDataSets )
     {
         this.lockedDataSets = lockedDataSets;
@@ -169,23 +169,18 @@
 
         // -------------------------------------------------------------------------------
         // For data set movement from locked to unlocked data set list box and
-        // vice versa
-        // according to lock status
+        // vice versa according to lock status
         // -------------------------------------------------------------------------------
 
         for ( String id : unlockedDataSets )
-        {
-            DataSet dataSet = dataSetService.getDataSet( Integer.parseInt( id ) );
+        {      	
+        	DataSet dataSet = dataSetService.getDataSet( Integer.parseInt( id ) );
             DataSetLock dataSetLock = dataSetLockService.getDataSetLockByDataSetAndPeriod( dataSet, period );
-
+            
             if ( dataSetLock != null )
-            {
-                if ( dataSet.getLocked() == true )
-                {
-                    dataSet.setLocked( false );
-                    dataSetService.updateDataSet( dataSet );
-                }
-                
+            {                
+                dataSet.setLocked( false );
+                dataSetService.updateDataSet( dataSet );                               
                 dataSetLock.getSources().removeAll( dataSetLock.getSources() );
                 dataSetLockService.deleteDataSetLock( dataSetLock );
             }
@@ -198,7 +193,7 @@
 
         if ( lockedDataSets != null )
         {
-            DataSet dataSet = dataSetService.getDataSet( lockedDataSets );
+            DataSet dataSet = dataSetService.getDataSet(  lockedDataSets.intValue() );
             Set<Source> organisationUnitsSelectedForLocking = new HashSet<Source>( selectionTreeManager
                 .getLockOnSelectedOrganisationUnits() );
             DataSetLock dataSetLock = dataSetLockService.getDataSetLockByDataSetAndPeriod( dataSet, period );

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/OrgunitwiseGetDataSetsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/OrgunitwiseGetDataSetsAction.java	2009-09-14 16:13:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/OrgunitwiseGetDataSetsAction.java	1970-01-01 00:00:00 +0000
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2004-2009, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.hisp.dhis.dataadmin.action.lock;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.period.Period;
-import org.hisp.dhis.period.PeriodService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Brajesh Murari
- * @version $Id$
- */
-public class OrgunitwiseGetDataSetsAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private DataSetService dataSetService;
-
-    public void setDataSetService( DataSetService dataSetService )
-    {
-        this.dataSetService = dataSetService;
-    }
-    
-    private PeriodService periodService;
-    
-    public void setPeriodService( PeriodService periodService )
-    {
-        this.periodService = periodService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input/output
-    // -------------------------------------------------------------------------
-    
-    private Integer periodId;
-    
-    public void setPeriodId( Integer periodId )
-    {
-        this.periodId = periodId;
-    }
-    
-    private Collection<DataSet> dataSets = new ArrayList<DataSet>();
-
-    public Collection<DataSet> getDataSets()
-    {
-        return dataSets;
-    }
-    
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-    {
-        if ( periodId != null )
-        {
-            Period period = periodService.getPeriod( periodId.intValue() );
-        
-            for ( DataSet dataSet : dataSetService.getAllDataSets() )
-            {
-                dataSet.setLocked( dataSet.getLockedPeriods().contains( period ) );
-                
-                dataSets.add( dataSet );
-            }
-        }
-
-        return SUCCESS;
-    }
-}
-

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml	2009-09-10 13:17:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml	2009-09-15 03:50:33 +0000
@@ -22,14 +22,6 @@
   </bean>
   
   <bean
-    id="org.hisp.dhis.dataadmin.action.lock.OrgunitwiseGetDataSetsAction"
-    class="org.hisp.dhis.dataadmin.action.lock.OrgunitwiseGetDataSetsAction"
-    scope="prototype">
-    <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService"/>
-    <property name="periodService" ref="org.hisp.dhis.period.PeriodService"/>
-  </bean>
-  
-  <bean
     id="org.hisp.dhis.dataadmin.action.lock.SetupAssociationsTreeAction"
     class="org.hisp.dhis.dataadmin.action.lock.SetupAssociationsTreeAction"
     scope="prototype">

=== 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	2009-09-14 16:00:37 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties	2009-09-15 03:50:33 +0000
@@ -6,6 +6,7 @@
 data_locking                                                        = Data Locking												
 locked_datasets														= Locked Data Sets
 unlocked_datasets													= Unlocked Data Sets
+organisation_units_lock            = Organization Units [ Orange Colour = Unlocked ][ Green Colour = Locked ]
 save																= Save
 data_administration													= Data Administration
 period_type															= Period Type

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/locking.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/locking.js	2009-09-10 13:17:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/locking.js	2009-09-15 03:50:33 +0000
@@ -52,6 +52,10 @@
                 });
                 document.getElementById( "unlockedDataSets" ).disabled = false;
                 document.getElementById( "lockedDataSets" ).disabled = false;
+                document.getElementById( "submitButton1" ).disabled = false;
+     						document.getElementById( "submitButton2" ).disabled = false;
+     						document.getElementById( "submitButton3" ).disabled = false;
+     						document.getElementById( "submitButton4" ).disabled = false;   
             }
         });
     }
@@ -73,8 +77,9 @@
      var periodList = document.getElementById( "periodId" );
      var periodId = periodList.options[ periodList.selectedIndex ].value;
      var lockedDataSetList = document.getElementById('lockedDataSets');
-     var selectedLockedDataSetId = lockedDataSetList.options[ lockedDataSetList.selectedIndex ].value;       
-     iframeForOUTree.location.href='orgunitWiseSetupAssociationsTree.action?selectedLockedDataSetId=' + selectedLockedDataSetId + '&periodId=' + periodId;
+     var selectedLockedDataSetId = lockedDataSetList.options[ lockedDataSetList.selectedIndex ].value;
+          
+     iframeForOUTree.location.href='orgunitWiseSetupAssociationsTree.action?selectedLockedDataSetId=' + selectedLockedDataSetId + '&periodId=' + periodId;		 
 }
     
 function ApplyAll() {
@@ -113,7 +118,7 @@
 
 function updateDataSetsOrgunitwise() {
      if ( validateLocking() )  {
-               
+        selectAllById( "unlockedDataSets" );       
         document.getElementById( "lockingForm" ).submit();            
      }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/oust.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/oust.js	2009-09-10 13:17:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/oust.js	2009-09-15 03:50:33 +0000
@@ -122,6 +122,7 @@
         request.setResponseTypeXML( 'units' );
         request.setCallbackSuccess( treeReceived );
         request.send( selectionTreePath + 'getExpandedTreeForLock.action' );
+        
     };
 
     function processExpand( rootElement ){
@@ -168,6 +169,7 @@
         }
         
         clearLoadingMessage( treeTag );
+        
     }
 
     function createChildren( parentTag, parentElement ){
@@ -232,7 +234,7 @@
 				}
 				else{
 					toggleTag.appendChild( toggleImg );
-				}
+				}				
     }
 
     function setVisible( tag, visible ){

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/lockingForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/lockingForm.vm	2009-09-10 13:17:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/lockingForm.vm	2009-09-15 03:50:33 +0000
@@ -80,22 +80,22 @@
     	<table> 
 			<tr>
 				<td>
-                	<input type="button" id="submitButton1" value="$i18n.getString( "apply_lock_on_all" )" onclick="ApplyAll()" style="width:12em">                
-    				<input type="button" id="submitButton2" value="$i18n.getString( "remove_all" )" onclick="RemoveAll()" style="width:12em">             
-    				<input type="button" id="submitButton3" value="$i18n.getString( "select_all_at_level" )" onclick="lockAllAtLevel()" style="width:12em">      		
-                    <select id="levelList" id="submitButton4" name="levelList" style="width:12em">
+                	<input type="button" id="submitButton1" value="$i18n.getString( "apply_lock_on_all" )" onclick="ApplyAll()" style="width:12em" disabled="true">                
+    				<input type="button" id="submitButton2" value="$i18n.getString( "remove_all" )" onclick="RemoveAll()" style="width:12em" disabled="true">             
+    				<input type="button" id="submitButton3" value="$i18n.getString( "select_all_at_level" )" onclick="lockAllAtLevel()" style="width:12em" disabled="true">      		
+                    <select id="levelList" id="levelList" name="levelList" style="width:12em">
                     	#foreach( $level in $levels )
                     		<option value="$level.level" #if ( $selectLevel == $level.level )selected="selcted"#end>$encoder.htmlEncode( $level.name )</option>
                     	#end
                     </select> 			
-                	<input type="button" id="submitButton5" value="$i18n.getString( "unselect_all_at_level" )" onclick="unLockAllAtLevel()" style="width:12em">      		
+                	<input type="button" id="submitButton4" value="$i18n.getString( "unselect_all_at_level" )" onclick="unLockAllAtLevel()" style="width:12em" disabled="true">      		
             	</td>
 			</tr>
             <tr>
                   <td colspan="3" height="15"></td>
             </tr>
             <tr>
-                  <th colspan="3">$i18n.getString( "organisation_units" )</th>
+                  <th colspan="3">$i18n.getString( "organisation_units_lock" )</th>
             </tr>
             <tr>
                   <td colspan="3">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/selectionedTreeInFrame.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/selectionedTreeInFrame.vm	2009-09-10 13:17:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/selectionedTreeInFrame.vm	2009-09-15 03:50:33 +0000
@@ -54,7 +54,7 @@
         <tr>        
             <td>
                 <input type="button" id="submitButton" value="$i18n.getString( 'save' )" style="width:15em"  onclick="parent.updateDataSetsOrgunitwise()">									
-			    <input type="button" id="submitButton1" value="$i18n.getString( 'cancel' )" style="width:15em"  onclick="parent.cancilSelection()">                                  
+			    <input type="button" id="submitButton5" value="$i18n.getString( 'cancel' )" style="width:15em"  onclick="parent.cancilSelection()">                                  
             </td>
             <td colspan="2"></td>
         </tr>    

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DelDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DelDataSetAction.java	2009-09-10 13:17:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DelDataSetAction.java	2009-09-15 03:50:33 +0000
@@ -27,6 +27,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.util.Collection;
+
 import org.hisp.dhis.datalock.DataSetLock;
 import org.hisp.dhis.datalock.DataSetLockService;
 import org.hisp.dhis.dataset.DataSetService;
@@ -76,16 +78,18 @@
     public String execute()
         throws Exception
         {
-        	DataSetLock dataSetLock = dataSetLockService.getDataSetLockByDataSet( dataSetService.getDataSet( dataSetId ) );
+    		Collection<DataSetLock> dataSetLocks = dataSetLockService.getDataSetLockByDataSet( dataSetService.getDataSet( dataSetId ) );
             
-        	if ( dataSetLock != null )
-        	{
-                dataSetLock.getSources().removeAll( dataSetLock.getSources() ); 
-                dataSetLockService.deleteDataSetLock( dataSetLock );	            
-        	}
+    		if ( dataSetLocks != null )
+            {               
+        	for ( DataSetLock dataSetLock : dataSetLocks )
+                {
+                    dataSetLock.getSources().removeAll( dataSetLock.getSources() ); 
+                    dataSetLockService.deleteDataSetLock( dataSetLock );                
+                }
+            }
         	
-        	dataSetService.deleteDataSet( dataSetService.getDataSet( dataSetId ) );
-            
+            dataSetService.deleteDataSet( dataSetService.getDataSet( dataSetId ) );           
             return SUCCESS;
         }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UnselectAllAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UnselectAllAction.java	2009-08-20 08:17:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UnselectAllAction.java	2009-09-15 03:50:33 +0000
@@ -36,7 +36,7 @@
  * @version $Id$
  */
 public class UnselectAllAction
-    implements Action
+implements Action
 {
     // -------------------------------------------------------------------------
     // Dependencies

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UnselectLevelAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UnselectLevelAction.java	2009-08-20 08:17:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UnselectLevelAction.java	2009-09-15 03:50:33 +0000
@@ -40,68 +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;
-    }
-    
-    // -------------------------------------------------------------------------
-    // Action
-    // -------------------------------------------------------------------------
-
-    public String execute()
-        throws Exception
-    {
-        Collection<OrganisationUnit> rootUnits = selectionTreeManager.getRootOrganisationUnits();
+    {
+        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;
+        }
         
-        Collection<OrganisationUnit> selectedUnits = selectionTreeManager.getSelectedOrganisationUnits();
-
-        for ( OrganisationUnit rootUnit : rootUnits )
-        {        	
-            unselectLevel( rootUnit, FIRST_LEVEL, selectedUnits );
-        }
-
-        selectionTreeManager.setSelectedOrganisationUnits( selectedUnits );
-
-        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() )
-            {            	
-                unselectLevel( child, currentLevel + 1, selectedUnits );
-            }
-        }
-    }
-}
+        // -------------------------------------------------------------------------
+        // 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() )
+                {            	
+                    unselectLevel( child, currentLevel + 1, selectedUnits );
+                }
+            }
+        }
+    }

=== removed file 'dhis-2/dhis-web/dhis-web-portal/pom.xml'
--- dhis-2/dhis-web/dhis-web-portal/pom.xml	2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-portal/pom.xml	1970-01-01 00:00:00 +0000
@@ -1,199 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0";
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
-  
-  <parent>
-    <groupId>org.hisp.dhis</groupId>
-    <artifactId>dhis-web</artifactId>
-    <version>2.0.3-SNAPSHOT</version>
-  </parent>
-  
-  <artifactId>dhis-web-portal</artifactId>
-  <packaging>war</packaging>
-  <name>DHIS Web Portal</name>
-  
-  <build>
-    <finalName>dhis</finalName>
-  </build>
-  
-  <dependencies>
-    
-    <!-- DHIS -->
-    
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-commons</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-commons-resources</artifactId>
-      <type>war</type>
-    </dependency>
-    
-    <!-- Web maintenance modules -->
-    
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-maintenance-datadictionary</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-maintenance-dataset</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-maintenance-organisationunit</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-maintenance-user</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-maintenance-dataadmin</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-maintenance-settings</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    
-    <!-- Web service modules -->
-    <!-- 
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-importexport</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-datamart</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-validationrule</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    -->
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-dataentry</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-	
-	 <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-excel-reporting</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    <!-- 
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-reporting</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-   
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-dashboard-integration</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-	<dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-mapping</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    -->     
-    <!-- India modules -->
-    
-    <!--
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-dashboard</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-dataentry-national</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-reports-national</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-validationrule-local-in</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    -->
-    
-    <!-- Vietnam modules -->
-    
-    <!--
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-gis</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    -->    
-	<!--
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-vn-report</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
- 
-    -->
-    <!-- South Africa modules -->
-    
-    <!-- 
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-jforum-integration</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    -->
-    
-    <!-- WHO modules -->
-    
-    <!--
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-openhealth-integration</artifactId>
-      <version>${version}</version>
-      <type>war</type>
-    </dependency>
-    -->
-    
-  </dependencies>
-</project>

=== modified file 'dhis-2/dhis-web/pom.xml'
--- dhis-2/dhis-web/pom.xml	2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/pom.xml	2009-09-15 03:50:33 +0000
@@ -23,7 +23,7 @@
     <module>dhis-web-datamart</module>
     <module>dhis-web-validationrule</module>
     <module>dhis-web-reporting</module>
-	<module>dhis-web-excel-reporting</module>
+	<!--<module>dhis-web-excel-reporting</module>-->
     <module>dhis-web-mapping</module>
     <module>dhis-web-dashboard-integration</module>
     <module>dhis-web-portal</module>