Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
2aecae7e
by Tony Chemit at 2021-01-04T12:14:57+01:00
7 changed files:
- services/i18n/src/main/i18n/translations/services_en_GB.properties
- services/i18n/src/main/i18n/translations/services_es_ES.properties
- services/i18n/src/main/i18n/translations/services_fr_FR.properties
- services/validation/src/main/i18n/getters/validation-messages.getter
- services/validation/src/main/resources/fr/ird/observe/dto/data/ll/logbook/CatchDto-update-error-validation.xml
- + services/validation/src/main/resources/fr/ird/observe/dto/data/ll/logbook/CatchDto-update-warning-validation.xml
- services/validation/src/main/resources/fr/ird/observe/dto/data/ll/observation/CatchDto-update-error-validation.xml
Changes:
| ... | ... | @@ -158,7 +158,6 @@ observe.data.ll.Activity.validation.endDate.before.currentTrip.endDate=End date |
| 158 | 158 |
observe.data.ll.Activity.validation.endTime.after.startTime=End time must be after start time
|
| 159 | 159 |
observe.data.ll.Activity.validation.startDate.after.currentTrip.startDate=Start date must be after current trip start date
|
| 160 | 160 |
observe.data.ll.Activity.validation.startDate.before.currentTrip.endDate=Start date must be before current trip end date
|
| 161 |
-observe.data.ll.Catch.validation.required.count.when.acquisitionModeIsGrouped=Count must be filled in group mode.
|
|
| 162 | 161 |
observe.data.ll.Set.validation.baitsComposition.uniqueKey=Tuple (type/status/size/weight) must be unique.
|
| 163 | 162 |
observe.data.ll.Set.validation.branchlinesComposition.uniqueKey=Tuple (topType/type/size) must be unique.
|
| 164 | 163 |
observe.data.ll.Set.validation.duplicated.homeId=Home id is already used in another fishing operation (%1$s).
|
| ... | ... | @@ -241,6 +240,7 @@ observe.data.ll.logbook.Catch.predator=TODO |
| 241 | 240 |
observe.data.ll.logbook.Catch.speciesCatch=Species
|
| 242 | 241 |
observe.data.ll.logbook.Catch.totalWeight=Total weight (kg)
|
| 243 | 242 |
observe.data.ll.logbook.Catch.type=Catch
|
| 243 |
+observe.data.ll.logbook.Catch.validation.required.countOrTotalWeight.when.acquisitionModeIsGrouped=Count or total weight must be filled in group mode.
|
|
| 244 | 244 |
observe.data.ll.logbook.FloatlinesComposition.length=Length
|
| 245 | 245 |
observe.data.ll.logbook.FloatlinesComposition.lineType=Line type
|
| 246 | 246 |
observe.data.ll.logbook.FloatlinesComposition.proportion=Proportion
|
| ... | ... | @@ -360,6 +360,7 @@ observe.data.ll.observation.Catch.speciesCatch=Species |
| 360 | 360 |
observe.data.ll.observation.Catch.stomachFullness=Stomac fullness
|
| 361 | 361 |
observe.data.ll.observation.Catch.totalWeight=Total weight (kg)
|
| 362 | 362 |
observe.data.ll.observation.Catch.type=Catch
|
| 363 |
+observe.data.ll.observation.Catch.validation.required.count.when.acquisitionModeIsGrouped=Count must be filled in group mode.
|
|
| 363 | 364 |
observe.data.ll.observation.Encounter.count=Count
|
| 364 | 365 |
observe.data.ll.observation.Encounter.distance=Distance (m)
|
| 365 | 366 |
observe.data.ll.observation.Encounter.encounterType=Type
|
| ... | ... | @@ -158,7 +158,6 @@ observe.data.ll.Activity.validation.endDate.before.currentTrip.endDate=End date |
| 158 | 158 |
observe.data.ll.Activity.validation.endTime.after.startTime=End time must be after start time \#TODO
|
| 159 | 159 |
observe.data.ll.Activity.validation.startDate.after.currentTrip.startDate=Start date must be after current trip start date \#TODO
|
| 160 | 160 |
observe.data.ll.Activity.validation.startDate.before.currentTrip.endDate=Start date must be before current trip end date \#TODO
|
| 161 |
-observe.data.ll.Catch.validation.required.count.when.acquisitionModeIsGrouped=El número es mandatorio en modo grupado.
|
|
| 162 | 161 |
observe.data.ll.Set.validation.baitsComposition.uniqueKey=La tupla (type/estado/tamaño/peso) debe ser única, la tupa ya está utilizada.
|
| 163 | 162 |
observe.data.ll.Set.validation.branchlinesComposition.uniqueKey=La tupla (tipo alto/tipo bajo/tamaño) debe ser única, la tupa ya está utilizada.
|
| 164 | 163 |
observe.data.ll.Set.validation.duplicated.homeId=El Id de negocio ya está utilizado por una otra operación de pesca (%s)
|
| ... | ... | @@ -241,6 +240,7 @@ observe.data.ll.logbook.Catch.predator=TODO |
| 241 | 240 |
observe.data.ll.logbook.Catch.speciesCatch=Especie
|
| 242 | 241 |
observe.data.ll.logbook.Catch.totalWeight=Peso total (kg)
|
| 243 | 242 |
observe.data.ll.logbook.Catch.type=Captura
|
| 243 |
+observe.data.ll.logbook.Catch.validation.required.countOrTotalWeight.when.acquisitionModeIsGrouped=El número or total weight es mandatorio en modo grupado. \#TODO
|
|
| 244 | 244 |
observe.data.ll.logbook.FloatlinesComposition.length=Longitud (m)
|
| 245 | 245 |
observe.data.ll.logbook.FloatlinesComposition.lineType=Tipo
|
| 246 | 246 |
observe.data.ll.logbook.FloatlinesComposition.proportion=Proporción (%)
|
| ... | ... | @@ -360,6 +360,7 @@ observe.data.ll.observation.Catch.speciesCatch=Especie |
| 360 | 360 |
observe.data.ll.observation.Catch.stomachFullness=Estatuto del estomago
|
| 361 | 361 |
observe.data.ll.observation.Catch.totalWeight=Peso total (kg)
|
| 362 | 362 |
observe.data.ll.observation.Catch.type=Captura
|
| 363 |
+observe.data.ll.observation.Catch.validation.required.count.when.acquisitionModeIsGrouped=El número es mandatorio en modo grupado.
|
|
| 363 | 364 |
observe.data.ll.observation.Encounter.count=Numéro
|
| 364 | 365 |
observe.data.ll.observation.Encounter.distance=Distancia (m)
|
| 365 | 366 |
observe.data.ll.observation.Encounter.encounterType=Tipo del encuentro
|
| ... | ... | @@ -158,7 +158,6 @@ observe.data.ll.Activity.validation.endDate.before.currentTrip.endDate=La date d |
| 158 | 158 |
observe.data.ll.Activity.validation.endTime.after.startTime=L'heure de fin doit être supérieure ou égale à l'heure de début de l'activité
|
| 159 | 159 |
observe.data.ll.Activity.validation.startDate.after.currentTrip.startDate=La date doit être supérieure ou égale à la date de début de marée
|
| 160 | 160 |
observe.data.ll.Activity.validation.startDate.before.currentTrip.endDate=La date doit être inférieure ou égale à la date de fin de marée
|
| 161 |
-observe.data.ll.Catch.validation.required.count.when.acquisitionModeIsGrouped=Le nombre est obligatoire en mode groupé.
|
|
| 162 | 161 |
observe.data.ll.Set.validation.baitsComposition.uniqueKey=Le tuple (type/état/taille/poids) doit être unique, le tuple est déjà utilisé.
|
| 163 | 162 |
observe.data.ll.Set.validation.branchlinesComposition.uniqueKey=Le tuple (type haut/type bas/taille) doit être unique
|
| 164 | 163 |
observe.data.ll.Set.validation.duplicated.homeId=L'Id métier est déjà utilisé par une autre opération de pêche (%s)
|
| ... | ... | @@ -241,6 +240,7 @@ observe.data.ll.logbook.Catch.predator=TODO |
| 241 | 240 |
observe.data.ll.logbook.Catch.speciesCatch=Espèce
|
| 242 | 241 |
observe.data.ll.logbook.Catch.totalWeight=Poids total (kg)
|
| 243 | 242 |
observe.data.ll.logbook.Catch.type=Capture
|
| 243 |
+observe.data.ll.logbook.Catch.validation.required.countOrTotalWeight.when.acquisitionModeIsGrouped=Le nombre ou le poids total est obligatoire en mode groupé.
|
|
| 244 | 244 |
observe.data.ll.logbook.FloatlinesComposition.length=Longueur (m)
|
| 245 | 245 |
observe.data.ll.logbook.FloatlinesComposition.lineType=Type
|
| 246 | 246 |
observe.data.ll.logbook.FloatlinesComposition.proportion=Proportion (%)
|
| ... | ... | @@ -360,6 +360,7 @@ observe.data.ll.observation.Catch.speciesCatch=Espèce |
| 360 | 360 |
observe.data.ll.observation.Catch.stomachFullness=État de l'estomac
|
| 361 | 361 |
observe.data.ll.observation.Catch.totalWeight=Poids total (kg)
|
| 362 | 362 |
observe.data.ll.observation.Catch.type=Capture
|
| 363 |
+observe.data.ll.observation.Catch.validation.required.count.when.acquisitionModeIsGrouped=Le nombre est obligatoire en mode groupé.
|
|
| 363 | 364 |
observe.data.ll.observation.Encounter.count=Nombre
|
| 364 | 365 |
observe.data.ll.observation.Encounter.distance=Distance (m)
|
| 365 | 366 |
observe.data.ll.observation.Encounter.encounterType=Type de la rencontre
|
| ... | ... | @@ -29,7 +29,6 @@ observe.data.ll.Activity.validation.endDate.before.currentTrip.endDate |
| 29 | 29 |
observe.data.ll.Activity.validation.endTime.after.startTime
|
| 30 | 30 |
observe.data.ll.Activity.validation.startDate.after.currentTrip.startDate
|
| 31 | 31 |
observe.data.ll.Activity.validation.startDate.before.currentTrip.endDate
|
| 32 |
-observe.data.ll.Catch.validation.required.count.when.acquisitionModeIsGrouped
|
|
| 33 | 32 |
observe.data.ll.Set.validation.baitsComposition.uniqueKey
|
| 34 | 33 |
observe.data.ll.Set.validation.branchlinesComposition.uniqueKey
|
| 35 | 34 |
observe.data.ll.Set.validation.duplicated.homeId
|
| ... | ... | @@ -42,6 +41,7 @@ observe.data.ll.Set.validation.settingStartTimeStamp.before.settingEndTimeStamp |
| 42 | 41 |
observe.data.ll.landing.Landing.validation.endDate.after.startDate
|
| 43 | 42 |
observe.data.ll.landing.LandingPart.validation.bound.categoryWeight
|
| 44 | 43 |
observe.data.ll.landing.LandingPart.validation.required.weightMeasureMethod
|
| 44 |
+observe.data.ll.logbook.Catch.validation.required.countOrTotalWeight.when.acquisitionModeIsGrouped
|
|
| 45 | 45 |
observe.data.ll.logbook.SamplePart.validation.required.sizeMeasureType.for.length
|
| 46 | 46 |
observe.data.ll.logbook.SamplePart.validation.required.weightMeasureType.for.weight
|
| 47 | 47 |
observe.data.ll.logbook.Set.validation.required.haulingEndLatitude
|
| ... | ... | @@ -50,6 +50,7 @@ observe.data.ll.logbook.Set.validation.required.haulingStartLatitude |
| 50 | 50 |
observe.data.ll.logbook.Set.validation.required.haulingStartLongitude
|
| 51 | 51 |
observe.data.ll.logbook.Set.validation.required.settingEndLatitude
|
| 52 | 52 |
observe.data.ll.logbook.Set.validation.required.settingEndLongitude
|
| 53 |
+observe.data.ll.observation.Catch.validation.required.count.when.acquisitionModeIsGrouped
|
|
| 53 | 54 |
observe.data.ll.observation.LonglinePositionAware.validation.required.position
|
| 54 | 55 |
observe.data.ll.observation.SetDetailComposition.validation.invalid.templates
|
| 55 | 56 |
observe.data.ll.observation.Tdr.validation.deploymentStart.before.fishingStart
|
| ... | ... | @@ -24,12 +24,17 @@ |
| 24 | 24 |
"http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
|
| 25 | 25 |
<validators>
|
| 26 | 26 |
<field name="count">
|
| 27 |
- <!-- count obligatoire si mode = groupe -->
|
|
| 28 |
- <field-validator type="fieldexpression" short-circuit="true">
|
|
| 29 |
- <param name="expression">
|
|
| 30 |
- <![CDATA[ acquisitionMode == 0 || count != null ]]>
|
|
| 31 |
- </param>
|
|
| 32 |
- <message>observe.data.ll.Catch.validation.required.count.when.acquisitionModeIsGrouped</message>
|
|
| 27 |
+ <!-- count ou totalWeight obligatoire si mode = groupe -->
|
|
| 28 |
+ <field-validator type="mandatory" short-circuit="true">
|
|
| 29 |
+ <param name="skip">acquisitionMode == 0 || totalWeight != null</param>
|
|
| 30 |
+ <message>observe.data.ll.logbook.Catch.validation.required.countOrTotalWeight.when.acquisitionModeIsGrouped</message>
|
|
| 31 |
+ </field-validator>
|
|
| 32 |
+ </field>
|
|
| 33 |
+ <field name="totalWeight">
|
|
| 34 |
+ <!-- count ou totalWeight obligatoire si mode = groupe -->
|
|
| 35 |
+ <field-validator type="mandatory" short-circuit="true">
|
|
| 36 |
+ <param name="skip">acquisitionMode == 0 || count != null</param>
|
|
| 37 |
+ <message>observe.data.ll.logbook.Catch.validation.required.countOrTotalWeight.when.acquisitionModeIsGrouped</message>
|
|
| 33 | 38 |
</field-validator>
|
| 34 | 39 |
</field>
|
| 35 | 40 |
<field name="depredatedProportion">
|
| 1 |
+<?xml version="1.0" encoding="UTF-8"?>
|
|
| 2 |
+<!--
|
|
| 3 |
+ #%L
|
|
| 4 |
+ ObServe Services :: Validation
|
|
| 5 |
+ %%
|
|
| 6 |
+ Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
|
|
| 7 |
+ %%
|
|
| 8 |
+ This program is free software: you can redistribute it and/or modify
|
|
| 9 |
+ it under the terms of the GNU General Public License as
|
|
| 10 |
+ published by the Free Software Foundation, either version 3 of the
|
|
| 11 |
+ License, or (at your option) any later version.
|
|
| 12 |
+ This program is distributed in the hope that it will be useful,
|
|
| 13 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 14 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 15 |
+ GNU General Public License for more details.
|
|
| 16 |
+ You should have received a copy of the GNU General Public
|
|
| 17 |
+ License along with this program. If not, see
|
|
| 18 |
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 19 |
+ #L%
|
|
| 20 |
+ -->
|
|
| 21 |
+ |
|
| 22 |
+<!DOCTYPE validators PUBLIC
|
|
| 23 |
+ "-//Apache Struts//XWork Validator 1.0.3//EN"
|
|
| 24 |
+ "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
|
|
| 25 |
+<validators>
|
|
| 26 |
+ <field name="count">
|
|
| 27 |
+ <field-validator type="notFilled" short-circuit="true">
|
|
| 28 |
+ <param name="skip">acquisitionMode == 0 || totalWeight == null</param>
|
|
| 29 |
+ <message/>
|
|
| 30 |
+ </field-validator>
|
|
| 31 |
+ </field>
|
|
| 32 |
+ <field name="totalWeight">
|
|
| 33 |
+ <field-validator type="notFilled" short-circuit="true">
|
|
| 34 |
+ <param name="skip">acquisitionMode == 0 || count == null</param>
|
|
| 35 |
+ <message/>
|
|
| 36 |
+ </field-validator>
|
|
| 37 |
+ </field>
|
|
| 38 |
+ <field name="depredatedProportion">
|
|
| 39 |
+ <field-validator type="boundNumber" short-circuit="true">
|
|
| 40 |
+ <param name="min">1.0</param>
|
|
| 41 |
+ <param name="max">100.0</param>
|
|
| 42 |
+ <message/>
|
|
| 43 |
+ </field-validator>
|
|
| 44 |
+ </field>
|
|
| 45 |
+</validators>
|
| ... | ... | @@ -25,11 +25,9 @@ |
| 25 | 25 |
<validators>
|
| 26 | 26 |
<field name="count">
|
| 27 | 27 |
<!-- count obligatoire si mode = groupe -->
|
| 28 |
- <field-validator type="fieldexpression" short-circuit="true">
|
|
| 29 |
- <param name="expression">
|
|
| 30 |
- <![CDATA[ acquisitionMode == 0 || count != null ]]>
|
|
| 31 |
- </param>
|
|
| 32 |
- <message>observe.data.ll.Catch.validation.required.count.when.acquisitionModeIsGrouped</message>
|
|
| 28 |
+ <field-validator type="mandatory" short-circuit="true">
|
|
| 29 |
+ <param name="skip">acquisitionMode == 0</param>
|
|
| 30 |
+ <message>observe.data.ll.observation.Catch.validation.required.count.when.acquisitionModeIsGrouped</message>
|
|
| 33 | 31 |
</field-validator>
|
| 34 | 32 |
</field>
|
| 35 | 33 |
<field name="gonadeWeight">
|