← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1901: Removed outdated code

 

Merge authors:
  Lars <larshelg@larshelg-laptop>
------------------------------------------------------------
revno: 1901 [merge]
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Thu 2010-08-05 21:11:52 +0200
message:
  Removed outdated code
modified:
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/SelectionTreeManager.java


--
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-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java	2010-08-03 11:34:19 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java	2010-08-05 17:12:47 +0000
@@ -45,10 +45,7 @@
 public class DefaultSelectionTreeManager
     implements SelectionTreeManager
 {
-    private static final String SESSION_KEY_SELECTED_ORG_UNITS = "dhis-oust-selected-org-units";
-    
-    private static final String SESSION_KEY_LOCKED_ORG_UNITS = "dhis-oust-locked-org-units";
-
+    private static final String SESSION_KEY_SELECTED_ORG_UNITS = "dhis-oust-selected-org-units";    
     private static final String SESSION_KEY_ROOT_ORG_UNITS = "dhis-oust-root-org-units";
     
     private static final double PERCENTAGE_OF_MULTIPLE_RELOADING_ORG_UNITS = 0.2;
@@ -109,18 +106,6 @@
         return reloadOrganisationUnits( rootUnits );
     }
     
-    public Collection<OrganisationUnit> getLockedRootOrganisationUnits()
-    {
-        Collection<OrganisationUnit> rootUnits = getCollectionFromSession( SESSION_KEY_LOCKED_ORG_UNITS );
-
-        if ( rootUnits == null )
-        {
-            return organisationUnitService.getRootOrganisationUnits();
-        }
-
-        return reloadOrganisationUnits( rootUnits );
-    }
-
     public OrganisationUnit getRootOrganisationUnitsParent()
     {
         Collection<OrganisationUnit> rootUnits = getCollectionFromSession( SESSION_KEY_ROOT_ORG_UNITS );
@@ -163,23 +148,6 @@
         }
     }
     
-    public void setLockOnSelectedOrganisationUnits( Collection<OrganisationUnit> selectedUnits )
-    {
-        if ( selectedUnits == null )
-        {
-            throw new IllegalArgumentException( "Selected locked OrganisationUnits cannot be null" );
-        }
-      
-        Collection<OrganisationUnit> rootUnits = getRootOrganisationUnits();
-
-        if ( rootUnits != null )
-        {
-            selectedUnits = getUnitsInTree( rootUnits, selectedUnits );
-
-            saveToSession( SESSION_KEY_LOCKED_ORG_UNITS, selectedUnits );                      
-        }
-    }
-    
     public Collection<OrganisationUnit> getSelectedOrganisationUnits()
     {
         Collection<OrganisationUnit> selectedUnits = getCollectionFromSession( SESSION_KEY_SELECTED_ORG_UNITS );
@@ -197,50 +165,10 @@
         return reloadOrganisationUnits( getSelectedOrganisationUnits() );
     }
 
-    public Collection<OrganisationUnit> getLockOnSelectedOrganisationUnits()
-    {
-        Collection<OrganisationUnit> selectedUnits = getCollectionFromSession( SESSION_KEY_LOCKED_ORG_UNITS );
-
-        if ( selectedUnits == null )
-        {
-            return new HashSet<OrganisationUnit>();
-        }
-        return selectedUnits;
-    }
-
     public void clearSelectedOrganisationUnits()
     {
         removeFromSession( SESSION_KEY_SELECTED_ORG_UNITS );
     }
-    
-    public void setLockOnSelectedOrganisationUnits( OrganisationUnit selectedUnit )
-    {
-        if ( selectedUnit == null )
-        {
-            throw new IllegalArgumentException( "Selected OrganisationUnit cannot be null" );
-        }
-
-        Set<OrganisationUnit> set = new HashSet<OrganisationUnit>( 1 );
-        set.add( selectedUnit );
-        setLockOnSelectedOrganisationUnits( set );
-    }
-    
-    public OrganisationUnit getLockOnSelectedOrganisationUnit()
-    {
-        Collection<OrganisationUnit> selectedUnits = getLockOnSelectedOrganisationUnits();
-
-        if ( selectedUnits.isEmpty() )
-        {
-            return null;
-        }
-
-        return selectedUnits.iterator().next();
-    }
-    
-    public void clearLockOnSelectedOrganisationUnits()
-    {
-        removeFromSession( SESSION_KEY_LOCKED_ORG_UNITS );
-    }
 
     public OrganisationUnit getSelectedOrganisationUnit()
     {

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/SelectionTreeManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/SelectionTreeManager.java	2010-05-17 16:13:24 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/SelectionTreeManager.java	2010-08-05 17:12:47 +0000
@@ -79,8 +79,6 @@
      */
     Collection<OrganisationUnit> getRootOrganisationUnits();
     
-    Collection<OrganisationUnit> getLockedRootOrganisationUnits();
-
     /**
      * Resets the selection tree to use the actual root of the OrganisationUnit
      * tree.
@@ -108,16 +106,6 @@
      */
     Collection<OrganisationUnit> getSelectedOrganisationUnits();
     
-    void setLockOnSelectedOrganisationUnits( Collection<OrganisationUnit> selectedUnits );
-    
-    void setLockOnSelectedOrganisationUnits( OrganisationUnit selectedUnit );
-    
-    OrganisationUnit getLockOnSelectedOrganisationUnit();
-    
-    Collection<OrganisationUnit> getLockOnSelectedOrganisationUnits();
-    
-    void clearLockOnSelectedOrganisationUnits();
-
     /**
      * Clears the selection and makes getSelectedOrganisationUnit() return null.
      */