branch develop updated (68bcb13 -> af70d9e)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository observe. See http://git.codelutin.com/observe.git from 68bcb13 [jgitflow-maven-plugin]Updating develop poms back to pre merge state new 783b02a refs #6963 Ajout d'un binder sur les SpeciesList new 8236694 fixes #6963: Problème technique lors de la synchro de référentiel central -> local, lorsqu'une entité a été ajoutée à une display list d'espèces Merge branch 'feature/6963' into develop new af70d9e refs #6970 Ajout d'un message utilisateur si une liste d'espèce n'a pas pu être chargée The 3 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 af70d9e750b9474fb3d213bc9dc2e07b54616868 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 15 18:11:19 2015 +0200 refs #6970 Ajout d'un message utilisateur si une liste d'espèce n'a pas pu être chargée commit 8236694c13754c9b7a2ddca47adc10e3bd61a4e7 Merge: 68bcb13 783b02a Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 15 16:45:27 2015 +0200 fixes #6963: Problème technique lors de la synchro de référentiel central -> local, lorsqu'une entité a été ajoutée à une display list d'espèces Merge branch 'feature/6963' into develop commit 783b02a33d66a80e0b8082d7e01c30cea8fa8d0f Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 15 16:45:23 2015 +0200 refs #6963 Ajout d'un binder sur les SpeciesList Summary of changes: .../fr/ird/observe/ObserveApplicationContext.java | 9 +++++++++ .../ui/content/table/ContentTableUIHandler.java | 23 ++++++++++++++++++++-- .../impl/longline/CatchLonglineUIHandler.java | 4 ++-- .../table/impl/longline/EncounterUIHandler.java | 2 +- .../content/table/impl/longline/TdrUIHandler.java | 2 +- .../impl/seine/ObjectObservedSpeciesUIHandler.java | 2 +- .../impl/seine/ObjectSchoolEstimateUIHandler.java | 4 ++-- .../table/impl/seine/TargetCatchUIHandler.java | 3 ++- .../impl/seine/TargetDiscardCatchUIHandler.java | 2 +- .../resources/i18n/observe-swing_en_GB.properties | 7 +++++++ .../resources/i18n/observe-swing_es_ES.properties | 7 +++++++ .../resources/i18n/observe-swing_fr_FR.properties | 7 +++++++ 12 files changed, 61 insertions(+), 11 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See http://git.codelutin.com/observe.git commit 783b02a33d66a80e0b8082d7e01c30cea8fa8d0f Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 15 16:45:23 2015 +0200 refs #6963 Ajout d'un binder sur les SpeciesList --- .../src/main/java/fr/ird/observe/ObserveApplicationContext.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/observe-business/src/main/java/fr/ird/observe/ObserveApplicationContext.java b/observe-business/src/main/java/fr/ird/observe/ObserveApplicationContext.java index 7f127a6..dccc397 100644 --- a/observe-business/src/main/java/fr/ird/observe/ObserveApplicationContext.java +++ b/observe-business/src/main/java/fr/ird/observe/ObserveApplicationContext.java @@ -25,6 +25,7 @@ import fr.ird.observe.db.DataContext; import fr.ird.observe.db.DataSource; import fr.ird.observe.db.DataSourceFactory; import fr.ird.observe.entities.constants.ReferenceLocale; +import fr.ird.observe.entities.referentiel.SpeciesList; import fr.ird.observe.gps.GPSService; import fr.ird.observe.validation.ObserveValidator; import fr.ird.observe.validation.ValidationContext; @@ -34,6 +35,7 @@ import jaxx.runtime.context.JAXXContextEntryDef; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.decorator.Decorator; +import org.nuiton.util.beans.BinderModelBuilder; import java.util.Locale; @@ -150,6 +152,13 @@ public class ObserveApplicationContext extends DefaultApplicationContext { BINDER_SERVICE_ENTRY_DEF.getContextValue(this); if (service == null) { service = new BinderService(); + + // Need to add by hand a speciesList binder + // see https://forge.codelutin.com/issues/6963 + BinderModelBuilder<SpeciesList, SpeciesList> builderModel= + BinderModelBuilder.newEmptyBuilder(SpeciesList.class); + service.registerTopiaBinder(SpeciesList.class, builderModel, "Observe"); + BINDER_SERVICE_ENTRY_DEF.setContextValue(this, service); } return service; -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See http://git.codelutin.com/observe.git commit 8236694c13754c9b7a2ddca47adc10e3bd61a4e7 Merge: 68bcb13 783b02a Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 15 16:45:27 2015 +0200 fixes #6963: Problème technique lors de la synchro de référentiel central -> local, lorsqu'une entité a été ajoutée à une display list d'espèces Merge branch 'feature/6963' into develop .../src/main/java/fr/ird/observe/ObserveApplicationContext.java | 9 +++++++++ 1 file changed, 9 insertions(+) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See http://git.codelutin.com/observe.git commit af70d9e750b9474fb3d213bc9dc2e07b54616868 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 15 18:11:19 2015 +0200 refs #6970 Ajout d'un message utilisateur si une liste d'espèce n'a pas pu être chargée --- .../ui/content/table/ContentTableUIHandler.java | 23 ++++++++++++++++++++-- .../impl/longline/CatchLonglineUIHandler.java | 4 ++-- .../table/impl/longline/EncounterUIHandler.java | 2 +- .../content/table/impl/longline/TdrUIHandler.java | 2 +- .../impl/seine/ObjectObservedSpeciesUIHandler.java | 2 +- .../impl/seine/ObjectSchoolEstimateUIHandler.java | 4 ++-- .../table/impl/seine/TargetCatchUIHandler.java | 3 ++- .../impl/seine/TargetDiscardCatchUIHandler.java | 2 +- .../resources/i18n/observe-swing_en_GB.properties | 7 +++++++ .../resources/i18n/observe-swing_es_ES.properties | 7 +++++++ .../resources/i18n/observe-swing_fr_FR.properties | 7 +++++++ 11 files changed, 52 insertions(+), 11 deletions(-) diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/ContentTableUIHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/ContentTableUIHandler.java index 45375f8..1c6c060 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/ContentTableUIHandler.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/ContentTableUIHandler.java @@ -29,6 +29,7 @@ import fr.ird.observe.db.DataSource; import fr.ird.observe.db.DataSourceException; import fr.ird.observe.db.constants.DataContextType; import fr.ird.observe.entities.referentiel.Species2; +import fr.ird.observe.ui.UIHelper; import fr.ird.observe.ui.content.ContentMode; import fr.ird.observe.ui.content.ContentUIHandler; import fr.ird.observe.ui.content.ObserveContentUI; @@ -54,6 +55,7 @@ import javax.swing.table.DefaultTableCellRenderer; import java.awt.Rectangle; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; @@ -260,8 +262,25 @@ public abstract class ContentTableUIHandler<E extends TopiaEntity, D extends Top } - protected void prepareSpeciesList(String speciesListId, JComponent speciesComponent) throws DataSourceException { - Set<String> speciesIds = getDataService().getSpeciesListSpeciesIds(getDataSource(), speciesListId); + public Set<String> loadSpeciesList(String speciesListId, String errorMessage) { + + Set<String> speciesIds; + try { + speciesIds = getDataService().getSpeciesListSpeciesIds(getDataSource(), speciesListId); + } catch (Exception e) { + + UIHelper.displayWarning(t("observe.title.speciesList.not.found"), t(errorMessage)); + speciesIds = Collections.emptySet(); + + } + return speciesIds; + + } + + + protected void prepareSpeciesList(String speciesListId, JComponent speciesComponent, String errorMessage) throws DataSourceException { + Set<String> speciesIds = loadSpeciesList(speciesListId, errorMessage); + speciesComponent.putClientProperty( ObserveContentUI.CLIENT_PROPERTY_LIST_PREDICATE, Species2.newSpeciesByIdPredicate(speciesIds)); diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/CatchLonglineUIHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/CatchLonglineUIHandler.java index a28ae64..ae4a399 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/CatchLonglineUIHandler.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/CatchLonglineUIHandler.java @@ -461,12 +461,12 @@ public class CatchLonglineUIHandler extends ContentTableUIHandler<SetLongline, C { String speciesListId = config.getSpeciesListLonglineCatchId(); - prepareSpeciesList(speciesListId, getUi().getSpeciesCatch()); + prepareSpeciesList(speciesListId, getUi().getSpeciesCatch(), n("observe.error.speciesList.longline.catch.notFound")); } { String speciesListId = config.getSpeciesListLonglineDepredatorId(); - prepareSpeciesList(speciesListId, getUi().getPredator()); + prepareSpeciesList(speciesListId, getUi().getPredator(), n("observe.error.speciesList.longline.depredator.notFound")); } diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/EncounterUIHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/EncounterUIHandler.java index 1a17a5b..2392b1a 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/EncounterUIHandler.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/EncounterUIHandler.java @@ -102,7 +102,7 @@ public class EncounterUIHandler extends ContentTableUIHandler<ActivityLongline, // add a listPredicate to get only species from the correct configured speciesList ObserveConfig config = getUi().getContextValue(ObserveConfig.class); String speciesListId = config.getSpeciesListLonglineEncounterId(); - prepareSpeciesList(speciesListId, getUi().getSpecies()); + prepareSpeciesList(speciesListId, getUi().getSpecies() , n("observe.error.speciesList.longline.encounter.notFound")); super.initUI(); diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/TdrUIHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/TdrUIHandler.java index d3d5c52..f01592f 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/TdrUIHandler.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/TdrUIHandler.java @@ -209,7 +209,7 @@ public class TdrUIHandler extends ContentTableUIHandler<SetLongline, Tdr> { // add a listPredicate to get only species from the correct configured speciesList ObserveConfig config = getUi().getContextValue(ObserveConfig.class); String speciesListId = config.getSpeciesListLonglineCatchId(); - prepareSpeciesList(speciesListId, getUi().getSpecies()); + prepareSpeciesList(speciesListId, getUi().getSpecies(), n("observe.error.speciesList.longline.catch.notFound")); super.initUI(); diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/ObjectObservedSpeciesUIHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/ObjectObservedSpeciesUIHandler.java index fc2f5c7..9bbbd05 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/ObjectObservedSpeciesUIHandler.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/ObjectObservedSpeciesUIHandler.java @@ -97,7 +97,7 @@ public class ObjectObservedSpeciesUIHandler extends ContentTableUIHandler<Floati // add a listPredicate to get only species from the correct configured speciesList ObserveConfig config = getUi().getContextValue(ObserveConfig.class); String speciesListId = config.getSpeciesListSeineObjectObservedSpeciesId(); - prepareSpeciesList(speciesListId, getUi().getSpecies()); + prepareSpeciesList(speciesListId, getUi().getSpecies(),n("observe.error.speciesList.seine.objectObservedSpecies.notFound")); super.initUI(); diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/ObjectSchoolEstimateUIHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/ObjectSchoolEstimateUIHandler.java index 14fe2c4..4823b5e 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/ObjectSchoolEstimateUIHandler.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/ObjectSchoolEstimateUIHandler.java @@ -92,8 +92,8 @@ public class ObjectSchoolEstimateUIHandler extends ContentTableUIHandler<Floatin // add a listPredicate to get only species from the correct configured speciesList ObserveConfig config = getUi().getContextValue(ObserveConfig.class); - String speciesListId = config.getSpeciesListSeineObjectObservedSpeciesId(); - prepareSpeciesList(speciesListId, getUi().getSpecies()); + String speciesListId = config.getSpeciesListSeineObjectSchoolEstimateId(); + prepareSpeciesList(speciesListId, getUi().getSpecies(), n("observe.error.speciesList.seine.objectSchoolEstimate.notFound")); super.initUI(); diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/TargetCatchUIHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/TargetCatchUIHandler.java index f1f8cb8..2068cda 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/TargetCatchUIHandler.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/TargetCatchUIHandler.java @@ -165,7 +165,8 @@ public class TargetCatchUIHandler extends ContentTableUIHandler<SetSeine, Target // Keep only weight categories for the species ObserveConfig config = getUi().getContextValue(ObserveConfig.class); String speciesListId = config.getSpeciesListSeineTargetCatchId(); - java.util.Set<String> speciesIds = getDataService().getSpeciesListSpeciesIds(getDataSource(), speciesListId); + + java.util.Set<String> speciesIds = loadSpeciesList(speciesListId, n("observe.error.speciesList.seine.targetCatch.notFound")); categorieList = Species2.filterWeightCategoryBySpeciesIds( categorieList, speciesIds); diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/TargetDiscardCatchUIHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/TargetDiscardCatchUIHandler.java index 55ad3a2..d9a1ae5 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/TargetDiscardCatchUIHandler.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/TargetDiscardCatchUIHandler.java @@ -221,7 +221,7 @@ public class TargetDiscardCatchUIHandler extends ContentTableUIHandler<SetSeine, // filtre sur la liste d'espèce configuree ObserveConfig config = getUi().getContextValue(ObserveConfig.class); String speciesListId = config.getSpeciesListSeineTargetCatchId(); - java.util.Set<String> speciesIds = getDataService().getSpeciesListSpeciesIds(getDataSource(), speciesListId); + java.util.Set<String> speciesIds = loadSpeciesList(speciesListId, n("observe.error.speciesList.seine.targetCatch.notFound")); categorieList = Species2.filterWeightCategoryBySpeciesIds( categorieList, speciesIds); diff --git a/observe-swing/src/main/resources/i18n/observe-swing_en_GB.properties b/observe-swing/src/main/resources/i18n/observe-swing_en_GB.properties index b8481be..dc596f2 100644 --- a/observe-swing/src/main/resources/i18n/observe-swing_en_GB.properties +++ b/observe-swing/src/main/resources/i18n/observe-swing_en_GB.properties @@ -1008,6 +1008,12 @@ observe.entity.message.updating= observe.error.can.not.create.directory= observe.error.no.activity.6= observe.error.open.first.db= +observe.error.speciesList.longline.catch.notFound= +observe.error.speciesList.longline.depredator.notFound= +observe.error.speciesList.longline.encounter.notFound= +observe.error.speciesList.seine.objectObservedSpecies.notFound= +observe.error.speciesList.seine.objectSchoolEstimate.notFound= +observe.error.speciesList.seine.targetCatch.notFound= observe.error.storage.could.not.backup.unsane.local.db= observe.error.storage.could.not.load.local.db= observe.floatingObject.message.creating=Creating a floating object @@ -1943,6 +1949,7 @@ observe.title.report.tip=Help to generate reports observe.title.save.localDB=Save local storage to a file observe.title.save.remoteDB=Save remote database to a file observe.title.show.usage=Show usages +observe.title.speciesList.not.found= observe.title.storage.info=Storage details observe.title.synchronize=Synchronize observe.title.synchronize.tip=Synchronize objectOperation on local database diff --git a/observe-swing/src/main/resources/i18n/observe-swing_es_ES.properties b/observe-swing/src/main/resources/i18n/observe-swing_es_ES.properties index 5798666..31ac796 100644 --- a/observe-swing/src/main/resources/i18n/observe-swing_es_ES.properties +++ b/observe-swing/src/main/resources/i18n/observe-swing_es_ES.properties @@ -1008,6 +1008,12 @@ observe.entity.message.updating=Se está modificando el objeto actual '%1$s'. observe.error.can.not.create.directory=¡Imposible crear el directorio %1$s\! observe.error.no.activity.6=La actividad con código 6 no se ha encontrado en la base de datos. observe.error.open.first.db=La base está siendo utilizada por otra aplicación.\nPor favor, cierre la aplicación H2 y vuelva a intentarlo. +observe.error.speciesList.longline.catch.notFound= +observe.error.speciesList.longline.depredator.notFound= +observe.error.speciesList.longline.encounter.notFound= +observe.error.speciesList.seine.objectObservedSpecies.notFound= +observe.error.speciesList.seine.objectSchoolEstimate.notFound= +observe.error.speciesList.seine.targetCatch.notFound= observe.error.storage.could.not.backup.unsane.local.db= observe.error.storage.could.not.load.local.db= observe.floatingObject.message.creating=Objeto en proceso de creación. @@ -1943,6 +1949,7 @@ observe.title.report.tip= observe.title.save.localDB= observe.title.save.remoteDB= observe.title.show.usage= +observe.title.speciesList.not.found= observe.title.storage.info= observe.title.synchronize= observe.title.synchronize.tip= diff --git a/observe-swing/src/main/resources/i18n/observe-swing_fr_FR.properties b/observe-swing/src/main/resources/i18n/observe-swing_fr_FR.properties index 92b3836..c6ff15d 100644 --- a/observe-swing/src/main/resources/i18n/observe-swing_fr_FR.properties +++ b/observe-swing/src/main/resources/i18n/observe-swing_fr_FR.properties @@ -1008,6 +1008,12 @@ observe.entity.message.updating=L'objet '%1$s' est en cours de modification. observe.error.can.not.create.directory=Création du répertoire %1$s impossible\! observe.error.no.activity.6=L'activité de type 6 n'a pas été trouvée en base. observe.error.open.first.db=La base est en cours d'utilisation par une autre application.\nVeuillez fermer l'application H2 et réessayer. +observe.error.speciesList.longline.catch.notFound=Impossible de charger la liste d'espèces.\nVérifier dans la configuration (Onglet Configuration des listes d'espèces (Palangre) > speciesList.longline.catch) que la liste d'espèces est bien renseignée. +observe.error.speciesList.longline.depredator.notFound=Impossible de charger la liste d'espèces.\nVérifier dans la configuration (Onglet Configuration des listes d'espèces (Palangre) > speciesList.longline.depredator) que la liste d'espèces est bien renseignée. +observe.error.speciesList.longline.encounter.notFound=Impossible de charger la liste d'espèces.\nVérifier dans la configuration (Onglet Configuration des listes d'espèces (Palangre) > speciesList.longline.encounter) que la liste d'espèces est bien renseignée. +observe.error.speciesList.seine.objectObservedSpecies.notFound=Impossible de charger la liste d'espèces.\nVérifier dans la configuration (Onglet Configuration des listes d'espèces (Senne) > speciesList.seine.objectObservedSpecies) que la liste d'espèces est bien renseignée. +observe.error.speciesList.seine.objectSchoolEstimate.notFound=Impossible de charger la liste d'espèces.\nVérifier dans la configuration (Onglet Configuration des listes d'espèces (Senne) > speciesList.seine.objectSchoolEstimate) que la liste d'espèces est bien renseignée. +observe.error.speciesList.seine.targetCatch.notFound=Impossible de charger la liste d'espèces.\nVérifier dans la configuration (Onglet Configuration des listes d'espèces (Senne) > speciesList.seine.targetCatch) que la liste d'espèces est bien renseignée. observe.error.storage.could.not.backup.unsane.local.db=Impossible d'enregistrer une base non endommagée observe.error.storage.could.not.load.local.db=Impossible d'ouvrir la base locale pour la raison suivante \: %s observe.floatingObject.message.creating=L'objet flottant est en cours de création. @@ -1941,6 +1947,7 @@ observe.title.report.tip=Aide à la génération du rapport de fin d'embarquemen observe.title.save.localDB=Sauver la base locale vers une fichier observe.title.save.remoteDB=Sauver la base distante vers un fichier observe.title.show.usage=Listes des utilisations d'un référentiel... +observe.title.speciesList.not.found=Liste d'espèces non trouvée observe.title.storage.info=Information sur la source de données observe.title.synchronize=Synchronisation du référentiel observe.title.synchronize.tip=Opération de synchronisation du référentiel de la base locale -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
participants (1)
-
codelutin.com scm