← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11630: Removed unused class

 

------------------------------------------------------------
revno: 11630
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-08-12 10:56:50 +0200
message:
  Removed unused class
removed:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ShowAddDataElementForm.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.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/common/BaseIdentifiableObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java	2013-07-23 09:55:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java	2013-08-12 08:56:50 +0000
@@ -333,9 +333,12 @@
             return true;
         }
 
-        if ( o == null || getClass() != o.getClass() ) return false;
+        if ( o == null || getClass() != o.getClass() )
+        {
+            return false;
+        }
 
-        BaseIdentifiableObject that = (BaseIdentifiableObject) o;
+        final BaseIdentifiableObject that = (BaseIdentifiableObject) o;
 
         if ( uid != null ? !uid.equals( that.uid ) : that.uid != null )
         {

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ShowAddDataElementForm.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ShowAddDataElementForm.java	2013-07-12 09:21:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ShowAddDataElementForm.java	1970-01-01 00:00:00 +0000
@@ -1,218 +0,0 @@
-package org.hisp.dhis.dd.action.dataelement;
-
-/*
- * Copyright (c) 2004-2012, 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 com.opensymphony.xwork2.Action;
-import org.hisp.dhis.attribute.Attribute;
-import org.hisp.dhis.attribute.AttributeService;
-import org.hisp.dhis.attribute.comparator.AttributeSortOrderComparator;
-import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryCombo;
-import org.hisp.dhis.dataelement.DataElementCategoryService;
-import org.hisp.dhis.dataelement.DataElementGroup;
-import org.hisp.dhis.dataelement.DataElementGroupSet;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.mapping.MapLegendSet;
-import org.hisp.dhis.mapping.MappingService;
-import org.hisp.dhis.option.OptionService;
-import org.hisp.dhis.option.OptionSet;
-import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @author Hans S. Toemmerholt
- * @version $Id: GetDataElementAction.java 2869 2007-02-20 14:26:09Z andegje $
- */
-public class ShowAddDataElementForm
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private DataElementService dataElementService;
-
-    public void setDataElementService( DataElementService dataElementService )
-    {
-        this.dataElementService = dataElementService;
-    }
-
-    private DataElementCategoryService dataElementCategoryService;
-
-    public void setDataElementCategoryService( DataElementCategoryService dataElementCategoryService )
-    {
-        this.dataElementCategoryService = dataElementCategoryService;
-    }
-
-    private OrganisationUnitService organisationUnitService;
-
-    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
-    {
-        this.organisationUnitService = organisationUnitService;
-    }
-
-    private AttributeService attributeService;
-
-    public void setAttributeService( AttributeService attributeService )
-    {
-        this.attributeService = attributeService;
-    }
-
-    private OptionService optionService;
-
-    public void setOptionService( OptionService optionService )
-    {
-        this.optionService = optionService;
-    }
-
-    private MappingService mappingService;
-
-    public void setMappingService( MappingService mappingService )
-    {
-        this.mappingService = mappingService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input/output
-    // -------------------------------------------------------------------------
-
-    private Collection<DataElementGroup> dataElementGroups;
-
-    public Collection<DataElementGroup> getDataElementGroups()
-    {
-        return dataElementGroups;
-    }
-
-    private List<DataElementCategoryCombo> dataElementCategoryCombos;
-
-    public List<DataElementCategoryCombo> getDataElementCategoryCombos()
-    {
-        return dataElementCategoryCombos;
-    }
-
-    private DataElementCategoryCombo defaultCategoryCombo;
-
-    public DataElementCategoryCombo getDefaultCategoryCombo()
-    {
-        return defaultCategoryCombo;
-    }
-
-    private List<OrganisationUnitLevel> organisationUnitLevels;
-
-    public List<OrganisationUnitLevel> getOrganisationUnitLevels()
-    {
-        return organisationUnitLevels;
-    }
-
-    private List<DataElementGroupSet> groupSets;
-
-    public List<DataElementGroupSet> getGroupSets()
-    {
-        return groupSets;
-    }
-
-    private List<Attribute> attributes;
-
-    public List<Attribute> getAttributes()
-    {
-        return attributes;
-    }
-
-    private List<OptionSet> optionSets;
-
-    public List<OptionSet> getOptionSets()
-    {
-        return optionSets;
-    }
-
-    private List<MapLegendSet> legendSets;
-
-    public List<MapLegendSet> getLegendSets()
-    {
-        return legendSets;
-    }
-
-    private String dataElementId;
-
-    public void setDataElementId( String dataElementId )
-    {
-        this.dataElementId = dataElementId;
-    }
-
-    private DataElement dataElement;
-
-    public DataElement getDataElement()
-    {
-        return dataElement;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-    {
-        defaultCategoryCombo = dataElementCategoryService
-            .getDataElementCategoryComboByName( DataElementCategoryCombo.DEFAULT_CATEGORY_COMBO_NAME );
-
-        dataElementGroups = dataElementService.getAllDataElementGroups();
-
-        dataElementCategoryCombos = new ArrayList<DataElementCategoryCombo>( dataElementCategoryService
-            .getAllDataElementCategoryCombos() );
-
-        organisationUnitLevels = organisationUnitService.getOrganisationUnitLevels();
-
-        groupSets = new ArrayList<DataElementGroupSet>( dataElementService
-            .getCompulsoryDataElementGroupSetsWithMembers() );
-
-        attributes = new ArrayList<Attribute>( attributeService.getDataElementAttributes() );
-
-        optionSets = new ArrayList<OptionSet>( optionService.getAllOptionSets() );
-
-        legendSets = new ArrayList<MapLegendSet>( mappingService.getAllMapLegendSets() );
-
-        Collections.sort( dataElementCategoryCombos, IdentifiableObjectNameComparator.INSTANCE );
-        Collections.sort( groupSets, IdentifiableObjectNameComparator.INSTANCE );
-        Collections.sort( attributes, new AttributeSortOrderComparator() );
-        Collections.sort( optionSets, IdentifiableObjectNameComparator.INSTANCE );
-        Collections.sort( legendSets, IdentifiableObjectNameComparator.INSTANCE );
-
-        if ( dataElementId != null )
-        {
-            dataElement = dataElementService.getDataElement( dataElementId );
-        }
-
-        return SUCCESS;
-    }
-}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml	2013-07-12 09:21:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml	2013-08-12 08:56:50 +0000
@@ -33,16 +33,6 @@
     <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
   </bean>
 
-  <bean id="org.hisp.dhis.dd.action.dataelement.ShowAddDataElementForm" class="org.hisp.dhis.dd.action.dataelement.ShowAddDataElementForm"
-    scope="prototype">
-    <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
-    <property name="dataElementCategoryService" ref="org.hisp.dhis.dataelement.DataElementCategoryService" />
-    <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
-    <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
-    <property name="optionService" ref="org.hisp.dhis.option.OptionService" />
-    <property name="mappingService" ref="org.hisp.dhis.mapping.MappingService" />
-  </bean>
-
   <bean id="org.hisp.dhis.dd.action.dataelement.GetDataElementAction" class="org.hisp.dhis.dd.action.dataelement.GetDataElementAction"
     scope="prototype">
     <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />