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

Commits:

25 changed files:

Changes:

  • client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIHandler.java
    ... ... @@ -479,4 +479,15 @@ public abstract class ContentUIHandler<U extends ContentUI> implements ObserveSe
    479 479
                 editor.setEnabled(enabled);
    
    480 480
             });
    
    481 481
         }
    
    482
    +
    
    483
    +    public void onEndOpenForCreateMode() {
    
    484
    +        if (getModel().getStates().isCreatingMode() && withMainTab) {
    
    485
    +            JTabbedPane mainTab = (JTabbedPane) ui.getObjectById(DefaultUIInitializer.MAIN_TABBED_PANE);
    
    486
    +            mainTab.setSelectedIndex(0);
    
    487
    +            if (withSubTab) {
    
    488
    +                JTabbedPane subTab = (JTabbedPane) ui.getObjectById(DefaultUIInitializer.SUB_TABBED_PANE);
    
    489
    +                subTab.setSelectedIndex(0);
    
    490
    +            }
    
    491
    +        }
    
    492
    +    }
    
    482 493
     }

  • client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/edit/ContentEditUIOpenExecutor.java
    ... ... @@ -66,6 +66,7 @@ public class ContentEditUIOpenExecutor<D extends EditableDto, U extends ContentE
    66 66
         public void onOpened(U ui) {
    
    67 67
             ContentEditUIHandler<D, U> handler = ui.getHandler();
    
    68 68
             handler.fixFormSize();
    
    69
    +        handler.onEndOpenForCreateMode();
    
    69 70
             handler.onEndOpenUI();
    
    70 71
         }
    
    71 72
     
    

  • client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/open/ContentOpenableUIOpenExecutor.java
    ... ... @@ -55,6 +55,7 @@ public class ContentOpenableUIOpenExecutor<D extends OpenableDto, U extends Cont
    55 55
         public void onOpened(U ui) {
    
    56 56
             ContentOpenableUIHandler<D, U> handler = ui.getHandler();
    
    57 57
             handler.fixFormSize();
    
    58
    +        handler.onEndOpenForCreateMode();
    
    58 59
             handler.onEndOpenUI();
    
    59 60
         }
    
    60 61
     
    

  • client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/ropen/ContentRootOpenableUIOpenExecutor.java
    ... ... @@ -55,6 +55,7 @@ public class ContentRootOpenableUIOpenExecutor<D extends RootOpenableDto, U exte
    55 55
         public void onOpened(U ui) {
    
    56 56
             ContentRootOpenableUIHandler<D, U> handler = ui.getHandler();
    
    57 57
             handler.fixFormSize();
    
    58
    +        handler.onEndOpenForCreateMode();
    
    58 59
             handler.onEndOpenUI();
    
    59 60
         }
    
    60 61
     
    

  • client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/simple/ContentSimpleUIOpenExecutor.java
    ... ... @@ -56,6 +56,7 @@ public class ContentSimpleUIOpenExecutor<D extends SimpleDto, U extends ContentS
    56 56
         public void onOpened(U ui) {
    
    57 57
             ContentSimpleUIHandler<D, U> handler = ui.getHandler();
    
    58 58
             handler.fixFormSize();
    
    59
    +        handler.onEndOpenForCreateMode();
    
    59 60
             handler.onEndOpenUI();
    
    60 61
         }
    
    61 62
     
    

  • client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUIOpenExecutor.java
    ... ... @@ -125,7 +125,7 @@ public class ContentReferentialUIOpenExecutor<D extends ReferentialDto, R extend
    125 125
             ContentReferentialUIHandler<D, R, U> handler = ui.getHandler();
    
    126 126
             handler.getContentOpen().prepareCoordinateEditors();
    
    127 127
             handler.fixFormSize();
    
    128
    -
    
    128
    +        handler.onEndOpenForCreateMode();
    
    129 129
         }
    
    130 130
     
    
    131 131
         @Override
    

  • client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/SetCatchUIHandler.java
    1
    +package fr.ird.observe.client.datasource.editor.ps.data.observation;
    
    2
    +
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * ObServe Client :: DataSource :: Editor :: PS
    
    6
    + * %%
    
    7
    + * Copyright (C) 2008 - 2022 IRD, Ultreia.io
    
    8
    + * %%
    
    9
    + * This program is free software: you can redistribute it and/or modify
    
    10
    + * it under the terms of the GNU General Public License as
    
    11
    + * published by the Free Software Foundation, either version 3 of the
    
    12
    + * License, or (at your option) any later version.
    
    13
    + *
    
    14
    + * This program is distributed in the hope that it will be useful,
    
    15
    + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16
    + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17
    + * GNU General Public License for more details.
    
    18
    + *
    
    19
    + * You should have received a copy of the GNU General Public
    
    20
    + * License along with this program.  If not, see
    
    21
    + * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    22
    + * #L%
    
    23
    + */
    
    24
    +
    
    25
    +
    
    26
    +import fr.ird.observe.client.datasource.editor.api.DataSourceEditor;
    
    27
    +import fr.ird.observe.client.datasource.editor.api.content.actions.save.SaveAction;
    
    28
    +import fr.ird.observe.client.datasource.editor.api.content.data.table.actions.SaveContentTableUIAdapter;
    
    29
    +import fr.ird.observe.dto.data.ps.observation.SetCatchDto;
    
    30
    +
    
    31
    +/**
    
    32
    + * @author Tony Chemit - dev@tchemit.fr
    
    33
    + * @since 9.0.12
    
    34
    + */
    
    35
    +public class SetCatchUIHandler extends GeneratedSetCatchUIHandler {
    
    36
    +    @Override
    
    37
    +    protected void installSaveAction() {
    
    38
    +        SaveAction
    
    39
    +                .create(ui, SetCatchDto.class)
    
    40
    +                .on(ui.getModel()::toSaveRequest)
    
    41
    +                .call((r, d) -> getContainerService().save(d))
    
    42
    +                .then(new SaveContentTableUIAdapter<>() {
    
    43
    +                    @Override
    
    44
    +                    public void adaptUi(DataSourceEditor dataSourceEditor, SetCatchUI ui, boolean notPersisted, SetCatchDto savedBean) {
    
    45
    +                        super.adaptUi(dataSourceEditor, ui, notPersisted, savedBean);
    
    46
    +                        SetCatchUINavigationNode node = ui.getModel().getSource();
    
    47
    +                        SetUINavigationNode parent = node.getParent();
    
    48
    +                        parent.getSampleUINavigationNode().reloadNodeData();
    
    49
    +                        parent.getSetNonTargetCatchReleaseUINavigationNode().reloadNodeData();
    
    50
    +                    }
    
    51
    +                })
    
    52
    +                .install(ui.getSave());
    
    53
    +    }
    
    54
    +}

  • client/runner/src/main/assembly/bin.xml
    ... ... @@ -32,7 +32,8 @@
    32 32
           <fileMode>0755</fileMode>
    
    33 33
           <includes>
    
    34 34
             <include>${applicationJarName}.jar</include>
    
    35
    -        <include>${applicationJarName}.exe</include>
    
    35
    +<!--        FIXME - See https://gitlab.com/ultreiaio/ird-observe/-/issues/2454-->
    
    36
    +<!--        <include>${applicationJarName}.exe</include>-->
    
    36 37
           </includes>
    
    37 38
         </fileSet>
    
    38 39
     
    

  • core/api/validation/src/main/filtered-resources/META-INF/validators/validation.json
    ... ... @@ -11853,7 +11853,8 @@
    11853 11853
           {
    
    11854 11854
             "name": "informationSource",
    
    11855 11855
             "comments": [
    
    11856
    -          "check if referential informationSource is disabled (only if validation is strong)"
    
    11856
    +          "check if referential informationSource is disabled (only if validation is strong)",
    
    11857
    +          "informationSource is mandatory"
    
    11857 11858
             ]
    
    11858 11859
           },
    
    11859 11860
           {
    
    ... ... @@ -11999,7 +12000,8 @@
    11999 12000
           {
    
    12000 12001
             "name": "informationSource",
    
    12001 12002
             "comments": [
    
    12002
    -          "check if referential informationSource is disabled (only if validation is strong)"
    
    12003
    +          "check if referential informationSource is disabled (only if validation is strong)",
    
    12004
    +          "informationSource is mandatory"
    
    12003 12005
             ]
    
    12004 12006
           },
    
    12005 12007
           {
    

  • core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/observation/CatchDto-create-error-validation.xml
    ... ... @@ -52,6 +52,11 @@
    52 52
       </field>
    
    53 53
     
    
    54 54
       <field name="informationSource">
    
    55
    +    <!-- informationSource is mandatory -->
    
    56
    +    <field-validator type="mandatory" short-circuit="true">
    
    57
    +      <message/>
    
    58
    +    </field-validator>
    
    59
    +
    
    55 60
         <!-- check if referential informationSource is disabled (only if validation is strong) -->
    
    56 61
         <field-validator type="checkDisabledReferentialOnErrorScope">
    
    57 62
           <message/>
    

  • core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/observation/CatchDto-update-error-validation.xml
    ... ... @@ -52,6 +52,11 @@
    52 52
       </field>
    
    53 53
     
    
    54 54
       <field name="informationSource">
    
    55
    +    <!-- informationSource is mandatory -->
    
    56
    +    <field-validator type="mandatory" short-circuit="true">
    
    57
    +      <message/>
    
    58
    +    </field-validator>
    
    59
    +
    
    55 60
         <!-- check if referential informationSource is disabled (only if validation is strong) -->
    
    56 61
         <field-validator type="checkDisabledReferentialOnErrorScope">
    
    57 62
           <message/>
    

  • core/persistence/java/src/main/resources/fr/ird/observe/entities/data/ps/observation/CatchImpl.hbm.xml
    ... ... @@ -68,7 +68,7 @@
    68 68
             </property>
    
    69 69
             <property name="well" access="field" type="java.lang.String" column="well"/>
    
    70 70
             <many-to-one name="reasonForDiscard" class="fr.ird.observe.entities.referential.ps.observation.ReasonForDiscardImpl" column="reasonForDiscard" foreign-key="fk_ps_observation_catch_reasonfordiscard" />
    
    71
    -        <many-to-one name="informationSource" class="fr.ird.observe.entities.referential.ps.observation.InformationSourceImpl" column="informationSource" foreign-key="fk_ps_observation_catch_informationsource" />
    
    71
    +        <many-to-one name="informationSource" class="fr.ird.observe.entities.referential.ps.observation.InformationSourceImpl" column="informationSource" foreign-key="fk_ps_observation_catch_informationsource" not-null="true" />
    
    72 72
             <many-to-one name="species" class="fr.ird.observe.entities.referential.common.SpeciesImpl" column="species" foreign-key="fk_ps_observation_catch_species" not-null="true" />
    
    73 73
             <many-to-one name="weightMeasureMethod" class="fr.ird.observe.entities.referential.common.WeightMeasureMethodImpl" column="weightMeasureMethod" foreign-key="fk_ps_observation_catch_weightmeasuremethod" />
    
    74 74
             <many-to-one name="lengthMeasureMethod" class="fr.ird.observe.entities.referential.common.LengthMeasureMethodImpl" column="lengthMeasureMethod" foreign-key="fk_ps_observation_catch_lengthmeasuremethod" />
    

  • core/persistence/resources/src/main/resources/db/migration/v9/9.0/03_create-table-ps_observation_catch-H2.sql
    ... ... @@ -19,4 +19,4 @@
    19 19
     -- <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    20 20
     -- #L%
    
    21 21
     ---
    
    22
    -create table ps_observation.catch (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), catchWeight numeric, catchWeightComputedSource integer, meanWeight numeric, meanWeightComputedSource integer, meanLength numeric, meanLengthComputedSource integer, totalCount integer, totalCountComputedSource integer, well varchar(255), reasonForDiscard varchar(255), informationSource varchar(255), species varchar(255) not null, weightMeasureMethod varchar(255), lengthMeasureMethod varchar(255), speciesFate varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId));
    22
    +create table ps_observation.catch (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), catchWeight numeric, catchWeightComputedSource integer, meanWeight numeric, meanWeightComputedSource integer, meanLength numeric, meanLengthComputedSource integer, totalCount integer, totalCountComputedSource integer, well varchar(255), reasonForDiscard varchar(255), informationSource varchar(255) not null, species varchar(255) not null, weightMeasureMethod varchar(255), lengthMeasureMethod varchar(255), speciesFate varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId));

  • core/persistence/resources/src/main/resources/db/migration/v9/9.0/03_create-table-ps_observation_catch-PG.sql
    ... ... @@ -19,4 +19,4 @@
    19 19
     -- <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    20 20
     -- #L%
    
    21 21
     ---
    
    22
    -create table ps_observation.catch (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), catchWeight numeric, catchWeightComputedSource integer, meanWeight numeric, meanWeightComputedSource integer, meanLength numeric, meanLengthComputedSource integer, totalCount integer, totalCountComputedSource integer, well varchar(255), reasonForDiscard varchar(255), informationSource varchar(255), species varchar(255) not null, weightMeasureMethod varchar(255), lengthMeasureMethod varchar(255), speciesFate varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId));
    22
    +create table ps_observation.catch (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), catchWeight numeric, catchWeightComputedSource integer, meanWeight numeric, meanWeightComputedSource integer, meanLength numeric, meanLengthComputedSource integer, totalCount integer, totalCountComputedSource integer, well varchar(255), reasonForDiscard varchar(255), informationSource varchar(255) not null, species varchar(255) not null, weightMeasureMethod varchar(255), lengthMeasureMethod varchar(255), speciesFate varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId));

  • core/persistence/resources/src/main/resources/db/migration/v9/9.0/99_0_add_missing_not_null-common.sql
    ... ... @@ -229,6 +229,7 @@ ALTER TABLE ps_logbook.WellPlan ALTER COLUMN wellSamplingConformity SET NOT NULL
    229 229
     ALTER TABLE ps_logbook.WellPlan ALTER COLUMN wellSamplingStatus SET NOT NULL;
    
    230 230
     ALTER TABLE ps_logbook.WellPlan ALTER COLUMN well SET NOT NULL;
    
    231 231
     ALTER TABLE ps_observation.Catch ALTER COLUMN species SET NOT NULL;
    
    232
    +ALTER TABLE ps_observation.Catch ALTER COLUMN informationSource SET NOT NULL;
    
    232 233
     
    
    233 234
     -- ALTER TABLE ps_observation.Activity ALTER COLUMN latitude SET NOT NULL;
    
    234 235
     -- ALTER TABLE ps_observation.Activity ALTER COLUMN longitude SET NOT NULL;
    

  • core/persistence/resources/src/main/resources/db/migration/v9/9.0/empty-schema-H2.sql
    ... ... @@ -178,7 +178,7 @@ create table ps_logbook.wellSamplingConformity (topiaId varchar(255) not null, t
    178 178
     create table ps_logbook.wellSamplingStatus (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, code varchar(255) not null, uri varchar(255), homeId varchar(255), needComment boolean default false not null, status integer not null, label1 varchar(255) not null, label2 varchar(255) not null, label3 varchar(255) not null, label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId));
    
    179 179
     create table ps_observation.activity (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), time time not null, latitude numeric, longitude numeric, vesselSpeed numeric, seaSurfaceTemperature numeric, observedSystemDistance numeric, ersId varchar(255), vesselActivity varchar(255) not null, surroundingActivity varchar(255), wind varchar(255), detectionMode varchar(255), reasonForNoFishing varchar(255), currentFpaZone varchar(255), previousFpaZone varchar(255), nextFpaZone varchar(255), dataQuality varchar(255), route varchar(255) not null, primary key (topiaId));
    
    180 180
     create table ps_observation.activity_observedSystem (activity varchar(255) not null, observedSystem varchar(255) not null, primary key (activity, observedSystem));
    
    181
    -create table ps_observation.catch (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), catchWeight numeric, catchWeightComputedSource integer, meanWeight numeric, meanWeightComputedSource integer, meanLength numeric, meanLengthComputedSource integer, totalCount integer, totalCountComputedSource integer, well varchar(255), reasonForDiscard varchar(255), informationSource varchar(255), species varchar(255) not null, weightMeasureMethod varchar(255), lengthMeasureMethod varchar(255), speciesFate varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId));
    
    181
    +create table ps_observation.catch (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), catchWeight numeric, catchWeightComputedSource integer, meanWeight numeric, meanWeightComputedSource integer, meanLength numeric, meanLengthComputedSource integer, totalCount integer, totalCountComputedSource integer, well varchar(255), reasonForDiscard varchar(255), informationSource varchar(255) not null, species varchar(255) not null, weightMeasureMethod varchar(255), lengthMeasureMethod varchar(255), speciesFate varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId));
    
    182 182
     create table ps_observation.detectionMode (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, code varchar(255) not null, uri varchar(255), homeId varchar(255), needComment boolean default false not null, status integer not null, label1 varchar(255) not null, label2 varchar(255) not null, label3 varchar(255) not null, label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId));
    
    183 183
     create table ps_observation.floatingObject (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), objectOperation varchar(255), supportVesselName varchar(32), computedWhenArrivingBiodegradable varchar(255), computedWhenArrivingNonEntangling varchar(255), computedWhenArrivingSimplifiedObjectType varchar(255), computedWhenLeavingBiodegradable varchar(255), computedWhenLeavingNonEntangling varchar(255), computedWhenLeavingSimplifiedObjectType varchar(255), activity varchar(255) not null, primary key (topiaId));
    
    184 184
     create table ps_observation.floatingObjectPart (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), whenArriving varchar(255), whenLeaving varchar(255), objectMaterial varchar(255) not null, floatingObject varchar(255) not null, primary key (topiaId));
    

  • core/persistence/resources/src/main/resources/db/migration/v9/9.0/empty-schema-PG.sql
    ... ... @@ -178,7 +178,7 @@ create table ps_logbook.wellSamplingConformity (topiaId varchar(255) not null, t
    178 178
     create table ps_logbook.wellSamplingStatus (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, code varchar(255) not null, uri varchar(255), homeId varchar(255), needComment boolean default false not null, status integer not null, label1 varchar(255) not null, label2 varchar(255) not null, label3 varchar(255) not null, label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId));
    
    179 179
     create table ps_observation.activity (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), time time not null, latitude numeric, longitude numeric, vesselSpeed numeric, seaSurfaceTemperature numeric, observedSystemDistance numeric, ersId varchar(255), vesselActivity varchar(255) not null, surroundingActivity varchar(255), wind varchar(255), detectionMode varchar(255), reasonForNoFishing varchar(255), currentFpaZone varchar(255), previousFpaZone varchar(255), nextFpaZone varchar(255), dataQuality varchar(255), route varchar(255) not null, primary key (topiaId));
    
    180 180
     create table ps_observation.activity_observedSystem (activity varchar(255) not null, observedSystem varchar(255) not null, primary key (activity, observedSystem));
    
    181
    -create table ps_observation.catch (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), catchWeight numeric, catchWeightComputedSource integer, meanWeight numeric, meanWeightComputedSource integer, meanLength numeric, meanLengthComputedSource integer, totalCount integer, totalCountComputedSource integer, well varchar(255), reasonForDiscard varchar(255), informationSource varchar(255), species varchar(255) not null, weightMeasureMethod varchar(255), lengthMeasureMethod varchar(255), speciesFate varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId));
    
    181
    +create table ps_observation.catch (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), catchWeight numeric, catchWeightComputedSource integer, meanWeight numeric, meanWeightComputedSource integer, meanLength numeric, meanLengthComputedSource integer, totalCount integer, totalCountComputedSource integer, well varchar(255), reasonForDiscard varchar(255), informationSource varchar(255) not null, species varchar(255) not null, weightMeasureMethod varchar(255), lengthMeasureMethod varchar(255), speciesFate varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId));
    
    182 182
     create table ps_observation.detectionMode (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, code varchar(255) not null, uri varchar(255), homeId varchar(255), needComment boolean default false not null, status integer not null, label1 varchar(255) not null, label2 varchar(255) not null, label3 varchar(255) not null, label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId));
    
    183 183
     create table ps_observation.floatingObject (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), objectOperation varchar(255), supportVesselName varchar(32), computedWhenArrivingBiodegradable varchar(255), computedWhenArrivingNonEntangling varchar(255), computedWhenArrivingSimplifiedObjectType varchar(255), computedWhenLeavingBiodegradable varchar(255), computedWhenLeavingNonEntangling varchar(255), computedWhenLeavingSimplifiedObjectType varchar(255), activity varchar(255) not null, primary key (topiaId));
    
    184 184
     create table ps_observation.floatingObjectPart (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), whenArriving varchar(255), whenLeaving varchar(255), objectMaterial varchar(255) not null, floatingObject varchar(255) not null, primary key (topiaId));
    

  • core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/observation/Catch/validation-create.json
    ... ... @@ -16,7 +16,8 @@
    16 16
       },
    
    17 17
       "informationSource": {
    
    18 18
         "errors": [
    
    19
    -      "check if referential informationSource is disabled (only if validation is strong)"
    
    19
    +      "check if referential informationSource is disabled (only if validation is strong)",
    
    20
    +      "informationSource is mandatory"
    
    20 21
         ],
    
    21 22
         "warnings": [
    
    22 23
           "check if referential informationSource is disabled (only if validation is not strong)"
    

  • core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/observation/Catch/validation-update.json
    ... ... @@ -16,7 +16,8 @@
    16 16
       },
    
    17 17
       "informationSource": {
    
    18 18
         "errors": [
    
    19
    -      "check if referential informationSource is disabled (only if validation is strong)"
    
    19
    +      "check if referential informationSource is disabled (only if validation is strong)",
    
    20
    +      "informationSource is mandatory"
    
    20 21
         ],
    
    21 22
         "warnings": [
    
    22 23
           "check if referential informationSource is disabled (only if validation is not strong)"
    

  • model/src/main/models/Observe/dto/attribute/notNull.properties
    ... ... @@ -165,6 +165,7 @@ data.ps.observation.Activity.attribute.observedSystem=true
    165 165
     data.ps.observation.Activity.attribute.quadrant=true
    
    166 166
     data.ps.observation.Activity.attribute.time=true
    
    167 167
     data.ps.observation.Activity.attribute.vesselActivity=true
    
    168
    +data.ps.observation.Catch.attribute.informationSource=true
    
    168 169
     data.ps.observation.Catch.attribute.species=true
    
    169 170
     data.ps.observation.FloatingObjectPart.attribute.objectMaterial=true
    
    170 171
     data.ps.observation.NonTargetCatchRelease.attribute.count=true
    

  • model/src/main/models/Observe/persistence/attribute/notNull.properties
    ... ... @@ -167,6 +167,7 @@ data.ps.observation.Activity.attribute.latitude=false
    167 167
     data.ps.observation.Activity.attribute.longitude=false
    
    168 168
     data.ps.observation.Activity.attribute.time=true
    
    169 169
     data.ps.observation.Activity.attribute.vesselActivity=true
    
    170
    +data.ps.observation.Catch.attribute.informationSource=true
    
    170 171
     data.ps.observation.Catch.attribute.species=true
    
    171 172
     data.ps.observation.FloatingObjectPart.attribute.objectMaterial=true
    
    172 173
     data.ps.observation.NonTargetCatchRelease.attribute.count=true
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/observation/Catch/validation-create-error.xml
    ... ... @@ -52,6 +52,11 @@
    52 52
       </field>
    
    53 53
     
    
    54 54
       <field name="informationSource">
    
    55
    +    <!-- informationSource is mandatory -->
    
    56
    +    <field-validator type="mandatory" short-circuit="true">
    
    57
    +      <message/>
    
    58
    +    </field-validator>
    
    59
    +
    
    55 60
         <!-- check if referential informationSource is disabled (only if validation is strong) -->
    
    56 61
         <field-validator type="checkDisabledReferentialOnErrorScope">
    
    57 62
           <message/>
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/observation/Catch/validation-create.json
    ... ... @@ -16,7 +16,8 @@
    16 16
       },
    
    17 17
       "informationSource": {
    
    18 18
         "errors": [
    
    19
    -      "check if referential informationSource is disabled (only if validation is strong)"
    
    19
    +      "check if referential informationSource is disabled (only if validation is strong)",
    
    20
    +      "informationSource is mandatory"
    
    20 21
         ],
    
    21 22
         "warnings": [
    
    22 23
           "check if referential informationSource is disabled (only if validation is not strong)"
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/observation/Catch/validation-update-error.xml
    ... ... @@ -52,6 +52,11 @@
    52 52
       </field>
    
    53 53
     
    
    54 54
       <field name="informationSource">
    
    55
    +    <!-- informationSource is mandatory -->
    
    56
    +    <field-validator type="mandatory" short-circuit="true">
    
    57
    +      <message/>
    
    58
    +    </field-validator>
    
    59
    +
    
    55 60
         <!-- check if referential informationSource is disabled (only if validation is strong) -->
    
    56 61
         <field-validator type="checkDisabledReferentialOnErrorScope">
    
    57 62
           <message/>
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/observation/Catch/validation-update.json
    ... ... @@ -16,7 +16,8 @@
    16 16
       },
    
    17 17
       "informationSource": {
    
    18 18
         "errors": [
    
    19
    -      "check if referential informationSource is disabled (only if validation is strong)"
    
    19
    +      "check if referential informationSource is disabled (only if validation is strong)",
    
    20
    +      "informationSource is mandatory"
    
    20 21
         ],
    
    21 22
         "warnings": [
    
    22 23
           "check if referential informationSource is disabled (only if validation is not strong)"