Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: ae453e7b by Tony CHEMIT at 2018-06-17T00:25:20Z -m[REFERENTIEL] L'écran du référentiel taille-poids plante à son ouverture - Closes #964 - - - - - 4d31f01c by Tony CHEMIT at 2018-06-17T00:25:51Z [REFERENTIEL] L'écran du référentiel taille-taille plante - Closes #965 - - - - - a0e85176 by Tony CHEMIT at 2018-06-17T00:27:45Z [REFERENTIEL] Lien entre lengthlengthparameter et species ? - Closes #962 - - - - - 20 changed files: - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthLengthParameterUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthLengthParameterUIModel.java - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthWeightParameterUIModel.java - dto/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterDtoReferenceBinder.java - dto/src/main/models/Observe.model - persistence/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterEntityDtoBinder.java - persistence/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterEntityReferenceBinder.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_3.java - persistence/src/main/models/Observe.model - + persistence/src/main/resources/db/migration/7.3/02_add_length_length_parameter_species-common.sql - test/src/main/resources/db/7.3/dataForTestLongline.sql.gz - test/src/main/resources/db/7.3/dataForTestSeine.sql.gz - test/src/main/resources/db/7.3/empty_h2.sql.gz - test/src/main/resources/db/7.3/empty_pg.sql.gz - test/src/main/resources/db/7.3/referentiel.sql.gz - validation/src/main/resources/fr/ird/observe/dto/referential/LengthLengthParameterDto-create-error-validation.xml - validation/src/main/resources/fr/ird/observe/dto/referential/LengthLengthParameterDto-update-error-validation.xml - validation/src/main/resources/i18n/validation_en_GB.properties - validation/src/main/resources/i18n/validation_es_ES.properties - validation/src/main/resources/i18n/validation_fr_FR.properties Changes: ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthLengthParameterUI.jaxx ===================================== --- a/client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthLengthParameterUI.jaxx +++ b/client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthLengthParameterUI.jaxx @@ -30,6 +30,7 @@ fr.ird.observe.dto.reference.ReferentialDtoReference fr.ird.observe.dto.referential.SizeMeasureTypeDto fr.ird.observe.dto.referential.SizeMeasureTypeReference + fr.ird.observe.dto.referential.SpeciesReference fr.ird.observe.dto.referential.LengthLengthParameterDto fr.ird.observe.dto.referential.LengthLengthParameterReference fr.ird.observe.client.ui.util.UIHelper @@ -63,6 +64,16 @@ <tab id='generalTab' computeI18n=""> <Table fill="both"> + <!-- species --> + <row> + <cell anchor='west'> + <JLabel id='speciesLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <BeanComboBox id='species' constructorParams='this' genericType='SpeciesReference'/> + </cell> + </row> + <!-- inputSizeMeasureType --> <row> <cell anchor='west'> ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthLengthParameterUIModel.java ===================================== --- a/client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthLengthParameterUIModel.java +++ b/client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthLengthParameterUIModel.java @@ -47,6 +47,7 @@ public class LengthLengthParameterUIModel extends ContentReferenceUIModel<Length LengthLengthParameterDto.PROPERTY_STATUS, LengthLengthParameterDto.PROPERTY_NEED_COMMENT, LengthLengthParameterDto.PROPERTY_SOURCE, + LengthLengthParameterDto.PROPERTY_SPECIES, LengthLengthParameterDto.PROPERTY_OUTPUT_SIZE_MEASURE_TYPE, LengthLengthParameterDto.PROPERTY_INPUT_SIZE_MEASURE_TYPE).build(); @@ -65,13 +66,15 @@ public class LengthLengthParameterUIModel extends ContentReferenceUIModel<Length public LengthLengthParameterUIModel() { super(LengthLengthParameterDto.class, - null, + LengthLengthParameterReference.class, new String[]{ LengthLengthParameterDto.PROPERTY_INPUT_SIZE_MEASURE_TYPE, LengthLengthParameterDto.PROPERTY_OUTPUT_SIZE_MEASURE_TYPE, + LengthLengthParameterDto.PROPERTY_SPECIES, }, new String[]{ LengthLengthParameterUI.BINDING_INPUT_SIZE_MEASURE_TYPE_SELECTED_ITEM, + LengthLengthParameterUI.BINDING_SPECIES_SELECTED_ITEM, LengthLengthParameterUI.BINDING_INPUT_OUTPUT_FORMULA_TEXT, LengthLengthParameterUI.BINDING_OUTPUT_SIZE_MEASURE_TYPE_SELECTED_ITEM, LengthLengthParameterUI.BINDING_OUTPUT_INPUT_FORMULA_TEXT, ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthWeightParameterUIModel.java ===================================== --- a/client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthWeightParameterUIModel.java +++ b/client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthWeightParameterUIModel.java @@ -71,7 +71,7 @@ public class LengthWeightParameterUIModel extends ContentReferenceUIModel<Length public LengthWeightParameterUIModel() { super(LengthWeightParameterDto.class, - null, + LengthWeightParameterReference.class, new String[]{ LengthWeightParameterDto.PROPERTY_SEX, LengthWeightParameterDto.PROPERTY_OCEAN, ===================================== dto/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterDtoReferenceBinder.java ===================================== --- a/dto/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterDtoReferenceBinder.java +++ b/dto/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterDtoReferenceBinder.java @@ -42,6 +42,7 @@ public class LengthLengthParameterDtoReferenceBinder extends ReferentialDtoRefer public LengthLengthParameterReference toReference(ReferentialLocale referentialLocale, LengthLengthParameterDto dto) { return new LengthLengthParameterReference(dto, dto.getCode(), + dto.getSpecies().getLabel(), dto.getInputSizeMeasureType().getLabel(), dto.getOutputSizeMeasureType().getLabel(), dto.getInputOutputFormula(), ===================================== dto/src/main/models/Observe.model ===================================== --- a/dto/src/main/models/Observe.model +++ b/dto/src/main/models/Observe.model @@ -382,13 +382,14 @@ longitude + {*:1} Float quadrant + {*:1} Integer country {*:0..1} fr.ird.observe.dto.referential.CountryReference -referential.LengthLengthParameter > referential.Referential >> WithComment | references=code,inputSizeMeasureTypeLabel,outputSizeMeasureTypeLabel,inputOutputFormula,outputInputFormula +referential.LengthLengthParameter > referential.Referential >> WithComment | references=code,speciesLabel,inputSizeMeasureTypeLabel,outputSizeMeasureTypeLabel,inputOutputFormula,outputInputFormula coefficients + {*:1} String inputOutputFormula + {*:1} String inputOutputFormulaValid + {*:1} boolean outputInputFormula + {*:1} String outputInputFormulaValid + {*:1} boolean source + {*:1} String +species {*:1} fr.ird.observe.dto.referential.SpeciesReference inputSizeMeasureType {*:1} fr.ird.observe.dto.referential.SizeMeasureTypeReference outputSizeMeasureType {*:1} fr.ird.observe.dto.referential.SizeMeasureTypeReference ===================================== persistence/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterEntityDtoBinder.java ===================================== --- a/persistence/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterEntityDtoBinder.java +++ b/persistence/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterEntityDtoBinder.java @@ -40,28 +40,26 @@ public class LengthLengthParameterEntityDtoBinder extends ReferentialEntityDtoBi @Override public void copyToEntity(ReferentialLocale referentialLocale, LengthLengthParameterDto dto, LengthLengthParameter entity) { - copyDtoReferentialFieldsToEntity(dto, entity); entity.setInputOutputFormula(dto.getInputOutputFormula()); entity.setOutputInputFormula(dto.getOutputInputFormula()); + entity.setSpecies(toEntity(dto.getSpecies())); entity.setInputSizeMeasureType(toEntity(dto.getInputSizeMeasureType())); entity.setOutputSizeMeasureType(toEntity(dto.getOutputSizeMeasureType())); entity.setCoefficients(dto.getCoefficients()); entity.setSource(dto.getSource()); - } @Override public void copyToDto(ReferentialLocale referentialLocale, LengthLengthParameter entity, LengthLengthParameterDto dto) { - copyEntityReferentialFieldsToDto(entity, dto); dto.setInputOutputFormula(entity.getInputOutputFormula()); dto.setOutputInputFormula(entity.getOutputInputFormula()); + dto.setSpecies(toReferentialReference(referentialLocale, entity.getSpecies())); dto.setInputSizeMeasureType(toReferentialReference(referentialLocale, entity.getInputSizeMeasureType())); dto.setOutputSizeMeasureType(toReferentialReference(referentialLocale, entity.getOutputSizeMeasureType())); dto.setCoefficients(entity.getCoefficients()); dto.setSource(entity.getSource()); - } } ===================================== persistence/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterEntityReferenceBinder.java ===================================== --- a/persistence/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterEntityReferenceBinder.java +++ b/persistence/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterEntityReferenceBinder.java @@ -41,12 +41,11 @@ public class LengthLengthParameterEntityReferenceBinder extends ReferentialEntit @Override public LengthLengthParameterReference toReference(ReferentialLocale referentialLocale, LengthLengthParameter dto) { - return new LengthLengthParameterReference(dto, dto.getCode(), + dto.getSpecies().getLabel(referentialLocale), dto.getInputSizeMeasureType().getLabel(referentialLocale), dto.getOutputSizeMeasureType().getLabel(referentialLocale), dto.getInputOutputFormula(), dto.getOutputInputFormula()); - } } ===================================== persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_3.java ===================================== --- a/persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_3.java +++ b/persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_3.java @@ -43,6 +43,7 @@ public class DataSourceMigrationForVersion_7_3 extends MigrationVersionResource @Override public void generateSqlScript(MigrationVersionResourceExecutor executor) { executor.addScript("01", "remove_one_size_measure_type"); + executor.addScript("02", "add_length_length_parameter_species"); } } ===================================== persistence/src/main/models/Observe.model ===================================== --- a/persistence/src/main/models/Observe.model +++ b/persistence/src/main/models/Observe.model @@ -480,6 +480,7 @@ getLabel(referentialLocale !fr.ird.observe.dto.referential.ReferentialLocale) St referentiel.LengthLengthParameter > referentiel.FormulaSupport | entity inputOutputFormula + {*:1} String outputInputFormula + {*:1} String +species {*:1} referentiel.Species | notNull lazy=false inputSizeMeasureType {*:1} referentiel.SizeMeasureType | lazy=false outputSizeMeasureType {*:1} referentiel.SizeMeasureType | lazy=false ===================================== persistence/src/main/resources/db/migration/7.3/02_add_length_length_parameter_species-common.sql ===================================== --- /dev/null +++ b/persistence/src/main/resources/db/migration/7.3/02_add_length_length_parameter_species-common.sql @@ -0,0 +1,25 @@ +--- +-- #%L +-- ObServe :: Persistence +-- %% +-- Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io +-- %% +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public +-- License along with this program. If not, see +-- <http://www.gnu.org/licenses/gpl-3.0.html>. +-- #L% +--- + +ALTER TABLE observe_common.lengthlengthparameter ADD COLUMN species VARCHAR(255); +ALTER TABLE observe_common.lengthlengthparameter ADD CONSTRAINT fk_lengthlengthparameter_species FOREIGN KEY (species) REFERENCES observe_common.species(topiaid); +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 ===================================== --- a/test/src/main/resources/db/7.3/empty_h2.sql.gz +++ b/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 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)); 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)); 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)); -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)); +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)); 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)); 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)); 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 alter table OBSERVE_COMMON.gear_gearcaracteristic add constraint fk_gear_gearcaracteristic_gear foreign key (gear) references OBSERVE_COMMON.gear; alter table OBSERVE_COMMON.gearCaracteristic add constraint fk_gearcaracteristic_gearcaracteristictype foreign key (gearCaracteristicType) references OBSERVE_COMMON.gearCaracteristicType; alter table OBSERVE_COMMON.harbour add constraint fk_harbour_country foreign key (country) references OBSERVE_COMMON.country; +alter table OBSERVE_COMMON.lengthLengthParameter add constraint fk_lengthlengthparameter_species foreign key (species) references OBSERVE_COMMON.species; alter table OBSERVE_COMMON.lengthLengthParameter add constraint fk_lengthlengthparameter_inputsizemeasuretype foreign key (inputSizeMeasureType) references OBSERVE_COMMON.sizeMeasureType; alter table OBSERVE_COMMON.lengthLengthParameter add constraint fk_lengthlengthparameter_outputsizemeasuretype foreign key (outputSizeMeasureType) references OBSERVE_COMMON.sizeMeasureType; 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 ===================================== --- a/test/src/main/resources/db/7.3/empty_pg.sql.gz +++ b/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 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)); 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)); 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)); -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)); +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)); 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)); 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)); 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 alter table if exists OBSERVE_COMMON.gear_gearcaracteristic add constraint fk_gear_gearcaracteristic_gear foreign key (gear) references OBSERVE_COMMON.gear; alter table if exists OBSERVE_COMMON.gearCaracteristic add constraint fk_gearcaracteristic_gearcaracteristictype foreign key (gearCaracteristicType) references OBSERVE_COMMON.gearCaracteristicType; alter table if exists OBSERVE_COMMON.harbour add constraint fk_harbour_country foreign key (country) references OBSERVE_COMMON.country; +alter table if exists OBSERVE_COMMON.lengthLengthParameter add constraint fk_lengthlengthparameter_species foreign key (species) references OBSERVE_COMMON.species; alter table if exists OBSERVE_COMMON.lengthLengthParameter add constraint fk_lengthlengthparameter_inputsizemeasuretype foreign key (inputSizeMeasureType) references OBSERVE_COMMON.sizeMeasureType; alter table if exists OBSERVE_COMMON.lengthLengthParameter add constraint fk_lengthlengthparameter_outputsizemeasuretype foreign key (outputSizeMeasureType) references OBSERVE_COMMON.sizeMeasureType; 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 ===================================== --- a/validation/src/main/resources/fr/ird/observe/dto/referential/LengthLengthParameterDto-create-error-validation.xml +++ b/validation/src/main/resources/fr/ird/observe/dto/referential/LengthLengthParameterDto-create-error-validation.xml @@ -35,6 +35,22 @@ </field> + + <field name="species"> + <!-- pas de species selectionne --> + <field-validator type="required" short-circuit="true"> + <message>observe.validation.lengthWeightParameter.required.species</message> + </field-validator> + + <!-- clef unique species --> + <field-validator type="observeCollectionUniqueKeyDto" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">species</param> + <!--<param name="againstMe">true</param>--> + <message>observe.validation.lengthWeightParameter.invalid.uniqueKey</message> + </field-validator> + </field> + <field name="inputSizeMeasureType"> <!-- intputSizeMeasureType desactive --> ===================================== validation/src/main/resources/fr/ird/observe/dto/referential/LengthLengthParameterDto-update-error-validation.xml ===================================== --- a/validation/src/main/resources/fr/ird/observe/dto/referential/LengthLengthParameterDto-update-error-validation.xml +++ b/validation/src/main/resources/fr/ird/observe/dto/referential/LengthLengthParameterDto-update-error-validation.xml @@ -26,6 +26,21 @@ "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> <validators> + <field name="species"> + <!-- pas de species selectionne --> + <field-validator type="required" short-circuit="true"> + <message>observe.validation.lengthWeightParameter.required.species</message> + </field-validator> + + <!-- clef unique species --> + <field-validator type="observeCollectionUniqueKeyDto" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">species</param> + <!--<param name="againstMe">true</param>--> + <message>observe.validation.lengthWeightParameter.invalid.uniqueKey</message> + </field-validator> + </field> + <field name="inputOutputFormula"> <!-- pas de relation inputOutputFormula renseignee --> <field-validator type="requiredstring" short-circuit="true"> ===================================== validation/src/main/resources/i18n/validation_en_GB.properties ===================================== --- a/validation/src/main/resources/i18n/validation_en_GB.properties +++ b/validation/src/main/resources/i18n/validation_en_GB.properties @@ -103,6 +103,7 @@ observe.common.LengthLengthParameterDto.coefficients=Coefficients observe.common.LengthLengthParameterDto.inputSizeMeasureType=Input size measure type observe.common.LengthLengthParameterDto.outputInputFormula=Output to Input formula observe.common.LengthLengthParameterDto.outputSizeMeasureType=Output size measure type +observe.common.LengthLengthParameterDto.species=Species observe.common.LengthWeightParameterDto.coefficients=Coefficients observe.common.LengthWeightParameterDto.endDate=End date observe.common.LengthWeightParameterDto.lengthWeightFormula=Length weight formula ===================================== validation/src/main/resources/i18n/validation_es_ES.properties ===================================== --- a/validation/src/main/resources/i18n/validation_es_ES.properties +++ b/validation/src/main/resources/i18n/validation_es_ES.properties @@ -103,6 +103,7 @@ observe.common.LengthLengthParameterDto.coefficients=Coeficientes observe.common.LengthLengthParameterDto.inputSizeMeasureType=Type de mensuration d'entrée \#TODO observe.common.LengthLengthParameterDto.outputInputFormula=Formule Sortie vers Entrée \#TODO observe.common.LengthLengthParameterDto.outputSizeMeasureType=Type de mensuration de sortie \#TODO +observe.common.LengthLengthParameterDto.species=Especie observe.common.LengthWeightParameterDto.coefficients=Coeficientes observe.common.LengthWeightParameterDto.endDate=Fecha de fin observe.common.LengthWeightParameterDto.lengthWeightFormula=Relación de peso ===================================== validation/src/main/resources/i18n/validation_fr_FR.properties ===================================== --- a/validation/src/main/resources/i18n/validation_fr_FR.properties +++ b/validation/src/main/resources/i18n/validation_fr_FR.properties @@ -103,6 +103,7 @@ observe.common.LengthLengthParameterDto.coefficients=Coefficients observe.common.LengthLengthParameterDto.inputSizeMeasureType=Type de mensuration d'entrée observe.common.LengthLengthParameterDto.outputInputFormula=Formule sortie -> entrée observe.common.LengthLengthParameterDto.outputSizeMeasureType=Type de mensuration de sortie +observe.common.LengthLengthParameterDto.species=Espèce observe.common.LengthWeightParameterDto.coefficients=Coefficients observe.common.LengthWeightParameterDto.endDate=Fin de validité observe.common.LengthWeightParameterDto.lengthWeightFormula=Relation Poids View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/8c0a556ca195d9c0a3057bb9b65... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/8c0a556ca195d9c0a3057bb9b65... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT