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

Commits:

22 changed files:

Changes:

  • client-core/src/main/i18n/getters/jaxx.getter
    ... ... @@ -644,6 +644,7 @@ observe.common.TransmittingBuoyDto.noBuoy
    644 644
     observe.common.TransmittingBuoyDto.ownership
    
    645 645
     observe.common.TransmittingBuoyDto.transmittingBuoyOperation
    
    646 646
     observe.common.TransmittingBuoyDto.transmittingBuoyType
    
    647
    +observe.common.TransmittingBuoyTypeDto.technology
    
    647 648
     observe.common.TripDto.action.close.tip
    
    648 649
     observe.common.TripDto.action.closeAndCreate
    
    649 650
     observe.common.TripDto.action.closeAndCreate.tip
    

  • client-core/src/main/java/fr/ird/observe/client/ui/content/ref/seine/TransmittingBuoyTypeUI.jaxx
    ... ... @@ -28,12 +28,13 @@
    28 28
     
    
    29 29
       <import>
    
    30 30
         fr.ird.observe.dto.reference.ReferentialDtoReference
    
    31
    +    fr.ird.observe.dto.referential.ReferenceStatus
    
    31 32
     
    
    32 33
         fr.ird.observe.dto.referential.seine.TransmittingBuoyTypeDto
    
    33 34
         fr.ird.observe.dto.referential.seine.TransmittingBuoyTypeReference
    
    35
    +    org.nuiton.jaxx.widgets.text.BigTextEditor
    
    34 36
     
    
    35 37
         static fr.ird.observe.client.ui.util.UIHelper.getStringValue
    
    36
    -    fr.ird.observe.dto.referential.ReferenceStatus
    
    37 38
       </import>
    
    38 39
     
    
    39 40
       <!-- validator -->
    
    ... ... @@ -79,5 +80,13 @@
    79 80
           </cell>
    
    80 81
         </row>
    
    81 82
         </Table>
    
    83
    +  <Table id='editMoreExtraTable'>
    
    84
    +    <!-- technology -->
    
    85
    +    <row>
    
    86
    +      <cell weightx="1" weighty="1" fill="both" columns="2">
    
    87
    +        <BigTextEditor id="technology"/>
    
    88
    +      </cell>
    
    89
    +    </row>
    
    90
    +  </Table>
    
    82 91
     </fr.ird.observe.client.ui.content.ref.ContentI18nReferenceUI>
    
    83 92
     

  • client-core/src/main/java/fr/ird/observe/client/ui/content/ref/seine/TransmittingBuoyTypeUI.jcss
    1
    +/*-
    
    2
    + * #%L
    
    3
    + * ObServe :: Client core
    
    4
    + * %%
    
    5
    + * Copyright (C) 2008 - 2020 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
    +#technology {
    
    24
    +  model:{getBean()};
    
    25
    +  i18nProperty:"";
    
    26
    +}

  • dto/src/main/models/Observe.model
    ... ... @@ -589,6 +589,7 @@ referential.seine.SurroundingActivity > referential.I18nReferential
    589 589
     referential.seine.TransmittingBuoyOperation > referential.I18nReferential
    
    590 590
     
    
    591 591
     referential.seine.TransmittingBuoyType > referential.I18nReferential
    
    592
    +technology + {*:1} String
    
    592 593
     
    
    593 594
     referential.seine.VesselActivitySeine > referential.I18nReferential | references=code,label,uri,allowFad
    
    594 595
     allowFad + {*:1} boolean
    

  • observe-i18n/src/main/i18n/translations/observe_en_GB.properties
    ... ... @@ -1543,6 +1543,7 @@ observe.common.TransmittingBuoyDto.type=Transmitting buoy
    1543 1543
     observe.common.TransmittingBuoyDto.types=Transmitting buoys
    
    1544 1544
     observe.common.TransmittingBuoyOperationDto.type=Transmitting buoy operation
    
    1545 1545
     observe.common.TransmittingBuoyOperationDto.types=Transmitting buoy operations
    
    1546
    +observe.common.TransmittingBuoyTypeDto.technology=Technologies
    
    1546 1547
     observe.common.TransmittingBuoyTypeDto.type=Transmitting buoy type
    
    1547 1548
     observe.common.TransmittingBuoyTypeDto.types=Transmitting buoy types
    
    1548 1549
     observe.common.TripDto.action.close.tip=Close the opened maree
    
    ... ... @@ -2315,6 +2316,7 @@ observe.validation.tdr.deployementStart.before.fishingStart=fishing start time m
    2315 2316
     observe.validation.tdr.fishingEnd.before.deployementEnd=Deployement end time must be before fishing end time.
    
    2316 2317
     observe.validation.tdr.fishingStart.before.fishingEnd=Fishing end time must be before fishing start time.
    
    2317 2318
     observe.validation.tdr.required.position=Position must be filled.
    
    2319
    +observe.validation.technology.too.big=Field size can not exceed %s characters (actual length\: %s).
    
    2318 2320
     observe.validation.trip.endDate.after.startDate=End date of the trip must be after trip start date.
    
    2319 2321
     observe.validation.trip.invalid.date=Observation date must be after route date (route at position %1$s is not correct).
    
    2320 2322
     observe.validation.trip.invalid.endDate=Trip end date must be after a route date (route at position %1$s is not correct).
    

  • observe-i18n/src/main/i18n/translations/observe_es_ES.properties
    ... ... @@ -1543,6 +1543,7 @@ observe.common.TransmittingBuoyDto.type=Baliza emisora
    1543 1543
     observe.common.TransmittingBuoyDto.types=Balizas emisoras
    
    1544 1544
     observe.common.TransmittingBuoyOperationDto.type=Operación baliza
    
    1545 1545
     observe.common.TransmittingBuoyOperationDto.types=Operaciones baliza
    
    1546
    +observe.common.TransmittingBuoyTypeDto.technology=Tecnologías
    
    1546 1547
     observe.common.TransmittingBuoyTypeDto.type=Tipo de baliza
    
    1547 1548
     observe.common.TransmittingBuoyTypeDto.types=Tipos de baliza
    
    1548 1549
     observe.common.TripDto.action.close.tip=Cierre de la marea abierta
    
    ... ... @@ -2315,6 +2316,7 @@ observe.validation.tdr.deployementStart.before.fishingStart=La FechaHora de inic
    2315 2316
     observe.validation.tdr.fishingEnd.before.deployementEnd=La FechaHora de fin de despliegue debe ir después de la FechaHora de fin de pesca
    
    2316 2317
     observe.validation.tdr.fishingStart.before.fishingEnd=La FechaHora de fin de pesca debe llegar después del inicio del de inicio de pesca
    
    2317 2318
     observe.validation.tdr.required.position=Deben registrarse posiciones
    
    2319
    +observe.validation.technology.too.big=El tamaño está limitado a %s caracteres (tamaño actual\: %s).
    
    2318 2320
     observe.validation.trip.endDate.after.startDate=La fecha de fin de marea debe ser superior a la fecha de inicio
    
    2319 2321
     observe.validation.trip.invalid.date=La fecha de esta ruta debe ser superior al la fecha de la ruta anterior (la ruta en la línea %1$s es incorrecta)
    
    2320 2322
     observe.validation.trip.invalid.endDate=La fecha de fin de marea debe ser superior a la fecha de las rutas de la marea (la ruta %1$s es incorrecta)
    

  • observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
    ... ... @@ -1543,6 +1543,7 @@ observe.common.TransmittingBuoyDto.type=Balise lue
    1543 1543
     observe.common.TransmittingBuoyDto.types=Balises lues
    
    1544 1544
     observe.common.TransmittingBuoyOperationDto.type=Opération balise
    
    1545 1545
     observe.common.TransmittingBuoyOperationDto.types=Opérations balise
    
    1546
    +observe.common.TransmittingBuoyTypeDto.technology=Technologies
    
    1546 1547
     observe.common.TransmittingBuoyTypeDto.type=Type de balise
    
    1547 1548
     observe.common.TransmittingBuoyTypeDto.types=Types de balise
    
    1548 1549
     observe.common.TripDto.action.close.tip=Clôturer la marée ouverte
    
    ... ... @@ -2315,6 +2316,7 @@ observe.validation.tdr.deployementStart.before.fishingStart=L'horodatage de déb
    2315 2316
     observe.validation.tdr.fishingEnd.before.deployementEnd=L'horodatage de fin de déploiement doit être après le début de celui de fin de pêche.
    
    2316 2317
     observe.validation.tdr.fishingStart.before.fishingEnd=L'horodatage de fin de pêche doit être après le début de celui de début de pêche.
    
    2317 2318
     observe.validation.tdr.required.position=Pas de position renseignée sur la palangre.
    
    2319
    +observe.validation.technology.too.big=La taille du champs est limitée à %s caractères (taille actuelle %s).
    
    2318 2320
     observe.validation.trip.endDate.after.startDate=La date de fin de marée doit être supérieure à sa date de début.
    
    2319 2321
     observe.validation.trip.invalid.date=Le jour d'observation doit être supérieure à celui d'une route précédente. (la route à la position %1$s est incorrecte).
    
    2320 2322
     observe.validation.trip.invalid.endDate=La date de fin de marée doit être supérieure au jour d'observation de chaque route. (la route à la position %1$s est incorrecte).
    

  • persistence/src/main/java/fr/ird/observe/binder/referential/seine/TransmittingBuoyTypeEntityDtoBinder.java
    ... ... @@ -40,20 +40,16 @@ public class TransmittingBuoyTypeEntityDtoBinder extends ReferentialEntityDtoBin
    40 40
     
    
    41 41
         @Override
    
    42 42
         public void copyToEntity(ReferentialLocale referentialLocale, TransmittingBuoyTypeDto dto, TransmittingBuoyType entity) {
    
    43
    -
    
    44
    -
    
    45 43
             copyDtoReferentialFieldsToEntity(dto, entity);
    
    46 44
             copyDtoI18nFieldsToEntity(dto, entity);
    
    47
    -
    
    45
    +        entity.setTechnology(dto.getTechnology());
    
    48 46
         }
    
    49 47
     
    
    50 48
         @Override
    
    51 49
         public void copyToDto(ReferentialLocale referentialLocale, TransmittingBuoyType entity, TransmittingBuoyTypeDto dto) {
    
    52
    -
    
    53
    -
    
    54 50
             copyEntityReferentialFieldsToDto(entity, dto);
    
    55 51
             copyEntityI18nFieldsToDto(entity, dto);
    
    56
    -
    
    52
    +        dto.setTechnology(entity.getTechnology());
    
    57 53
         }
    
    58 54
     
    
    59 55
     }

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

  • persistence/src/main/models/Observe.model
    ... ... @@ -629,6 +629,7 @@ referentiel.seine.SurroundingActivity > referentiel.I18nReferentialEntity | enti
    629 629
     referentiel.seine.TransmittingBuoyOperation > referentiel.I18nReferentialEntity | entity
    
    630 630
     
    
    631 631
     referentiel.seine.TransmittingBuoyType > referentiel.I18nReferentialEntity | entity
    
    632
    +technology + {*:1} String | hibernateAttributeType=text
    
    632 633
     
    
    633 634
     referentiel.seine.VesselActivitySeine > referentiel.I18nReferentialEntity | entity dbName=VesselActivity
    
    634 635
     allowFad + {*:1} boolean
    

  • persistence/src/main/resources/db/migration/7.5/02_add_transmittingBuoyType_technology_field-common.sql
    1
    +---
    
    2
    +-- #%L
    
    3
    +-- ObServe :: Persistence
    
    4
    +-- %%
    
    5
    +-- Copyright (C) 2008 - 2020 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
    +ALTER TABLE observe_seine.TransmittingBuoyType ADD COLUMN technology VARCHAR(1024);

  • test/src/main/java/fr/ird/observe/test/ObserveFixtures.java
    ... ... @@ -68,16 +68,16 @@ public class ObserveFixtures {
    68 68
         public static final int REFERENTIAL_FORM_COUNT = ENTITY_BINDER_REFERENTIAL_COUNT;
    
    69 69
         public static final int DATA_FORM_COUNT = 47;
    
    70 70
     
    
    71
    -    public static final int VALIDATORS_COUNT = 52;//90;
    
    71
    +    public static final int VALIDATORS_COUNT = 54;//90;
    
    72 72
         public static final int VALIDATOR_CREATE_DATA_COUNT = 9; //8;
    
    73 73
         //    public static final int VALIDATOR_CREATE_ENTITY_DATA_COUNT = 33;
    
    74 74
         public static final int VALIDATOR_CREATE_ENTITY_DATA_COUNT_REAL = 112;
    
    75 75
         public static final int VALIDATOR_UPDATE_DATA_COUNT = 23;//32;
    
    76 76
         //    public static final int VALIDATOR_UPDATE_ENTITY_DATA_COUNT = 35;
    
    77 77
         public static final int VALIDATOR_UPDATE_ENTITY_DATA_COUNT_REAL = 113;
    
    78
    -    public static final int VALIDATOR_UPDATE_REFERENTIAL_COUNT = 4;//17;
    
    78
    +    public static final int VALIDATOR_UPDATE_REFERENTIAL_COUNT = 5;//17;
    
    79 79
         public static final int VALIDATOR_UPDATE_REFERENTIAL_COUNT_REAL = 66;
    
    80
    -    public static final int VALIDATOR_CREATE_REFERENTIAL_COUNT = 3;//18;
    
    80
    +    public static final int VALIDATOR_CREATE_REFERENTIAL_COUNT = 4;//18;
    
    81 81
         public static final int VALIDATOR_CREATE_REFERENTIAL_COUNT_REAL = 66;
    
    82 82
         public static final int VALIDATOR_UPDATE_EXTRA_CREATE_DATA_COUNT = 13;
    
    83 83
     
    

  • test/src/main/resources/db/7.5/dataForTestLongline.sql.gz
    No preview for this file type
  • test/src/main/resources/db/7.5/dataForTestSeine.sql.gz
    No preview for this file type
  • test/src/main/resources/db/7.5/empty_h2.sql.gz
    No preview for this file type
  • test/src/main/resources/db/7.5/empty_pg.sql.gz
    No preview for this file type
  • test/src/main/resources/db/7.5/referentiel.sql.gz
    No preview for this file type
  • validation/src/main/i18n/getters/validation-fields.getter
    ... ... @@ -267,6 +267,7 @@ observe.common.TdrDto.section
    267 267
     observe.common.TdrDto.sensorBrand
    
    268 268
     observe.common.TransmittingBuoyDto.transmittingBuoyOperation
    
    269 269
     observe.common.TransmittingBuoyDto.transmittingBuoyType
    
    270
    +observe.common.TransmittingBuoyTypeDto.technology
    
    270 271
     observe.common.TripLonglineDto.activityLongline
    
    271 272
     observe.common.TripLonglineDto.dataEntryOperator
    
    272 273
     observe.common.TripLonglineDto.totalFishingOperationsNumber
    

  • validation/src/main/i18n/getters/validation-messages.getter
    ... ... @@ -60,6 +60,7 @@ observe.validation.tdr.deployementStart.before.fishingStart
    60 60
     observe.validation.tdr.fishingEnd.before.deployementEnd
    
    61 61
     observe.validation.tdr.fishingStart.before.fishingEnd
    
    62 62
     observe.validation.tdr.required.position
    
    63
    +observe.validation.technology.too.big
    
    63 64
     observe.validation.trip.endDate.after.startDate
    
    64 65
     observe.validation.trip.invalid.date
    
    65 66
     observe.validation.trip.invalid.endDate
    

  • validation/src/main/resources/fr/ird/observe/dto/referential/seine/TransmittingBuoyTypeDto-create-error-validation.xml
    1
    +<!--
    
    2
    +  #%L
    
    3
    +  ObServe :: Validation
    
    4
    +  %%
    
    5
    +  Copyright (C) 2008 - 2020 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
    +<!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="technology">
    
    27
    +    <field-validator type="commentLengthFieldDto">
    
    28
    +      <message>observe.validation.technology.too.big##${maxLength}##${commentLength}</message>
    
    29
    +    </field-validator>
    
    30
    +  </field>
    
    31
    +
    
    32
    +</validators>

  • validation/src/main/resources/fr/ird/observe/dto/referential/seine/TransmittingBuoyTypeDto-update-error-validation.xml
    1
    +<!--
    
    2
    +  #%L
    
    3
    +  ObServe :: Validation
    
    4
    +  %%
    
    5
    +  Copyright (C) 2008 - 2020 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
    +<!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="technology">
    
    27
    +    <field-validator type="commentLengthFieldDto">
    
    28
    +      <message>observe.validation.technology.too.big##${maxLength}##${commentLength}</message>
    
    29
    +    </field-validator>
    
    30
    +  </field>
    
    31
    +
    
    32
    +</validators>

  • validation/src/test/java/fr/ird/observe/validation/BeanValidatorDetectorTest.java
    ... ... @@ -55,6 +55,7 @@ import fr.ird.observe.dto.referential.LengthLengthParameterDto;
    55 55
     import fr.ird.observe.dto.referential.LengthWeightParameterDto;
    
    56 56
     import fr.ird.observe.dto.referential.SpeciesListDto;
    
    57 57
     import fr.ird.observe.dto.referential.seine.ObjectMaterialDto;
    
    58
    +import fr.ird.observe.dto.referential.seine.TransmittingBuoyTypeDto;
    
    58 59
     import fr.ird.observe.spi.DtoModelClasses;
    
    59 60
     import fr.ird.observe.test.ObserveFixtures;
    
    60 61
     import org.junit.Assert;
    
    ... ... @@ -141,6 +142,7 @@ public class BeanValidatorDetectorTest extends AbstractValidatorDetectorTest {
    141 142
     //                                               ShipOwnerDto.class,
    
    142 143
     //                                               SpeciesDto.class,
    
    143 144
                                                    SpeciesListDto.class,
    
    145
    +                                               TransmittingBuoyTypeDto.class,
    
    144 146
                                                    TripLonglineDto.class,
    
    145 147
                                                    TripSeineDto.class);
    
    146 148
     //        ,
    
    ... ... @@ -202,6 +204,7 @@ public class BeanValidatorDetectorTest extends AbstractValidatorDetectorTest {
    202 204
                                                    TargetLengthDto.class,
    
    203 205
                                                    TdrDto.class,
    
    204 206
     //                                               TransmittingBuoyDto.class,
    
    207
    +                                               TransmittingBuoyTypeDto.class,
    
    205 208
                                                    TripLonglineDto.class,
    
    206 209
     //                                               TripLonglineGearUseDto.class,
    
    207 210
                                                    TripSeineDto.class);