=== 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 reportExcels; - - public List getReportExcels() - { - return reportExcels; - } - - private List periods; - - public List getPeriods() - { - return periods; - } - - public void setPeriods( List 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(); - - List listReports = new ArrayList( reportExcelService.getALLReportExcel() ); - - if ( organisationUnit == null ) - { - reportExcels.addAll( listReports ); - } - else - { - - for ( ReportExcel report : listReports ) - { - - Collection 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" ) + "
' " - + 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 @@ - listReportExcel.action + listReportExcel.action + @@ -359,61 +360,6 @@ /dhis-web-excel-reporting/responseDataElementOrder.vm - - - - - - selectFormChain - - - - - getInformationChain - - - - - /main.vm - /dhis-web-excel-reporting/importDataParams.vm - /dhis-web-excel-reporting/menuWithTree.vm - 220 - ../dhis-web-commons/ouwt/ouwt.js,javascript/imports.js, - javascript/export.js - style/style.css - - - - - /main.vm - /dhis-web-excel-reporting/importDataParams.vm - /dhis-web-excel-reporting/menuWithTree.vm - 220 - ../dhis-web-commons/ouwt/ouwt.js,javascript/imports.js, - javascript/export.js - style/style.css - - - - - /dhis-web-excel-reporting/responseSuccess.vm - - /dhis-web-excel-reporting/responseError.vm - - - - - /dhis-web-excel-reporting/responseExcelItemValues.vm - - /dhis-web-excel-reporting/responseError.vm - - /dhis-web-excel-reporting/menuWithTree.vm 220 ../dhis-web-commons/ouwt/ouwt.js,javascript/export.js, - javascript/commons.js,javascript/imports.js + javascript/commons.js,javascript/imports.js style/style.css @@ -975,5 +921,21 @@ ../dhis-web-commons/oust/oust.js,javascript/associations.js + + + /dhis-web-excel-reporting/responseSuccess.vm + + /dhis-web-excel-reporting/responseError.vm + + + + + /dhis-web-excel-reporting/responseExcelItemValues.vm + + /dhis-web-excel-reporting/responseError.vm + +