=== removed directory 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor' === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/AddDataSetEditorAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/AddDataSetEditorAction.java 2010-12-30 09:13:41 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/AddDataSetEditorAction.java 1970-01-01 00:00:00 +0000 @@ -1,176 +0,0 @@ -package org.hisp.dhis.dataset.action.editor; - -/* - * 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.dataset.DataSet; -import org.hisp.dhis.dataset.DataSetService; -import org.hisp.dhis.period.PeriodService; -import org.hisp.dhis.period.PeriodType; -import org.hisp.dhis.user.CurrentUserService; -import org.hisp.dhis.user.User; -import org.hisp.dhis.user.UserAuthorityGroup; -import org.hisp.dhis.user.UserCredentials; -import org.hisp.dhis.user.UserService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Dang Duy Hieu - * @version $Id$ - * @since 2010-03-23 - */ -public class AddDataSetEditorAction - 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; - } - - private CurrentUserService currentUserService; - - public void setCurrentUserService( CurrentUserService currentUserService ) - { - this.currentUserService = currentUserService; - } - - private UserService userService; - - public void setUserService( UserService userService ) - { - this.userService = userService; - } - - // ------------------------------------------------------------------------- - // Input & output - // ------------------------------------------------------------------------- - - private String name; - - public void setName( String name ) - { - this.name = name; - } - - private String shortName; - - public void setShortName( String shortName ) - { - this.shortName = shortName; - } - - private String code; - - public void setCode( String code ) - { - this.code = code; - } - - private String frequencySelect; - - public void setFrequencySelect( String frequencySelect ) - { - this.frequencySelect = frequencySelect; - } - - private String message; - - public String getMessage() - { - return message; - } - - // ------------------------------------------------------------------------- - // Action - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - // --------------------------------------------------------------------- - // Prepare values - // --------------------------------------------------------------------- - - if ( shortName != null && shortName.trim().length() == 0 ) - { - shortName = null; - } - - if ( code != null && code.trim().length() == 0 ) - { - code = null; - } - - PeriodType periodType = periodService.getPeriodTypeByName( frequencySelect ); - - DataSet dataSet = new DataSet( name, shortName, code, periodType ); - - dataSetService.addDataSet( dataSet ); - - assignDataSetToUserRole( dataSet ); - - message = "add_success"; - - return SUCCESS; - } - - // ------------------------------------------------------------------------- - // Supportive methods - // ------------------------------------------------------------------------- - - private void assignDataSetToUserRole( DataSet dataSet ) - { - User currentUser = currentUserService.getCurrentUser(); - - if ( !currentUserService.currentUserIsSuper() && currentUser != null ) - { - UserCredentials userCredentials = userService.getUserCredentials( currentUser ); - - for ( UserAuthorityGroup userAuthorityGroup : userCredentials.getUserAuthorityGroups() ) - { - userAuthorityGroup.getDataSets().add( dataSet ); - - userService.updateUserAuthorityGroup( userAuthorityGroup ); - } - } - } - -} === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/MergeAssignedOrgunitsAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/MergeAssignedOrgunitsAction.java 2011-02-17 08:25:53 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/MergeAssignedOrgunitsAction.java 1970-01-01 00:00:00 +0000 @@ -1,129 +0,0 @@ -package org.hisp.dhis.dataset.action.editor; - -/* - * 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 java.util.HashSet; -import java.util.Iterator; -import java.util.Set; - -import org.hisp.dhis.dataset.DataSet; -import org.hisp.dhis.dataset.DataSetService; -import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.oust.manager.SelectionTreeManager; - -import com.opensymphony.xwork2.Action; - -/** - * @author Dang Duy Hieu - * @version $Id$ - */ -public class MergeAssignedOrgunitsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private SelectionTreeManager selectionTreeManager; - - public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager ) - { - this.selectionTreeManager = selectionTreeManager; - } - - private DataSetService dataSetService; - - public void setDataSetService( DataSetService dataSetService ) - { - this.dataSetService = dataSetService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Collection selectedDataSets = new HashSet(); - - public void setSelectedDataSets( Collection selectedDataSets ) - { - this.selectedDataSets = selectedDataSets; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private Set selectedUnits = new HashSet(); - - public Set getSelectedUnits() - { - return selectedUnits; - } - - // ------------------------------------------------------------------------- - // Action - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - Set tempUnits = new HashSet(); - - if ( selectedDataSets.size() >= 1 ) - { - Iterator iterator = selectedDataSets.iterator(); - - if ( iterator.hasNext() ) - { - DataSet dataSet = dataSetService.getDataSet( Integer.valueOf( iterator.next() ) ); - selectedUnits.addAll( dataSet.getOrganisationUnits() ); - - iterator.remove(); - } - } - - for ( String dataSetId : selectedDataSets ) - { - DataSet dataSet = dataSetService.getDataSet( Integer.parseInt( dataSetId ) ); - tempUnits = dataSet.getOrganisationUnits(); - - if ( !(tempUnits.size() == selectedUnits.size() && tempUnits.containsAll( selectedUnits )) ) - { - selectedUnits.clear(); - selectionTreeManager.setSelectedOrganisationUnits( selectedUnits ); - - return SUCCESS; - } - } - - selectionTreeManager.setSelectedOrganisationUnits( selectedUnits ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/RenameDataSetEditorAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/RenameDataSetEditorAction.java 2010-04-12 21:23:33 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/RenameDataSetEditorAction.java 1970-01-01 00:00:00 +0000 @@ -1,121 +0,0 @@ -package org.hisp.dhis.dataset.action.editor; - -/* - * 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.dataset.DataSet; -import org.hisp.dhis.dataset.DataSetService; -import org.hisp.dhis.i18n.I18n; - -import com.opensymphony.xwork2.Action; - -/** - * @author Dang Duy Hieu - * @version $Id$ - * @since 2010-03-22 - */ -public class RenameDataSetEditorAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private DataSetService dataSetService; - - public void setDataSetService( DataSetService dataSetService ) - { - this.dataSetService = dataSetService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - private String name; - - public void setName( String name ) - { - this.name = name; - } - - private int dataSetId; - - public void setDataSetId( int dataSetId ) - { - this.dataSetId = dataSetId; - } - - // ------------------------------------------------------------------------- - // I18n Object - // ------------------------------------------------------------------------- - private I18n i18n; - - public void setI18n( I18n i18n ) - { - this.i18n = i18n; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private String message; - - public String getMessage() - { - return message; - } - - // ------------------------------------------------------------------------- - // Action - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - // --------------------------------------------------------------------- - // Update values - // --------------------------------------------------------------------- - - DataSet dataSet = dataSetService.getDataSet( dataSetId ); - - if ( dataSet == null ) - { - message = i18n.getString( "rename_failed" ); - - return ERROR; - - } - - dataSet.setName( name ); - dataSetService.updateDataSet( dataSet ); - - message = name; - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/SaveAssignMultiDataSetForOrgunitAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/SaveAssignMultiDataSetForOrgunitAction.java 2010-09-29 07:05:04 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/SaveAssignMultiDataSetForOrgunitAction.java 1970-01-01 00:00:00 +0000 @@ -1,129 +0,0 @@ -package org.hisp.dhis.dataset.action.editor; - -/* - * 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 java.util.HashSet; -import java.util.Set; - -import org.hisp.dhis.dataset.DataSet; -import org.hisp.dhis.dataset.DataSetService; -import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.organisationunit.OrganisationUnitService; -import org.hisp.dhis.oust.manager.SelectionTreeManager; -import org.hisp.dhis.source.Source; - -import com.opensymphony.xwork2.Action; - -/** - * @author Dang Duy Hieu - * @version $Id$ - */ -public class SaveAssignMultiDataSetForOrgunitAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private SelectionTreeManager selectionTreeManager; - - public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager ) - { - this.selectionTreeManager = selectionTreeManager; - } - - private DataSetService dataSetService; - - public void setDataSetService( DataSetService dataSetService ) - { - this.dataSetService = dataSetService; - } - - private OrganisationUnitService organisationUnitService; - - public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) - { - this.organisationUnitService = organisationUnitService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Collection selectedDataSets = new HashSet(); - - public void setSelectedDataSets( Collection selectedDataSets ) - { - this.selectedDataSets = selectedDataSets; - } - - private boolean assignStatus; - - public void setAssignStatus( boolean assignStatus ) - { - this.assignStatus = assignStatus; - } - - // ------------------------------------------------------------------------- - // Action - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - Collection rootUnits = selectionTreeManager.getRootOrganisationUnits(); - - Set unitsInTheTree = new HashSet(); - - organisationUnitService.getUnitsInTheTree( rootUnits, unitsInTheTree ); - - Set selectedOrganisationUnits = organisationUnitService.convert( selectionTreeManager - .getReloadedSelectedOrganisationUnits() ); - - for ( String dataSetId : selectedDataSets ) - { - DataSet dataSet = dataSetService.getDataSet( Integer.valueOf( dataSetId ) ); - - Set assignedSources = dataSet.getSources(); - - if ( !assignStatus ) - { - assignedSources.removeAll( organisationUnitService.convert( unitsInTheTree ) ); - } - - assignedSources.addAll( selectedOrganisationUnits ); - - dataSet.setSources( assignedSources ); - - dataSetService.updateDataSet( dataSet ); - } - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/ShowAssignMultiDataSetForOrgunitAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/ShowAssignMultiDataSetForOrgunitAction.java 2010-04-12 21:23:33 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/ShowAssignMultiDataSetForOrgunitAction.java 1970-01-01 00:00:00 +0000 @@ -1,176 +0,0 @@ -package org.hisp.dhis.dataset.action.editor; - -/* - * 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.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.List; - -import org.hisp.dhis.dataset.DataSet; -import org.hisp.dhis.dataset.DataSetService; -import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler; -import org.hisp.dhis.organisationunit.OrganisationUnitGroup; -import org.hisp.dhis.organisationunit.OrganisationUnitGroupService; -import org.hisp.dhis.organisationunit.OrganisationUnitLevel; -import org.hisp.dhis.organisationunit.OrganisationUnitService; -import org.hisp.dhis.organisationunit.comparator.OrganisationUnitGroupNameComparator; - -import com.opensymphony.xwork2.ActionSupport; - -/** - * @author Dang Duy Hieu - * @version $Id$ - */ -public class ShowAssignMultiDataSetForOrgunitAction - extends ActionSupport -{ - private static final long serialVersionUID = 1L; - - // ------------------------------------------------------------------------- - // Dependency - // ------------------------------------------------------------------------- - - private DataSetService dataSetService; - - public void setDataSetService( DataSetService dataSetService ) - { - this.dataSetService = dataSetService; - } - - private Comparator dataSetComparator; - - public void setDataSetComparator( Comparator dataSetComparator ) - { - this.dataSetComparator = dataSetComparator; - } - - private DisplayPropertyHandler displayPropertyHandler; - - public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler ) - { - this.displayPropertyHandler = displayPropertyHandler; - } - - private OrganisationUnitService organisationUnitService; - - public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) - { - this.organisationUnitService = organisationUnitService; - } - - private OrganisationUnitGroupService organisationUnitGroupService; - - public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService ) - { - this.organisationUnitGroupService = organisationUnitGroupService; - } - - // ------------------------------------------------------------------------- - // Input & Output - // ------------------------------------------------------------------------- - - private List availableDataSets; - - private List levels; - - private List groups; - - private String name; - - private String message; - - // ------------------------------------------------------------------------- - // Getter & Setter - // ------------------------------------------------------------------------- - - public List getAvailableDataSets() - { - return availableDataSets; - } - - public List getLevels() - { - return levels; - } - - public List getGroups() - { - return groups; - } - - public String getName() - { - return name; - } - - public void setName( String name ) - { - this.name = name; - } - - public void setMessage( String message ) - { - this.message = message; - } - - public String getMessage() - { - return message; - } - - // ------------------------------------------------------------------------- - // Action Implementation - // ------------------------------------------------------------------------- - - public String execute() - { - // --------------------------------------------------------------------- - // Get list of datasets - // --------------------------------------------------------------------- - - availableDataSets = new ArrayList( dataSetService.getAllDataSets() ); - - Collections.sort( availableDataSets, dataSetComparator ); - - displayPropertyHandler.handle( availableDataSets ); - - // --------------------------------------------------------------------- - // Setup the association tree - // --------------------------------------------------------------------- - - levels = new ArrayList( organisationUnitService.getOrganisationUnitLevels() ); - - groups = new ArrayList( organisationUnitGroupService.getAllOrganisationUnitGroups() ); - - Collections.sort( groups, new OrganisationUnitGroupNameComparator() ); - - return SUCCESS; - } - -} === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/ValidateRenameDataSetEditorAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/ValidateRenameDataSetEditorAction.java 2010-04-12 21:23:33 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/ValidateRenameDataSetEditorAction.java 1970-01-01 00:00:00 +0000 @@ -1,128 +0,0 @@ -package org.hisp.dhis.dataset.action.editor; - -/* - * 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.dataset.DataSet; -import org.hisp.dhis.dataset.DataSetService; -import org.hisp.dhis.i18n.I18n; - -import com.opensymphony.xwork2.Action; - -/** - * @author Dang Duy Hieu - * @version $Id$ - * @since 2010-03-22 - */ -public class ValidateRenameDataSetEditorAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private DataSetService dataSetService; - - public void setDataSetService( DataSetService dataSetService ) - { - this.dataSetService = dataSetService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer dataSetId; - - public void setDataSetId( Integer dataSetId ) - { - this.dataSetId = dataSetId; - } - - private String name; - - public void setName( String name ) - { - this.name = name; - } - - // ------------------------------------------------------------------------- - // I18n - // ------------------------------------------------------------------------- - - private I18n i18n; - - public void setI18n( I18n i18n ) - { - this.i18n = i18n; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private String message; - - public String getMessage() - { - return message; - } - - // ------------------------------------------------------------------------- - // Execution - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - // --------------------------------------------------------------------- - // Name - // --------------------------------------------------------------------- - - if ( (name == null) || (name.trim().length() == 0) ) - { - message = i18n.getString( "specify_name" ); - - return INPUT; - } - else - { - DataSet match = dataSetService.getDataSetByName( name ); - - if ( match != null && (dataSetId == null || match.getId() != dataSetId) ) - { - message = i18n.getString( "duplicate_names" ); - - return INPUT; - } - } - - message = "OK"; - - return SUCCESS; - } -} === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml 2011-03-11 12:35:11 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml 2011-03-16 21:33:31 +0000 @@ -404,72 +404,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -484,23 +418,4 @@ - - - - - - - - - \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml 2011-03-03 06:16:22 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml 2011-03-16 21:33:31 +0000 @@ -305,60 +305,6 @@ class="org.hisp.dhis.dataset.action.compulsory.SaveCompulsoryDataElementsAction"> dataSet.action - - - - - /main.vm - /dhis-web-maintenance-dataset/showAssignMultiDataSetForm.vm - /dhis-web-maintenance-dataset/menu.vm - ../dhis-web-commons/oust/oust.js - - - - index.action - - - - /dhis-web-maintenance-dataset/responsePeriodTypeList.vm - F_DATASET_ADD - - - - showAssignMultiDataSetForOrgunitForm - F_DATASET_ADD - - - - /dhis-web-maintenance-dataset/responseSuccess.vm - /dhis-web-maintenance-dataset/responseInput.vm - plainTextError - - - - /dhis-web-maintenance-dataset/responseSuccess.vm - /dhis-web-maintenance-dataset/responseError.vm - plainTextError - - - - /dhis-web-maintenance-dataset/responseSuccess.vm - F_DATASET_DELETE - - - - - /dhis-web-commons/ouwt/responseSelect.vm - plainTextError - === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm 2011-03-03 06:16:22 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm 2011-03-16 21:33:31 +0000 @@ -5,5 +5,4 @@ #introListImgItem( "dataSet.action" "dataset" "dataset" ) #introListImgItem( "showMobileDataSet.action" "mobile_dataset" "dataset" ) #introListImgItem( "section.action" "dataset_section" "dataset" ) - #introListImgItem( "showAssignMultiDataSetForOrgunitForm.action" "dataset_assignment_editor" "dataset" ) \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/menu.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/menu.vm 2011-03-03 06:16:22 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/menu.vm 2011-03-16 21:33:31 +0000 @@ -4,5 +4,4 @@
  • $i18n.getString( "dataset" ) 
  • $i18n.getString( "mobile_dataset" ) 
  • $i18n.getString( "dataset_section" ) 
  • -
  • $i18n.getString( "dataset_assignment_editor" ) 
  • \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/showAssignMultiDataSetForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/showAssignMultiDataSetForm.vm 2010-12-21 07:10:25 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/showAssignMultiDataSetForm.vm 1970-01-01 00:00:00 +0000 @@ -1,147 +0,0 @@ - - -

    $i18n.getString( "dataset_assignment_editor" )

    - -
    - - - - - - - - - - - - - - - -
    $i18n.getString( "available_datasets" )$i18n.getString( "selected_datasets" )
    < $i18n.getString( "filter" ) >
    - - -
    -
    -
    - -
    -
    - -

    -#organisationUnitSelectionTree( true, true, false ) -
    - - - - - - -
    $i18n.getString( "optional" )
    - $i18n.getString( "not_change_old_but_assign_new_only" ) -
    - -

    - - -

    -
    - - - - - -