[wao] branch develop updated (ddd83d0 -> a4f9d4c)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository wao. See http://git.codelutin.com/wao.git from ddd83d0 [jgitflow-maven-plugin]Updating develop poms back to pre merge state new 88af0bb Correction d'une faute d'orthographe : professionNel (fixes #6028) new dd924ff Au démarrage de Wao, on contrôle qu'on a bien un répertoire temporaire qui existe (sinon JFreeChart lève une exception) (fixes #6001) new 622657d On définit dès le début du cycle de vie de chaque contact une valeur pour la qualité de la donnée (la contraine de non-nullité en base n'était pas respectée à l'import de contacts en tant qu'administrateur sous ObsVente) (fixes #6027) new bea67c6 On journalise les erreurs dans JFreeChartToImgTagConverter car les exceptions lancées sont perdues par Struts new a4f9d4c POM en version 4.2-RC2-SNAPSHOT conformément à la feuille de route The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit a4f9d4c68268658dbd1f05141843cd9b2fdbaeec Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Oct 28 17:56:26 2014 +0100 POM en version 4.2-RC2-SNAPSHOT conformément à la feuille de route commit bea67c664db95ab4b3fc86163bcbb5f30a27f1aa Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Oct 28 17:54:42 2014 +0100 On journalise les erreurs dans JFreeChartToImgTagConverter car les exceptions lancées sont perdues par Struts commit 622657d4c2e4daafa7e1a2b32afbee488b14242f Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Oct 28 17:42:17 2014 +0100 On définit dès le début du cycle de vie de chaque contact une valeur pour la qualité de la donnée (la contraine de non-nullité en base n'était pas respectée à l'import de contacts en tant qu'administrateur sous ObsVente) (fixes #6027) commit dd924ffe7ba55ca6e640059bb2d44a682f71ef9d Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Oct 28 17:08:30 2014 +0100 Au démarrage de Wao, on contrôle qu'on a bien un répertoire temporaire qui existe (sinon JFreeChart lève une exception) (fixes #6001) commit 88af0bbdf63d7a0c5c9944454cb7396d9c5bb5aa Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Oct 28 16:52:08 2014 +0100 Correction d'une faute d'orthographe : professionNel (fixes #6028) Summary of changes: pom.xml | 2 +- wao-persistence/pom.xml | 2 +- wao-services/pom.xml | 2 +- .../wao/services/service/ContactsService.java | 2 ++ .../service/csv/ContactImportExportModel.java | 1 + wao-web/pom.xml | 2 +- .../wao/web/DefaultWaoApplicationContext.java | 39 ++++++++++++++++++++++ .../web/converter/JFreeChartToImgTagConverter.java | 15 ++++++++- .../main/resources/i18n/wao-web_fr_FR.properties | 4 +-- 9 files changed, 62 insertions(+), 7 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository wao. See http://git.codelutin.com/wao.git commit 88af0bbdf63d7a0c5c9944454cb7396d9c5bb5aa Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Oct 28 16:52:08 2014 +0100 Correction d'une faute d'orthographe : professionNel (fixes #6028) --- wao-web/src/main/resources/i18n/wao-web_fr_FR.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties b/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties index 92b4202..e74ca09 100644 --- a/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties +++ b/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties @@ -394,8 +394,8 @@ wao.ui.form.updateWaoUserCommand.observer=Observateur wao.ui.form.updateWaoUserCommand.observerReadOnly=Observateur (lecture seule) wao.ui.form.updateWaoUserCommand.passwordMismatch=La confirmation du mot de passe ne correspond pas au mot de passe indiqué wao.ui.form.updateWaoUserCommand.passwordStrategy=Changement du mot de passe -wao.ui.form.updateWaoUserCommand.professional=Professionel -wao.ui.form.updateWaoUserCommand.professionalReadOnly=Professionel (lecture seule) +wao.ui.form.updateWaoUserCommand.professional=Professionnel +wao.ui.form.updateWaoUserCommand.professionalReadOnly=Professionnel (lecture seule) wao.ui.form.updateWaoUserCommand.requiredCompany=Il faut associer l'utilisateur à une société wao.ui.form.updateWaoUserCommand.success=Les modifications concernant l'utilisateur %s ont bien été enregistrées wao.ui.form.updateWaoUserCommand.title.creation=Création d'un utilisateur -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository wao. See http://git.codelutin.com/wao.git commit dd924ffe7ba55ca6e640059bb2d44a682f71ef9d Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Oct 28 17:08:30 2014 +0100 Au démarrage de Wao, on contrôle qu'on a bien un répertoire temporaire qui existe (sinon JFreeChart lève une exception) (fixes #6001) --- .../wao/web/DefaultWaoApplicationContext.java | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/wao-web/src/main/java/fr/ifremer/wao/web/DefaultWaoApplicationContext.java b/wao-web/src/main/java/fr/ifremer/wao/web/DefaultWaoApplicationContext.java index db09e28..3976508 100644 --- a/wao-web/src/main/java/fr/ifremer/wao/web/DefaultWaoApplicationContext.java +++ b/wao-web/src/main/java/fr/ifremer/wao/web/DefaultWaoApplicationContext.java @@ -21,10 +21,12 @@ package fr.ifremer.wao.web; * #L% */ +import com.google.common.base.StandardSystemProperty; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.opensymphony.xwork2.util.LocalizedTextUtil; import fr.ifremer.wao.WaoApplicationConfig; +import fr.ifremer.wao.WaoTechnicalException; import fr.ifremer.wao.WaoTopiaApplicationContext; import fr.ifremer.wao.WaoTopiaPersistenceContext; import fr.ifremer.wao.services.DefaultWaoServiceContext; @@ -42,6 +44,7 @@ import fr.ifremer.wao.services.service.SamplingPlan; import fr.ifremer.wao.services.service.SamplingPlanCacheKey; import fr.ifremer.wao.services.service.Synthesis; import fr.ifremer.wao.services.service.SynthesisCacheKey; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.log4j.LogManager; @@ -268,6 +271,8 @@ public class DefaultWaoApplicationContext implements WaoApplicationContext { LocalizedTextUtil.addDefaultResourceBundle("i18n.wao-web"); + checkTempDir(); + WaoTopiaPersistenceContext persistenceContext = newPersistenceContext(); WaoServiceContext serviceContext = newServiceContext(persistenceContext, Locale.FRANCE); @@ -281,4 +286,38 @@ public class DefaultWaoApplicationContext implements WaoApplicationContext { } + protected void checkTempDir() { + + String javaIoTempDirValue = StandardSystemProperty.JAVA_IO_TMPDIR.value(); + if (StringUtils.isBlank(javaIoTempDirValue)) { + throw new WaoTechnicalException(StandardSystemProperty.JAVA_IO_TMPDIR.key() + " is blank"); + } + + File javaIoTempDirFile = new File(javaIoTempDirValue); + + if (javaIoTempDirFile.exists()) { + if (log.isInfoEnabled()) { + log.info("storage directory exists " + javaIoTempDirFile.getAbsolutePath()); + } + } else { + if (log.isInfoEnabled()) { + log.info("storage directory does not exist, creating " + javaIoTempDirFile.getAbsolutePath()); + } + + boolean created = javaIoTempDirFile.mkdirs(); + if ( ! created) { + throw new WaoTechnicalException("unable to create directory " + javaIoTempDirFile.getAbsolutePath()); + } + } + + if ( ! javaIoTempDirFile.isDirectory()) { + throw new WaoTechnicalException("file exists but is not a directory " + javaIoTempDirFile.getAbsolutePath()); + } + + if ( ! javaIoTempDirFile.canWrite()) { + throw new WaoTechnicalException("directory exists but is not writable " + javaIoTempDirFile.getAbsolutePath()); + } + + } + } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository wao. See http://git.codelutin.com/wao.git commit 622657d4c2e4daafa7e1a2b32afbee488b14242f Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Oct 28 17:42:17 2014 +0100 On définit dès le début du cycle de vie de chaque contact une valeur pour la qualité de la donnée (la contraine de non-nullité en base n'était pas respectée à l'import de contacts en tant qu'administrateur sous ObsVente) (fixes #6027) --- .../src/main/java/fr/ifremer/wao/services/service/ContactsService.java | 2 ++ .../fr/ifremer/wao/services/service/csv/ContactImportExportModel.java | 1 + 2 files changed, 3 insertions(+) diff --git a/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java b/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java index a3f1387..56097cd 100644 --- a/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java +++ b/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java @@ -256,6 +256,8 @@ public class ContactsService extends WaoServiceSupport { contact.setCreationDate(getNow()); + contact.setDataReliability(DataReliability.UNKNOWN); + UpdateContactCommand updateContactCommand = new UpdateContactCommand(); updateContactCommand.setAdmin(authenticatedWaoUser.isAdmin()); diff --git a/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactImportExportModel.java b/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactImportExportModel.java index 5b45cb8..afe38e9 100644 --- a/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactImportExportModel.java +++ b/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactImportExportModel.java @@ -135,6 +135,7 @@ public class ContactImportExportModel implements ImportExportModel<Contact> { @Override public Contact newEmptyInstance() { Contact newContact = new ContactImpl(); + newContact.setDataReliability(DataReliability.UNKNOWN); return newContact; } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository wao. See http://git.codelutin.com/wao.git commit bea67c664db95ab4b3fc86163bcbb5f30a27f1aa Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Oct 28 17:54:42 2014 +0100 On journalise les erreurs dans JFreeChartToImgTagConverter car les exceptions lancées sont perdues par Struts --- .../wao/web/converter/JFreeChartToImgTagConverter.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/wao-web/src/main/java/fr/ifremer/wao/web/converter/JFreeChartToImgTagConverter.java b/wao-web/src/main/java/fr/ifremer/wao/web/converter/JFreeChartToImgTagConverter.java index 5ec6152..9fe7f81 100644 --- a/wao-web/src/main/java/fr/ifremer/wao/web/converter/JFreeChartToImgTagConverter.java +++ b/wao-web/src/main/java/fr/ifremer/wao/web/converter/JFreeChartToImgTagConverter.java @@ -23,6 +23,8 @@ package fr.ifremer.wao.web.converter; import com.google.common.io.BaseEncoding; import fr.ifremer.wao.WaoTechnicalException; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.struts2.util.StrutsTypeConverter; import org.jfree.chart.ChartUtilities; import org.jfree.chart.JFreeChart; @@ -33,6 +35,8 @@ import java.util.Map; public class JFreeChartToImgTagConverter extends StrutsTypeConverter { + private static final Log log = LogFactory.getLog(JFreeChartToImgTagConverter.class); + @Override public Object convertFromString(Map context, String[] values, Class toClass) { throw new UnsupportedOperationException(); @@ -41,6 +45,8 @@ public class JFreeChartToImgTagConverter extends StrutsTypeConverter { @Override public String convertToString(Map context, Object o) { + // XXX brendan 28/10/14 inutile de lancer une exception... C'est perdu par struts + if (o instanceof JFreeChart) { JFreeChart chart = (JFreeChart) o; @@ -50,6 +56,9 @@ public class JFreeChartToImgTagConverter extends StrutsTypeConverter { try { ChartUtilities.writeChartAsPNG(output, chart, 1000, 600); } catch (IOException e) { + if (log.isErrorEnabled()) { + log.error("unable to write chart to PNG", e); + } throw new WaoTechnicalException("unable to write chart to PNG", e); } @@ -62,8 +71,12 @@ public class JFreeChartToImgTagConverter extends StrutsTypeConverter { return html; } else { - throw new WaoTechnicalException("unable to convert " + o); + if (log.isErrorEnabled()) { + log.error("unable to convert " + o); + } + throw new UnsupportedOperationException("unable to convert " + o); } + } } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository wao. See http://git.codelutin.com/wao.git commit a4f9d4c68268658dbd1f05141843cd9b2fdbaeec Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Oct 28 17:56:26 2014 +0100 POM en version 4.2-RC2-SNAPSHOT conformément à la feuille de route --- pom.xml | 2 +- wao-persistence/pom.xml | 2 +- wao-services/pom.xml | 2 +- wao-web/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index a6b506d..e921973 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ <groupId>fr.ifremer</groupId> <artifactId>wao</artifactId> - <version>4.2-SNAPSHOT</version> + <version>4.2-RC2-SNAPSHOT</version> <packaging>pom</packaging> <name>Wao</name> diff --git a/wao-persistence/pom.xml b/wao-persistence/pom.xml index 898f5b0..80f3419 100644 --- a/wao-persistence/pom.xml +++ b/wao-persistence/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>fr.ifremer</groupId> <artifactId>wao</artifactId> - <version>4.2-SNAPSHOT</version> + <version>4.2-RC2-SNAPSHOT</version> </parent> <artifactId>wao-persistence</artifactId> diff --git a/wao-services/pom.xml b/wao-services/pom.xml index 342d943..fc0e0a9 100644 --- a/wao-services/pom.xml +++ b/wao-services/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>fr.ifremer</groupId> <artifactId>wao</artifactId> - <version>4.2-SNAPSHOT</version> + <version>4.2-RC2-SNAPSHOT</version> </parent> <artifactId>wao-services</artifactId> diff --git a/wao-web/pom.xml b/wao-web/pom.xml index 98b2632..50c2794 100644 --- a/wao-web/pom.xml +++ b/wao-web/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>fr.ifremer</groupId> <artifactId>wao</artifactId> - <version>4.2-SNAPSHOT</version> + <version>4.2-RC2-SNAPSHOT</version> </parent> <artifactId>wao-web</artifactId> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm