dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10979
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3033: Removed unused actions
Merge authors:
Lars Helge Øverland (larshelge)
------------------------------------------------------------
revno: 3033 [merge]
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-03-14 21:52:09 +0100
message:
Removed unused actions
removed:
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetIndicatorGroupsAction.java
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetOrganisationUnitLevelsAction.java
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetPeriodTypesAction.java
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/pivottable/PivotTableService.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/pivottable/impl/DefaultPivotTableService.java
dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.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/pivottable/PivotTableService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/pivottable/PivotTableService.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/pivottable/PivotTableService.java 2011-03-14 20:44:04 +0000
@@ -37,12 +37,12 @@
/**
* Returns a PivotTable object.
*
- * @param indicatorGroupId the identifier of the IndicatorGroup.
+ * @param groupId the identifier of the IndicatorGroup.
* @param periodTypeName the identifier of the PeriodType.
* @param startDate the start date string.
* @param endDate the end date string.
* @param level the OrganisationUnit level.
* @return a PivotTable object.
*/
- PivotTable getPivotTable( int indicatorGroupId, String periodTypeName, String startDate, String endDate, int level );
+ PivotTable getPivotTable( int groupId, String periodTypeName, String startDate, String endDate, int level );
}
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/pivottable/impl/DefaultPivotTableService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/pivottable/impl/DefaultPivotTableService.java 2011-03-14 19:34:32 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/pivottable/impl/DefaultPivotTableService.java 2011-03-14 20:44:04 +0000
@@ -99,7 +99,7 @@
// PivotTableService implementation
// -------------------------------------------------------------------------
- public PivotTable getPivotTable( int indicatorGroupId, String periodTypeName, String startDate, String endDate, int organisationUnitId )
+ public PivotTable getPivotTable( int groupId, String periodTypeName, String startDate, String endDate, int organisationUnitId )
{
PeriodType periodType = PeriodType.getPeriodTypeByName( periodTypeName );
@@ -109,10 +109,10 @@
List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>(
organisationUnitService.getOrganisationUnit( organisationUnitId ).getChildren() );
- List<Indicator> indicators = null;
+ List<? extends Indicator> indicators = null;
Collection<AggregatedIndicatorValue> indicatorValues = null;
- if ( indicatorGroupId == -1 ) // -1 -> All
+ if ( groupId == -1 ) // -1 -> All
{
indicators = new ArrayList<Indicator>( indicatorService.getAllIndicators() );
@@ -122,7 +122,7 @@
}
else
{
- indicators = new ArrayList<Indicator>( indicatorService.getIndicatorGroup( indicatorGroupId ).getMembers() );
+ indicators = new ArrayList<Indicator>( indicatorService.getIndicatorGroup( groupId ).getMembers() );
indicatorValues = aggregatedDataValueService.getAggregatedIndicatorValues(
ConversionUtils.getIdentifiers( Indicator.class, indicators ),
=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetIndicatorGroupsAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetIndicatorGroupsAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetIndicatorGroupsAction.java 1970-01-01 00:00:00 +0000
@@ -1,81 +0,0 @@
-package org.hisp.dhis.reporting.pivottable.action;
-
-/*
- * 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.List;
-
-import org.hisp.dhis.indicator.IndicatorGroup;
-import org.hisp.dhis.indicator.IndicatorService;
-import org.hisp.dhis.indicator.comparator.IndicatorGroupNameComparator;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class GetIndicatorGroupsAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private IndicatorService indicatorService;
-
- public void setIndicatorService( IndicatorService indicatorService )
- {
- this.indicatorService = indicatorService;
- }
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private List<IndicatorGroup> indicatorGroups;
-
- public List<IndicatorGroup> getIndicatorGroups()
- {
- return indicatorGroups;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- indicatorGroups = new ArrayList<IndicatorGroup>( indicatorService.getAllIndicatorGroups() );
-
- Collections.sort( indicatorGroups, new IndicatorGroupNameComparator() );
-
- return SUCCESS;
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetOrganisationUnitLevelsAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetOrganisationUnitLevelsAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetOrganisationUnitLevelsAction.java 1970-01-01 00:00:00 +0000
@@ -1,76 +0,0 @@
-package org.hisp.dhis.reporting.pivottable.action;
-
-/*
- * 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.List;
-
-import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class GetOrganisationUnitLevelsAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private OrganisationUnitService organisationUnitService;
-
- public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
- {
- this.organisationUnitService = organisationUnitService;
- }
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private List<OrganisationUnitLevel> levels;
-
- public List<OrganisationUnitLevel> getLevels()
- {
- return levels;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- levels = organisationUnitService.getOrganisationUnitLevels();
-
- return SUCCESS;
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetPeriodTypesAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetPeriodTypesAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetPeriodTypesAction.java 1970-01-01 00:00:00 +0000
@@ -1,76 +0,0 @@
-package org.hisp.dhis.reporting.pivottable.action;
-
-/*
- * 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.List;
-
-import org.hisp.dhis.period.PeriodService;
-import org.hisp.dhis.period.PeriodType;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class GetPeriodTypesAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private PeriodService periodService;
-
- public void setPeriodService( PeriodService periodService )
- {
- this.periodService = periodService;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private List<PeriodType> periodTypes;
-
- public List<PeriodType> getPeriodTypes()
- {
- return periodTypes;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- periodTypes = periodService.getAllPeriodTypes();
-
- return SUCCESS;
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml 2011-03-11 12:35:11 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml 2011-03-14 20:51:30 +0000
@@ -346,27 +346,6 @@
<property name="pivotTableService"
ref="org.hisp.dhis.pivottable.PivotTableService"/>
</bean>
-
- <bean id="org.hisp.dhis.reporting.pivottable.action.GetOrganisationUnitLevelsAction"
- class="org.hisp.dhis.reporting.pivottable.action.GetOrganisationUnitLevelsAction"
- scope="prototype">
- <property name="organisationUnitService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
- </bean>
-
- <bean id="org.hisp.dhis.reporting.pivottable.action.GetPeriodTypesAction"
- class="org.hisp.dhis.reporting.pivottable.action.GetPeriodTypesAction"
- scope="prototype">
- <property name="periodService"
- ref="org.hisp.dhis.period.PeriodService"/>
- </bean>
-
- <bean id="org.hisp.dhis.reporting.pivottable.action.GetIndicatorGroupsAction"
- class="org.hisp.dhis.reporting.pivottable.action.GetIndicatorGroupsAction"
- scope="prototype">
- <property name="indicatorService"
- ref="org.hisp.dhis.indicator.IndicatorService"/>
- </bean>
<!-- Custom DataSet Report -->
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml 2011-03-11 12:35:11 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml 2011-03-14 20:51:30 +0000
@@ -252,22 +252,7 @@
<result name="success" type="velocity-json">/dhis-web-reporting/responsePivotTable.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
-
- <action name="getOrganisationUnitLevels" class="org.hisp.dhis.reporting.pivottable.action.GetOrganisationUnitLevelsAction">
- <result name="success" type="velocity-json">/dhis-web-reporting/responseOrganisationUnitLevel.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
- <action name="getPeriodTypes" class="org.hisp.dhis.reporting.pivottable.action.GetPeriodTypesAction">
- <result name="success" type="velocity-json">/dhis-web-reporting/responsePeriodType.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
- <action name="getIndicatorGroups" class="org.hisp.dhis.reporting.pivottable.action.GetIndicatorGroupsAction">
- <result name="success" type="velocity-json">/dhis-web-reporting/responseIndicatorGroup.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
+
<!-- Data Completeness -->
<action name="displayViewDataCompletenessForm" class="org.hisp.dhis.reporting.completeness.action.GetDataCompletenessOptionsAction">