=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java 2010-08-27 08:07:10 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java 2010-09-23 04:50:45 +0000
@@ -31,9 +31,24 @@
import java.sql.SQLException;
import java.util.Collection;
+import javax.management.Query;
+
import org.amplecode.quick.StatementHolder;
import org.amplecode.quick.StatementManager;
import org.amplecode.quick.mapper.ObjectMapper;
+import org.hibernate.Criteria;
+import org.hibernate.Hibernate;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.AggregateProjection;
+import org.hibernate.criterion.CountProjection;
+import org.hibernate.criterion.Disjunction;
+import org.hibernate.criterion.Expression;
+import org.hibernate.criterion.Projection;
+import org.hibernate.criterion.Projections;
+import org.hibernate.criterion.Property;
+import org.hibernate.criterion.Restrictions;
+import org.hibernate.criterion.SQLCriterion;
import org.hisp.dhis.dataanalysis.DataAnalysisStore;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
@@ -62,6 +77,13 @@
@Autowired
private StatementBuilder statementBuilder;
+ protected SessionFactory sessionFactory;
+
+ public void setSessionFactory( SessionFactory sessionFactory )
+ {
+ this.sessionFactory = sessionFactory;
+ }
+
// -------------------------------------------------------------------------
// OutlierAnalysisStore implementation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2010-09-04 07:26:32 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2010-09-23 04:50:45 +0000
@@ -150,7 +150,9 @@
+ class="org.hisp.dhis.dataanalysis.jdbc.JdbcDataAnalysisStore" >
+
+
=== modified file 'dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/resourcebundle/DefaultResourceBundleManager.java'
--- dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/resourcebundle/DefaultResourceBundleManager.java 2010-09-22 12:16:23 +0000
+++ dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/resourcebundle/DefaultResourceBundleManager.java 2010-09-23 04:50:45 +0000
@@ -175,6 +175,7 @@
private Collection getAvailableLocalesFromDir( String dirPath )
{
File dir = new File( dirPath );
+
Set availableLocales = new HashSet();
File[] files = dir.listFiles( new FilenameFilter()
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/SelectLevelAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/SelectLevelAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/SelectLevelAction.java 1970-01-01 00:00:00 +0000
@@ -1,107 +0,0 @@
-package org.hisp.dhis.patient.action.program;
-
-/*
- * Copyright (c) 2004-2010, 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.
- */
-
-import java.util.Collection;
-
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.oust.manager.SelectionTreeManager;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Torgeir Lorange Ostby
- * @version $Id: SelectLevelAction.java 4524 2008-02-04 18:48:53Z larshelg $
- */
-public class SelectLevelAction
- 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 rootUnits = selectionTreeManager.getRootOrganisationUnits();
-
- Collection selectedUnits = selectionTreeManager.getSelectedOrganisationUnits();
-
- for ( OrganisationUnit rootUnit : rootUnits )
- {
- selectLevel( rootUnit, FIRST_LEVEL, selectedUnits );
- }
-
- selectionTreeManager.setSelectedOrganisationUnits( selectedUnits );
-
- return SUCCESS;
- }
-
- // -------------------------------------------------------------------------
- // Supportive methods
- // -------------------------------------------------------------------------
-
- private void selectLevel( OrganisationUnit orgUnit, int currentLevel, Collection selectedUnits )
- {
- if ( currentLevel == level )
- {
- selectedUnits.add( orgUnit );
- }
- else
- {
- for ( OrganisationUnit child : orgUnit.getChildren() )
- {
- selectLevel( child, currentLevel + 1, selectedUnits );
- }
- }
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/SelectOrganisationUnitGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/SelectOrganisationUnitGroupAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/SelectOrganisationUnitGroupAction.java 1970-01-01 00:00:00 +0000
@@ -1,94 +0,0 @@
-package org.hisp.dhis.patient.action.program;
-
-/*
- * Copyright (c) 2004-2010, 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.
- */
-
-import java.util.Collection;
-
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
-import org.hisp.dhis.oust.manager.SelectionTreeManager;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class SelectOrganisationUnitGroupAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private SelectionTreeManager selectionTreeManager;
-
- public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager )
- {
- this.selectionTreeManager = selectionTreeManager;
- }
-
- private OrganisationUnitGroupService organisationUnitGroupService;
-
- public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
- {
- this.organisationUnitGroupService = organisationUnitGroupService;
- }
-
- // -------------------------------------------------------------------------
- // Input & output
- // -------------------------------------------------------------------------
-
- private Integer organisationUnitGroupId;
-
- public void setOrganisationUnitGroupId( Integer organisationUnitGroupId )
- {
- this.organisationUnitGroupId = organisationUnitGroupId;
- }
-
- // -------------------------------------------------------------------------
- // Action
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- OrganisationUnitGroup group = organisationUnitGroupService.getOrganisationUnitGroup( organisationUnitGroupId );
-
- if ( group != null )
- {
- Collection units = selectionTreeManager.getSelectedOrganisationUnits();
-
- units.addAll( group.getMembers() );
-
- selectionTreeManager.setSelectedOrganisationUnits( units );
- }
-
- return SUCCESS;
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/SetupAssociationsTreeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/SetupAssociationsTreeAction.java 2010-06-24 13:28:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/SetupAssociationsTreeAction.java 2010-09-23 04:50:45 +0000
@@ -27,16 +27,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.oust.manager.SelectionTreeManager;
import org.hisp.dhis.program.Program;
import org.hisp.dhis.program.ProgramService;
-
import com.opensymphony.xwork2.Action;
/**
@@ -49,14 +42,7 @@
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
-
- private SelectionTreeManager selectionTreeManager;
-
- public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager )
- {
- this.selectionTreeManager = selectionTreeManager;
- }
-
+
private ProgramService programService;
public void setProgramService( ProgramService programService )
@@ -96,24 +82,7 @@
{
program = programService.getProgram( id );
- selectionTreeManager.setSelectedOrganisationUnits( convert( program.getOrganisationUnits() ) );
-
return SUCCESS;
}
-
- // -------------------------------------------------------------------------
- // Supportive methods
- // -------------------------------------------------------------------------
-
- private Set convert( Collection orgUnits )
- {
- Set organisationUnits = new HashSet();
-
- for ( OrganisationUnit orgUnit : orgUnits )
- {
- organisationUnits.add( orgUnit );
- }
-
- return organisationUnits;
- }
+
}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UnselectAllAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UnselectAllAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UnselectAllAction.java 1970-01-01 00:00:00 +0000
@@ -1,63 +0,0 @@
-package org.hisp.dhis.patient.action.program;
-
-/*
- * Copyright (c) 2004-2010, 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.
- */
-
-import org.hisp.dhis.oust.manager.SelectionTreeManager;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class UnselectAllAction
-implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private SelectionTreeManager selectionTreeManager;
-
- public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager )
- {
- this.selectionTreeManager = selectionTreeManager;
- }
-
- // -------------------------------------------------------------------------
- // Action
- // -------------------------------------------------------------------------
-
- public String execute()
- throws Exception
- {
- selectionTreeManager.clearSelectedOrganisationUnits();
-
- return SUCCESS;
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UnselectLevelAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UnselectLevelAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UnselectLevelAction.java 1970-01-01 00:00:00 +0000
@@ -1,120 +0,0 @@
-package org.hisp.dhis.patient.action.program;
-
-/*
- * Copyright (c) 2004-2010, 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.
- */
-
-import java.util.Collection;
-
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.oust.manager.SelectionTreeManager;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-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 rootUnits = selectionTreeManager.getRootOrganisationUnits();
-
- Collection 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 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-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UnselectOrganisationUnitGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UnselectOrganisationUnitGroupAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UnselectOrganisationUnitGroupAction.java 1970-01-01 00:00:00 +0000
@@ -1,94 +0,0 @@
-package org.hisp.dhis.patient.action.program;
-
-/*
- * Copyright (c) 2004-2010, 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.
- */
-
-import java.util.Collection;
-
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
-import org.hisp.dhis.oust.manager.SelectionTreeManager;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class UnselectOrganisationUnitGroupAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private SelectionTreeManager selectionTreeManager;
-
- public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager )
- {
- this.selectionTreeManager = selectionTreeManager;
- }
-
- private OrganisationUnitGroupService organisationUnitGroupService;
-
- public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
- {
- this.organisationUnitGroupService = organisationUnitGroupService;
- }
-
- // -------------------------------------------------------------------------
- // Input & output
- // -------------------------------------------------------------------------
-
- private Integer organisationUnitGroupId;
-
- public void setOrganisationUnitGroupId( Integer organisationUnitGroupId )
- {
- this.organisationUnitGroupId = organisationUnitGroupId;
- }
-
- // -------------------------------------------------------------------------
- // Action
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- OrganisationUnitGroup group = organisationUnitGroupService.getOrganisationUnitGroup( organisationUnitGroupId );
-
- if ( group != null )
- {
- Collection units = selectionTreeManager.getSelectedOrganisationUnits();
-
- units.removeAll( group.getMembers() );
-
- selectionTreeManager.setSelectedOrganisationUnits( units );
- }
-
- return SUCCESS;
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2010-09-15 09:16:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2010-09-23 04:50:45 +0000
@@ -610,8 +610,6 @@
id="org.hisp.dhis.patient.action.program.SetupAssociationsTreeAction"
class="org.hisp.dhis.patient.action.program.SetupAssociationsTreeAction"
scope="prototype">
-
@@ -623,45 +621,6 @@
ref="org.hisp.dhis.oust.manager.SelectionTreeManager" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1191,9 +1150,6 @@
-
-
- /main.vm
/dhis-web-maintenance-patient/programAssociations.vm
- ../dhis-web-commons/oust/oust.js,javascript/associations.js
F_PROGRAM_UPDATE
@@ -624,42 +623,7 @@
F_PROGRAM_UPDATE
-
-
-
- /dhis-web-maintenance-patient/responseSuccess.vm
- F_PROGRAM_UPDATE
-
-
-
-
- /dhis-web-maintenance-patient/responseSuccess.vm
- F_PROGRAM_UPDATE
-
-
-
-
- /dhis-web-maintenance-patient/responseSuccess.vm
- F_PROGRAM_UPDATE
-
-
-
-
- /dhis-web-maintenance-patient/responseSuccess.vm
- F_PROGRAM_UPDATE
-
-
-
-
- /dhis-web-maintenance-patient/responseSuccess.vm
- F_PROGRAM_UPDATE
-
-
+
/main.vm
/dhis-web-maintenance-patient/validationCriteriaAssociations.vm
- ../dhis-web-commons/oust/oust.js
- ,javascript/associations.js
,javascript/program.js
F_PROGRAM_UPDATE
@@ -688,8 +650,6 @@
/main.vm
/dhis-web-maintenance-patient/validationDEAssociations.vm
- ../dhis-web-commons/oust/oust.js
- ,javascript/associations.js
,javascript/program.js
,javascript/programStageDEValidation.js
@@ -1118,8 +1078,6 @@
/main.vm
/dhis-web-maintenance-patient/programsForValidationCriteriaAssociations.vm
- ../dhis-web-commons/oust/oust.js
- ,javascript/associations.js
,javascript/program.js
F_PROGRAM_UPDATE
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/associations.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/associations.js 2010-03-05 13:21:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/associations.js 1970-01-01 00:00:00 +0000
@@ -1,69 +0,0 @@
-
-var numberOfSelects = 0;
-
-function selectAllAtLevel()
-{
- setMessage( i18n_loading );
- var request = new Request();
- request.setCallbackSuccess( selectReceived );
- request.send( 'selectLevel.action?level=' + getListValue( 'levelList' ) );
-}
-
-function unselectAllAtLevel()
-{
- setMessage( i18n_loading );
- var request = new Request();
- request.setCallbackSuccess( selectReceived );
- request.send( 'unselectLevel.action?level=' + getListValue( 'levelList' ) );
-}
-
-function selectGroup()
-{
- setMessage( i18n_loading );
- var request = new Request();
- request.setCallbackSuccess( selectReceived );
- request.send( 'selectOrganisationUnitGroup.action?organisationUnitGroupId=' + getListValue( 'groupList' ) );
-}
-
-function unselectGroup()
-{
- setMessage( i18n_loading );
- var request = new Request();
- request.setCallbackSuccess( selectReceived );
- request.send( 'unselectOrganisationUnitGroup.action?organisationUnitGroupId=' + getListValue( 'groupList' ) );
-}
-
-function unselectAll()
-{
- setMessage( i18n_loading );
- var request = new Request();
- request.setCallbackSuccess( selectReceived );
- request.send( 'unselectAll.action' );
-}
-
-function selectReceived()
-{
- selectionTree.buildSelectionTree();
- hideMessage();
-}
-
-function treeClicked()
-{
- numberOfSelects++;
-
- setMessage( i18n_loading );
-
- document.getElementById( "submitButton" ).disabled = true;
-}
-
-function selectCompleted( selectedUnits )
-{
- numberOfSelects--;
-
- if ( numberOfSelects <= 0 )
- {
- hideMessage();
-
- document.getElementById( "submitButton" ).disabled = false;
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAssociations.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAssociations.vm 2010-06-24 13:28:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAssociations.vm 2010-09-23 04:50:45 +0000
@@ -10,45 +10,10 @@