Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: f88006ee by Tony Chemit at 2020-06-27T08:59:47+02:00 La modification de la sélection du composant comboBox ne fonctionne pas - Closes #1550 - - - - - b96c348b by Tony Chemit at 2020-06-27T09:00:08+02:00 Update fluido skin - - - - - 9f9fd999 by Tony Chemit at 2020-06-27T09:08:51+02:00 L'export de marées central vers local plante - Closes #1549 - - - - - c74ca282 by Tony Chemit at 2020-06-27T09:24:42+02:00 Ajout d'une méthode de mesure de poids par défaut sur Estimations du banc - Closes #1510 - - - - - b60b261b by Tony Chemit at 2020-06-27T09:25:36+02:00 Renommer un onglet sur form Marée LL - Closes #1521 - - - - - dd8fe1fa by Tony Chemit at 2020-06-27T09:38:54+02:00 LL Observations / Capture / déprédation : libellé - Closes #1520 [LL][Logbook] opération de pêche / libellé - Closes #1526 - - - - - 19 changed files: - client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/ObjectSchoolEstimateUIModel.java - client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/SchoolEstimateUIModel.java - dto/pom.xml - dto/src/main/java/fr/ird/observe/dto/ProtectedIds.java - observe-i18n/src/main/i18n/translations/observe_en_GB.properties - observe-i18n/src/main/i18n/translations/observe_es_ES.properties - observe-i18n/src/main/i18n/translations/observe_fr_FR.properties - persistence/pom.xml - persistence/src/main/resources/db/migration/8.0/11_add_weight_measure_method-common.sql - pom.xml - server-core/pom.xml - services-client/pom.xml - services-local/src/main/java/fr/ird/observe/services/local/service/DataSourceServiceLocal.java - services-local/src/test/java/fr/ird/observe/services/local/service/referential/differential/DifferentialModelTest.java - src/site/site_fr.xml - test/src/main/resources/db/8.0/dataForTestLongline.sql.gz - test/src/main/resources/db/8.0/dataForTestSeine.sql.gz - test/src/main/resources/db/8.0/referentiel.sql.gz - test/src/main/resources/fixtures/count-referential-common.properties Changes: ===================================== client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/ObjectSchoolEstimateUIModel.java ===================================== @@ -22,13 +22,17 @@ package fr.ird.observe.client.datasource.editor.content.data.ps.observation; * #L% */ +import fr.ird.observe.client.datasource.api.ObserveDataSourcesManagerApplicationComponent; +import fr.ird.observe.client.datasource.api.ObserveSwingDataSource; import fr.ird.observe.client.datasource.editor.content.data.table.ContentTableMeta; import fr.ird.observe.client.datasource.editor.content.data.table.ContentTableModel; import fr.ird.observe.client.datasource.editor.content.data.table.ContentTableUI; import fr.ird.observe.client.datasource.editor.content.data.table.ContentTableUIModel; +import fr.ird.observe.dto.ProtectedIds; import fr.ird.observe.dto.data.ps.observation.FloatingObjectSchoolEstimateDto; import fr.ird.observe.dto.data.ps.observation.ObjectSchoolEstimateDto; import fr.ird.observe.dto.data.ps.observation.ObjectSchoolEstimateHelper; +import fr.ird.observe.dto.referential.common.WeightMeasureMethodReference; import java.util.Arrays; import java.util.Collection; @@ -41,7 +45,7 @@ import java.util.List; * @since XXX */ public class ObjectSchoolEstimateUIModel extends ContentTableUIModel<FloatingObjectSchoolEstimateDto, ObjectSchoolEstimateDto> { - + private final WeightMeasureMethodReference defaultWeightMeasureMethod; public ObjectSchoolEstimateUIModel(ObjectSchoolEstimateUI ui) { super(FloatingObjectSchoolEstimateDto.class, @@ -51,8 +55,12 @@ public class ObjectSchoolEstimateUIModel extends ContentTableUIModel<FloatingObj FloatingObjectSchoolEstimateDto.PROPERTY_COMMENT}, new String[]{ ObjectSchoolEstimateDto.PROPERTY_SPECIES, - ObjectSchoolEstimateDto.PROPERTY_TOTAL_WEIGHT} + ObjectSchoolEstimateDto.PROPERTY_TOTAL_WEIGHT, + ObjectSchoolEstimateDto.PROPERTY_WEIGHT_MEASURE_METHOD + } ); + ObserveSwingDataSource dataSource = ObserveDataSourcesManagerApplicationComponent.value().getMainDataSource(); + defaultWeightMeasureMethod = dataSource.getReferentialReferenceSet(WeightMeasureMethodReference.class).tryGetReferenceById(ProtectedIds.PS_OBSERVATION_SCHOOL_ESTIMATE_DEFAULT_WEIGHT_MEASURE_METHOD_ID).orElseThrow(IllegalStateException::new); List<ContentTableMeta<ObjectSchoolEstimateDto>> metas = Arrays.asList( ContentTableModel.newTableMeta(ObjectSchoolEstimateDto.class, ObjectSchoolEstimateDto.PROPERTY_SPECIES, false), @@ -86,4 +94,15 @@ public class ObjectSchoolEstimateUIModel extends ContentTableUIModel<FloatingObj } }; } + + @Override + public ObjectSchoolEstimateDto newTableEditBean() { + ObjectSchoolEstimateDto result = super.newTableEditBean(); + result.setWeightMeasureMethod(getDefaultWeightMeasureMethod()); + return result; + } + + public WeightMeasureMethodReference getDefaultWeightMeasureMethod() { + return defaultWeightMeasureMethod; + } } ===================================== client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/SchoolEstimateUIModel.java ===================================== @@ -22,13 +22,17 @@ package fr.ird.observe.client.datasource.editor.content.data.ps.observation; * #L% */ +import fr.ird.observe.client.datasource.api.ObserveDataSourcesManagerApplicationComponent; +import fr.ird.observe.client.datasource.api.ObserveSwingDataSource; import fr.ird.observe.client.datasource.editor.content.data.table.ContentTableMeta; import fr.ird.observe.client.datasource.editor.content.data.table.ContentTableModel; import fr.ird.observe.client.datasource.editor.content.data.table.ContentTableUI; import fr.ird.observe.client.datasource.editor.content.data.table.ContentTableUIModel; +import fr.ird.observe.dto.ProtectedIds; import fr.ird.observe.dto.data.ps.observation.SchoolEstimateDto; import fr.ird.observe.dto.data.ps.observation.SchoolEstimateHelper; import fr.ird.observe.dto.data.ps.observation.SetSchoolEstimateDto; +import fr.ird.observe.dto.referential.common.WeightMeasureMethodReference; import java.util.Arrays; import java.util.Collection; @@ -41,6 +45,7 @@ import java.util.List; * @since XXX */ public class SchoolEstimateUIModel extends ContentTableUIModel<SetSchoolEstimateDto, SchoolEstimateDto> { + private final WeightMeasureMethodReference defaultWeightMeasureMethod; public SchoolEstimateUIModel(SchoolEstimateUI ui) { @@ -52,8 +57,12 @@ public class SchoolEstimateUIModel extends ContentTableUIModel<SetSchoolEstimate new String[]{ SchoolEstimateDto.PROPERTY_SPECIES, SchoolEstimateDto.PROPERTY_TOTAL_WEIGHT, - SchoolEstimateDto.PROPERTY_MEAN_WEIGHT} + SchoolEstimateDto.PROPERTY_MEAN_WEIGHT, + SchoolEstimateDto.PROPERTY_WEIGHT_MEASURE_METHOD + } ); + ObserveSwingDataSource dataSource = ObserveDataSourcesManagerApplicationComponent.value().getMainDataSource(); + defaultWeightMeasureMethod = dataSource.getReferentialReferenceSet(WeightMeasureMethodReference.class).tryGetReferenceById(ProtectedIds.PS_OBSERVATION_SCHOOL_ESTIMATE_DEFAULT_WEIGHT_MEASURE_METHOD_ID).orElseThrow(IllegalStateException::new); List<ContentTableMeta<SchoolEstimateDto>> metas = Arrays.asList( ContentTableModel.newTableMeta(SchoolEstimateDto.class, SchoolEstimateDto.PROPERTY_SPECIES, false), @@ -88,4 +97,15 @@ public class SchoolEstimateUIModel extends ContentTableUIModel<SetSchoolEstimate } }; } + + @Override + public SchoolEstimateDto newTableEditBean() { + SchoolEstimateDto result = super.newTableEditBean(); + result.setWeightMeasureMethod(getDefaultWeightMeasureMethod()); + return result; + } + + public WeightMeasureMethodReference getDefaultWeightMeasureMethod() { + return defaultWeightMeasureMethod; + } } ===================================== dto/pom.xml ===================================== @@ -204,6 +204,12 @@ <artifactId>java-util</artifactId> <version>${lib.version.java4all.java-util}</version> </dependency> + <dependency> + <groupId>io.ultreia.java4all.jaxx</groupId> + <artifactId>jaxx-runtime-spi</artifactId> + <version>${lib.version.java4all.jaxx}</version> + </dependency> + </dependencies> </plugin> <plugin> ===================================== dto/src/main/java/fr/ird/observe/dto/ProtectedIds.java ===================================== @@ -145,6 +145,8 @@ public class ProtectedIds { public static final Set<String> PS_OBSERVATION_FOB_OBSERVED_SYSTEM_EXCLUDE_OPERATIONS = ImmutableSet.of("fr.ird.referential.ps.common.ObjectOperation#0#10", "fr.ird.referential.ps.common.ObjectOperation#0#1"); //FIXME-PROTECTED-ID public static final String PS_COMMON_TRANSMITTING_BUOY_OPERATION_POSE = "fr.ird.referential.ps.common.TransmittingBuoyOperation#1239832686238#0.4755624782839416"; + //FIXME-PROTECTED-ID + public static final String PS_OBSERVATION_SCHOOL_ESTIMATE_DEFAULT_WEIGHT_MEASURE_METHOD_ID = "fr.ird.referential.common.WeightMeasureMethod#666#04"; private ProtectedIds() { // avoid instance ===================================== observe-i18n/src/main/i18n/translations/observe_en_GB.properties ===================================== @@ -837,7 +837,7 @@ observe.data.ll.common.Trip.departureHarbour=Departure harbour observe.data.ll.common.Trip.endDate=End date observe.data.ll.common.Trip.ersId=Id ERS observe.data.ll.common.Trip.generalComment=Comment -observe.data.ll.common.Trip.generalTab=Characteristics +observe.data.ll.common.Trip.generalTab=Common characteristics observe.data.ll.common.Trip.homeId=Home id observe.data.ll.common.Trip.landingHarbour=Landing harbour observe.data.ll.common.Trip.logbookAvailability=Logbook @@ -1055,7 +1055,7 @@ observe.data.ll.logbook.Catch.action.new=New catch observe.data.ll.logbook.Catch.action.new.tip=Create a new catch observe.data.ll.logbook.Catch.action.reset.photoReferences.tip=Reset photo references observe.data.ll.logbook.Catch.availablePredator=Avaiable predators -observe.data.ll.logbook.Catch.beatDiameter=Beat diameter +observe.data.ll.logbook.Catch.beatDiameter=Beat diameter (cm) observe.data.ll.logbook.Catch.branchlineTab=Branchline observe.data.ll.logbook.Catch.caracteristicTab=Caracteristics observe.data.ll.logbook.Catch.catchFate=Fate @@ -1064,7 +1064,7 @@ observe.data.ll.logbook.Catch.comment=Comment observe.data.ll.logbook.Catch.count=Count observe.data.ll.logbook.Catch.countDepredated=Count depredated observe.data.ll.logbook.Catch.depredated=Depredated -observe.data.ll.logbook.Catch.depredatedProportion=Depredated proportion +observe.data.ll.logbook.Catch.depredatedProportion=Depredated proportion (%) observe.data.ll.logbook.Catch.depredatedTab=Depredation observe.data.ll.logbook.Catch.discardHealthStatus=Discard health status observe.data.ll.logbook.Catch.foodAndSexualTab=Food and sexual maturity @@ -1208,9 +1208,9 @@ observe.data.ll.logbook.Set.haulingStartTimeStamp=Start timestamp observe.data.ll.logbook.Set.haulingTab=Hauling observe.data.ll.logbook.Set.homeId=Home id observe.data.ll.logbook.Set.lengthBetweenBranchlines=Length between branchlines (m) -observe.data.ll.logbook.Set.lightsticksColor=Lightsticks color +observe.data.ll.logbook.Set.lightsticksColor=Majority lightsticks color observe.data.ll.logbook.Set.lightsticksTab=Lightsticks -observe.data.ll.logbook.Set.lightsticksType=Lightsticks type +observe.data.ll.logbook.Set.lightsticksType=Majority lightsticks type observe.data.ll.logbook.Set.lightsticksUsed=Lightsticks used observe.data.ll.logbook.Set.lineType=Line type observe.data.ll.logbook.Set.maxDepthTargeted=Max depth targeted (m) @@ -1410,9 +1410,9 @@ observe.data.ll.observation.Catch.action.deleteSelectedWeightMeasure.tip=Delete observe.data.ll.observation.Catch.action.new=New catch observe.data.ll.observation.Catch.action.new.tip=Create a new catch observe.data.ll.observation.Catch.action.reset.photoReferences.tip=Reset photo references -observe.data.ll.observation.Catch.availablePredator=Avaiable predators +observe.data.ll.observation.Catch.availablePredator=Available predators observe.data.ll.observation.Catch.basket=Basket -observe.data.ll.observation.Catch.beatDiameter=Beat diameter +observe.data.ll.observation.Catch.beatDiameter=Beat diameter (cm) observe.data.ll.observation.Catch.branchline=Branchline observe.data.ll.observation.Catch.branchlineTab=Branchline observe.data.ll.observation.Catch.caracteristicTab=Caracteristics ===================================== observe-i18n/src/main/i18n/translations/observe_es_ES.properties ===================================== @@ -837,7 +837,7 @@ observe.data.ll.common.Trip.departureHarbour=Puerto de embarque observe.data.ll.common.Trip.endDate=Fecha de fin observe.data.ll.common.Trip.ersId=Id ERS observe.data.ll.common.Trip.generalComment=Comentarios -observe.data.ll.common.Trip.generalTab=Características +observe.data.ll.common.Trip.generalTab=General características observe.data.ll.common.Trip.homeId=Id de negocio observe.data.ll.common.Trip.landingHarbour=Puerto de desembarque observe.data.ll.common.Trip.logbookAvailability=Logbook \#TODO @@ -1055,7 +1055,7 @@ observe.data.ll.logbook.Catch.action.new=Nueva captura observe.data.ll.logbook.Catch.action.new.tip=Crear una nueva captura observe.data.ll.logbook.Catch.action.reset.photoReferences.tip=Reiniciar las referencias photo observe.data.ll.logbook.Catch.availablePredator=Deprepadaores disponibles -observe.data.ll.logbook.Catch.beatDiameter=Diametro de la mordedura +observe.data.ll.logbook.Catch.beatDiameter=Diametro de la mordedura (cm) observe.data.ll.logbook.Catch.branchlineTab=Arponcillo observe.data.ll.logbook.Catch.caracteristicTab=Características observe.data.ll.logbook.Catch.catchFate=Devenir @@ -1064,7 +1064,7 @@ observe.data.ll.logbook.Catch.comment=Comentario observe.data.ll.logbook.Catch.count=Numéro observe.data.ll.logbook.Catch.countDepredated=Count depredated \#TODO observe.data.ll.logbook.Catch.depredated=Victima de depredación -observe.data.ll.logbook.Catch.depredatedProportion=Depredación propertion \#TODO +observe.data.ll.logbook.Catch.depredatedProportion=Depredación propertion (%) \#TODO observe.data.ll.logbook.Catch.depredatedTab=Depredación observe.data.ll.logbook.Catch.discardHealthStatus=Salud al rechazo observe.data.ll.logbook.Catch.foodAndSexualTab=Alimentación y maturidad sexual @@ -1208,12 +1208,12 @@ observe.data.ll.logbook.Set.haulingStartTimeStamp=Timestamp del inicio observe.data.ll.logbook.Set.haulingTab=Arrastre observe.data.ll.logbook.Set.homeId=Id de negocio observe.data.ll.logbook.Set.lengthBetweenBranchlines=Length between branchlines (m) \#TODO -observe.data.ll.logbook.Set.lightsticksColor=Color de barrita de luz +observe.data.ll.logbook.Set.lightsticksColor=Mayoritario color de barrita de luz #TODO observe.data.ll.logbook.Set.lightsticksTab=Lightsticks \#TODO -observe.data.ll.logbook.Set.lightsticksType=Tipo de barrita de luz +observe.data.ll.logbook.Set.lightsticksType=Mayoritario tipo de barrita de luz #TODO observe.data.ll.logbook.Set.lightsticksUsed=Lightsticks used \#TODO observe.data.ll.logbook.Set.lineType=Tipo de línea -observe.data.ll.logbook.Set.maxDepthTargeted=Profundidad máxima deseada +observe.data.ll.logbook.Set.maxDepthTargeted=Profundidad máxima deseada (m) observe.data.ll.logbook.Set.message.creating=Lance en proceso de creación. observe.data.ll.logbook.Set.message.updating=La operación de pesca está en proceso de modificación. observe.data.ll.logbook.Set.monitored=Instrumentada @@ -1412,7 +1412,7 @@ observe.data.ll.observation.Catch.action.new.tip=Crear una nueva captura observe.data.ll.observation.Catch.action.reset.photoReferences.tip=Reiniciar las referencias photo observe.data.ll.observation.Catch.availablePredator=Deprepadaores disponibles observe.data.ll.observation.Catch.basket=cesta -observe.data.ll.observation.Catch.beatDiameter=Diametro de la mordedura +observe.data.ll.observation.Catch.beatDiameter=Diametro de la mordedura (cm) observe.data.ll.observation.Catch.branchline=Arponcillo observe.data.ll.observation.Catch.branchlineTab=Arponcillo observe.data.ll.observation.Catch.caracteristicTab=Características ===================================== observe-i18n/src/main/i18n/translations/observe_fr_FR.properties ===================================== @@ -837,7 +837,7 @@ observe.data.ll.common.Trip.departureHarbour=Port de départ observe.data.ll.common.Trip.endDate=Date fin observe.data.ll.common.Trip.ersId=Id ERS observe.data.ll.common.Trip.generalComment=Commentaire -observe.data.ll.common.Trip.generalTab=Caractéristiques +observe.data.ll.common.Trip.generalTab=Caractéristiques communes observe.data.ll.common.Trip.homeId=Id métier observe.data.ll.common.Trip.landingHarbour=Port d'arrivée observe.data.ll.common.Trip.logbookAvailability=Logbook @@ -1055,7 +1055,7 @@ observe.data.ll.logbook.Catch.action.new=Nouvelle capture observe.data.ll.logbook.Catch.action.new.tip=Créer une nouvelle capture observe.data.ll.logbook.Catch.action.reset.photoReferences.tip=Réinitialiser les références photo observe.data.ll.logbook.Catch.availablePredator=Prédateurs disponibles -observe.data.ll.logbook.Catch.beatDiameter=Diamètre de la morsure +observe.data.ll.logbook.Catch.beatDiameter=Diamètre de la morsure (cm) observe.data.ll.logbook.Catch.branchlineTab=Avançon observe.data.ll.logbook.Catch.caracteristicTab=Caractéristiques observe.data.ll.logbook.Catch.catchFate=Devenir @@ -1064,7 +1064,7 @@ observe.data.ll.logbook.Catch.comment=Commentaire observe.data.ll.logbook.Catch.count=Nombre observe.data.ll.logbook.Catch.countDepredated=Nombre déprédatés observe.data.ll.logbook.Catch.depredated=Victime de déprédation -observe.data.ll.logbook.Catch.depredatedProportion=Proportion de deprédaté +observe.data.ll.logbook.Catch.depredatedProportion=Proportion de deprédaté (%) observe.data.ll.logbook.Catch.depredatedTab=Déprédation observe.data.ll.logbook.Catch.discardHealthStatus=Santé au rejet observe.data.ll.logbook.Catch.foodAndSexualTab=Alimentation et maturité sexuelle @@ -1208,12 +1208,12 @@ observe.data.ll.logbook.Set.haulingStartTimeStamp=Horodatage début observe.data.ll.logbook.Set.haulingTab=Virage observe.data.ll.logbook.Set.homeId=Id métier observe.data.ll.logbook.Set.lengthBetweenBranchlines=Distance entre avançons (m) -observe.data.ll.logbook.Set.lightsticksColor=Couleur de cyalumes +observe.data.ll.logbook.Set.lightsticksColor=Couleur de cyalumes majoritaire observe.data.ll.logbook.Set.lightsticksTab=Cyalumes -observe.data.ll.logbook.Set.lightsticksType=Type de cyalumes +observe.data.ll.logbook.Set.lightsticksType=Type de cyalumes majoritaire observe.data.ll.logbook.Set.lightsticksUsed=Utilisation des Cyalumes observe.data.ll.logbook.Set.lineType=Type de ligne -observe.data.ll.logbook.Set.maxDepthTargeted=Profondeur maximum ciblée +observe.data.ll.logbook.Set.maxDepthTargeted=Profondeur maximum ciblée (m) observe.data.ll.logbook.Set.message.creating=L'opération de pêche est en cours de création. observe.data.ll.logbook.Set.message.updating=L'opération de pêche est en cours de modification. observe.data.ll.logbook.Set.monitored=Instrumentée @@ -1412,7 +1412,7 @@ observe.data.ll.observation.Catch.action.new.tip=Créer une nouvelle capture observe.data.ll.observation.Catch.action.reset.photoReferences.tip=Réinitialiser les références photo observe.data.ll.observation.Catch.availablePredator=Prédateurs disponibles observe.data.ll.observation.Catch.basket=Panier -observe.data.ll.observation.Catch.beatDiameter=Diamètre de la morsure +observe.data.ll.observation.Catch.beatDiameter=Diamètre de la morsure (cm) observe.data.ll.observation.Catch.branchline=Avançon observe.data.ll.observation.Catch.branchlineTab=Avançon observe.data.ll.observation.Catch.caracteristicTab=Caractéristiques ===================================== persistence/pom.xml ===================================== @@ -303,6 +303,11 @@ <artifactId>application-context</artifactId> <version>${lib.version.java4all.application-context}</version> </dependency> + <dependency> + <groupId>io.ultreia.java4all.jaxx</groupId> + <artifactId>jaxx-runtime-spi</artifactId> + <version>${lib.version.java4all.jaxx}</version> + </dependency> <dependency> <groupId>com.google.auto.service</groupId> <artifactId>auto-service</artifactId> ===================================== persistence/src/main/resources/db/migration/8.0/11_add_weight_measure_method-common.sql ===================================== @@ -26,6 +26,7 @@ INSERT INTO observe_common.LASTUPDATEDATE(topiaId, topiaversion, topiacreatedate INSERT INTO observe_common.WeightMeasureMethod(topiaid, topiaversion, topiacreatedate, lastupdatedate, status, needComment, label1, label2, label3) values ('fr.ird.observe.entities.referentiel.WeightMeasureMethod#666#01' , 0, CURRENT_DATE, CURRENT_TIMESTAMP, 1, false, 'Peson', 'Peson', 'Peson #TODO'); INSERT INTO observe_common.WeightMeasureMethod(topiaid, topiaversion, topiacreatedate, lastupdatedate, status, needComment, label1, label2, label3) values ('fr.ird.observe.entities.referentiel.WeightMeasureMethod#666#02' , 0, CURRENT_DATE, CURRENT_TIMESTAMP, 1, false, 'Scale', 'Balance', 'Balance #TODO'); INSERT INTO observe_common.WeightMeasureMethod(topiaid, topiaversion, topiacreatedate, lastupdatedate, status, needComment, label1, label2, label3) values ('fr.ird.observe.entities.referentiel.WeightMeasureMethod#666#03' , 0, CURRENT_DATE, CURRENT_TIMESTAMP, 1, false, 'Visual estimation', 'Estimation visuelle', 'Estimation visuelle #TODO'); +INSERT INTO observe_common.WeightMeasureMethod(topiaid, topiaversion, topiacreatedate, lastupdatedate, status, needComment, label1, label2, label3) values ('fr.ird.observe.entities.referentiel.WeightMeasureMethod#666#04' , 0, CURRENT_DATE, CURRENT_TIMESTAMP, 1, false, 'Estimate with sounder', 'Estimation au sondeur', 'Estimación con la ecosonda'); ALTER TABLE observe_seine.nontargetcatch ADD COLUMN weightMeasureMethod VARCHAR(255); ALTER TABLE observe_seine.nontargetlength ADD COLUMN weightMeasureMethod VARCHAR(255); ===================================== pom.xml ===================================== @@ -24,7 +24,7 @@ <parent> <groupId>io.ultreia.maven</groupId> <artifactId>pom</artifactId> - <version>2020.33</version> + <version>2020.34</version> </parent> <groupId>fr.ird.observe</groupId> @@ -162,7 +162,7 @@ <maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format> <buildDate>${maven.build.timestamp}</buildDate> - <lib.version.toolkit>4.32</lib.version.toolkit> + <lib.version.toolkit>4.33</lib.version.toolkit> <lib.version.nuiton.validation>3.1</lib.version.nuiton.validation> <!--can't use 1.4.197 (date has changed + blob also)--> <lib.version.h2>1.4.196</lib.version.h2> @@ -170,7 +170,7 @@ <!-- <lib.version.java4all.topia>1.17</lib.version.java4all.topia>--> <!--<lib.version.java4all.eugene>3.0<-alpha-22</lib.version.java4all.eugene>--> -<!-- <lib.version.java4all.jaxx>3.0-alpha-70-SNAPSHOT</lib.version.java4all.jaxx>--> +<!-- <lib.version.java4all.jaxx>3.0-alpha-71-SNAPSHOT</lib.version.java4all.jaxx>--> <!--<lib.version.java4all.application-context>1.0.3-SNAPSHOT</lib.version.java4all.application-context>--> <!--<lib.version.java4all.application-template>1.0.2-SNAPSHOT</lib.version.java4all.application-template>--> <!--<lib.version.java4all.i18n>4.0-beta-3-SNAPSHOT</lib.version.java4all.i18n>--> ===================================== server-core/pom.xml ===================================== @@ -253,6 +253,12 @@ <artifactId>guava</artifactId> <version>${lib.version.google.guava}</version> </dependency> + <dependency> + <groupId>io.ultreia.java4all.jaxx</groupId> + <artifactId>jaxx-runtime-spi</artifactId> + <version>${lib.version.java4all.jaxx}</version> + </dependency> + </dependencies> </plugin> </plugins> ===================================== services-client/pom.xml ===================================== @@ -170,6 +170,11 @@ <artifactId>services</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>io.ultreia.java4all.jaxx</groupId> + <artifactId>jaxx-runtime-spi</artifactId> + <version>${lib.version.java4all.jaxx}</version> + </dependency> </dependencies> </plugin> </plugins> ===================================== services-local/src/main/java/fr/ird/observe/services/local/service/DataSourceServiceLocal.java ===================================== @@ -54,6 +54,7 @@ import fr.ird.observe.services.service.sql.SqlScriptProducerService; import fr.ird.observe.spi.DbModelHelper; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.nuiton.topia.persistence.TopiaMigrationServiceException; import org.nuiton.topia.persistence.jdbc.JdbcHelper; import org.nuiton.topia.persistence.jdbc.JdbcPostgresHelper; import org.nuiton.topia.persistence.metadata.TopiaMetadataEntity; @@ -611,10 +612,12 @@ public class DataSourceServiceLocal extends ObserveServiceLocal implements DataS public void migrateData(ObserveDataSourceConfiguration dataSourceConfiguration) { Path temporaryDirectory = getTemporaryDirectory(dataSourceConfiguration); log.debug("Will use temporary directory: " + temporaryDirectory); - - try (ObserveTopiaApplicationContext topiaApplicationContext = ObserveTopiaApplicationContextFactory.getOrCreateTopiaApplicationContext((ObserveDataSourceConfigurationTopiaSupport) dataSourceConfiguration)) { - //FIXME: Si ca plante il faut bien nettoyer les topia context, la base semble ne pas bien etre fermee + ObserveTopiaApplicationContext topiaApplicationContext = ObserveTopiaApplicationContextFactory.getOrCreateTopiaApplicationContext((ObserveDataSourceConfigurationTopiaSupport) dataSourceConfiguration); + try { topiaApplicationContext.getMigrationService().runSchemaMigration(); + } catch (Exception e) { + close((ObserveDataSourceConfigurationTopiaSupport) dataSourceConfiguration, topiaApplicationContext); + throw e; } } ===================================== services-local/src/test/java/fr/ird/observe/services/local/service/referential/differential/DifferentialModelTest.java ===================================== @@ -87,7 +87,7 @@ public class DifferentialModelTest extends ServiceLocalTestSupport { DifferentialList rightSideDifferentialList = result.getRightSideDifferentialList(); Assert.assertNotNull(rightSideDifferentialList); Assert.assertNotNull(rightSideDifferentialList.getStates()); - Assert.assertEquals(3016, rightSideDifferentialList.getStates().size()); + Assert.assertEquals(3017, rightSideDifferentialList.getStates().size()); Assert.assertTrue(rightSideDifferentialList.getStates().stream().allMatch(s -> DifferentialType.ADDED.equals(s.getDifferentialType()))); } ===================================== src/site/site_fr.xml ===================================== @@ -29,7 +29,7 @@ <skin> <groupId>org.apache.maven.skins</groupId> <artifactId>maven-fluido-skin</artifactId> - <version>1.8</version> + <version>1.9</version> </skin> <custom> ===================================== test/src/main/resources/db/8.0/dataForTestLongline.sql.gz ===================================== Binary files a/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz and b/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz differ ===================================== test/src/main/resources/db/8.0/dataForTestSeine.sql.gz ===================================== Binary files a/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz and b/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz differ ===================================== test/src/main/resources/db/8.0/referentiel.sql.gz ===================================== Binary files a/test/src/main/resources/db/8.0/referentiel.sql.gz and b/test/src/main/resources/db/8.0/referentiel.sql.gz differ ===================================== test/src/main/resources/fixtures/count-referential-common.properties ===================================== @@ -48,6 +48,6 @@ common.specieslist=8 common.vessel=1172 common.vesselsizecategory=13 common.vesseltype=16 -common.weightmeasuremethod=3 +common.weightmeasuremethod=4 common.weightmeasuretype=3 common.wind=13 View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/db511b177a0ed6d5fc2976341... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/db511b177a0ed6d5fc2976341... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT