dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #01286
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 369: Made the JdbcConfigurationProvider a FactoryBean, simplifies configuration
------------------------------------------------------------
revno: 369
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Thu 2009-06-11 10:59:33 +0200
message:
Made the JdbcConfigurationProvider a FactoryBean, simplifies configuration
removed:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/jdbc/JDBCConfigurationProvider.java
dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/statement/StatementDialectFactoryBean.java
renamed:
dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/configuration/DefaultJDBCConfigurationProvider.java => dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/configuration/JdbcConfigurationFactoryBean.java
modified:
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/maintenance/jdbc/JdbcMaintenanceStore.java
dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/DataMartInternalProcess.java
dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/startup/AggregationTableCreator.java
dhis-2/dhis-services/dhis-service-datamart-default/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/factory/DefaultBatchHandlerFactory.java
dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/statement/JDBCStatementManager.java
dhis-2/dhis-services/dhis-service-jdbc/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStatementTest.java
dhis-2/dhis-web/dhis-web-datamart/src/main/resources/org/hisp/dhis/datamart/i18n_module.properties
dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/configuration/JdbcConfigurationFactoryBean.java
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/jdbc/JDBCConfigurationProvider.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/jdbc/JDBCConfigurationProvider.java 2009-06-11 08:31:32 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/jdbc/JDBCConfigurationProvider.java 1970-01-01 00:00:00 +0000
@@ -1,46 +0,0 @@
-package org.hisp.dhis.jdbc;
-
-
-/*
- * 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.
- */
-
-/**
- * @author Lars Helge Overland
- * @version $Id: JDBCConfigurationProvider.java 5714 2008-09-17 13:05:36Z larshelg $
- */
-public interface JDBCConfigurationProvider
-{
- String ID = JDBCConfigurationProvider.class.getName();
-
- /**
- * Creates a JDBCConfiguration, which holds properties for dialect, driverClass,
- * connectionURL, username, and password.
- *
- * @return a JDBCConfiguration.
- */
- JDBCConfiguration getConfiguration();
-}
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/maintenance/jdbc/JdbcMaintenanceStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/maintenance/jdbc/JdbcMaintenanceStore.java 2009-06-10 22:25:07 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/maintenance/jdbc/JdbcMaintenanceStore.java 2009-06-11 08:59:33 +0000
@@ -27,7 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.jdbc.StatementDialect;
+import org.hisp.dhis.jdbc.JDBCConfiguration;
import org.hisp.dhis.jdbc.factory.StatementBuilderFactory;
import org.hisp.dhis.maintenance.MaintenanceStore;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -50,11 +50,11 @@
this.jdbcTemplate = jdbcTemplate;
}
- private StatementDialect statementDialect;
+ private JDBCConfiguration jdbcConfiguration;
- public void setStatementDialect( StatementDialect statementDialect )
+ public void setJdbcConfiguration( JDBCConfiguration jdbcConfiguration )
{
- this.statementDialect = statementDialect;
+ this.jdbcConfiguration = jdbcConfiguration;
}
// -------------------------------------------------------------------------
@@ -63,7 +63,7 @@
public int deleteZeroDataValues()
{
- final String sql = StatementBuilderFactory.createStatementBuilder( statementDialect ).getDeleteZeroDataValues();
+ final String sql = StatementBuilderFactory.createStatementBuilder( jdbcConfiguration.getDialect() ).getDeleteZeroDataValues();
return jdbcTemplate.update( sql );
}
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml 2009-06-10 22:25:07 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml 2009-06-11 08:59:33 +0000
@@ -47,7 +47,7 @@
<bean id="org.hisp.dhis.maintenance.MaintenanceStore"
class="org.hisp.dhis.maintenance.jdbc.JdbcMaintenanceStore">
<property name="jdbcTemplate" ref="jdbcTemplate"/>
- <property name="statementDialect" ref="statementDialect"/>
+ <property name="jdbcConfiguration" ref="jdbcConfiguration"/>
</bean>
<bean id="org.hisp.dhis.maintenance.MaintenanceService"
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/DataMartInternalProcess.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/DataMartInternalProcess.java 2009-06-10 22:25:07 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/DataMartInternalProcess.java 2009-06-11 08:59:33 +0000
@@ -119,6 +119,10 @@
protected void executeStatements()
throws Exception
{
- dataMartService.export( dataElementIds, indicatorIds, periodIds, organisationUnitIds );
+ setMessage( "export_process_started" );
+
+ dataMartService.export( dataElementIds, indicatorIds, periodIds, organisationUnitIds );
+
+ setMessage( "export_process_finished" );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/startup/AggregationTableCreator.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/startup/AggregationTableCreator.java 2009-06-10 22:25:07 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/startup/AggregationTableCreator.java 2009-06-11 08:59:33 +0000
@@ -29,8 +29,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.hisp.dhis.jdbc.JDBCConfiguration;
import org.hisp.dhis.jdbc.StatementBuilder;
-import org.hisp.dhis.jdbc.StatementDialect;
import org.hisp.dhis.jdbc.factory.StatementBuilderFactory;
import org.hisp.dhis.system.startup.AbstractStartupRoutine;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -55,11 +55,11 @@
this.jdbcTemplate = jdbcTemplate;
}
- private StatementDialect statementDialect;
+ private JDBCConfiguration jdbcConfiguration;
- public void setStatementDialect( StatementDialect statementDialect )
+ public void setJdbcConfiguration( JDBCConfiguration jdbcConfiguration )
{
- this.statementDialect = statementDialect;
+ this.jdbcConfiguration = jdbcConfiguration;
}
// -------------------------------------------------------------------------
@@ -68,7 +68,7 @@
public void execute()
{
- StatementBuilder builder = StatementBuilderFactory.createStatementBuilder( statementDialect );
+ StatementBuilder builder = StatementBuilderFactory.createStatementBuilder( jdbcConfiguration.getDialect() );
try
{
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/resources/META-INF/dhis/beans.xml 2009-06-10 22:25:07 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/resources/META-INF/dhis/beans.xml 2009-06-11 08:59:33 +0000
@@ -237,7 +237,7 @@
class="org.hisp.dhis.datamart.startup.AggregationTableCreator">
<property name="runlevel" value="3"/>
<property name="jdbcTemplate" ref="jdbcTemplate"/>
- <property name="statementDialect" ref="statementDialect"/>
+ <property name="jdbcConfiguration" ref="jdbcConfiguration"/>
</bean>
<bean id="org.hisp.dhis.datamart.startup.DataElementCategoryOptionComboStartupRoutine"
=== renamed file 'dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/configuration/DefaultJDBCConfigurationProvider.java' => 'dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/configuration/JdbcConfigurationFactoryBean.java'
--- dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/configuration/DefaultJDBCConfigurationProvider.java 2009-06-11 08:31:32 +0000
+++ dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/configuration/JdbcConfigurationFactoryBean.java 2009-06-11 08:59:33 +0000
@@ -30,15 +30,15 @@
import org.hibernate.cfg.Configuration;
import org.hisp.dhis.hibernate.HibernateConfigurationProvider;
import org.hisp.dhis.jdbc.JDBCConfiguration;
-import org.hisp.dhis.jdbc.JDBCConfigurationProvider;
import org.hisp.dhis.jdbc.StatementDialect;
+import org.springframework.beans.factory.FactoryBean;
/**
* @author Lars Helge Overland
* @version $Id: DefaultJDBCConfigurationProvider.java 5714 2008-09-17 13:05:36Z larshelg $
*/
-public class DefaultJDBCConfigurationProvider
- implements JDBCConfigurationProvider
+public class JdbcConfigurationFactoryBean
+implements FactoryBean
{
private static final String KEY_DIALECT = "hibernate.dialect";
private static final String KEY_DRIVER = "hibernate.connection.driver_class";
@@ -64,11 +64,13 @@
this.configurationProvider = configurationProvider;
}
- // -------------------------------------------------------------------------
- // JDBCConfigurationProvider implementation
- // -------------------------------------------------------------------------
+ private JDBCConfiguration jdbcConfiguration;
- public JDBCConfiguration getConfiguration()
+ // -------------------------------------------------------------------------
+ // Initialisation
+ // -------------------------------------------------------------------------
+
+ public void init()
{
Configuration hibernateConfiguration = configurationProvider.getConfiguration();
@@ -102,6 +104,26 @@
config.setUsername( hibernateConfiguration.getProperty( KEY_USERNAME ) );
config.setPassword( hibernateConfiguration.getProperty( KEY_PASSWORD ) );
- return config;
+ this.jdbcConfiguration = config;
+ }
+
+ // -------------------------------------------------------------------------
+ // FactoryBean implementation
+ // -------------------------------------------------------------------------
+
+ public Object getObject()
+ throws Exception
+ {
+ return jdbcConfiguration;
+ }
+
+ public Class<?> getObjectType()
+ {
+ return JDBCConfiguration.class;
+ }
+
+ public boolean isSingleton()
+ {
+ return true;
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/factory/DefaultBatchHandlerFactory.java'
--- dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/factory/DefaultBatchHandlerFactory.java 2009-06-11 08:31:32 +0000
+++ dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/factory/DefaultBatchHandlerFactory.java 2009-06-11 08:59:33 +0000
@@ -32,7 +32,6 @@
import org.hisp.dhis.jdbc.BatchHandler;
import org.hisp.dhis.jdbc.BatchHandlerFactory;
import org.hisp.dhis.jdbc.JDBCConfiguration;
-import org.hisp.dhis.jdbc.JDBCConfigurationProvider;
/**
* @author Lars Helge Overland
@@ -44,12 +43,12 @@
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
-
- private JDBCConfigurationProvider configurationProvider;
-
- public void setConfigurationProvider( JDBCConfigurationProvider configurationProvider )
+
+ private JDBCConfiguration jdbcConfiguration;
+
+ public void setJdbcConfiguration( JDBCConfiguration jdbcConfiguration )
{
- this.configurationProvider = configurationProvider;
+ this.jdbcConfiguration = jdbcConfiguration;
}
// -------------------------------------------------------------------------
@@ -60,9 +59,7 @@
{
try
{
- JDBCConfiguration configuration = configurationProvider.getConfiguration();
-
- return createBatchHandler( clazz, configuration );
+ return createBatchHandler( clazz, jdbcConfiguration );
}
catch ( Exception ex )
{
=== modified file 'dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/statement/JDBCStatementManager.java'
--- dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/statement/JDBCStatementManager.java 2009-06-11 08:31:32 +0000
+++ dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/statement/JDBCStatementManager.java 2009-06-11 08:59:33 +0000
@@ -31,7 +31,6 @@
import java.sql.DriverManager;
import org.hisp.dhis.jdbc.JDBCConfiguration;
-import org.hisp.dhis.jdbc.JDBCConfigurationProvider;
import org.hisp.dhis.jdbc.StatementBuilder;
import org.hisp.dhis.jdbc.StatementHolder;
import org.hisp.dhis.jdbc.StatementManager;
@@ -50,11 +49,11 @@
// Dependencies
// -------------------------------------------------------------------------
- private JDBCConfigurationProvider configurationProvider;
+ private JDBCConfiguration jdbcConfiguration;
- public void setConfigurationProvider( JDBCConfigurationProvider configurationProvider )
+ public void setJdbcConfiguration( JDBCConfiguration jdbcConfiguration )
{
- this.configurationProvider = configurationProvider;
+ this.jdbcConfiguration = jdbcConfiguration;
}
// -------------------------------------------------------------------------
@@ -96,7 +95,7 @@
public StatementBuilder getStatementBuilder()
{
- return StatementBuilderFactory.createStatementBuilder( configurationProvider.getConfiguration().getDialect() );
+ return StatementBuilderFactory.createStatementBuilder( jdbcConfiguration.getDialect() );
}
// -------------------------------------------------------------------------
@@ -106,15 +105,13 @@
private Connection getConnection()
{
try
- {
- JDBCConfiguration configuration = configurationProvider.getConfiguration();
-
- Class.forName( configuration.getDriverClass() );
+ {
+ Class.forName( jdbcConfiguration.getDriverClass() );
Connection connection = DriverManager.getConnection(
- configuration.getConnectionUrl(),
- configuration.getUsername(),
- configuration.getPassword() );
+ jdbcConfiguration.getConnectionUrl(),
+ jdbcConfiguration.getUsername(),
+ jdbcConfiguration.getPassword() );
return connection;
}
=== removed file 'dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/statement/StatementDialectFactoryBean.java'
--- dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/statement/StatementDialectFactoryBean.java 2009-06-10 22:26:49 +0000
+++ dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/statement/StatementDialectFactoryBean.java 1970-01-01 00:00:00 +0000
@@ -1,71 +0,0 @@
-package org.hisp.dhis.jdbc.statement;
-
-/*
- * 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 org.hisp.dhis.jdbc.JDBCConfigurationProvider;
-import org.hisp.dhis.jdbc.StatementDialect;
-import org.springframework.beans.factory.FactoryBean;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class StatementDialectFactoryBean
- implements FactoryBean
-{
- // ----------------------------------------------------------------------
- // Dependencies
- // ----------------------------------------------------------------------
-
- private JDBCConfigurationProvider configurationProvider;
-
- public void setConfigurationProvider( JDBCConfigurationProvider configurationProvider )
- {
- this.configurationProvider = configurationProvider;
- }
-
- // ----------------------------------------------------------------------
- // FactoryBean implementation
- // ----------------------------------------------------------------------
-
- public Object getObject()
- throws Exception
- {
- return configurationProvider.getConfiguration().getDialect();
- }
-
- public Class<?> getObjectType()
- {
- return StatementDialect.class;
- }
-
- public boolean isSingleton()
- {
- return true;
- }
-}
=== modified file 'dhis-2/dhis-services/dhis-service-jdbc/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-jdbc/src/main/resources/META-INF/dhis/beans.xml 2009-06-10 22:25:07 +0000
+++ dhis-2/dhis-services/dhis-service-jdbc/src/main/resources/META-INF/dhis/beans.xml 2009-06-11 08:59:33 +0000
@@ -12,10 +12,11 @@
ref="org.hisp.dhis.jdbc.StatementManager"/>
</bean>
- <!-- JDBCConfigurationProvider -->
+ <!-- JdbcConfiguration -->
- <bean id="org.hisp.dhis.jdbc.JDBCConfigurationProvider"
- class="org.hisp.dhis.jdbc.configuration.DefaultJDBCConfigurationProvider">
+ <bean id="jdbcConfiguration"
+ class="org.hisp.dhis.jdbc.configuration.JdbcConfigurationFactoryBean"
+ init-method="init">
<property name="configurationProvider"
ref="org.hisp.dhis.hibernate.HibernateConfigurationProvider"/>
</bean>
@@ -24,23 +25,14 @@
<bean id="org.hisp.dhis.jdbc.StatementManager"
class="org.hisp.dhis.jdbc.statement.JDBCStatementManager">
- <property name="configurationProvider"
- ref="org.hisp.dhis.jdbc.JDBCConfigurationProvider"/>
+ <property name="jdbcConfiguration" ref="jdbcConfiguration"/>
</bean>
<!-- BatchHandlerFactory -->
<bean id="org.hisp.dhis.jdbc.BatchHandlerFactory"
class="org.hisp.dhis.jdbc.factory.DefaultBatchHandlerFactory">
- <property name="configurationProvider"
- ref="org.hisp.dhis.jdbc.JDBCConfigurationProvider"/>
+ <property name="jdbcConfiguration" ref="jdbcConfiguration"/>
</bean>
- <!-- StatementDialect -->
-
- <bean id="statementDialect" class="org.hisp.dhis.jdbc.statement.StatementDialectFactoryBean">
- <property name="configurationProvider"
- ref="org.hisp.dhis.jdbc.JDBCConfigurationProvider"/>
- </bean>
-
</beans>
\ No newline at end of file
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java 2009-05-18 21:42:15 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java 2009-06-11 08:59:33 +0000
@@ -40,7 +40,7 @@
import org.apache.commons.logging.LogFactory;
import org.hisp.dhis.common.MetaObject;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.jdbc.JDBCConfigurationProvider;
+import org.hisp.dhis.jdbc.JDBCConfiguration;
import org.hisp.dhis.jdbc.StatementHolder;
import org.hisp.dhis.jdbc.StatementManager;
import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -74,13 +74,13 @@
{
this.statementManager = statementManager;
}
-
- private JDBCConfigurationProvider configurationProvider;
-
- public void setConfigurationProvider( JDBCConfigurationProvider configurationProvider )
+
+ private JDBCConfiguration jdbcConfiguration;
+
+ public void setJdbcConfiguration( JDBCConfiguration jdbcConfiguration )
{
- this.configurationProvider = configurationProvider;
- }
+ this.jdbcConfiguration = jdbcConfiguration;
+ }
// -------------------------------------------------------------------------
// ReportTableManager implementation
@@ -92,8 +92,7 @@
StatementHolder holder = statementManager.getHolder();
- ReportTableStatement statement = new CreateReportTableStatement( reportTable,
- configurationProvider.getConfiguration().getDialect() );
+ ReportTableStatement statement = new CreateReportTableStatement( reportTable, jdbcConfiguration.getDialect() );
log.debug( "Creating report table with SQL statement: '" + statement.getStatement() + "'" );
=== 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 2009-06-10 22:25:07 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml 2009-06-11 08:59:33 +0000
@@ -32,8 +32,7 @@
class="org.hisp.dhis.reporttable.jdbc.JDBCReportTableManager">
<property name="statementManager"
ref="org.hisp.dhis.jdbc.StatementManager"/>
- <property name="configurationProvider"
- ref="org.hisp.dhis.jdbc.JDBCConfigurationProvider"/>
+ <property name="jdbcConfiguration" ref="jdbcConfiguration"/>
</bean>
<bean id="org.hisp.dhis.reporttable.ReportTableStore"
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStatementTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStatementTest.java 2009-06-10 22:25:07 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStatementTest.java 2009-06-11 08:59:33 +0000
@@ -40,7 +40,7 @@
import org.hisp.dhis.i18n.I18nFormat;
import org.hisp.dhis.indicator.Indicator;
import org.hisp.dhis.indicator.IndicatorType;
-import org.hisp.dhis.jdbc.JDBCConfigurationProvider;
+import org.hisp.dhis.jdbc.JDBCConfiguration;
import org.hisp.dhis.jdbc.StatementDialect;
import org.hisp.dhis.mock.MockI18nFormat;
import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -60,7 +60,7 @@
public class ReportTableStatementTest
extends DhisSpringTest
{
- private JDBCConfigurationProvider configurationProvider;
+ private JDBCConfiguration jdbcConfiguration;
private StatementDialect dialect;
@@ -88,9 +88,9 @@
public void setUpTest()
throws Exception
{
- configurationProvider = (JDBCConfigurationProvider) getBean( JDBCConfigurationProvider.ID );
+ jdbcConfiguration = (JDBCConfiguration) getBean( "jdbcConfiguration" );
- dialect = configurationProvider.getConfiguration().getDialect();
+ dialect = jdbcConfiguration.getDialect();
dataElements = new ArrayList<DataElement>();
categoryOptionCombos = new ArrayList<DataElementCategoryOptionCombo>();
=== modified file 'dhis-2/dhis-web/dhis-web-datamart/src/main/resources/org/hisp/dhis/datamart/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-datamart/src/main/resources/org/hisp/dhis/datamart/i18n_module.properties 2009-03-13 11:51:35 +0000
+++ dhis-2/dhis-web/dhis-web-datamart/src/main/resources/org/hisp/dhis/datamart/i18n_module.properties 2009-06-11 08:59:33 +0000
@@ -43,6 +43,7 @@
cancel= Cancel
export_process_started= Export process started
export_process_cancelled= Export process cancelled
+export_process_finished= Export process finished
no_export_process_running= No export process running
export_process_not_initialized= Export process not initalized
datamart_intro= Please select an item from the menu.
--
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.