Author: tchemit Date: 2013-11-05 14:46:48 +0100 (Tue, 05 Nov 2013) New Revision: 1331 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1331 Log: refs #3624: [Rapport] Int?\195?\169gration de rapports g?\195?\169n?\195?\169r?\195?\169s par Birt (config + model) Added: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportModel.java trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportService.java Modified: trunk/pom.xml trunk/tutti-service/pom.xml trunk/tutti-service/src/license/THIRD-PARTY.properties trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfig.java trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfigOption.java trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2013-11-05 13:43:05 UTC (rev 1330) +++ trunk/pom.xml 2013-11-05 13:46:48 UTC (rev 1331) @@ -138,6 +138,7 @@ <slf4jVersion>1.7.5</slf4jVersion> <adagioVersion>3.4</adagioVersion> + <birtVersion>4.2.1a</birtVersion> <!--<adagioVersion>3.4.1-SNAPSHOT</adagioVersion>--> <bluecoveVersion>2.1.0</bluecoveVersion> @@ -167,9 +168,7 @@ <jreVersion>1.7.45</jreVersion> <!-- Last tutti db version --> - <dbVersion>2013.06.04</dbVersion> - <!-- for next release --> - <!--<dbVersion>2013.08.22</dbVersion>--> + <dbVersion>2013.08.22</dbVersion> </properties> @@ -208,6 +207,12 @@ <!-- librairies utils --> <dependency> + <groupId>org.milyn</groupId> + <artifactId>flute</artifactId> + <version>1.3</version> + </dependency> + + <dependency> <groupId>org.nuiton</groupId> <artifactId>nuiton-profiling</artifactId> <version>2.7</version> @@ -361,6 +366,24 @@ <groupId>fr.ifremer.adagio</groupId> <artifactId>adagio-core-allegro</artifactId> <version>${adagioVersion}</version> + <exclusions> + <exclusion> + <groupId>org.andromda.profiles.emf.uml2</groupId> + <artifactId>andromda-profile-common</artifactId> + </exclusion> + <exclusion> + <groupId>org.andromda.cartridges</groupId> + <artifactId>andromda-spring-cartridge</artifactId> + </exclusion> + <exclusion> + <groupId>org.andromda.cartridges</groupId> + <artifactId>andromda-hibernate-cartridge</artifactId> + </exclusion> + <exclusion> + <groupId>org.andromda.cartridges</groupId> + <artifactId>andromda-java-cartridge</artifactId> + </exclusion> + </exclusions> </dependency> <!-- Logging --> @@ -411,6 +434,28 @@ </dependency> <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>${commonsIoVersion}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.birt.runtime</groupId> + <artifactId>org.eclipse.birt.runtime</artifactId> + <version>${birtVersion}</version> + <exclusions> + <exclusion> + <groupId>milyn</groupId> + <artifactId>flute</artifactId> + </exclusion> + <exclusion> + <groupId>org.milyn</groupId> + <artifactId>flute</artifactId> + </exclusion> + </exclusions> + </dependency> + + <dependency> <groupId>hsqldb</groupId> <artifactId>hsqldb</artifactId> <version>${jdbc.hsqldb.version}</version> Modified: trunk/tutti-service/pom.xml =================================================================== --- trunk/tutti-service/pom.xml 2013-11-05 13:43:05 UTC (rev 1330) +++ trunk/tutti-service/pom.xml 2013-11-05 13:46:48 UTC (rev 1331) @@ -157,6 +157,17 @@ <artifactId>freemarker</artifactId> </dependency> + <!--dependency> + <groupId>org.eclipse.birt.runtime</groupId> + <artifactId>org.eclipse.birt.runtime</artifactId> + </dependency--> + <!-- fix a m-license-p bug ... --> + <!--dependency> + <groupId>org.milyn</groupId> + <artifactId>flute</artifactId> + <scope>runtime</scope> + </dependency--> + </dependencies> <build> Modified: trunk/tutti-service/src/license/THIRD-PARTY.properties =================================================================== --- trunk/tutti-service/src/license/THIRD-PARTY.properties 2013-11-05 13:43:05 UTC (rev 1330) +++ trunk/tutti-service/src/license/THIRD-PARTY.properties 2013-11-05 13:46:48 UTC (rev 1331) @@ -21,6 +21,7 @@ # - MPL 1.1 # - New BSD License # - Public Domain +# - The AndroMDA Project # - The Apache Software License, Version 2.0 # - The MIT License # - license.txt @@ -28,8 +29,9 @@ # Please fill the missing licenses for dependencies : # # -#Mon May 27 20:20:05 CEST 2013 +#Thu Oct 31 15:46:39 CET 2013 antlr--antlr--2.7.6=BSD License +commons-cli--commons-cli--1.0=The Apache Software License, Version 2.0 commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 dom4j--dom4j--1.6.1=BSD License javax.persistence--persistence-api--1.0.2=COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfig.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfig.java 2013-11-05 13:43:05 UTC (rev 1330) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfig.java 2013-11-05 13:46:48 UTC (rev 1331) @@ -100,6 +100,12 @@ return result; } + /** @return {@link TuttiServiceConfigOption#REPORT_DIRECTORY} value */ + public File getReportDirectory() { + File result = applicationConfig.getOptionAsFile(TuttiServiceConfigOption.REPORT_DIRECTORY.getKey()); + return result; + } + public File getTmpDirectory() { File result = applicationConfig.getOptionAsFile(TuttiServiceConfigOption.TMP_DIRECTORY.getKey()); return result; Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfigOption.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfigOption.java 2013-11-05 13:43:05 UTC (rev 1330) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfigOption.java 2013-11-05 13:46:48 UTC (rev 1331) @@ -63,6 +63,13 @@ File.class, true, true), + REPORT_DIRECTORY( + "tutti.report.directory", + n_("tutti.config.option.report.directory.description"), + "${tutti.data.basedir}/report", + File.class, + true, + true), CSV_SEPARATOR( "tutti.csv.separator", n_("tutti.config.option.csv.separator.description"), Added: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportModel.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportModel.java (rev 0) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportModel.java 2013-11-05 13:46:48 UTC (rev 1331) @@ -0,0 +1,72 @@ +package fr.ifremer.tutti.service.report; + +/* + * #%L + * Tutti :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import java.io.File; +import java.io.Serializable; + +/** + * Model to execute a report (using birt). + * + * @author tchemit <chemit@codelutin.com> + * @since 2.9 + */ +public class ReportModel implements Serializable { + + private static final long serialVersionUID = 1L; + + /** Report to use. */ + protected File report; + + /** Input data file. */ + protected File dataFile; + + /** Where to generate the report. */ + protected File outputFile; + + public File getReport() { + return report; + } + + public void setReport(File report) { + this.report = report; + } + + public File getDataFile() { + return dataFile; + } + + public void setDataFile(File dataFile) { + this.dataFile = dataFile; + } + + public File getOutputFile() { + return outputFile; + } + + public void setOutputFile(File outputFile) { + this.outputFile = outputFile; + } +} Property changes on: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportModel.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportService.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportService.java (rev 0) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportService.java 2013-11-05 13:46:48 UTC (rev 1331) @@ -0,0 +1,51 @@ +package fr.ifremer.tutti.service.report; + +/* + * #%L + * Tutti :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import fr.ifremer.tutti.service.AbstractTuttiService; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * To generate some reports. + * + * @author tchemit <chemit@codelutin.com> + * @since 2.9 + */ +public class ReportService extends AbstractTuttiService { + + private static final Log log = + LogFactory.getLog(ReportService.class); + + + public void generateReport(ReportModel model) { + + // TODO + if (log.isInfoEnabled()) { + log.info("Will generate report using "); + } + } + +} Property changes on: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportService.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties =================================================================== --- trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties 2013-11-05 13:43:05 UTC (rev 1330) +++ trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties 2013-11-05 13:46:48 UTC (rev 1331) @@ -9,6 +9,7 @@ tutti.config.option.export.countryId.description= tutti.config.option.inceptionYear.description= tutti.config.option.organizationName.description= +tutti.config.option.report.directory.description= tutti.config.option.samplingCategoryOrderIds.description= tutti.config.option.site.url.description= tutti.config.option.tmp.directory.description= Modified: trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties =================================================================== --- trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties 2013-11-05 13:43:05 UTC (rev 1330) +++ trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties 2013-11-05 13:46:48 UTC (rev 1331) @@ -9,6 +9,7 @@ tutti.config.option.export.countryId.description=L'id du pays à utiliser pour les exports (il s'agit de la valeur LOCATION.ID). tutti.config.option.inceptionYear.description=Année de démarrage du projet tutti.config.option.organizationName.description=Nom de l'organisation dans la licence +tutti.config.option.report.directory.description= tutti.config.option.samplingCategoryOrderIds.description=Ordre des catégories d'échantillonnage tutti.config.option.site.url.description=Url du site internet de l'application tutti.config.option.tmp.directory.description=Répertoire temporaire utilisée par l'application (est nettoyé à chaque démarrage de l'application). Modified: trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties =================================================================== --- trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties 2013-11-05 13:43:05 UTC (rev 1330) +++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties 2013-11-05 13:46:48 UTC (rev 1331) @@ -1,3 +1,26 @@ +### +# #%L +# Tutti :: UI +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2012 - 2013 Ifremer +# %% +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/gpl-3.0.html>. +# #L% +### #Generated by org.nuiton.jaxx.plugin.GenerateHelpIdsMojo #Tue Oct 08 15:36:15 CEST 2013 tutti.config.help=config.html Modified: trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties =================================================================== --- trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties 2013-11-05 13:43:05 UTC (rev 1330) +++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties 2013-11-05 13:46:48 UTC (rev 1331) @@ -1,3 +1,26 @@ +### +# #%L +# Tutti :: UI +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2012 - 2013 Ifremer +# %% +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/gpl-3.0.html>. +# #L% +### #Generated by org.nuiton.jaxx.plugin.GenerateHelpIdsMojo #Tue Oct 08 15:36:15 CEST 2013 tutti.config.help=config.html