This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 6e1312bae3ada819ebdb011b8a973d5b393b024d Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Mar 11 11:03:39 2015 +0100 suppression de l'ancien service de rapport + recherche du jar par defaut en mode dev --- .../java/fr/ifremer/tutti/TuttiConfiguration.java | 46 +++- tutti-service/pom.xml | 27 -- .../service/report/ReportGenerationService.java | 7 +- .../ifremer/tutti/service/report/ReportModel.java | 86 ------- .../tutti/service/report/ReportService.java | 274 --------------------- .../tutti/service/report/ReportServiceTest.java | 187 -------------- tutti-ui-swing/src/license/THIRD-PARTY.properties | 2 +- .../fr/ifremer/tutti/ui/swing/TuttiUIContext.java | 5 - 8 files changed, 51 insertions(+), 583 deletions(-) diff --git a/tutti-persistence/src/main/java/fr/ifremer/tutti/TuttiConfiguration.java b/tutti-persistence/src/main/java/fr/ifremer/tutti/TuttiConfiguration.java index 9a017bc..bccc1fc 100644 --- a/tutti-persistence/src/main/java/fr/ifremer/tutti/TuttiConfiguration.java +++ b/tutti-persistence/src/main/java/fr/ifremer/tutti/TuttiConfiguration.java @@ -709,19 +709,61 @@ public class TuttiConfiguration extends ApplicationConfiguration { //FIXME Should include version in file name String commandName = "tutti-report-generator.jar"; if (isFullLaunchMode()) { + reportJarPath = getBasedir().toPath().resolve("tutti").resolve("report-generator").resolve(commandName).toFile(); + } else { - if (log.isWarnEnabled()) { - log.warn("You must defined yourself the path to tutti-report-generator jar!"); + reportJarPath = guessReportJarPath(commandName); + + if (reportJarPath == null) { + + if (log.isWarnEnabled()) { + log.warn("You must defined yourself the path to " + commandName); + } + + } else { + + if (log.isInfoEnabled()) { + log.info("Guess reportGenerarorPath: "+reportJarPath); + } } } } + return reportJarPath; + } public void setReportJarPath(File reportJarPath) { this.reportJarPath = reportJarPath; } + + protected File guessReportJarPath(String commandName) { + + { + File file = getBasedir().toPath().resolve("tutti-report-generator").resolve(commandName).toFile(); + if (file.exists()) { + return file; + } + } + + { + File file = new File("").toPath().resolve("target").resolve("tutti-report-generator").resolve(commandName).toFile(); + if (file.exists()) { + return file; + } + } + + { + File file = new File("tutti-ui-swing").toPath().resolve("target").resolve("tutti-report-generator").resolve(commandName).toFile(); + if (file.exists()) { + return file; + } + } + + return null; + + } } diff --git a/tutti-service/pom.xml b/tutti-service/pom.xml index 7a19cc1..130c27a 100644 --- a/tutti-service/pom.xml +++ b/tutti-service/pom.xml @@ -146,33 +146,6 @@ <artifactId>freemarker</artifactId> </dependency> - <!-- Birt --> - <dependency> - <groupId>org.eclipse.birt.runtime</groupId> - <artifactId>org.eclipse.birt.runtime</artifactId> - <classifier>codelutin</classifier> - </dependency> - - <!-- Required by birt --> - <dependency> - <groupId>org.apache.xmlgraphics</groupId> - <artifactId>batik-css</artifactId> - <scope>runtime</scope> - </dependency> - - <!-- Required by birt --> - <dependency> - <groupId>xml-apis</groupId> - <artifactId>xml-apis</artifactId> - <scope>runtime</scope> - </dependency> - <!-- Required by birt --> - <dependency> - <groupId>xml-apis</groupId> - <artifactId>xml-apis-ext</artifactId> - <scope>runtime</scope> - </dependency> - <!-- Logging --> <dependency> <groupId>org.slf4j</groupId> diff --git a/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportGenerationService.java b/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportGenerationService.java index befa8ce..8d39977 100644 --- a/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportGenerationService.java +++ b/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportGenerationService.java @@ -135,6 +135,10 @@ public class ReportGenerationService extends AbstractTuttiService { TuttiConfiguration config = context.getConfig(); + File reportJarPath = config.getReportJarPath(); + + Preconditions.checkState(reportJarPath!=null, "No reportJarPath configured!"); + List<String> command = new ArrayList<>(); command.add(config.getJavaCommandPath()); @@ -150,7 +154,8 @@ public class ReportGenerationService extends AbstractTuttiService { //command.add("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000"); command.add("-jar"); - command.add(config.getReportJarPath().getAbsolutePath()); + + command.add(reportJarPath.getAbsolutePath()); // arguments diff --git a/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportModel.java b/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportModel.java deleted file mode 100644 index 65901ad..0000000 --- a/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportModel.java +++ /dev/null @@ -1,86 +0,0 @@ -package fr.ifremer.tutti.service.report; - -/* - * #%L - * Tutti :: Service - * %% - * Copyright (C) 2012 - 2014 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; - - /** - * Selected cruise id (of fishing operation). - */ - protected String cruiseId; - - /** - * Selected fishing operation to report. - */ - protected String fishingOperationId; - - /** Where to generate the report. */ - protected File outputFile; - - public File getReport() { - return report; - } - - public void setReport(File report) { - this.report = report; - } - - public String getCruiseId() { - return cruiseId; - } - - public void setCruiseId(String cruiseId) { - this.cruiseId = cruiseId; - } - - public String getFishingOperationId() { - return fishingOperationId; - } - - public void setFishingOperationId(String fishingOperationId) { - this.fishingOperationId = fishingOperationId; - } - - public File getOutputFile() { - return outputFile; - } - - public void setOutputFile(File outputFile) { - this.outputFile = outputFile; - } -} diff --git a/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportService.java b/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportService.java deleted file mode 100644 index 9676c8f..0000000 --- a/tutti-service/src/main/java/fr/ifremer/tutti/service/report/ReportService.java +++ /dev/null @@ -1,274 +0,0 @@ -package fr.ifremer.tutti.service.report; - -/* - * #%L - * Tutti :: Service - * %% - * Copyright (C) 2012 - 2014 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 com.google.common.base.Preconditions; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import fr.ifremer.tutti.persistence.ProgressionModel; -import fr.ifremer.tutti.persistence.entities.data.FishingOperation; -import fr.ifremer.tutti.service.AbstractTuttiService; -import fr.ifremer.tutti.service.PersistenceService; -import fr.ifremer.tutti.service.TuttiServiceContext; -import fr.ifremer.tutti.service.genericformat.GenericFormatExportService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.eclipse.birt.core.exception.BirtException; -import org.eclipse.birt.core.framework.Platform; -import org.eclipse.birt.report.engine.api.EngineConfig; -import org.eclipse.birt.report.engine.api.EngineConstants; -import org.eclipse.birt.report.engine.api.IRenderOption; -import org.eclipse.birt.report.engine.api.IReportEngine; -import org.eclipse.birt.report.engine.api.IReportEngineFactory; -import org.eclipse.birt.report.engine.api.IReportRunnable; -import org.eclipse.birt.report.engine.api.IRunAndRenderTask; -import org.eclipse.birt.report.engine.api.RenderOption; -import org.nuiton.jaxx.application.ApplicationTechnicalException; - -import java.io.File; -import java.io.FileFilter; -import java.io.IOException; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; - -import static org.nuiton.i18n.I18n.t; - -/** - * 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 static final FileFilter REPORT_FILTER = new FileFilter() { - @Override - public boolean accept(File pathname) { - return pathname.isFile() && - pathname.getName().endsWith(".rptdesign"); - } - }; - - public static final String REPORT_FILENAME_PATTERN = "tutti-report-%s.pdf"; - - public static final DateFormat df = new SimpleDateFormat("yyy-MM-dd_HH-mm"); - - private static final int RENDER_DPI = 300; - - protected IReportEngineFactory factory; - - protected EngineConfig engineConfig; - - protected static class ReportContext { - - /** - * Incoming reportm model. - */ - final ReportModel model; - - /** - * Selected fishing operation. - */ - final FishingOperation fishingOperation; - - /** - * Where export is exploded. - */ - final File exportDirectory; - - public ReportContext(ReportModel model, - FishingOperation fishingOperation, - File exportFileDirectory) { - this.model = model; - this.fishingOperation = fishingOperation; - this.exportDirectory = exportFileDirectory; - } - - public File getExportDirectory() { - return exportDirectory; - } - - public FishingOperation getFishingOperation() { - return fishingOperation; - } - - public File getReport() { - return model.getReport(); - } - - public File getOutputFile() { - return model.getOutputFile(); - } - } - - @Override - public void setServiceContext(TuttiServiceContext context) { - super.setServiceContext(context); - // Configure engine - - engineConfig = new EngineConfig(); - engineConfig.setBIRTHome(context.getConfig().getReportHomeDirectory().getAbsolutePath()); - engineConfig.setResourcePath(context.getConfig().getReportHomeDirectory().getAbsolutePath()); - engineConfig.setLogConfig(context.getConfig().getReportLogDirectory().getAbsolutePath(), Level.FINE); - - // Get the instance of the engine - try { - Platform.startup(engineConfig); - } catch (BirtException e) { - throw new ApplicationTechnicalException("Could not init birt", e); - } - - factory = (IReportEngineFactory) Platform.createFactoryObject( - IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY); - } - - public ReportModel createModel() { - - File defaultOutputFile = getDefaultOutputFile(); - ReportModel model = new ReportModel(); - model.setOutputFile(defaultOutputFile); - return model; - } - - public void generateReport(ReportModel model, - ProgressionModel progressionModel) { - - Preconditions.checkNotNull(model); - Preconditions.checkNotNull(model.getReport()); - Preconditions.checkState(model.getReport().exists()); - Preconditions.checkNotNull(model.getCruiseId()); - Preconditions.checkNotNull(model.getFishingOperationId()); - Preconditions.checkNotNull(model.getOutputFile()); - - // load fishing operation - progressionModel.increments(t("tutti.report.step.load.fishingOperation")); - FishingOperation operation = getService(PersistenceService.class). - getFishingOperation(model.getFishingOperationId()); - - // export fishing operation - progressionModel.increments(t("tutti.report.step.export.fishingOperation")); - File exportDirectory = getService(GenericFormatExportService.class). - exportFishingOperation(model.getCruiseId(), - model.getFishingOperationId()); - - ReportContext reportContext = new ReportContext(model, - operation, - exportDirectory); - - generateReport(reportContext, progressionModel); - } - - protected void generateReport(ReportContext reportContext, - ProgressionModel progressionModel) { - - Preconditions.checkNotNull(reportContext.getFishingOperation()); - Preconditions.checkNotNull(reportContext.getExportDirectory()); - Preconditions.checkState(reportContext.getExportDirectory().exists()); - - // explode input zip file - File dataDirectory = reportContext.getExportDirectory(); - - if (log.isInfoEnabled()) { - log.info("Will generate report using report " + - reportContext.getReport().getName()); - } - - progressionModel.increments(t("tutti.report.step.generateReport", reportContext.getReport().getName())); - - IReportEngine engine = factory.createReportEngine(engineConfig); - - try { - - // Get the report document - IReportRunnable rptDoc = - engine.openReportDesign(reportContext.getReport().getAbsolutePath()); - - // Report context - Map<String, Object> context = Maps.newHashMap(); - context.put(EngineConstants.APPCONTEXT_CHART_RESOLUTION, RENDER_DPI); - - /** - * rpt-param_dirfile : répertoire contant les fichiers - + rpt-param_codestation : code de la station (ex: G101) - + rpt-param_numerotrait : code du trait (ex: 53) - */ - - // Configure the render options - IRenderOption renderOption = new RenderOption(); - renderOption.setOutputFileName(reportContext.getOutputFile().getAbsolutePath()); - renderOption.setOutputFormat(IRenderOption.OUTPUT_FORMAT_PDF); - - // Create the render task - IRunAndRenderTask task = engine.createRunAndRenderTask(rptDoc); - task.setRenderOption(renderOption); - task.setAppContext(context); - task.setParameterValue("rpt-param_dirfile", dataDirectory.getAbsolutePath()); - task.setParameterValue("rpt-param_codestation", reportContext.getFishingOperation().getStationNumber()); - task.setParameterValue("rpt-param_numerotrait", reportContext.getFishingOperation().getFishingOperationNumber()); - - // render - task.run(); - - // close task - task.close(); - - if (log.isInfoEnabled()) { - log.info("Report generated at " + reportContext.getOutputFile()); - } - - } catch (Exception e) { - throw new ApplicationTechnicalException("Could not generate report", e); - } finally { - engine.destroy(); - } - } - - @Override - public void close() throws IOException { - Platform.shutdown(); - super.close(); - } - - public List<File> getAvailableReports() { - List<File> result = Lists.newArrayList(); - File reportDirectory = context.getConfig().getReportDirectory(); - File[] files = reportDirectory.listFiles(REPORT_FILTER); - if (files != null) { - result.addAll(Arrays.asList(files)); - } - return result; - } - - public File getDefaultOutputFile() { - String filename = String.format(REPORT_FILENAME_PATTERN, df.format(context.currentDate())); - File result = new File(context.getConfig().getReportBackupDirectory(), filename); - return result; - } -} diff --git a/tutti-service/src/test/java/fr/ifremer/tutti/service/report/ReportServiceTest.java b/tutti-service/src/test/java/fr/ifremer/tutti/service/report/ReportServiceTest.java deleted file mode 100644 index 83d5121..0000000 --- a/tutti-service/src/test/java/fr/ifremer/tutti/service/report/ReportServiceTest.java +++ /dev/null @@ -1,187 +0,0 @@ -package fr.ifremer.tutti.service.report; - -/* - * #%L - * Tutti :: Service - * %% - * Copyright (C) 2012 - 2014 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 org.nuiton.jaxx.application.ApplicationIOUtil; -import fr.ifremer.tutti.persistence.ProgressionModel; -import fr.ifremer.tutti.persistence.entities.data.FishingOperation; -import fr.ifremer.tutti.persistence.entities.data.FishingOperations; -import fr.ifremer.tutti.service.ServiceDbResource; -import fr.ifremer.tutti.service.TuttiServiceContext; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.nuiton.util.FileUtil; - -import java.io.File; -import java.util.List; - -/** - * Created on 12/5/13. - * - * @author Tony Chemit <chemit@codelutin.com> - * @since 3.0-rc-2 - */ -public class ReportServiceTest { - - @ClassRule - public static final ServiceDbResource dbResource = - ServiceDbResource.readDb("dbMedits"); - - /** Logger. */ - private static final Log log = LogFactory.getLog(ReportServiceTest.class); - - public static final String PROGRAM_ID = "CAM-MEDITS"; - - public static final String CRUISE_ID = "100001"; - - public static final String OPERATION_1_ID = "100106"; - - protected ReportService service; - - protected ServiceDbResource.DataContext dataContext; - - @Before - public void setUp() throws Exception { - - TuttiServiceContext serviceContext = dbResource.getServiceContext(); - - dbResource.setCountryInConfig("12"); - dbResource.openDataContext(); - - dataContext = dbResource.loadContext(PROGRAM_ID, CRUISE_ID, 1, OPERATION_1_ID); - - service = serviceContext.getService(ReportService.class); - } - - @Test - public void testGenerateReport() throws Exception { - - // copy report resources from class-path - File sourceDirectory = FileUtil.getFileFromPaths(new File("src"), "test", "resources", "report", "2013.12.05"); - File targetDirectory = dbResource.getConfig().getReportHomeDirectory(); - if (log.isInfoEnabled()) { - log.info("Prepare report birt home at " + targetDirectory); - } - ApplicationIOUtil.copyDirectory(sourceDirectory, targetDirectory, "Could not copy report directory"); - - // get reports - List<File> availableReports = service.getAvailableReports(); - Assert.assertNotNull(availableReports); - Assert.assertFalse(availableReports.isEmpty()); - Assert.assertEquals(1, availableReports.size()); - - // get unique report file - File reportFileName = availableReports.get(0); - - ReportModel model = createReportModel(); - model.setReport(reportFileName); - model.setCruiseId(CRUISE_ID); - model.setFishingOperationId(OPERATION_1_ID); - - // report must NOT exist - Assert.assertFalse(model.getOutputFile().exists()); - - ProgressionModel progressionModel = new ProgressionModel(); - progressionModel.setTotal(3); - - FishingOperation fishingOperation = FishingOperations.newFishingOperation(); - fishingOperation.setId(OPERATION_1_ID); - fishingOperation.setFishingOperationNumber(53); - fishingOperation.setStationNumber("G101"); - - - - // generate report - service.generateReport(model, progressionModel); - - // report must exist - Assert.assertTrue(model.getOutputFile().exists()); - } - - @Test - public void testGenerateReportFromExport() throws Exception { - - // copy report resources from class-path - File sourceDirectory = FileUtil.getFileFromPaths(new File("src"), "test", "resources", "report", "2013.12.05"); - File targetDirectory = dbResource.getConfig().getReportHomeDirectory(); - if (log.isInfoEnabled()) { - log.info("Prepare report birt home at " + targetDirectory); - } - ApplicationIOUtil.copyDirectory(sourceDirectory, targetDirectory, "Could not copy report directory"); - - // copy export resources from class-path - File exportSourceDirectory = FileUtil.getFileFromPaths(new File("src"), "test", "resources", "report", "exportCruise"); - File exportTargetDirectory = dbResource.getConfig().newTempFile("exportCruise"); - if (log.isInfoEnabled()) { - log.info("Prepare export at " + exportTargetDirectory); - } - ApplicationIOUtil.copyDirectory(exportSourceDirectory, exportTargetDirectory, "Could not copy report directory"); - - // get reports - List<File> availableReports = service.getAvailableReports(); - Assert.assertNotNull(availableReports); - Assert.assertFalse(availableReports.isEmpty()); - Assert.assertEquals(1, availableReports.size()); - - // get unique report file - File reportFileName = availableReports.get(0); - - ReportModel model = createReportModel(); - model.setReport(reportFileName); - model.setCruiseId(CRUISE_ID); - model.setFishingOperationId(OPERATION_1_ID); - - // report must NOT exist - Assert.assertFalse(model.getOutputFile().exists()); - - ProgressionModel progressionModel = new ProgressionModel(); - progressionModel.setTotal(3); - - FishingOperation fishingOperation = FishingOperations.newFishingOperation(); - fishingOperation.setId(OPERATION_1_ID); - fishingOperation.setFishingOperationNumber(53); - fishingOperation.setStationNumber("G101"); - - ReportService.ReportContext reportContext = new ReportService.ReportContext( - model, - fishingOperation, - exportTargetDirectory - ); - - // generate report - service.generateReport(reportContext, progressionModel); - - // report must exist - Assert.assertTrue(model.getOutputFile().exists()); - } - - public ReportModel createReportModel() { - ReportModel model = service.createModel(); - model.setOutputFile(new File(model.getOutputFile().getAbsolutePath()+"_"+System.nanoTime())); - return model; - } -} diff --git a/tutti-ui-swing/src/license/THIRD-PARTY.properties b/tutti-ui-swing/src/license/THIRD-PARTY.properties index d4a4d02..901091a 100644 --- a/tutti-ui-swing/src/license/THIRD-PARTY.properties +++ b/tutti-ui-swing/src/license/THIRD-PARTY.properties @@ -37,7 +37,7 @@ # Please fill the missing licenses for dependencies : # # -#Tue Mar 10 22:51:39 CET 2015 +#Wed Mar 11 10:42:46 CET 2015 commons-codec--commons-codec--1.2=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 diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java index 1ca4210..1f04ba6 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java @@ -55,7 +55,6 @@ import fr.ifremer.tutti.service.referential.ReferentialTemporarySpeciesService; import fr.ifremer.tutti.service.referential.ReferentialTemporaryVesselService; import fr.ifremer.tutti.service.referential.TuttiReferentialSynchronizeService; import fr.ifremer.tutti.service.report.ReportGenerationService; -import fr.ifremer.tutti.service.report.ReportService; import fr.ifremer.tutti.ui.swing.content.MainUI; import fr.ifremer.tutti.ui.swing.updater.DeleteHelper; import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil; @@ -756,10 +755,6 @@ public class TuttiUIContext extends AbstractBean implements Closeable, UIMessage return serviceContext.getService(ReportGenerationService.class); } - public ReportService getReportService() { - return serviceContext.getService(ReportService.class); - } - public boolean useRealPersistenceService() { return isDbExist() && isDbLoaded(); } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.