dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10167
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2792: Removed BIRT report functionality. Not suitable for multi-user environments and BIRT is not closi...
------------------------------------------------------------
revno: 2792
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-02-01 12:03:47 +0100
message:
Removed BIRT report functionality. Not suitable for multi-user environments and BIRT is not closing database connections properly which will exhaust the dbms over time.
removed:
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/ReportManager.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager/
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager/DefaultReportManager.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager/ReportConfiguration.java
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/report/ReportManagerTest.java
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/GetReportConfigurationAction.java
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/SetReportConfigurationAction.java
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ReportImporter.java
dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/dashboard/DashboardStoreTest.java
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/report/ReportStoreTest.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/AddReportAction.java
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/GetAllReportsAction.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
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportForm.vm
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/menu.vm
--
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/report/Report.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java 2011-01-20 08:46:49 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java 2011-02-01 11:03:47 +0000
@@ -40,17 +40,10 @@
public class Report
extends IdentifiableObject
{
- public static final String TYPE_BIRT = "birt";
- public static final String TYPE_JASPER = "jasper";
- public static final String TYPE_DEFAULT = TYPE_JASPER;
public static final String TEMPLATE_DIR = "templates";
- private String design;
-
private String designContent;
-
- private String type;
-
+
private Set<ReportTable> reportTables = new HashSet<ReportTable>();
private transient String url;
@@ -63,11 +56,10 @@
{
}
- public Report( String name, String design, String type, Set<ReportTable> reportTable )
+ public Report( String name, String designContent, Set<ReportTable> reportTable )
{
this.name = name;
- this.design = design;
- this.type = type;
+ this.designContent = designContent;
this.reportTables = reportTable;
}
@@ -79,12 +71,7 @@
{
return reportTables != null;
}
-
- public String getReportType()
- {
- return type != null && type.trim().length() > 0 ? type : TYPE_DEFAULT;
- }
-
+
// -------------------------------------------------------------------------
// Equals and hashCode
// -------------------------------------------------------------------------
@@ -128,16 +115,6 @@
// Getters and setters
// -------------------------------------------------------------------------
- public String getDesign()
- {
- return design;
- }
-
- public void setDesign( String design )
- {
- this.design = design;
- }
-
public String getDesignContent()
{
return designContent;
@@ -148,16 +125,6 @@
this.designContent = designContent;
}
- public String getType()
- {
- return type;
- }
-
- public void setType( String type )
- {
- this.type = type;
- }
-
public Set<ReportTable> getReportTables()
{
return reportTables;
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportConverter.java 2010-07-30 12:59:39 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportConverter.java 2011-02-01 11:03:47 +0000
@@ -51,9 +51,7 @@
private static final String FIELD_ID = "id";
private static final String FIELD_NAME = "name";
- private static final String FIELD_DESIGN = "design";
private static final String FIELD_DESIGN_CONTENT = "designContent";
- private static final String FIELD_TYPE = "type";
/**
* Constructor for write operations.
@@ -92,9 +90,7 @@
writer.writeElement( FIELD_ID, String.valueOf( report.getId() ) );
writer.writeElement( FIELD_NAME, report.getName() );
- writer.writeElement( FIELD_DESIGN, report.getDesign() );
writer.writeElement( FIELD_DESIGN_CONTENT, report.getDesignContent() );
- writer.writeElement( FIELD_TYPE, report.getType() );
writer.closeElement();
}
@@ -114,9 +110,7 @@
report.setId( Integer.parseInt( values.get( FIELD_ID ) ) );
report.setName( values.get( FIELD_NAME ) );
- report.setDesign( values.get( FIELD_DESIGN ) );
report.setDesignContent( values.get( FIELD_DESIGN_CONTENT ) );
- report.setType( values.get( FIELD_TYPE ) );
importObject( report, params );
}
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ReportImporter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ReportImporter.java 2010-07-28 13:44:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ReportImporter.java 2011-02-01 11:03:47 +0000
@@ -66,9 +66,7 @@
protected void importMatching( Report object, Report match )
{
match.setName( match.getName() );
- match.setDesign( object.getDesign() );
match.setDesignContent( object.getDesignContent() );
- match.setType( object.getType() );
reportService.saveReport( match );
}
@@ -86,18 +84,10 @@
{
return false;
}
- if ( !isSimiliar( object.getDesign(), existing.getDesign() ) || ( isNotNull( object.getDesign(), existing.getDesign() ) && !object.getDesign().equals( existing.getDesign() ) ) )
- {
- return false;
- }
if ( !isSimiliar( object.getDesignContent(), existing.getDesignContent() ) || ( isNotNull( object.getDesignContent(), existing.getDesignContent() ) && !object.getDesignContent().equals( existing.getDesignContent() ) ) )
{
return false;
}
- if ( !isSimiliar( object.getType(), existing.getType() ) || ( isNotNull( object.getType(), existing.getType() ) && !object.getType().equals( existing.getType() ) ) )
- {
- return false;
- }
return true;
}
=== modified file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java'
--- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 2011-01-07 11:37:47 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 2011-02-01 11:03:47 +0000
@@ -46,7 +46,6 @@
final String KEY_FORUM_INTEGRATION = "forumIntegration";
final String KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART = "omitIndicatorsZeroNumeratorDataMart";
final String KEY_REPORT_TEMPLATE_DIRECTORY = "reportTemplateDirectory";
- final String KEY_REPORT_FRAMEWORK = "reportFramework";
final String KEY_MAX_NUMBER_OF_ATTEMPTS = "maxAttempts";
final String KEY_TIMEFRAME_MINUTES = "lockoutTimeframe";
final String KEY_GIS_LONGITUDE = "longitude";
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/ReportManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/ReportManager.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/ReportManager.java 1970-01-01 00:00:00 +0000
@@ -1,49 +0,0 @@
-package org.hisp.dhis.report;
-
-/*
- * 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.Map;
-
-import org.hisp.dhis.external.configuration.NoConfigurationFoundException;
-import org.hisp.dhis.report.manager.ReportConfiguration;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public interface ReportManager
-{
- String ID = ReportManager.class.getName();
-
- void setConfiguration( ReportConfiguration configuration );
-
- ReportConfiguration getConfiguration()
- throws NoConfigurationFoundException;
-
- Map<String[], String> getReportConnectionMap();
-}
=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager'
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager/DefaultReportManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager/DefaultReportManager.java 2010-11-10 13:45:42 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager/DefaultReportManager.java 1970-01-01 00:00:00 +0000
@@ -1,170 +0,0 @@
-package org.hisp.dhis.report.manager;
-
-/*
- * 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.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.hibernate.cfg.Configuration;
-import org.hisp.dhis.external.configuration.ConfigurationManager;
-import org.hisp.dhis.external.configuration.NoConfigurationFoundException;
-import org.hisp.dhis.external.location.LocationManager;
-import org.hisp.dhis.external.location.LocationManagerException;
-import org.hisp.dhis.hibernate.HibernateConfigurationProvider;
-import org.hisp.dhis.report.ReportManager;
-import org.hisp.dhis.system.util.CodecUtils;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class DefaultReportManager
- implements ReportManager
-{
- private static final String BIRT_HOME_SYSTEM_PROPERTY = "birt.home";
- private static final String BIRT_DIR_SYSTEM_PROPERTY = "birt.context.path";
-
- private static final String START_TAG_DRIVER = "<property name=\"odaDriverClass\">";
- private static final String START_TAG_URL = "<property name=\"odaURL\">";
- private static final String START_TAG_USER_NAME = "<property name=\"odaUser\">";
- private static final String START_TAG_PASSWORD = "<encrypted-property name=\"odaPassword\" encryptionID=\"base64\">";
- private static final String END_TAG_DRIVER = "</property>";
- private static final String END_TAG_URL = "</property>";
- private static final String END_TAG_USER_NAME = "</property>";
- private static final String END_TAG_PASSWORD = "</encrypted-property>";
-
- // -------------------------------------------------------------------------
- // Properties
- // -------------------------------------------------------------------------
-
- private String reportConfigDir;
-
- public void setReportConfigDir( String reportConfigDir )
- {
- this.reportConfigDir = reportConfigDir;
- }
-
- private String reportConfigFile;
-
- public void setReportConfigFile( String reportConfigFile )
- {
- this.reportConfigFile = reportConfigFile;
- }
-
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private HibernateConfigurationProvider hibernateConfigurationProvider;
-
- public void setHibernateConfigurationProvider( HibernateConfigurationProvider hibernateConfigurationProvider )
- {
- this.hibernateConfigurationProvider = hibernateConfigurationProvider;
- }
-
- private LocationManager locationManager;
-
- public void setLocationManager( LocationManager locationManager )
- {
- this.locationManager = locationManager;
- }
-
- private ConfigurationManager<ReportConfiguration> configurationManager;
-
- public void setConfigurationManager( ConfigurationManager<ReportConfiguration> configurationManager )
- {
- this.configurationManager = configurationManager;
- }
-
- // -------------------------------------------------------------------------
- // ReportManager implementation
- // -------------------------------------------------------------------------
-
- public void setConfiguration( ReportConfiguration configuration )
- {
- try
- {
- OutputStream out = locationManager.getOutputStream( reportConfigFile, reportConfigDir );
-
- configurationManager.setConfiguration( configuration, out );
- }
- catch ( LocationManagerException ex )
- {
- throw new RuntimeException( "Failed to set configuration", ex );
- }
- }
-
- public ReportConfiguration getConfiguration()
- throws NoConfigurationFoundException
- {
- // ---------------------------------------------------------------------
- // Look for system property
- // ---------------------------------------------------------------------
-
- String home = System.getProperty( BIRT_HOME_SYSTEM_PROPERTY );
- String dir = System.getProperty( BIRT_DIR_SYSTEM_PROPERTY );
-
- if ( home != null && dir != null )
- {
- return new ReportConfiguration( home, dir );
- }
-
- // ---------------------------------------------------------------------
- // Look for configuration file
- // ---------------------------------------------------------------------
-
- try
- {
- InputStream in = locationManager.getInputStream( reportConfigFile, reportConfigDir );
-
- return configurationManager.getConfiguration( in, ReportConfiguration.class );
- }
- catch ( LocationManagerException ex )
- {
- throw new NoConfigurationFoundException( "No configuration file found" );
- }
- }
-
- public Map<String[], String> getReportConnectionMap()
- {
- Configuration config = hibernateConfigurationProvider.getConfiguration();
-
- String encryptedPassword = CodecUtils.encryptBase64( config.getProperty( "hibernate.connection.password" ) );
-
- Map<String[], String> map = new HashMap<String[], String>();
-
- map.put( new String[] { START_TAG_DRIVER, END_TAG_DRIVER }, START_TAG_DRIVER + config.getProperty( "hibernate.connection.driver_class" ) + END_TAG_DRIVER );
- map.put( new String[] { START_TAG_URL, END_TAG_URL }, START_TAG_URL + config.getProperty( "hibernate.connection.url" ) + END_TAG_URL );
- map.put( new String[] { START_TAG_USER_NAME, END_TAG_USER_NAME }, START_TAG_USER_NAME + config.getProperty( "hibernate.connection.username" ) + END_TAG_USER_NAME );
- map.put( new String[] { START_TAG_PASSWORD, END_TAG_PASSWORD }, START_TAG_PASSWORD + encryptedPassword + END_TAG_PASSWORD );
-
- return map;
- }
-}
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager/ReportConfiguration.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager/ReportConfiguration.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager/ReportConfiguration.java 1970-01-01 00:00:00 +0000
@@ -1,151 +0,0 @@
-package org.hisp.dhis.report.manager;
-
-/*
- * 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.io.Serializable;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class ReportConfiguration
- implements Serializable
-{
- private static final String SEPARATOR = "/";
-
- private String home;
-
- private String directory;
-
- // -------------------------------------------------------------------------
- // Constructors
- // -------------------------------------------------------------------------
-
- public ReportConfiguration()
- {
- }
-
- public ReportConfiguration( String home, String directory )
- {
- this.home = home;
- this.directory = directory;
- }
-
- // -------------------------------------------------------------------------
- // Equals and hashCode
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- final int prime = 31;
-
- int result = 1;
-
- result = prime * result + ( ( directory == null ) ? 0 : directory.hashCode() );
- result = prime * result + ( ( home == null ) ? 0 : home.hashCode() );
-
- return result;
- }
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- final ReportConfiguration other = (ReportConfiguration) object;
-
- if ( directory == null )
- {
- if ( other.directory != null )
- {
- return false;
- }
- }
- else if ( !directory.equals( other.directory ) )
- {
- return false;
- }
-
- if ( home == null )
- {
- if ( other.home != null )
- {
- return false;
- }
- }
- else if ( !home.equals( other.home ) )
- {
- return false;
- }
-
- return true;
- }
-
- // -------------------------------------------------------------------------
- // Getters and setters
- // -------------------------------------------------------------------------
-
- public String getHome()
- {
- return home;
- }
-
- public void setHome( String home )
- {
- this.home = home;
- }
-
- public String getDirectory()
- {
- if ( directory != null && directory.startsWith( SEPARATOR ) )
- {
- return directory.substring( 1, directory.length() );
- }
-
- return directory;
- }
-
- public void setDirectory( String directory )
- {
- this.directory = directory;
- }
-}
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml 2011-01-13 15:44:09 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml 2011-02-01 11:03:47 +0000
@@ -76,18 +76,7 @@
<property name="reportStore"
ref="org.hisp.dhis.report.ReportStore"/>
</bean>
-
- <bean id="org.hisp.dhis.report.ReportManager"
- class="org.hisp.dhis.report.manager.DefaultReportManager">
- <property name="reportConfigDir"
- value="reports"/>
- <property name="reportConfigFile"
- value="reportConfiguration.xml"/>
- <property name="hibernateConfigurationProvider" ref="hibernateConfigurationProvider"/>
- <property name="locationManager" ref="locationManager"/>
- <property name="configurationManager" ref="configurationManager"/>
- </bean>
-
+
<!-- Chart -->
<bean id="org.hisp.dhis.chart.ChartStore"
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml 2010-05-17 13:40:52 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml 2011-02-01 11:03:47 +0000
@@ -14,11 +14,7 @@
<column name="name" not-null="true" unique="true" length="160"/>
</property>
- <property name="design"/>
-
<property name="designContent" type="text"/>
-
- <property name="type"/>
<set name="reportTables" table="reportreporttables">
<key column="reportid"/>
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/dashboard/DashboardStoreTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/dashboard/DashboardStoreTest.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/dashboard/DashboardStoreTest.java 2011-02-01 11:03:47 +0000
@@ -30,7 +30,6 @@
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
-import static org.hisp.dhis.report.Report.TYPE_BIRT;
import org.hibernate.NonUniqueObjectException;
import org.hisp.dhis.DhisSpringTest;
@@ -81,7 +80,7 @@
userA = createUser( 'A' );
userStore.addUser( userA );
- reportA = new Report( "ReportA", "DesignA", TYPE_BIRT, null );
+ reportA = new Report( "ReportA", "DesignA", null );
reportService.saveReport( reportA );
urlA = createOlapURL( 'A' );
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/report/ReportManagerTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/report/ReportManagerTest.java 2010-10-29 12:19:15 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/report/ReportManagerTest.java 1970-01-01 00:00:00 +0000
@@ -1,85 +0,0 @@
-package org.hisp.dhis.report;
-
-/*
- * 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 static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-
-import org.hisp.dhis.DhisSpringTest;
-import org.hisp.dhis.external.configuration.NoConfigurationFoundException;
-import org.hisp.dhis.external.location.LocationManager;
-import org.hisp.dhis.report.manager.ReportConfiguration;
-import org.junit.Test;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class ReportManagerTest
- extends DhisSpringTest
-{
- private LocationManager locationManager;
-
- private ReportManager reportManager;
-
- // -------------------------------------------------------------------------
- // Fixture
- // -------------------------------------------------------------------------
-
- @Override
- public void setUpTest()
- {
- locationManager = (LocationManager) getBean( "locationManager" );
-
- reportManager = (ReportManager) getBean( ReportManager.ID );
-
- setDependency( reportManager, "reportConfigDir", "test", String.class );
- setDependency( reportManager, "reportConfigFile", "testReportConfiguration.xml", String.class );
- }
-
- // -------------------------------------------------------------------------
- // Tests
- // -------------------------------------------------------------------------
-
- @Test
- public void testConfiguration()
- throws NoConfigurationFoundException
- {
- setExternalTestDir( locationManager );
-
- ReportConfiguration config = new ReportConfiguration( "home", "directory" );
-
- reportManager.setConfiguration( config );
-
- ReportConfiguration receivedConfig = reportManager.getConfiguration();
-
- assertNotNull( receivedConfig );
-
- assertEquals( config, receivedConfig );
- }
-}
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/report/ReportStoreTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/report/ReportStoreTest.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/report/ReportStoreTest.java 2011-02-01 11:03:47 +0000
@@ -32,8 +32,6 @@
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
-import static org.hisp.dhis.report.Report.TYPE_BIRT;
-
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
@@ -86,8 +84,8 @@
@Test
public void testSaveGet()
{
- Report reportA = new Report( "ReportA", "DesignA", TYPE_BIRT, reportTables );
- Report reportB = new Report( "ReportB", "DesignB", TYPE_BIRT, reportTables );
+ Report reportA = new Report( "ReportA", "DesignA", reportTables );
+ Report reportB = new Report( "ReportB", "DesignB", reportTables );
int idA = reportStore.save( reportA );
int idB = reportStore.save( reportB );
@@ -99,8 +97,8 @@
@Test
public void testSaveGetUpdate()
{
- Report reportA = new Report( "ReportA", "DesignA", TYPE_BIRT, reportTables );
- Report reportB = new Report( "ReportB", "DesignB", TYPE_BIRT, reportTables );
+ Report reportA = new Report( "ReportA", "DesignA", reportTables );
+ Report reportB = new Report( "ReportB", "DesignB", reportTables );
int idA = reportStore.save( reportA );
int idB = reportStore.save( reportB );
@@ -108,8 +106,8 @@
assertEquals( reportA, reportStore.get( idA ) );
assertEquals( reportB, reportStore.get( idB ) );
- reportA.setDesign( "UpdatedDesignA" );
- reportB.setDesign( "UpdatedDesignB" );
+ reportA.setDesignContent( "UpdatedDesignA" );
+ reportB.setDesignContent( "UpdatedDesignB" );
int updatedIdA = reportStore.save( reportA );
int updatedIdB = reportStore.save( reportB );
@@ -117,15 +115,15 @@
assertEquals( idA, updatedIdA );
assertEquals( idB, updatedIdB );
- assertEquals( "UpdatedDesignA", reportStore.get( updatedIdA ).getDesign() );
- assertEquals( "UpdatedDesignB", reportStore.get( updatedIdB ).getDesign() );
+ assertEquals( "UpdatedDesignA", reportStore.get( updatedIdA ).getDesignContent() );
+ assertEquals( "UpdatedDesignB", reportStore.get( updatedIdB ).getDesignContent() );
}
@Test
public void testDelete()
{
- Report reportA = new Report( "ReportA", "DesignA", TYPE_BIRT, reportTables );
- Report reportB = new Report( "ReportB", "DesignB", TYPE_BIRT, reportTables );
+ Report reportA = new Report( "ReportA", "DesignA", reportTables );
+ Report reportB = new Report( "ReportB", "DesignB", reportTables );
int idA = reportStore.save( reportA );
int idB = reportStore.save( reportB );
@@ -147,8 +145,8 @@
@Test
public void testGetAll()
{
- Report reportA = new Report( "ReportA", "DesignA", TYPE_BIRT, reportTables );
- Report reportB = new Report( "ReportB", "DesignB", TYPE_BIRT, reportTables );
+ Report reportA = new Report( "ReportA", "DesignA", reportTables );
+ Report reportB = new Report( "ReportB", "DesignB", reportTables );
reportStore.save( reportA );
reportStore.save( reportB );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java 2011-01-19 13:31:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java 2011-02-01 11:03:47 +0000
@@ -33,7 +33,6 @@
import static org.hisp.dhis.options.SystemSettingManager.KEY_FACTOR_OF_DEVIATION;
import static org.hisp.dhis.options.SystemSettingManager.KEY_FLAG;
import static org.hisp.dhis.options.SystemSettingManager.KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART;
-import static org.hisp.dhis.options.SystemSettingManager.KEY_REPORT_FRAMEWORK;
import static org.hisp.dhis.options.SystemSettingManager.KEY_START_MODULE;
import org.apache.commons.lang.StringUtils;
@@ -92,13 +91,6 @@
this.startModule = startModule;
}
- private String reportFramework;
-
- public void setReportFramework( String reportFramework )
- {
- this.reportFramework = reportFramework;
- }
-
private Boolean omitIndicatorsZeroNumeratorDataMart;
public void setOmitIndicatorsZeroNumeratorDataMart( Boolean omitIndicatorsZeroNumeratorDataMart )
@@ -155,7 +147,6 @@
systemSettingManager.saveSystemSetting( KEY_APPLICATION_TITLE, applicationTitle );
systemSettingManager.saveSystemSetting( KEY_FLAG, flag );
systemSettingManager.saveSystemSetting( KEY_START_MODULE, startModule );
- systemSettingManager.saveSystemSetting( KEY_REPORT_FRAMEWORK, reportFramework );
systemSettingManager.saveSystemSetting( KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART, omitIndicatorsZeroNumeratorDataMart );
systemSettingManager.saveSystemSetting( KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED, disableDataEntryWhenCompleted );
systemSettingManager.saveSystemSetting( KEY_FACTOR_OF_DEVIATION, factorDeviation );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm 2011-01-19 13:31:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm 2011-02-01 11:03:47 +0000
@@ -47,15 +47,6 @@
</select>
</p>
-<h4>$i18n.getString( "report_framework" )</h4>
-
-<p>
-<select name="reportFramework" style="width:30em">
- <option value="birt" #if( "birt" == $reportFramework )selected="selected"#end>$i18n.getString( "birt" )</option>
- <option value="jasper" #if( "jasper" == $reportFramework )selected="selected"#end>$i18n.getString( "jasper" )</option>
-</select>
-</p>
-
<h4>$i18n.getString( "omit_indicators_zero_numerator_data_mart" )</h4>
<p>
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/AddReportAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/AddReportAction.java 2010-07-30 12:59:39 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/AddReportAction.java 2011-02-01 11:03:47 +0000
@@ -32,15 +32,12 @@
import java.io.File;
import java.util.Collection;
-import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.report.Report;
-import org.hisp.dhis.report.ReportManager;
import org.hisp.dhis.report.ReportService;
-import org.hisp.dhis.report.manager.ReportConfiguration;
import org.hisp.dhis.reporttable.ReportTableService;
import org.hisp.dhis.system.util.StreamUtils;
@@ -59,13 +56,6 @@
// Dependencies
// -------------------------------------------------------------------------
- private ReportManager reportManager;
-
- public void setReportManager( ReportManager reportManager )
- {
- this.reportManager = reportManager;
- }
-
private ReportService reportService;
public void setReportService( ReportService reportService )
@@ -130,13 +120,6 @@
this.fileName = fileName;
}
- private String type;
-
- public void setType( String type )
- {
- this.type = type;
- }
-
private String contentType;
public void setUploadContentType( String contentType )
@@ -203,8 +186,6 @@
Report report = ( id == null ) ? new Report() : reportService.getReport( id );
report.setName( name );
- report.setDesign( fileName );
- report.setType( type );
report.setReportTables( selectedReportTables != null ? getSet(
reportTableService.getReportTables( getIntegerCollection( selectedReportTables ) ) ) : null );
@@ -216,33 +197,7 @@
if ( file != null )
{
- if ( type != null && type.equals( Report.TYPE_JASPER ) )
- {
- report.setDesignContent( StreamUtils.getContent( file ) );
- }
- else // BIRT
- {
- ReportConfiguration reportConfig = reportManager.getConfiguration();
-
- String birtHome = reportConfig.getHome();
-
- File design = new File( birtHome, fileName );
-
- log.info( "New file: " + design.getAbsolutePath() );
-
- // -----------------------------------------------------------------
- // Updating database properties in design file
- // -----------------------------------------------------------------
-
- if ( file != null )
- {
- Map<String[], String> connectionMap = reportManager.getReportConnectionMap();
-
- StringBuffer in = StreamUtils.readContent( file, connectionMap );
-
- StreamUtils.writeContent( design, in );
- }
- }
+ report.setDesignContent( StreamUtils.getContent( file ) );
}
reportService.saveReport( report );
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/GetAllReportsAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/GetAllReportsAction.java 2011-01-25 19:27:15 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/GetAllReportsAction.java 2011-02-01 11:03:47 +0000
@@ -28,22 +28,15 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.util.ContextUtils.getBaseUrl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.struts2.ServletActionContext;
-import org.hisp.dhis.options.SystemSettingManager;
import org.hisp.dhis.paging.ActionPagingSupport;
import org.hisp.dhis.report.Report;
-import org.hisp.dhis.report.ReportManager;
import org.hisp.dhis.report.ReportService;
import org.hisp.dhis.report.comparator.ReportComparator;
-import org.hisp.dhis.report.manager.ReportConfiguration;
/**
* @author Lars Helge Overland
@@ -52,21 +45,12 @@
public class GetAllReportsAction
extends ActionPagingSupport<Report>
{
- private static final String SEPARATOR = "/";
- private static final String BASE_QUERY = "frameset?__report=";
private static final String JASPER_BASE_URL = "renderReport.action?id=";
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
- private ReportManager reportManager;
-
- public void setReportManager( ReportManager reportManager )
- {
- this.reportManager = reportManager;
- }
-
private ReportService reportService;
public void setReportService( ReportService reportService )
@@ -74,13 +58,6 @@
this.reportService = reportService;
}
- private SystemSettingManager systemSettingManager;
-
- public void setSystemSettingManager( SystemSettingManager systemSettingManager )
- {
- this.systemSettingManager = systemSettingManager;
- }
-
// -------------------------------------------------------------------------
// Input & Output
// -------------------------------------------------------------------------
@@ -110,32 +87,12 @@
public String execute()
throws Exception
- {
- String reportFramework = (String) systemSettingManager.getSystemSetting( SystemSettingManager.KEY_REPORT_FRAMEWORK, Report.TYPE_DEFAULT );
-
- if ( reportFramework.equals( Report.TYPE_JASPER ) )
- {
- for ( Report report : reportService.getAllReports() )
- {
- report.setUrl( JASPER_BASE_URL + report.getId() );
-
- reports.add( report );
- }
- }
- else // BIRT
- {
- ReportConfiguration config = reportManager.getConfiguration();
-
- HttpServletRequest request = ServletActionContext.getRequest();
-
- String birtURL = getBaseUrl( request ) + config.getDirectory() + SEPARATOR + BASE_QUERY;
-
- for ( Report report : reportService.getAllReports() )
- {
- report.setUrl( birtURL + report.getDesign() );
-
- reports.add( report );
- }
+ {
+ for ( Report report : reportService.getAllReports() )
+ {
+ report.setUrl( JASPER_BASE_URL + report.getId() );
+
+ reports.add( report );
}
Collections.sort( reports, new ReportComparator() );
=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/GetReportConfigurationAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/GetReportConfigurationAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/GetReportConfigurationAction.java 1970-01-01 00:00:00 +0000
@@ -1,115 +0,0 @@
-package org.hisp.dhis.reporting.reportviewer.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 static org.hisp.dhis.report.Report.TYPE_BIRT;
-import static org.hisp.dhis.report.Report.TYPE_DEFAULT;
-
-import org.hisp.dhis.external.configuration.NoConfigurationFoundException;
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.options.SystemSettingManager;
-import org.hisp.dhis.report.ReportManager;
-import org.hisp.dhis.report.manager.ReportConfiguration;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class GetReportConfigurationAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private ReportManager reportManager;
-
- public void setReportManager( ReportManager reportManager )
- {
- this.reportManager = reportManager;
- }
-
- private I18n i18n;
-
- public void setI18n( I18n i18n )
- {
- this.i18n = i18n;
- }
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private ReportConfiguration reportConfiguration;
-
- public ReportConfiguration getReportConfiguration()
- {
- return reportConfiguration;
- }
-
- private SystemSettingManager systemSettingManager;
-
- public void setSystemSettingManager( SystemSettingManager systemSettingManager )
- {
- this.systemSettingManager = systemSettingManager;
- }
-
- private String message;
-
- public String getMessage()
- {
- return message;
- }
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- String framework = (String) systemSettingManager.getSystemSetting( SystemSettingManager.KEY_REPORT_FRAMEWORK, TYPE_DEFAULT );
-
- if ( framework.equals( TYPE_BIRT ) )
- {
- try
- {
- reportConfiguration = reportManager.getConfiguration();
- }
- catch ( NoConfigurationFoundException ex )
- {
- message = i18n.getString( "set_configuration" );
-
- return NONE;
- }
- }
-
- return SUCCESS;
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/SetReportConfigurationAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/SetReportConfigurationAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/SetReportConfigurationAction.java 1970-01-01 00:00:00 +0000
@@ -1,83 +0,0 @@
-package org.hisp.dhis.reporting.reportviewer.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 org.hisp.dhis.report.ReportManager;
-import org.hisp.dhis.report.manager.ReportConfiguration;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class SetReportConfigurationAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private ReportManager reportManager;
-
- public void setReportManager( ReportManager reportManager )
- {
- this.reportManager = reportManager;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private String home;
-
- public void setHome( String home )
- {
- this.home = home;
- }
-
- private String directory;
-
- public void setDirectory( String directory )
- {
- this.directory = directory;
- }
-
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- ReportConfiguration config = new ReportConfiguration( home, directory );
-
- reportManager.setConfiguration( config );
-
- 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-01-31 19:47:04 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml 2011-02-01 11:03:47 +0000
@@ -268,8 +268,6 @@
<bean id="org.hisp.dhis.reporting.reportviewer.action.AddReportAction"
class="org.hisp.dhis.reporting.reportviewer.action.AddReportAction"
scope="prototype">
- <property name="reportManager"
- ref="org.hisp.dhis.report.ReportManager"/>
<property name="reportService"
ref="org.hisp.dhis.report.ReportService"/>
<property name="reportTableService"
@@ -288,12 +286,8 @@
<bean id="org.hisp.dhis.reporting.reportviewer.action.GetAllReportsAction"
class="org.hisp.dhis.reporting.reportviewer.action.GetAllReportsAction"
scope="prototype">
- <property name="reportManager"
- ref="org.hisp.dhis.report.ReportManager"/>
<property name="reportService"
ref="org.hisp.dhis.report.ReportService"/>
- <property name="systemSettingManager"
- ref="org.hisp.dhis.options.SystemSettingManager"/>
</bean>
<bean id="org.hisp.dhis.reporting.reportviewer.action.GetReportAction"
@@ -310,22 +304,6 @@
ref="org.hisp.dhis.report.ReportService"/>
</bean>
- <bean id="org.hisp.dhis.reporting.reportviewer.action.SetReportConfigurationAction"
- class="org.hisp.dhis.reporting.reportviewer.action.SetReportConfigurationAction"
- scope="prototype">
- <property name="reportManager"
- ref="org.hisp.dhis.report.ReportManager"/>
- </bean>
-
- <bean id="org.hisp.dhis.reporting.reportviewer.action.GetReportConfigurationAction"
- class="org.hisp.dhis.reporting.reportviewer.action.GetReportConfigurationAction"
- scope="prototype">
- <property name="reportManager"
- ref="org.hisp.dhis.report.ReportManager"/>
- <property name="systemSettingManager"
- ref="org.hisp.dhis.options.SystemSettingManager"/>
- </bean>
-
<bean id="org.hisp.dhis.reporting.reportviewer.action.AddReportToDashboardAction"
class="org.hisp.dhis.reporting.reportviewer.action.AddReportToDashboardAction"
scope="prototype">
=== 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-01-31 19:47:04 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml 2011-02-01 11:03:47 +0000
@@ -134,13 +134,7 @@
<result name="success" type="redirect">displayViewReportForm.action</result>
<param name="requiredAuthorities">F_REPORT_VIEW</param>
</action>
-
- <action name="displayViewReportFormVerifyConfiguration" class="org.hisp.dhis.reporting.reportviewer.action.GetReportConfigurationAction">
- <result name="success" type="redirect">displayViewReportForm.action</result>
- <result name="none" type="redirect">displayConfigureReportForm.action</result>
- <param name="requiredAuthorities">F_REPORT_VIEW</param>
- </action>
-
+
<action name="displayViewReportForm" class="org.hisp.dhis.reporting.reportviewer.action.GetAllReportsAction">
<result name="success" type="velocity">/main.vm</result>
<param name="menuTreeHeight">420</param>
@@ -150,21 +144,7 @@
<param name="requiredAuthorities">F_REPORT_VIEW</param>
<param name="stylesheets">../dhis-web-commons/paging/paging.css</param>
</action>
-
- <action name="displayConfigureReportForm" class="org.hisp.dhis.reporting.reportviewer.action.GetReportConfigurationAction">
- <result name="success" type="velocity">/main.vm</result>
- <result name="none" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-reporting/configureReportForm.vm</param>
- <param name="menu">/dhis-web-reporting/menu.vm</param>
- <param name="javascripts">javascript/reportConfiguration.js</param>
- <param name="requiredAuthorities">F_REPORT_VIEW</param>
- </action>
-
- <action name="setReportConfiguration" class="org.hisp.dhis.reporting.reportviewer.action.SetReportConfigurationAction">
- <result name="success" type="redirect">displayViewReportForm.action</result>
- <param name="requiredAuthorities">F_REPORT_VIEW</param>
- </action>
-
+
<action name="addReportToDashboard" class="org.hisp.dhis.reporting.reportviewer.action.AddReportToDashboardAction">
<result name="success" type="velocity-xml">/dhis-web-reporting/responseSuccess.vm</result>
<param name="onExceptionReturn">plainTextError</param>
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportForm.vm 2010-11-23 08:13:14 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportForm.vm 2011-02-01 11:03:47 +0000
@@ -5,7 +5,6 @@
<input type="hidden" name="id" value="$!report.id">
<input type="hidden" name="currentDesign" value="$!report.design">
-<input type="hidden" name="type" value="$!reportFramework"/>
<table>
<tr>
@@ -19,12 +18,10 @@
<td><label for="upload">$i18n.getString( "design" )</label></td>
<td><input type="file" id="upload" name="upload" size="35"></td>
</tr>
- #if( $reportFramework == "jasper" && $report && $report.designContent )
<tr>
<td></td>
<td><input type="button" value="$i18n.getString( 'get_current_design' )" onclick="window.location.href='getReportDesign.action?id=${report.id}'"></td>
</tr>
- #end
<tr>
<td colspan="2" height="7px"></td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm 2011-01-11 16:52:46 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm 2011-02-01 11:03:47 +0000
@@ -2,7 +2,7 @@
<h3>$i18n.getString( "dhis-web-reporting" )</h3>
<ul id="introList">
- #introListImgItem( "displayViewReportFormVerifyConfiguration.action" "standard_report" "standardreport" )
+ #introListImgItem( "displayViewReportForm.action" "standard_report" "standardreport" )
#introListImgItem( "showDataSetReportForm.action" "dataset_report" "datasetreport" )
#introListImgItem( "displayViewDataCompletenessForm.action" "data_completeness" "datacompletenessreport" )
#introListImgItem( "displayViewDocumentForm.action" "static_report" "staticreport" )
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/menu.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/menu.vm 2011-01-18 10:19:19 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/menu.vm 2011-02-01 11:03:47 +0000
@@ -1,16 +1,13 @@
<h2>$i18n.getString( "report" ) </h2>
<ul>
- <li><a href="displayViewReportFormVerifyConfiguration.action">$i18n.getString( "standard_report" ) </a></li>
+ <li><a href="displayViewReportForm.action">$i18n.getString( "standard_report" ) </a></li>
<li><a href="showDataSetReportForm.action">$i18n.getString( "dataset_report" ) </a></li>
<li><a href="displayViewDataCompletenessForm.action">$i18n.getString( "data_completeness_report" ) </a></li>
<li><a href="displayViewDocumentForm.action">$i18n.getString( "static_report" ) </a></li>
<li><a href="displayOrgUnitDistribution.action">$i18n.getString( "organisation_unit_report" ) </a></li>
<li><a href="tallySheetGenerator.action">$i18n.getString( "tally_sheet_generator" ) </a></li>
<li><a href="displayManageTableForm.action">$i18n.getString( "report_table" ) </a></li>
- #if( $reportFramework == "birt" )
- <li><a href="displayConfigureReportForm.action">$i18n.getString( "report_configuration" ) </a></li>
- #end
</ul>
<h2>$i18n.getString( "chart" ) </h2>