dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22816
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11092: Removed unused action classes
------------------------------------------------------------
revno: 11092
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-05-29 22:10:38 +0200
message:
Removed unused action classes
removed:
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/GenerateChartAction.java
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/ViewChartAction.java
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewPivotTableForm.vm
modified:
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
=== removed directory 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart'
=== removed directory 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action'
=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/GenerateChartAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/GenerateChartAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/GenerateChartAction.java 1970-01-01 00:00:00 +0000
@@ -1,239 +0,0 @@
-package org.hisp.dhis.reporting.chart.action;
-
-/*
- * 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 static org.hisp.dhis.system.util.ConversionUtils.getIntegerCollection;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.chart.ChartService;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.indicator.IndicatorService;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.period.Period;
-import org.hisp.dhis.period.PeriodService;
-import org.jfree.chart.JFreeChart;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * Known usage of this class is the pivot table chart functionality.
- *
- * @author Lars Helge Overland
- */
-public class GenerateChartAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private ChartService chartService;
-
- public void setChartService( ChartService chartService )
- {
- this.chartService = chartService;
- }
-
- private IndicatorService indicatorService;
-
- public void setIndicatorService( IndicatorService indicatorService )
- {
- this.indicatorService = indicatorService;
- }
-
- private DataElementService dataElementService;
-
- public void setDataElementService( DataElementService dataElementService )
- {
- this.dataElementService = dataElementService;
- }
-
- private PeriodService periodService;
-
- public void setPeriodService( PeriodService periodService )
- {
- this.periodService = periodService;
- }
-
- private OrganisationUnitService organisationUnitService;
-
- public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
- {
- this.organisationUnitService = organisationUnitService;
- }
-
- private I18nFormat format;
-
- public void setFormat( I18nFormat format )
- {
- this.format = format;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private List<String> indicatorId;
-
- public void setIndicatorId( List<String> indicatorId )
- {
- this.indicatorId = indicatorId;
- }
-
- private List<String> dataElementId;
-
- public void setDataElementId( List<String> dataElementId )
- {
- this.dataElementId = dataElementId;
- }
-
- private List<String> periodId;
-
- public void setPeriodId( List<String> periodId )
- {
- this.periodId = periodId;
- }
-
- private List<String> organisationUnitId;
-
- public void setOrganisationUnitId( List<String> organisationUnitId )
- {
- this.organisationUnitId = organisationUnitId;
- }
-
- private String series;
-
- public void setSeries( String series )
- {
- this.series = series;
- }
-
- private String category;
-
- public void setCategory( String category )
- {
- this.category = category;
- }
-
- private String filter;
-
- public void setFilter( String filter )
- {
- this.filter = filter;
- }
-
- private boolean regression;
-
- public void setRegression( boolean regression )
- {
- this.regression = regression;
- }
-
- private String chartWidth;
-
- public void setChartWidth( String chartWidth )
- {
- this.chartWidth = chartWidth;
- }
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private JFreeChart chart;
-
- public JFreeChart getChart()
- {
- return chart;
- }
-
- private int width;
-
- public int getWidth()
- {
- return width;
- }
-
- private int height;
-
- public int getHeight()
- {
- return height;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- throws Exception
- {
- List<Indicator> indicators = new ArrayList<Indicator>();
-
- for ( String id : indicatorId )
- {
- indicators.add( indicatorService.getIndicator( Integer.parseInt( id ) ) );
- }
-
- List<DataElement> dataElements = new ArrayList<DataElement>();
-
- for ( Integer id : getIntegerCollection( dataElementId ) )
- {
- dataElements.add( dataElementService.getDataElement( id ) );
- }
-
- List<Period> periods = new ArrayList<Period>();
-
- for ( String id : periodId )
- {
- periods.add( periodService.getPeriod( Integer.parseInt( id ) ) );
- }
-
- List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>();
-
- for ( String id : organisationUnitId )
- {
- organisationUnits.add( organisationUnitService.getOrganisationUnit( Integer.parseInt( id ) ) );
- }
-
- width = chartWidth != null ? Integer.valueOf( chartWidth ) : 700;
-
- height = 500;
-
- chart = chartService.getJFreeChart( indicators, dataElements, periods, organisationUnits,
- series, category, filter, regression, format );
-
- return SUCCESS;
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/ViewChartAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/ViewChartAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/ViewChartAction.java 1970-01-01 00:00:00 +0000
@@ -1,132 +0,0 @@
-package org.hisp.dhis.reporting.chart.action;
-
-/*
- * 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 org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.chart.Chart;
-import org.hisp.dhis.chart.ChartService;
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.system.util.CodecUtils;
-import org.jfree.chart.JFreeChart;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class ViewChartAction
- implements Action
-{
- private static final Log log = LogFactory.getLog( ViewChartAction.class );
-
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private ChartService chartService;
-
- public void setChartService( ChartService chartService )
- {
- this.chartService = chartService;
- }
-
- private I18nFormat format;
-
- public void setFormat( I18nFormat format )
- {
- this.format = format;
- }
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private JFreeChart chart;
-
- public JFreeChart getChart()
- {
- return chart;
- }
-
- private int width;
-
- public int getWidth()
- {
- return width;
- }
-
- private int height;
-
- public int getHeight()
- {
- return height;
- }
-
- private String filename;
-
- public String getFilename()
- {
- return filename;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private Integer id;
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- if ( id != null )
- {
- chart = chartService.getJFreeChart( id, format );
-
- Chart temp = chartService.getChart( id );
-
- width = temp.getWidth();
- height = temp.getHeight();
- filename = CodecUtils.filenameEncode( temp.getName() );
-
- log.info( "Viewing chart: " + temp.getName() + ", width: " + width + ", height: " + height );
- }
-
- 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 2013-05-24 11:59:41 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml 2013-05-29 20:10:38 +0000
@@ -35,22 +35,6 @@
<property name="documentService" ref="org.hisp.dhis.document.DocumentService" />
</bean>
- <!-- Charts -->
-
- <bean id="org.hisp.dhis.reporting.chart.action.GenerateChartAction" class="org.hisp.dhis.reporting.chart.action.GenerateChartAction"
- scope="prototype">
- <property name="chartService" ref="org.hisp.dhis.chart.ChartService" />
- <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
- <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
- </bean>
-
- <bean id="org.hisp.dhis.reporting.chart.action.ViewChartAction" class="org.hisp.dhis.reporting.chart.action.ViewChartAction"
- scope="prototype">
- <property name="chartService" ref="org.hisp.dhis.chart.ChartService" />
- </bean>
-
<!-- TableCreator -->
<bean id="org.hisp.dhis.reporting.tablecreator.action.GetReportParamsAction" class="org.hisp.dhis.reporting.tablecreator.action.GetReportParamsAction"
=== 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 2013-05-24 11:59:41 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml 2013-05-29 20:10:38 +0000
@@ -48,16 +48,6 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
- <!-- Chart -->
-
- <action name="viewChart" class="org.hisp.dhis.reporting.chart.action.ViewChartAction">
- <result name="success" type="chart"></result>
- </action>
-
- <action name="generateChart" class="org.hisp.dhis.reporting.chart.action.GenerateChartAction">
- <result name="success" type="chart"></result>
- </action>
-
<!-- Report -->
<action name="displayAddReportForm" class="org.hisp.dhis.reporting.reportviewer.action.GetReportOptionsAction">
=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewPivotTableForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewPivotTableForm.vm 2012-07-03 16:43:55 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewPivotTableForm.vm 1970-01-01 00:00:00 +0000
@@ -1,209 +0,0 @@
-<script type="text/javascript">
- jQuery(document).ready(function(){
-
- $( "#pivotTable" ).click( setPosition );
-
- selectionTreeSelection.setMultipleSelectionAllowed( false );
- selectionTreeSelection.setListenerFunction( organisationUnitSelected );
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
-
- datePickerInRange( 'startDate' , 'endDate' );
- });
-
- var i18n_indicator_group = '$encoder.jsEscape( $i18n.getString( "indicator_group" ) , "'")';
- var i18n_start_date = '$encoder.jsEscape( $i18n.getString( "start_date" ) , "'")';
- var i18n_end_date = '$encoder.jsEscape( $i18n.getString( "end_date" ) , "'")';
- var i18n_period_type = '$encoder.jsEscape( $i18n.getString( "period_type" ) , "'")';
- var i18n_organisation_unit_level = '$encoder.jsEscape( $i18n.getString( "organisation_unit_level" ) , "'")';
- var i18n_selected_organisation_unit = '$encoder.jsEscape( $i18n.getString( "please_select_org_unit" ) , "'")';
-</script>
-
-<style type="text/css">
-div#control
-{
- margin-bottom: 15px;
-}
-
-div#pivot
-{
- position: relative;
- left: 2px;
- width: 265px;
- height: 137px;
- border: 1px solid #b0b0b0;
- background-color: #d9ece1;
- padding-left: 20px;
- margin-bottom: 6px;
- border-radius: 3px;
-}
-
-div#pivotMenu
-{
- position: absolute;
- display: none;
-}
-
-div.inputSection
-{
- padding-top: 7px;
- padding-bottom: 5px;
-}
-
-.pivot
-{
- border-collapse: collapse;
-}
-
-.pivot td
-{
- border: 1px solid #c0c0c0;
- padding: 3px 10px 10px 3px;
- padding-bottom: 3px;
-}
-
-td.column
-{
- background-color: #dae6f8;
- min-width: 60px;
- text-align: center;
-}
-
-td.row
-{
- background-color: #dae6f8;
- min-width: 120px;
-}
-
-td.cell
-{
- text-align: center;
- cursor: pointer;
-}
-
-</style>
-
-<h3>$i18n.getString( "pivot_table" ) #openHelp( "web_pivot_table" )</h3>
-
-<!-- Control panel -->
-
-<div id="control">
-<input type="button" value="$i18n.getString( 'data' )" style="width:110px" onclick="showCriteria()" />
-<input type="button" value="$i18n.getString( 'pivot' )" style="width:110px" onclick="showPivot()" />
-<input type="button" value="$i18n.getString( 'get_report_as_xls' )" onclick="exportXls()" style="width:130px">
-<input type="button" value="$i18n.getString( 'back' )" style="width:110px" onclick="window.location='index.action'" />
-<label id="dataLabel" style="color:#606060"></label>
-</div>
-
-<!-- Criteria -->
-
-<div id="criteria" class="inputCriteria" style="width:302px;height:520px;">
-
-<div class="inputSection">
-<label>$i18n.getString( "data_type" )</label>
-<select id="dataType" style="width:280px" onchange="toggleDataType()">
- <option value="0">$i18n.getString( "indicator" )</option>
- <option value="1">$i18n.getString( "data_element" )</option>
-</select>
-</div>
-
-<div id="indicatorGroupDiv" class="inputSection">
-<label>$i18n.getString( "indicator_group" )</label>
-<select id="indicatorGroup" style="width:280px">
- <option value="-1">[ All ]</option>
- #foreach( $group in $indicatorGroups )
- <option value="${group.id}">$encoder.htmlEncode( $group.name )</option>
- #end
-</select>
-</div>
-
-<div id="dataElementGroupDiv" class="inputSection" style="display:none">
-<label>$i18n.getString( "data_element_group" )</label>
-<select id="dataElementGroup" style="width:280px">
- <option value="-1">[ All ]</option>
- #foreach( $group in $dataElementGroups )
- <option value="${group.id}">$encoder.htmlEncode( $group.name )</option>
- #end
-</select>
-</div>
-
-<div class="inputSection">
-<label>$i18n.getString( "start_date" )</label><br>
-<input type="text" id="startDate" style="width:240px">
-</div>
-
-<div class="inputSection">
-<label>$i18n.getString( "end_date" )</label><br>
-<input type="text" id="endDate" style="width:240px">
-</div>
-
-<div class="inputSection">
-<label>$i18n.getString( "period_type" )</label>
-<select id="periodType" style="width:280px">
- #foreach( $type in $periodTypes )
- <option value="${type.name}" #if( $type.name == "Monthly" )selected="selected"#end>$i18n.getString( $type.name )</option>
- #end
-</select>
-</div>
-
-<div id="selectionTree" style="width:280px; height:200px"></div>
-
-<div class="inputSection">
-<input type="button" value='$i18n.getString( "get_data" )' style="width:120px" onclick="getData()">
-<input type="button" value='$i18n.getString( "cancel" )' style="width:120px" onclick="hideDivs()">
-</div>
-
-</div>
-
-<!-- Pivot -->
-
-<div id="pivot" class="inputCriteria" style="width:302px;height:137px;display:none;">
-
-<div class="inputSection">
-<table>
- <tr>
- <td><label>$i18n.getString( "indicators" )</label></td>
- <td><input type="checkbox" id="indicatorBox" checked="checked"></td>
- </tr>
- <tr>
- <td><label>$i18n.getString( "periods" )</label></td>
- <td><input type="checkbox" id="periodBox"></td>
- </tr>
- <tr>
- <td><label>$i18n.getString( "org_units" )</label></td>
- <td><input type="checkbox" id="orgunitBox"></td>
- </tr>
-</table>
-</div>
-
-<div class="inputSection">
- <input type="button" value='$i18n.getString( "pivot" )' style="width:120px" onclick="pivotData()" />
- <input type="button" value='$i18n.getString( "cancel" )' style="width:120px" onclick="hideDivs()" />
-</div>
-
-</div>
-
-<!-- Pivot menu -->
-
-<div id="pivotMenu" class="menuDropDownArea" onmouseover="cancelHideDropDownTimeout()" onmouseout="hideDropDownTimeout()">
- <ul class="menuDropDownBox">
- <li><a href="javascript:viewChart( 'single', 'period' )">$i18n.getString( "this_indicator_and_periods" ) </a></li>
- <li><a href="javascript:viewChart( 'single', 'orgunit' )">$i18n.getString( "this_indicator_and_orgunits" ) </a></li>
- <li><a href="javascript:viewChart( 'viewChart( 'all', 'period' )">$i18n.getString( "all_indicator_and_periods" ) </a></li>
- <li><a href="javascript:viewChart( 'viewChart( 'all', 'orgunit' )">$i18n.getString( "all_indicator_and_orgunits" ) </a></li>
- </ul>
-</div>
-
-<!-- Pivot table -->
-
-#parse( "dhis-web-commons/loader/loader.vm" )
-
-<div id="contentDiv">
-
-<table id="pivotTable" class="pivot"></table>
-
-</div>
-
-<div id="chartView" style="display:none; padding:0; margin:0;">
- <img id="chartImage" src="" style="padding: 10px;"></img>
-</div>