Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe

Commits:

20 changed files:

Changes:

  • client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthLengthParameterUI.jaxx
    ... ... @@ -30,6 +30,7 @@
    30 30
         fr.ird.observe.dto.reference.ReferentialDtoReference
    
    31 31
         fr.ird.observe.dto.referential.SizeMeasureTypeDto
    
    32 32
         fr.ird.observe.dto.referential.SizeMeasureTypeReference
    
    33
    +    fr.ird.observe.dto.referential.SpeciesReference
    
    33 34
         fr.ird.observe.dto.referential.LengthLengthParameterDto
    
    34 35
         fr.ird.observe.dto.referential.LengthLengthParameterReference
    
    35 36
         fr.ird.observe.client.ui.util.UIHelper
    
    ... ... @@ -63,6 +64,16 @@
    63 64
               <tab id='generalTab' computeI18n="">
    
    64 65
                 <Table fill="both">
    
    65 66
     
    
    67
    +              <!-- species -->
    
    68
    +              <row>
    
    69
    +                <cell anchor='west'>
    
    70
    +                  <JLabel id='speciesLabel'/>
    
    71
    +                </cell>
    
    72
    +                <cell anchor='east' weightx="1" fill="both">
    
    73
    +                  <BeanComboBox id='species' constructorParams='this' genericType='SpeciesReference'/>
    
    74
    +                </cell>
    
    75
    +              </row>
    
    76
    +
    
    66 77
                   <!-- inputSizeMeasureType -->
    
    67 78
                   <row>
    
    68 79
                     <cell anchor='west'>
    

  • client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthLengthParameterUIModel.java
    ... ... @@ -47,6 +47,7 @@ public class LengthLengthParameterUIModel extends ContentReferenceUIModel<Length
    47 47
                                                    LengthLengthParameterDto.PROPERTY_STATUS,
    
    48 48
                                                    LengthLengthParameterDto.PROPERTY_NEED_COMMENT,
    
    49 49
                                                    LengthLengthParameterDto.PROPERTY_SOURCE,
    
    50
    +                                               LengthLengthParameterDto.PROPERTY_SPECIES,
    
    50 51
                                                    LengthLengthParameterDto.PROPERTY_OUTPUT_SIZE_MEASURE_TYPE,
    
    51 52
                                                    LengthLengthParameterDto.PROPERTY_INPUT_SIZE_MEASURE_TYPE).build();
    
    52 53
     
    
    ... ... @@ -65,13 +66,15 @@ public class LengthLengthParameterUIModel extends ContentReferenceUIModel<Length
    65 66
     
    
    66 67
         public LengthLengthParameterUIModel() {
    
    67 68
             super(LengthLengthParameterDto.class,
    
    68
    -              null,
    
    69
    +                LengthLengthParameterReference.class,
    
    69 70
                   new String[]{
    
    70 71
                           LengthLengthParameterDto.PROPERTY_INPUT_SIZE_MEASURE_TYPE,
    
    71 72
                           LengthLengthParameterDto.PROPERTY_OUTPUT_SIZE_MEASURE_TYPE,
    
    73
    +                      LengthLengthParameterDto.PROPERTY_SPECIES,
    
    72 74
                   },
    
    73 75
                   new String[]{
    
    74 76
                           LengthLengthParameterUI.BINDING_INPUT_SIZE_MEASURE_TYPE_SELECTED_ITEM,
    
    77
    +                      LengthLengthParameterUI.BINDING_SPECIES_SELECTED_ITEM,
    
    75 78
                           LengthLengthParameterUI.BINDING_INPUT_OUTPUT_FORMULA_TEXT,
    
    76 79
                           LengthLengthParameterUI.BINDING_OUTPUT_SIZE_MEASURE_TYPE_SELECTED_ITEM,
    
    77 80
                           LengthLengthParameterUI.BINDING_OUTPUT_INPUT_FORMULA_TEXT,
    

  • client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthWeightParameterUIModel.java
    ... ... @@ -71,7 +71,7 @@ public class LengthWeightParameterUIModel extends ContentReferenceUIModel<Length
    71 71
     
    
    72 72
         public LengthWeightParameterUIModel() {
    
    73 73
             super(LengthWeightParameterDto.class,
    
    74
    -              null,
    
    74
    +              LengthWeightParameterReference.class,
    
    75 75
                   new String[]{
    
    76 76
                           LengthWeightParameterDto.PROPERTY_SEX,
    
    77 77
                           LengthWeightParameterDto.PROPERTY_OCEAN,
    

  • dto/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterDtoReferenceBinder.java
    ... ... @@ -42,6 +42,7 @@ public class LengthLengthParameterDtoReferenceBinder extends ReferentialDtoRefer
    42 42
         public LengthLengthParameterReference toReference(ReferentialLocale referentialLocale, LengthLengthParameterDto dto) {
    
    43 43
     
    
    44 44
             return new LengthLengthParameterReference(dto, dto.getCode(),
    
    45
    +                                                  dto.getSpecies().getLabel(),
    
    45 46
                                                       dto.getInputSizeMeasureType().getLabel(),
    
    46 47
                                                       dto.getOutputSizeMeasureType().getLabel(),
    
    47 48
                                                       dto.getInputOutputFormula(),
    

  • dto/src/main/models/Observe.model
    ... ... @@ -382,13 +382,14 @@ longitude + {*:1} Float
    382 382
     quadrant + {*:1} Integer
    
    383 383
     country {*:0..1} fr.ird.observe.dto.referential.CountryReference
    
    384 384
     
    
    385
    -referential.LengthLengthParameter > referential.Referential >> WithComment | references=code,inputSizeMeasureTypeLabel,outputSizeMeasureTypeLabel,inputOutputFormula,outputInputFormula
    
    385
    +referential.LengthLengthParameter > referential.Referential >> WithComment | references=code,speciesLabel,inputSizeMeasureTypeLabel,outputSizeMeasureTypeLabel,inputOutputFormula,outputInputFormula
    
    386 386
     coefficients + {*:1} String
    
    387 387
     inputOutputFormula + {*:1} String
    
    388 388
     inputOutputFormulaValid + {*:1} boolean
    
    389 389
     outputInputFormula + {*:1} String
    
    390 390
     outputInputFormulaValid + {*:1} boolean
    
    391 391
     source + {*:1} String
    
    392
    +species {*:1} fr.ird.observe.dto.referential.SpeciesReference
    
    392 393
     inputSizeMeasureType {*:1} fr.ird.observe.dto.referential.SizeMeasureTypeReference
    
    393 394
     outputSizeMeasureType {*:1} fr.ird.observe.dto.referential.SizeMeasureTypeReference
    
    394 395
     
    

  • persistence/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterEntityDtoBinder.java
    ... ... @@ -40,28 +40,26 @@ public class LengthLengthParameterEntityDtoBinder extends ReferentialEntityDtoBi
    40 40
     
    
    41 41
         @Override
    
    42 42
         public void copyToEntity(ReferentialLocale referentialLocale, LengthLengthParameterDto dto, LengthLengthParameter entity) {
    
    43
    -
    
    44 43
             copyDtoReferentialFieldsToEntity(dto, entity);
    
    45 44
             entity.setInputOutputFormula(dto.getInputOutputFormula());
    
    46 45
             entity.setOutputInputFormula(dto.getOutputInputFormula());
    
    46
    +        entity.setSpecies(toEntity(dto.getSpecies()));
    
    47 47
             entity.setInputSizeMeasureType(toEntity(dto.getInputSizeMeasureType()));
    
    48 48
             entity.setOutputSizeMeasureType(toEntity(dto.getOutputSizeMeasureType()));
    
    49 49
             entity.setCoefficients(dto.getCoefficients());
    
    50 50
             entity.setSource(dto.getSource());
    
    51
    -
    
    52 51
         }
    
    53 52
     
    
    54 53
         @Override
    
    55 54
         public void copyToDto(ReferentialLocale referentialLocale, LengthLengthParameter entity, LengthLengthParameterDto dto) {
    
    56
    -
    
    57 55
             copyEntityReferentialFieldsToDto(entity, dto);
    
    58 56
             dto.setInputOutputFormula(entity.getInputOutputFormula());
    
    59 57
             dto.setOutputInputFormula(entity.getOutputInputFormula());
    
    58
    +        dto.setSpecies(toReferentialReference(referentialLocale, entity.getSpecies()));
    
    60 59
             dto.setInputSizeMeasureType(toReferentialReference(referentialLocale, entity.getInputSizeMeasureType()));
    
    61 60
             dto.setOutputSizeMeasureType(toReferentialReference(referentialLocale, entity.getOutputSizeMeasureType()));
    
    62 61
             dto.setCoefficients(entity.getCoefficients());
    
    63 62
             dto.setSource(entity.getSource());
    
    64
    -
    
    65 63
         }
    
    66 64
     
    
    67 65
     }

  • persistence/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterEntityReferenceBinder.java
    ... ... @@ -41,12 +41,11 @@ public class LengthLengthParameterEntityReferenceBinder extends ReferentialEntit
    41 41
     
    
    42 42
         @Override
    
    43 43
         public LengthLengthParameterReference toReference(ReferentialLocale referentialLocale, LengthLengthParameter dto) {
    
    44
    -
    
    45 44
             return new LengthLengthParameterReference(dto, dto.getCode(),
    
    45
    +                                                  dto.getSpecies().getLabel(referentialLocale),
    
    46 46
                                                       dto.getInputSizeMeasureType().getLabel(referentialLocale),
    
    47 47
                                                       dto.getOutputSizeMeasureType().getLabel(referentialLocale),
    
    48 48
                                                       dto.getInputOutputFormula(),
    
    49 49
                                                       dto.getOutputInputFormula());
    
    50
    -
    
    51 50
         }
    
    52 51
     }

  • persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_3.java
    ... ... @@ -43,6 +43,7 @@ public class DataSourceMigrationForVersion_7_3 extends MigrationVersionResource
    43 43
         @Override
    
    44 44
         public void generateSqlScript(MigrationVersionResourceExecutor executor) {
    
    45 45
             executor.addScript("01", "remove_one_size_measure_type");
    
    46
    +        executor.addScript("02", "add_length_length_parameter_species");
    
    46 47
         }
    
    47 48
     
    
    48 49
     }
    

  • persistence/src/main/models/Observe.model
    ... ... @@ -480,6 +480,7 @@ getLabel(referentialLocale !fr.ird.observe.dto.referential.ReferentialLocale) St
    480 480
     referentiel.LengthLengthParameter > referentiel.FormulaSupport | entity
    
    481 481
     inputOutputFormula + {*:1} String
    
    482 482
     outputInputFormula + {*:1} String
    
    483
    +species {*:1} referentiel.Species | notNull lazy=false
    
    483 484
     inputSizeMeasureType {*:1} referentiel.SizeMeasureType | lazy=false
    
    484 485
     outputSizeMeasureType {*:1} referentiel.SizeMeasureType | lazy=false
    
    485 486
     
    

  • persistence/src/main/resources/db/migration/7.3/02_add_length_length_parameter_species-common.sql
    1
    +---
    
    2
    +-- #%L
    
    3
    +-- ObServe :: Persistence
    
    4
    +-- %%
    
    5
    +-- Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io
    
    6
    +-- %%
    
    7
    +-- This program is free software: you can redistribute it and/or modify
    
    8
    +-- it under the terms of the GNU General Public License as
    
    9
    +-- published by the Free Software Foundation, either version 3 of the
    
    10
    +-- License, or (at your option) any later version.
    
    11
    +--
    
    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
    +--
    
    17
    +-- You should have received a copy of the GNU General Public
    
    18
    +-- License along with this program.  If not, see
    
    19
    +-- <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    20
    +-- #L%
    
    21
    +---
    
    22
    +
    
    23
    +ALTER TABLE observe_common.lengthlengthparameter ADD COLUMN species VARCHAR(255);
    
    24
    +ALTER TABLE observe_common.lengthlengthparameter ADD CONSTRAINT fk_lengthlengthparameter_species FOREIGN KEY (species) REFERENCES observe_common.species(topiaid);
    
    25
    +CREATE INDEX idx_observe_common_lengthlengthparameter_species ON observe_common.lengthlengthparameter(species);
    \ No newline at end of file

  • test/src/main/resources/db/7.3/dataForTestLongline.sql.gz The diff for this file was not included because it is too large.
  • test/src/main/resources/db/7.3/dataForTestSeine.sql.gz The diff for this file was not included because it is too large.
  • test/src/main/resources/db/7.3/empty_h2.sql.gz
    ... ... @@ -10,7 +10,7 @@ create table OBSERVE_COMMON.gearCaracteristic (topiaId varchar(255) not null, to
    10 10
     create table OBSERVE_COMMON.gearCaracteristicType (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId));
    
    11 11
     create table OBSERVE_COMMON.harbour (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, country varchar(255), locode varchar(255), name varchar(255), latitude float, longitude float, primary key (topiaId));
    
    12 12
     create table OBSERVE_COMMON.lastUpdateDate (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, type varchar(255), primary key (topiaId));
    
    13
    -create table OBSERVE_COMMON.lengthLengthParameter (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, coefficients varchar(255), source varchar(2147483647), inputOutputFormula varchar(255), outputInputFormula varchar(255), inputSizeMeasureType varchar(255), outputSizeMeasureType varchar(255), primary key (topiaId));
    
    13
    +create table OBSERVE_COMMON.lengthLengthParameter (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, coefficients varchar(255), source varchar(2147483647), inputOutputFormula varchar(255), outputInputFormula varchar(255), species varchar(255) not null, inputSizeMeasureType varchar(255), outputSizeMeasureType varchar(255), primary key (topiaId));
    
    14 14
     create table OBSERVE_COMMON.lengthWeightParameter (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, coefficients varchar(255), source varchar(2147483647), ocean varchar(255) not null, species varchar(255) not null, sex varchar(255) not null, startDate timestamp, endDate timestamp, lengthWeightFormula varchar(255), weightLengthFormula varchar(255), meanLength float, meanWeight float, sizeMeasureType varchar(255), primary key (topiaId));
    
    15 15
     create table OBSERVE_COMMON.ocean (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId));
    
    16 16
     create table OBSERVE_COMMON.ocean_species (species varchar(255), ocean varchar(255) not null);
    
    ... ... @@ -118,6 +118,7 @@ alter table OBSERVE_COMMON.gear_gearcaracteristic add constraint fk_gear_gearcar
    118 118
     alter table OBSERVE_COMMON.gear_gearcaracteristic add constraint fk_gear_gearcaracteristic_gear foreign key (gear) references OBSERVE_COMMON.gear;
    
    119 119
     alter table OBSERVE_COMMON.gearCaracteristic add constraint fk_gearcaracteristic_gearcaracteristictype foreign key (gearCaracteristicType) references OBSERVE_COMMON.gearCaracteristicType;
    
    120 120
     alter table OBSERVE_COMMON.harbour add constraint fk_harbour_country foreign key (country) references OBSERVE_COMMON.country;
    
    121
    +alter table OBSERVE_COMMON.lengthLengthParameter add constraint fk_lengthlengthparameter_species foreign key (species) references OBSERVE_COMMON.species;
    
    121 122
     alter table OBSERVE_COMMON.lengthLengthParameter add constraint fk_lengthlengthparameter_inputsizemeasuretype foreign key (inputSizeMeasureType) references OBSERVE_COMMON.sizeMeasureType;
    
    122 123
     alter table OBSERVE_COMMON.lengthLengthParameter add constraint fk_lengthlengthparameter_outputsizemeasuretype foreign key (outputSizeMeasureType) references OBSERVE_COMMON.sizeMeasureType;
    
    123 124
     alter table OBSERVE_COMMON.lengthWeightParameter add constraint fk_lengthweightparameter_ocean foreign key (ocean) references OBSERVE_COMMON.ocean;
    

  • test/src/main/resources/db/7.3/empty_pg.sql.gz
    ... ... @@ -10,7 +10,7 @@ create table OBSERVE_COMMON.gearCaracteristic (topiaId varchar(255) not null, to
    10 10
     create table OBSERVE_COMMON.gearCaracteristicType (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId));
    
    11 11
     create table OBSERVE_COMMON.harbour (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, country varchar(255), locode varchar(255), name varchar(255), latitude float4, longitude float4, primary key (topiaId));
    
    12 12
     create table OBSERVE_COMMON.lastUpdateDate (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, type varchar(255), primary key (topiaId));
    
    13
    -create table OBSERVE_COMMON.lengthLengthParameter (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, coefficients varchar(255), source text, inputOutputFormula varchar(255), outputInputFormula varchar(255), inputSizeMeasureType varchar(255), outputSizeMeasureType varchar(255), primary key (topiaId));
    
    13
    +create table OBSERVE_COMMON.lengthLengthParameter (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, coefficients varchar(255), source text, inputOutputFormula varchar(255), outputInputFormula varchar(255), species varchar(255) not null, inputSizeMeasureType varchar(255), outputSizeMeasureType varchar(255), primary key (topiaId));
    
    14 14
     create table OBSERVE_COMMON.lengthWeightParameter (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, coefficients varchar(255), source text, ocean varchar(255) not null, species varchar(255) not null, sex varchar(255) not null, startDate timestamp, endDate timestamp, lengthWeightFormula varchar(255), weightLengthFormula varchar(255), meanLength float4, meanWeight float4, sizeMeasureType varchar(255), primary key (topiaId));
    
    15 15
     create table OBSERVE_COMMON.ocean (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId));
    
    16 16
     create table OBSERVE_COMMON.ocean_species (species varchar(255), ocean varchar(255) not null);
    
    ... ... @@ -118,6 +118,7 @@ alter table if exists OBSERVE_COMMON.gear_gearcaracteristic add constraint fk_ge
    118 118
     alter table if exists OBSERVE_COMMON.gear_gearcaracteristic add constraint fk_gear_gearcaracteristic_gear foreign key (gear) references OBSERVE_COMMON.gear;
    
    119 119
     alter table if exists OBSERVE_COMMON.gearCaracteristic add constraint fk_gearcaracteristic_gearcaracteristictype foreign key (gearCaracteristicType) references OBSERVE_COMMON.gearCaracteristicType;
    
    120 120
     alter table if exists OBSERVE_COMMON.harbour add constraint fk_harbour_country foreign key (country) references OBSERVE_COMMON.country;
    
    121
    +alter table if exists OBSERVE_COMMON.lengthLengthParameter add constraint fk_lengthlengthparameter_species foreign key (species) references OBSERVE_COMMON.species;
    
    121 122
     alter table if exists OBSERVE_COMMON.lengthLengthParameter add constraint fk_lengthlengthparameter_inputsizemeasuretype foreign key (inputSizeMeasureType) references OBSERVE_COMMON.sizeMeasureType;
    
    122 123
     alter table if exists OBSERVE_COMMON.lengthLengthParameter add constraint fk_lengthlengthparameter_outputsizemeasuretype foreign key (outputSizeMeasureType) references OBSERVE_COMMON.sizeMeasureType;
    
    123 124
     alter table if exists OBSERVE_COMMON.lengthWeightParameter add constraint fk_lengthweightparameter_ocean foreign key (ocean) references OBSERVE_COMMON.ocean;
    

  • test/src/main/resources/db/7.3/referentiel.sql.gz The diff for this file was not included because it is too large.
  • validation/src/main/resources/fr/ird/observe/dto/referential/LengthLengthParameterDto-create-error-validation.xml
    ... ... @@ -35,6 +35,22 @@
    35 35
     
    
    36 36
       </field>
    
    37 37
     
    
    38
    +
    
    39
    +  <field name="species">
    
    40
    +    <!-- pas de species selectionne -->
    
    41
    +    <field-validator type="required" short-circuit="true">
    
    42
    +      <message>observe.validation.lengthWeightParameter.required.species</message>
    
    43
    +    </field-validator>
    
    44
    +
    
    45
    +    <!-- clef unique species -->
    
    46
    +    <field-validator type="observeCollectionUniqueKeyDto" short-circuit="true">
    
    47
    +      <param name="collectionFieldName">editingReferentielList</param>
    
    48
    +      <param name="keys">species</param>
    
    49
    +      <!--<param name="againstMe">true</param>-->
    
    50
    +      <message>observe.validation.lengthWeightParameter.invalid.uniqueKey</message>
    
    51
    +    </field-validator>
    
    52
    +  </field>
    
    53
    +
    
    38 54
       <field name="inputSizeMeasureType">
    
    39 55
     
    
    40 56
         <!-- intputSizeMeasureType desactive -->
    

  • validation/src/main/resources/fr/ird/observe/dto/referential/LengthLengthParameterDto-update-error-validation.xml
    ... ... @@ -26,6 +26,21 @@
    26 26
         "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
    
    27 27
     <validators>
    
    28 28
     
    
    29
    +  <field name="species">
    
    30
    +    <!-- pas de species selectionne -->
    
    31
    +    <field-validator type="required" short-circuit="true">
    
    32
    +      <message>observe.validation.lengthWeightParameter.required.species</message>
    
    33
    +    </field-validator>
    
    34
    +
    
    35
    +    <!-- clef unique species -->
    
    36
    +    <field-validator type="observeCollectionUniqueKeyDto" short-circuit="true">
    
    37
    +      <param name="collectionFieldName">editingReferentielList</param>
    
    38
    +      <param name="keys">species</param>
    
    39
    +      <!--<param name="againstMe">true</param>-->
    
    40
    +      <message>observe.validation.lengthWeightParameter.invalid.uniqueKey</message>
    
    41
    +    </field-validator>
    
    42
    +  </field>
    
    43
    +
    
    29 44
       <field name="inputOutputFormula">
    
    30 45
         <!-- pas de relation inputOutputFormula renseignee -->
    
    31 46
         <field-validator type="requiredstring" short-circuit="true">
    

  • validation/src/main/resources/i18n/validation_en_GB.properties
    ... ... @@ -103,6 +103,7 @@ observe.common.LengthLengthParameterDto.coefficients=Coefficients
    103 103
     observe.common.LengthLengthParameterDto.inputSizeMeasureType=Input size measure type
    
    104 104
     observe.common.LengthLengthParameterDto.outputInputFormula=Output to Input formula
    
    105 105
     observe.common.LengthLengthParameterDto.outputSizeMeasureType=Output size measure type
    
    106
    +observe.common.LengthLengthParameterDto.species=Species
    
    106 107
     observe.common.LengthWeightParameterDto.coefficients=Coefficients
    
    107 108
     observe.common.LengthWeightParameterDto.endDate=End date
    
    108 109
     observe.common.LengthWeightParameterDto.lengthWeightFormula=Length weight formula
    

  • validation/src/main/resources/i18n/validation_es_ES.properties
    ... ... @@ -103,6 +103,7 @@ observe.common.LengthLengthParameterDto.coefficients=Coeficientes
    103 103
     observe.common.LengthLengthParameterDto.inputSizeMeasureType=Type de mensuration d'entrée \#TODO
    
    104 104
     observe.common.LengthLengthParameterDto.outputInputFormula=Formule Sortie vers Entrée \#TODO
    
    105 105
     observe.common.LengthLengthParameterDto.outputSizeMeasureType=Type de mensuration de sortie \#TODO
    
    106
    +observe.common.LengthLengthParameterDto.species=Especie
    
    106 107
     observe.common.LengthWeightParameterDto.coefficients=Coeficientes
    
    107 108
     observe.common.LengthWeightParameterDto.endDate=Fecha de fin
    
    108 109
     observe.common.LengthWeightParameterDto.lengthWeightFormula=Relación de peso
    

  • validation/src/main/resources/i18n/validation_fr_FR.properties
    ... ... @@ -103,6 +103,7 @@ observe.common.LengthLengthParameterDto.coefficients=Coefficients
    103 103
     observe.common.LengthLengthParameterDto.inputSizeMeasureType=Type de mensuration d'entrée
    
    104 104
     observe.common.LengthLengthParameterDto.outputInputFormula=Formule sortie -> entrée
    
    105 105
     observe.common.LengthLengthParameterDto.outputSizeMeasureType=Type de mensuration de sortie
    
    106
    +observe.common.LengthLengthParameterDto.species=Espèce
    
    106 107
     observe.common.LengthWeightParameterDto.coefficients=Coefficients
    
    107 108
     observe.common.LengthWeightParameterDto.endDate=Fin de validité
    
    108 109
     observe.common.LengthWeightParameterDto.lengthWeightFormula=Relation Poids