dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #02764
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 915: Remove unused file
------------------------------------------------------------
revno: 915
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2009-10-28 08:18:36 +0700
message:
Remove unused file
removed:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/GetInformationAction.java
modified:
dhis-2/dhis-web/dhis-web-excel-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 file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/GetInformationAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/GetInformationAction.java 2009-10-02 02:58:42 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/GetInformationAction.java 1970-01-01 00:00:00 +0000
@@ -1,155 +0,0 @@
-package org.hisp.dhis.reportexcel.importing.action;
-
-/*
- * Copyright (c) 2004-2007, 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.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
-import org.hisp.dhis.period.Period;
-import org.hisp.dhis.reportexcel.ReportExcel;
-import org.hisp.dhis.reportexcel.ReportExcelService;
-import org.hisp.dhis.reportexcel.action.ActionSupport;
-
-public class GetInformationAction
- extends ActionSupport
-{
-
- // -------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------
-
- private OrganisationUnitSelectionManager organisationUnitSelectionManager;
-
- public void setOrganisationUnitSelectionManager( OrganisationUnitSelectionManager organisationUnitSelectionManager )
- {
- this.organisationUnitSelectionManager = organisationUnitSelectionManager;
- }
-
- private ReportExcelService reportExcelService;
-
- public void setReportExcelService( ReportExcelService reportExcelService )
- {
- this.reportExcelService = reportExcelService;
- }
-
- // -------------------------------------------------------------
- // Getters and Setters
- // -------------------------------------------------------------
-
- private OrganisationUnit organisationUnit;
-
- public OrganisationUnit getOrganisationUnit()
- {
- return organisationUnit;
- }
-
- public void setOrganisationUnit( OrganisationUnit organisationUnit )
- {
- this.organisationUnit = organisationUnit;
- }
-
- private List<ReportExcel> reportExcels;
-
- public List<ReportExcel> getReportExcels()
- {
- return reportExcels;
- }
-
- private List<Period> periods;
-
- public List<Period> getPeriods()
- {
- return periods;
- }
-
- public void setPeriods( List<Period> periods )
- {
- this.periods = periods;
- }
-
- private File fileExcel;
-
- public File getFileExcel()
- {
- return fileExcel;
- }
-
- public void setFileExcel( File fileExcel )
- {
- this.fileExcel = fileExcel;
- }
-
- // -------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------
-
- public String execute()
- throws Exception
- {
- organisationUnit = organisationUnitSelectionManager.getSelectedOrganisationUnit();
-
- reportExcels = new ArrayList<ReportExcel>();
-
- List<ReportExcel> listReports = new ArrayList<ReportExcel>( reportExcelService.getALLReportExcel() );
-
- if ( organisationUnit == null )
- {
- reportExcels.addAll( listReports );
- }
- else
- {
-
- for ( ReportExcel report : listReports )
- {
-
- Collection<OrganisationUnit> orgUnits = report.getOrganisationAssocitions();
-
- for ( OrganisationUnit orgUnit : orgUnits )
- {
- if ( organisationUnit.getId() == orgUnit.getId() && report.isNormal());
- {
- reportExcels.add( report );
-
- break;
- }
- }
- }
- }
-
- if ( fileExcel != null )
- {
- message = i18n.getString( "upload_file" ) + " " + i18n.getString( "success" ) + " <br> ' "
- + fileExcel.getName() + " '";
- }
- return SUCCESS;
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml 2009-10-27 06:05:22 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml 2009-10-28 01:18:36 +0000
@@ -118,7 +118,8 @@
<action name="uploadBackupFile"
class="org.hisp.dhis.reportexcel.importing.action.UploadExcelFileAction">
- <result name="success" type="redirect">listReportExcel.action</result>
+ <result name="success" type="redirect">listReportExcel.action
+ </result>
<interceptor-ref name="fileUploadStack" />
</action>
@@ -359,61 +360,6 @@
/dhis-web-excel-reporting/responseDataElementOrder.vm</result>
</action>
-
- <!-- IMPORT EXCEL FILES -->
-
- <action name="getInformation"
- class="org.hisp.dhis.reportexcel.importing.action.UploadExcelFileAction">
- <result name="success" type="chain">
- selectFormChain</result>
- <interceptor-ref name="fileUploadStack" />
- </action>
-
- <action name="selectFormChain"
- class="org.hisp.dhis.reportexcel.export.action.SelectFormAction">
- <result name="success" type="chain">getInformationChain
- </result>
- </action>
-
- <action name="getInformationChain"
- class="org.hisp.dhis.reportexcel.importing.action.GetInformationAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-excel-reporting/importDataParams.vm</param>
- <param name="menu">/dhis-web-excel-reporting/menuWithTree.vm</param>
- <param name="menuTreeHeight">220</param>
- <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/imports.js,
- javascript/export.js</param>
- <param name="stylesheets">style/style.css</param>
- </action>
-
- <action name="getExcelItemParamChain"
- class="org.hisp.dhis.reportexcel.importing.excelitem.action.GetExcelItemParamAction">
- <interceptor-ref name="organisationUnitTreeStack" />
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-excel-reporting/importDataParams.vm</param>
- <param name="menu">/dhis-web-excel-reporting/menuWithTree.vm</param>
- <param name="menuTreeHeight">220</param>
- <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/imports.js,
- javascript/export.js</param>
- <param name="stylesheets">style/style.css</param>
- </action>
-
- <action name="importData"
- class="org.hisp.dhis.reportexcel.importing.action.ImportDataAction">
- <result name="success" type="velocity-xml">
- /dhis-web-excel-reporting/responseSuccess.vm</result>
- <result name="error" type="velocity-xml">
- /dhis-web-excel-reporting/responseError.vm</result>
- </action>
-
- <action name="previewData"
- class="org.hisp.dhis.reportexcel.importing.action.ViewDataAction">
- <result name="success" type="velocity">
- /dhis-web-excel-reporting/responseExcelItemValues.vm</result>
- <result name="error" type="velocity-xml">
- /dhis-web-excel-reporting/responseError.vm</result>
- </action>
-
<!-- GENERATE REPORT EXCEL ACTION -->
<action name="selectExportReportParam"
@@ -926,7 +872,7 @@
<param name="menu">/dhis-web-excel-reporting/menuWithTree.vm</param>
<param name="menuTreeHeight">220</param>
<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/export.js,
- javascript/commons.js,javascript/imports.js</param>
+ javascript/commons.js,javascript/imports.js</param>
<param name="stylesheets">style/style.css</param>
</action>
@@ -975,5 +921,21 @@
<param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/associations.js</param>
</action>
+ <action name="importData"
+ class="org.hisp.dhis.reportexcel.importing.action.ImportDataAction">
+ <result name="success" type="velocity-xml">
+ /dhis-web-excel-reporting/responseSuccess.vm</result>
+ <result name="error" type="velocity-xml">
+ /dhis-web-excel-reporting/responseError.vm</result>
+ </action>
+
+ <action name="previewData"
+ class="org.hisp.dhis.reportexcel.importing.action.ViewDataAction">
+ <result name="success" type="velocity">
+ /dhis-web-excel-reporting/responseExcelItemValues.vm</result>
+ <result name="error" type="velocity-xml">
+ /dhis-web-excel-reporting/responseError.vm</result>
+ </action>
+
</package>
</struts>