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

Commits:

22 changed files:

Changes:

  • client-configuration/src/main/config/Client.ini
    ... ... @@ -369,24 +369,43 @@ key = speciesList.seine.objectObservedSpecies
    369 369
     type = string
    
    370 370
     defaultValue = "fr.ird.observe.entities.referentiel.SpeciesList#1239832675370#0.2"
    
    371 371
     
    
    372
    -[option speciesListLonglineCatchId]
    
    373
    -description = observe.config.speciesList.longline.catch
    
    374
    -key = speciesList.longline.catch
    
    372
    +[option speciesListLonglineObsCatchId]
    
    373
    +description = observe.config.speciesList.longline.obs.catch
    
    374
    +key = speciesList.longline.obs.catch
    
    375 375
     type = string
    
    376 376
     defaultValue = "fr.ird.observe.entities.referentiel.SpeciesList#1239832675370#0.3"
    
    377 377
     
    
    378
    -[option speciesListLonglineEncounterId]
    
    379
    -description = observe.config.speciesList.longline.encounter
    
    380
    -key = speciesList.longline.encounter
    
    378
    +[option speciesListLonglineObsEncounterId]
    
    379
    +description = observe.config.speciesList.longline.obs.encounter
    
    380
    +key = speciesList.longline.obs.encounter
    
    381 381
     type = string
    
    382 382
     defaultValue = "fr.ird.observe.entities.referentiel.SpeciesList#1239832675370#0.4"
    
    383 383
     
    
    384
    -[option speciesListLonglineDepredatorId]
    
    385
    -description = observe.config.speciesList.longline.encounter
    
    386
    -key = speciesList.longline.depredator
    
    384
    +[option speciesListLonglineObsDepredatorId]
    
    385
    +description = observe.config.speciesList.longline.obs.depredator
    
    386
    +key = speciesList.longline.obs.tdr
    
    387 387
     type = string
    
    388 388
     defaultValue = "fr.ird.observe.entities.referentiel.SpeciesList#1239832675370#0.5"
    
    389 389
     
    
    390
    +[option speciesListLonglineLogbookCatchId]
    
    391
    +description = observe.config.speciesList.longline.logbook.catch
    
    392
    +key = speciesList.longline.logbook.catch
    
    393
    +type = string
    
    394
    +defaultValue = "fr.ird.observe.entities.referentiel.SpeciesList#1239832675370#0.3"
    
    395
    +
    
    396
    +[option speciesListLonglineLogbookLandingId]
    
    397
    +description = observe.config.speciesList.longline.logbook.landing
    
    398
    +key = speciesList.longline.logbook.landing
    
    399
    +type = string
    
    400
    +defaultValue = "fr.ird.observe.entities.referentiel.SpeciesList#1239832675370#0.3"
    
    401
    +
    
    402
    +[option speciesListLonglineLogbookSampleId]
    
    403
    +description = observe.config.speciesList.longline.logbook.sample
    
    404
    +key = speciesList.longline.logbook.sample
    
    405
    +type = string
    
    406
    +defaultValue = "fr.ird.observe.entities.referentiel.SpeciesList#1239832675370#0.3"
    
    407
    +
    
    408
    +
    
    390 409
     [option speciesListLonglineTripId]
    
    391 410
     description = observe.config.speciesList.longline.trip
    
    392 411
     key = speciesList.longline.trip
    

  • client-configuration/src/main/resources/i18n/client-configuration_en_GB.properties
    ... ... @@ -69,8 +69,12 @@ observe.config.serverDataSourceConfigurations.description=Server data source con
    69 69
     observe.config.showMigrationProgression=Show migration progression
    
    70 70
     observe.config.showMigrationSql=Show migration sql queries
    
    71 71
     observe.config.showSql=Show sql
    
    72
    -observe.config.speciesList.longline.catch=Species for catches
    
    73
    -observe.config.speciesList.longline.encounter=Species for encounters
    
    72
    +observe.config.speciesList.longline.logbook.catch=Species for logbook catches
    
    73
    +observe.config.speciesList.longline.logbook.landing=Species for logbook landings
    
    74
    +observe.config.speciesList.longline.logbook.sample=Species for logbook samples
    
    75
    +observe.config.speciesList.longline.obs.catch=Species for observation catches
    
    76
    +observe.config.speciesList.longline.obs.depredator=Species for observation depredator
    
    77
    +observe.config.speciesList.longline.obs.encounter=Species for encounters
    
    74 78
     observe.config.speciesList.longline.trip=Species for trip longline
    
    75 79
     observe.config.speciesList.seine.nonTargetCatch=Species for non target catches
    
    76 80
     observe.config.speciesList.seine.objectObservedSpecies=Species for object observed species
    

  • client-configuration/src/main/resources/i18n/client-configuration_es_ES.properties
    ... ... @@ -69,8 +69,12 @@ observe.config.serverDataSourceConfigurations.description=Configurations de serv
    69 69
     observe.config.showMigrationProgression=Mostar los logs de actualización de una base de datos
    
    70 70
     observe.config.showMigrationSql=Mostrar en los logs las consultas realizadas durante la actualización de una base de datos
    
    71 71
     observe.config.showSql=Mostrar en los los todas las consultas sql ejecutadas
    
    72
    -observe.config.speciesList.longline.catch=Especies para las capturas - TDR
    
    73
    -observe.config.speciesList.longline.encounter=Especies para los encuentros
    
    72
    +observe.config.speciesList.longline.logbook.catch=Especies para las capturas logbook \#TODO
    
    73
    +observe.config.speciesList.longline.logbook.landing=Especies para las landing logbook \#TODO
    
    74
    +observe.config.speciesList.longline.logbook.sample=Especies para las sample logbook \#TODO
    
    75
    +observe.config.speciesList.longline.obs.catch=Especies para las capturas observations \#TODO
    
    76
    +observe.config.speciesList.longline.obs.depredator=Species for observation depredator \#TODO
    
    77
    +observe.config.speciesList.longline.obs.encounter=Especies para los encuentros
    
    74 78
     observe.config.speciesList.longline.trip=Especies para las marea - Longline
    
    75 79
     observe.config.speciesList.seine.nonTargetCatch=Especies para las capturas que no forman parte del objetivo
    
    76 80
     observe.config.speciesList.seine.objectObservedSpecies=Especies para los especies que no forman parte del objetivo y que fueron observadas
    

  • client-configuration/src/main/resources/i18n/client-configuration_fr_FR.properties
    ... ... @@ -69,8 +69,12 @@ observe.config.serverDataSourceConfigurations.description=connexions à des serv
    69 69
     observe.config.showMigrationProgression=Afficher dans les logs la progression de la mise à jour d'une base
    
    70 70
     observe.config.showMigrationSql=Afficher dans les logs les requêtes jouées lors de la mise à jour d'une base
    
    71 71
     observe.config.showSql=Afficher dans les logs toutes les requêtes sql executées
    
    72
    -observe.config.speciesList.longline.catch=Espèces pour les captures - TDR
    
    73
    -observe.config.speciesList.longline.encounter=Espèces pour les rencontre
    
    72
    +observe.config.speciesList.longline.logbook.catch=Espèces pour les captures Logbook
    
    73
    +observe.config.speciesList.longline.logbook.landing=Espèces pour les débarquements Logbook
    
    74
    +observe.config.speciesList.longline.logbook.sample=Espèces pour les échantillons Logbook
    
    75
    +observe.config.speciesList.longline.obs.catch=Espèces pour les captures observation
    
    76
    +observe.config.speciesList.longline.obs.depredator=Espèces pour les déprédations
    
    77
    +observe.config.speciesList.longline.obs.encounter=Espèces pour les rencontre
    
    74 78
     observe.config.speciesList.longline.trip=Espèces ciébles pour les marées Palangre
    
    75 79
     observe.config.speciesList.seine.nonTargetCatch=Espèces pour les captures non cible
    
    76 80
     observe.config.speciesList.seine.objectObservedSpecies=Espèces pour les espèces non cible observées
    

  • client/src/main/java/fr/ird/observe/client/ui/actions/main/menu/config/ShowConfigAction.java
    ... ... @@ -36,8 +36,8 @@ import fr.ird.observe.dto.decoration.decorators.ReferentialReferenceDecorator;
    36 36
     import fr.ird.observe.dto.reference.ReferentialDtoReference;
    
    37 37
     import fr.ird.observe.dto.referential.SpeciesListReference;
    
    38 38
     import io.ultreia.java4all.config.ConfigOptionDef;
    
    39
    -import org.apache.logging.log4j.Logger;
    
    40 39
     import org.apache.logging.log4j.LogManager;
    
    40
    +import org.apache.logging.log4j.Logger;
    
    41 41
     import org.jdesktop.swingx.renderer.DefaultTableRenderer;
    
    42 42
     import org.nuiton.decorator.Decorator;
    
    43 43
     import org.nuiton.jaxx.widgets.config.ConfigCategoryUI;
    
    ... ... @@ -234,8 +234,13 @@ public class ShowConfigAction extends MenuActionSupport {
    234 234
                                    n("observe.config.category.speciesList.longline.description"),
    
    235 235
                                    ObserveUICallback.ui.name());
    
    236 236
     
    
    237
    -            helper.addSpeciesListOption(ClientConfigOption.SPECIES_LIST_LONGLINE_CATCH_ID);
    
    238
    -            helper.addSpeciesListOption(ClientConfigOption.SPECIES_LIST_LONGLINE_ENCOUNTER_ID);
    
    237
    +            helper.addSpeciesListOption(ClientConfigOption.SPECIES_LIST_LONGLINE_TRIP_ID);
    
    238
    +            helper.addSpeciesListOption(ClientConfigOption.SPECIES_LIST_LONGLINE_OBS_CATCH_ID);
    
    239
    +            helper.addSpeciesListOption(ClientConfigOption.SPECIES_LIST_LONGLINE_OBS_DEPREDATOR_ID);
    
    240
    +            helper.addSpeciesListOption(ClientConfigOption.SPECIES_LIST_LONGLINE_OBS_ENCOUNTER_ID);
    
    241
    +            helper.addSpeciesListOption(ClientConfigOption.SPECIES_LIST_LONGLINE_LOGBOOK_CATCH_ID);
    
    242
    +            helper.addSpeciesListOption(ClientConfigOption.SPECIES_LIST_LONGLINE_LOGBOOK_LANDING_ID);
    
    243
    +            helper.addSpeciesListOption(ClientConfigOption.SPECIES_LIST_LONGLINE_LOGBOOK_SAMPLE_ID);
    
    239 244
     
    
    240 245
     
    
    241 246
             }
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUIHandler.java
    ... ... @@ -70,7 +70,7 @@ class TripLonglineUIHandler extends ContentOpenableUIHandler<TripLonglineDto, Tr
    70 70
         }
    
    71 71
     
    
    72 72
         @Override
    
    73
    -    public void afterInit(TripLonglineUI ui) {
    
    73
    +    protected void onAfterInitAddReferentialFilters() {
    
    74 74
             addReferentialFilter(TripLonglineDto.PROPERTY_CAPTAIN, (ReferentialReferencesFilter<PersonDto, PersonReference>) incomingReferences -> {
    
    75 75
                 List<PersonReference> result = PersonHelper.filterCaptainReferences(incomingReferences);
    
    76 76
                 return DtoReferenceCollection.filterEnabled(result);
    
    ... ... @@ -98,6 +98,10 @@ class TripLonglineUIHandler extends ContentOpenableUIHandler<TripLonglineDto, Tr
    98 98
                 List<SpeciesReference> result = getTripLonglineService().getSpeciesByListAndTrip(tripLonglineId, speciesListId).toList();
    
    99 99
                 return DtoReferenceCollection.filterEnabled(result);
    
    100 100
             });
    
    101
    +    }
    
    102
    +
    
    103
    +    @Override
    
    104
    +    public void afterInit(TripLonglineUI ui) {
    
    101 105
             super.afterInit(ui);
    
    102 106
             TripMapUI tripMap = ui.getTripMap();
    
    103 107
             ClientConfig config = ObserveSwingApplicationContext.get().getConfig();
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUIHandler.java
    ... ... @@ -126,22 +126,19 @@ public class CatchLonglineLogbookUIHandler extends ContentTableUIHandler<SetLong
    126 126
         }
    
    127 127
     
    
    128 128
         @Override
    
    129
    -    public void afterInit(CatchLonglineLogbookUI ui) {
    
    130
    -        super.afterInit(ui);
    
    129
    +    protected void onAfterInitAddReferentialFilters() {
    
    131 130
             addReferentialFilter(CatchLonglineLogbookDto.PROPERTY_SPECIES_CATCH, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    132
    -            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineCatchId();
    
    131
    +            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineLogbookCatchId();
    
    133 132
                 String tripLonglineId = ObserveSwingApplicationContext.get().getNavigationSelect().getLongline().getTrip().getId();
    
    134 133
                 List<SpeciesReference> result = getTripLonglineService().getSpeciesByListAndTrip(tripLonglineId, speciesListId).toList();
    
    135 134
                 return DtoReferenceCollection.filterEnabled(result);
    
    136 135
             });
    
    137
    -
    
    138 136
             addReferentialFilter(CatchLonglineLogbookDto.PROPERTY_PREDATOR, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    139
    -            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineDepredatorId();
    
    137
    +            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineObsDepredatorId();
    
    140 138
                 String tripLonglineId = ObserveSwingApplicationContext.get().getNavigationSelect().getLongline().getTrip().getId();
    
    141 139
                 List<SpeciesReference> result = getTripLonglineService().getSpeciesByListAndTrip(tripLonglineId, speciesListId).toList();
    
    142 140
                 return DtoReferenceCollection.filterEnabled(result);
    
    143 141
             });
    
    144
    -
    
    145 142
         }
    
    146 143
     
    
    147 144
         @Override
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/LandingPartLogbookUIHandler.java
    ... ... @@ -22,11 +22,13 @@ package fr.ird.observe.client.ui.content.data.longline.logbook;
    22 22
      * #L%
    
    23 23
      */
    
    24 24
     
    
    25
    +import fr.ird.observe.client.ObserveSwingApplicationContext;
    
    25 26
     import fr.ird.observe.client.ui.content.api.data.table.ContentTableUIHandler;
    
    26 27
     import fr.ird.observe.client.ui.content.api.ui.ObserveLayoutFocusTraversalPolicy;
    
    27 28
     import fr.ird.observe.client.ui.util.UIHelper;
    
    28 29
     import fr.ird.observe.dto.data.longline.LandingLogbookDto;
    
    29 30
     import fr.ird.observe.dto.data.longline.LandingPartLogbookDto;
    
    31
    +import fr.ird.observe.dto.reference.DtoReferenceCollection;
    
    30 32
     import fr.ird.observe.dto.referential.SpeciesReference;
    
    31 33
     import org.apache.logging.log4j.LogManager;
    
    32 34
     import org.apache.logging.log4j.Logger;
    
    ... ... @@ -36,6 +38,7 @@ import javax.swing.JTable;
    36 38
     import javax.swing.table.DefaultTableCellRenderer;
    
    37 39
     import java.awt.Component;
    
    38 40
     import java.awt.Container;
    
    41
    +import java.util.List;
    
    39 42
     
    
    40 43
     import static org.nuiton.i18n.I18n.n;
    
    41 44
     
    
    ... ... @@ -69,6 +72,16 @@ public class LandingPartLogbookUIHandler extends ContentTableUIHandler<LandingLo
    69 72
             };
    
    70 73
         }
    
    71 74
     
    
    75
    +    @Override
    
    76
    +    protected void onAfterInitAddReferentialFilters() {
    
    77
    +        addReferentialFilter(LandingPartLogbookDto.PROPERTY_SPECIES, incomingReferences -> {
    
    78
    +            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineLogbookLandingId();
    
    79
    +            String tripLonglineId = ObserveSwingApplicationContext.get().getNavigationSelect().getLongline().getTrip().getId();
    
    80
    +            List<SpeciesReference> result = getTripLonglineService().getSpeciesByListAndTrip(tripLonglineId, speciesListId).toList();
    
    81
    +            return DtoReferenceCollection.filterEnabled(result);
    
    82
    +        });
    
    83
    +    }
    
    84
    +
    
    72 85
         @Override
    
    73 86
         protected void initTableUI(DefaultTableCellRenderer renderer) {
    
    74 87
             JTable table = ui.getTable();
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SamplePartLogbookUIHandler.java
    ... ... @@ -31,7 +31,7 @@ import fr.ird.observe.client.ui.content.api.ui.ObserveLayoutFocusTraversalPolicy
    31 31
     import fr.ird.observe.client.ui.util.UIHelper;
    
    32 32
     import fr.ird.observe.dto.data.longline.SampleLogbookDto;
    
    33 33
     import fr.ird.observe.dto.data.longline.SamplePartLogbookDto;
    
    34
    -import fr.ird.observe.dto.reference.ReferentialDtoReferenceSet;
    
    34
    +import fr.ird.observe.dto.reference.DtoReferenceCollection;
    
    35 35
     import fr.ird.observe.dto.referential.SexReference;
    
    36 36
     import fr.ird.observe.dto.referential.SizeMeasureTypeReference;
    
    37 37
     import fr.ird.observe.dto.referential.SpeciesReference;
    
    ... ... @@ -46,7 +46,6 @@ import javax.swing.table.DefaultTableCellRenderer;
    46 46
     import java.awt.Component;
    
    47 47
     import java.awt.Container;
    
    48 48
     import java.beans.PropertyChangeListener;
    
    49
    -import java.util.LinkedList;
    
    50 49
     import java.util.List;
    
    51 50
     import java.util.Optional;
    
    52 51
     
    
    ... ... @@ -97,21 +96,24 @@ public class SamplePartLogbookUIHandler extends ContentTableUIHandler<SampleLogb
    97 96
         }
    
    98 97
     
    
    99 98
         @Override
    
    100
    -    public void afterInit(SamplePartLogbookUI ui) {
    
    99
    +    protected void onAfterInitAddReferentialFilters() {
    
    101 100
             addReferentialFilter(SamplePartLogbookDto.PROPERTY_SPECIES, incomingReferences -> {
    
    102
    -            if (fromActivity) {
    
    103
    -//                FIXME We do not have the set selected here (since this is a brother of it)
    
    104
    -                String setId = ObserveSwingApplicationContext.get().getNavigationSelect().getLongline().getActivityLogbookSet().getId();
    
    105
    -                if (setId == null) {
    
    106
    -                    return incomingReferences;
    
    107
    -                }
    
    108
    -                ReferentialDtoReferenceSet<SpeciesReference> sampleSpecies = getSetLonglineLogbookCatchService().getSampleSpecies(setId);
    
    109
    -                return new LinkedList<>(sampleSpecies.toSet());
    
    110
    -            } else {
    
    111
    -                return incomingReferences;
    
    112
    -            }
    
    101
    +            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineLogbookSampleId();
    
    102
    +            String tripLonglineId = ObserveSwingApplicationContext.get().getNavigationSelect().getLongline().getTrip().getId();
    
    103
    +            List<SpeciesReference> result = getTripLonglineService().getSpeciesByListAndTrip(tripLonglineId, speciesListId).toList();
    
    104
    +            return DtoReferenceCollection.filterEnabled(result);
    
    105
    +//            if (fromActivity) {
    
    106
    +////                FIXME We do not have the set selected here (since this is a brother of it)
    
    107
    +//                String setId = ObserveSwingApplicationContext.get().getNavigationSelect().getLongline().getActivityLogbookSet().getId();
    
    108
    +//                if (setId == null) {
    
    109
    +//                    return incomingReferences;
    
    110
    +//                }
    
    111
    +//                ReferentialDtoReferenceSet<SpeciesReference> sampleSpecies = getSetLonglineLogbookCatchService().getSampleSpecies(setId);
    
    112
    +//                return new LinkedList<>(sampleSpecies.toSet());
    
    113
    +//            } else {
    
    114
    +//                return incomingReferences;
    
    115
    +//            }
    
    113 116
             });
    
    114
    -        super.afterInit(ui);
    
    115 117
         }
    
    116 118
     
    
    117 119
         @Override
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/CatchLonglineObsUIHandler.java
    ... ... @@ -161,24 +161,25 @@ public class CatchLonglineObsUIHandler extends ContentTableUIHandler<SetLongline
    161 161
         }
    
    162 162
     
    
    163 163
         @Override
    
    164
    -    public void afterInit(CatchLonglineObsUI ui) {
    
    165
    -
    
    166
    -        super.afterInit(ui);
    
    167
    -
    
    164
    +    protected void onAfterInitAddReferentialFilters() {
    
    168 165
             addReferentialFilter(CatchLonglineObsDto.PROPERTY_SPECIES_CATCH, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    169
    -            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineCatchId();
    
    166
    +            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineObsCatchId();
    
    170 167
                 String tripLonglineId = ObserveSwingApplicationContext.get().getNavigationSelect().getLongline().getTrip().getId();
    
    171 168
                 List<SpeciesReference> result = getTripLonglineService().getSpeciesByListAndTrip(tripLonglineId, speciesListId).toList();
    
    172 169
                 return DtoReferenceCollection.filterEnabled(result);
    
    173 170
             });
    
    174 171
     
    
    175 172
             addReferentialFilter(CatchLonglineObsDto.PROPERTY_PREDATOR, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    176
    -            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineDepredatorId();
    
    173
    +            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineObsDepredatorId();
    
    177 174
                 String tripLonglineId = ObserveSwingApplicationContext.get().getNavigationSelect().getLongline().getTrip().getId();
    
    178 175
                 List<SpeciesReference> result = getTripLonglineService().getSpeciesByListAndTrip(tripLonglineId, speciesListId).toList();
    
    179 176
                 return DtoReferenceCollection.filterEnabled(result);
    
    180 177
             });
    
    178
    +    }
    
    181 179
     
    
    180
    +    @Override
    
    181
    +    public void afterInit(CatchLonglineObsUI ui) {
    
    182
    +        super.afterInit(ui);
    
    182 183
             CatchLonglineObsUIModel model = ui.getModel();
    
    183 184
             model.addPropertyChangeListener(CatchLonglineObsUIModel.PROPERTY_SHOW_INDIVIDUAL_TABS, evt -> {
    
    184 185
                 Boolean newValue = (Boolean) evt.getNewValue();
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/EncounterObsUIHandler.java
    ... ... @@ -60,9 +60,9 @@ public class EncounterObsUIHandler extends ContentTableUIHandler<ActivityLonglin
    60 60
         private static final Logger log = LogManager.getLogger(EncounterObsUIHandler.class);
    
    61 61
     
    
    62 62
         @Override
    
    63
    -    public void afterInit(EncounterObsUI ui) {
    
    63
    +    protected void onAfterInitAddReferentialFilters() {
    
    64 64
             addReferentialFilter(EncounterObsDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    65
    -            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineEncounterId();
    
    65
    +            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineObsEncounterId();
    
    66 66
                 Form<SpeciesListDto> speciesListDtoForm = getReferentialService().loadForm(SpeciesListDto.class, speciesListId);
    
    67 67
                 SpeciesListDto speciesListDto = speciesListDtoForm.getObject();
    
    68 68
     
    
    ... ... @@ -71,7 +71,6 @@ public class EncounterObsUIHandler extends ContentTableUIHandler<ActivityLonglin
    71 71
                 List<SpeciesReference> result = DtoReferenceCollection.filterContains(incomingReferences, speciesIds);
    
    72 72
                 return DtoReferenceCollection.filterEnabled(result);
    
    73 73
             });
    
    74
    -        super.afterInit(ui);
    
    75 74
         }
    
    76 75
     
    
    77 76
         @Override
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/TdrObsUIHandler.java
    ... ... @@ -181,15 +181,18 @@ public class TdrObsUIHandler extends ContentTableUIHandler<SetLonglineObsTdrDto,
    181 181
         }
    
    182 182
     
    
    183 183
         @Override
    
    184
    -    public void afterInit(TdrObsUI ui) {
    
    184
    +    protected void onAfterInitAddReferentialFilters() {
    
    185 185
             addReferentialFilter(TdrObsDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    186
    -            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineCatchId();
    
    186
    +            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineObsCatchId();
    
    187 187
                 String tripLonglineId = ObserveSwingApplicationContext.get().getNavigationSelect().getLongline().getTrip().getId();
    
    188 188
                 List<SpeciesReference> result = getTripLonglineService().getSpeciesByListAndTrip(tripLonglineId, speciesListId).toList();
    
    189 189
                 return DtoReferenceCollection.filterEnabled(result);
    
    190 190
             });
    
    191
    -        super.afterInit(ui);
    
    191
    +    }
    
    192 192
     
    
    193
    +    @Override
    
    194
    +    public void afterInit(TdrObsUI ui) {
    
    195
    +        super.afterInit(ui);
    
    193 196
             positionHelper = new LonglinePositionHelper<>(ui.getSection(), ui.getBasket(), ui.getBranchline(), ui.getTableEditBean());
    
    194 197
         }
    
    195 198
     
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetCatchReleaseUIHandler.java
    ... ... @@ -113,11 +113,15 @@ public class NonTargetCatchReleaseUIHandler extends ContentTableUIHandler<SetSei
    113 113
         }
    
    114 114
     
    
    115 115
         @Override
    
    116
    -    public void afterInit(NonTargetCatchReleaseUI ui) {
    
    116
    +    protected void onAfterInitAddReferentialFilters() {
    
    117 117
             addReferentialFilter(NonTargetCatchReleaseDto.PROPERTY_SPECIES, incomingReferences -> {
    
    118 118
                 ReferentialDtoReferenceSet<SpeciesReference> sampleSpecies = getNonTargetCatchReleaseService().getSampleSpecies(getModel().getSelectedId());
    
    119 119
                 return new LinkedList<>(sampleSpecies.toSet());
    
    120 120
             });
    
    121
    +    }
    
    122
    +
    
    123
    +    @Override
    
    124
    +    public void afterInit(NonTargetCatchReleaseUI ui) {
    
    121 125
             super.afterInit(ui);
    
    122 126
             speciesGroupDtoMap = new TreeMap<>();
    
    123 127
             getReferentialService().loadSensibleSpeciesGroup().forEach(id -> speciesGroupDtoMap.put(id.getId(), id));
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetCatchUIHandler.java
    ... ... @@ -180,11 +180,8 @@ public class NonTargetCatchUIHandler extends ContentTableUIHandler<SetSeineNonTa
    180 180
             UIHelper.setTableColumnRenderer(table, 7, UIHelper.newEmptyNumberTableCellRenderer(renderer));
    
    181 181
             UIHelper.setTableColumnRenderer(table, 8, UIHelper.newStringTableCellRenderer(renderer, 10, true));
    
    182 182
         }
    
    183
    -
    
    184 183
         @Override
    
    185
    -    protected void loadEditBean(String beanId) {
    
    186
    -        Form<SetSeineNonTargetCatchDto> form = getNonTargetCatchService().loadForm(beanId);
    
    187
    -        getModel().openForm(form);
    
    184
    +    protected void onAfterInitAddReferentialFilters() {
    
    188 185
             addReferentialFilter(NonTargetCatchDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    189 186
                 String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListSeineNonTargetCatchId();
    
    190 187
                 String tripId = ObserveSwingApplicationContext.get().getNavigationSelect().getSeine().getTrip().getId();
    
    ... ... @@ -193,6 +190,19 @@ public class NonTargetCatchUIHandler extends ContentTableUIHandler<SetSeineNonTa
    193 190
             });
    
    194 191
         }
    
    195 192
     
    
    193
    +    @Override
    
    194
    +    protected void loadEditBean(String beanId) {
    
    195
    +        Form<SetSeineNonTargetCatchDto> form = getNonTargetCatchService().loadForm(beanId);
    
    196
    +        getModel().openForm(form);
    
    197
    +        //FIXME voir pk on faisait ça à ce moment
    
    198
    +//        addReferentialFilter(NonTargetCatchDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    199
    +//            String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListSeineNonTargetCatchId();
    
    200
    +//            String tripId = ObserveSwingApplicationContext.get().getNavigationSelect().getSeine().getTrip().getId();
    
    201
    +//            List<SpeciesReference> result = getTripSeineService().getSpeciesByListAndTrip(tripId, speciesListId).toList();
    
    202
    +//            return DtoReferenceCollection.filterEnabled(result);
    
    203
    +//        });
    
    204
    +    }
    
    205
    +
    
    196 206
         @Override
    
    197 207
         protected void onSelectedRowChanged(int editingRow, NonTargetCatchDto bean, boolean create) {
    
    198 208
             ContentTableModel<SetSeineNonTargetCatchDto, NonTargetCatchDto> model = getTableModel();
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetSampleUIHandler.java
    ... ... @@ -91,7 +91,7 @@ public class NonTargetSampleUIHandler extends AbstractSampleUIHandler<NonTargetS
    91 91
         }
    
    92 92
     
    
    93 93
         @Override
    
    94
    -    public void afterInit(NonTargetSampleUI ui) {
    
    94
    +    protected void onAfterInitAddReferentialFilters() {
    
    95 95
             addReferentialFilter(NonTargetLengthDto.PROPERTY_SPECIES, incomingReferences -> {
    
    96 96
                 ReferentialDtoReferenceSet<SpeciesReference> sampleSpecies = getNonTargetSampleService().getSampleSpecies(getModel().getSelectedId());
    
    97 97
                 return new LinkedList<>(sampleSpecies.toSet());
    
    ... ... @@ -102,7 +102,6 @@ public class NonTargetSampleUIHandler extends AbstractSampleUIHandler<NonTargetS
    102 102
                 return new LinkedList<>(speciesFate);
    
    103 103
     //            return ReferentialDtoReferences.filterEnabled(result);
    
    104 104
             });
    
    105
    -        super.afterInit(ui);
    
    106 105
         }
    
    107 106
     
    
    108 107
         @Override
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/seine/ObjectObservedSpeciesUIHandler.java
    ... ... @@ -58,7 +58,7 @@ public class ObjectObservedSpeciesUIHandler extends ContentTableUIHandler<Floati
    58 58
         private static final Logger log = LogManager.getLogger(ObjectObservedSpeciesUIHandler.class);
    
    59 59
     
    
    60 60
         @Override
    
    61
    -    public void afterInit(ObjectObservedSpeciesUI ui) {
    
    61
    +    protected void onAfterInitAddReferentialFilters() {
    
    62 62
             addReferentialFilter(ObjectSchoolEstimateDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    63 63
                 String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListSeineObjectObservedSpeciesId();
    
    64 64
                 Form<SpeciesListDto> speciesListDtoForm = getReferentialService().loadForm(SpeciesListDto.class, speciesListId);
    
    ... ... @@ -69,7 +69,6 @@ public class ObjectObservedSpeciesUIHandler extends ContentTableUIHandler<Floati
    69 69
                 List<SpeciesReference> result = DtoReferenceCollection.filterContains(incomingReferences, speciesIds);
    
    70 70
                 return DtoReferenceCollection.filterEnabled(result);
    
    71 71
             });
    
    72
    -        super.afterInit(ui);
    
    73 72
         }
    
    74 73
     
    
    75 74
         @Override
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/seine/ObjectSchoolEstimateUIHandler.java
    ... ... @@ -56,7 +56,7 @@ public class ObjectSchoolEstimateUIHandler extends ContentTableUIHandler<Floatin
    56 56
         private static final Logger log = LogManager.getLogger(ObjectSchoolEstimateUIHandler.class);
    
    57 57
     
    
    58 58
         @Override
    
    59
    -    public void afterInit(ObjectSchoolEstimateUI ui) {
    
    59
    +    protected void onAfterInitAddReferentialFilters() {
    
    60 60
             addReferentialFilter(ObjectSchoolEstimateDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    61 61
                 String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListSeineObjectSchoolEstimateId();
    
    62 62
                 Form<SpeciesListDto> speciesListDtoForm = getReferentialService().loadForm(SpeciesListDto.class, speciesListId);
    
    ... ... @@ -67,7 +67,6 @@ public class ObjectSchoolEstimateUIHandler extends ContentTableUIHandler<Floatin
    67 67
                 List<SpeciesReference> result = DtoReferenceCollection.filterContains(incomingReferences, speciesIds);
    
    68 68
                 return DtoReferenceCollection.filterEnabled(result);
    
    69 69
             });
    
    70
    -        super.afterInit(ui);
    
    71 70
         }
    
    72 71
     
    
    73 72
         @Override
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/seine/SchoolEstimateUIHandler.java
    ... ... @@ -56,7 +56,7 @@ import static org.nuiton.i18n.I18n.n;
    56 56
     public class SchoolEstimateUIHandler extends ContentTableUIHandler<SetSeineSchoolEstimateDto, SchoolEstimateDto, SchoolEstimateUI> implements UIHandler<SchoolEstimateUI> {
    
    57 57
     
    
    58 58
         @Override
    
    59
    -    public void afterInit(SchoolEstimateUI ui) {
    
    59
    +    protected void onAfterInitAddReferentialFilters() {
    
    60 60
             addReferentialFilter(SchoolEstimateDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    61 61
                 String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListSeineSchoolEstimateId();
    
    62 62
     
    
    ... ... @@ -64,7 +64,6 @@ public class SchoolEstimateUIHandler extends ContentTableUIHandler<SetSeineSchoo
    64 64
                 List<SpeciesReference> result = getTripSeineService().getSpeciesByListAndTrip(tripId, speciesListId).toList();
    
    65 65
                 return DtoReferenceCollection.filterEnabled(result);
    
    66 66
             });
    
    67
    -        super.afterInit(ui);
    
    68 67
         }
    
    69 68
     
    
    70 69
         @Override
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/seine/TargetCatchUIHandler.java
    ... ... @@ -67,7 +67,7 @@ public class TargetCatchUIHandler extends ContentTableUIHandler<SetSeineTargetCa
    67 67
         private static final Logger log = LogManager.getLogger(TargetCatchUIHandler.class);
    
    68 68
     
    
    69 69
         @Override
    
    70
    -    public void afterInit(TargetCatchUI ui) {
    
    70
    +    protected void onAfterInitAddReferentialFilters() {
    
    71 71
             addReferentialFilter(TargetCatchDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    72 72
                 String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListSeineTargetCatchId();
    
    73 73
     
    
    ... ... @@ -75,6 +75,10 @@ public class TargetCatchUIHandler extends ContentTableUIHandler<SetSeineTargetCa
    75 75
                 List<SpeciesReference> result = getTripSeineService().getSpeciesByListAndTrip(tripId, speciesListId).toList();
    
    76 76
                 return DtoReferenceCollection.filterEnabled(result);
    
    77 77
             });
    
    78
    +    }
    
    79
    +
    
    80
    +    @Override
    
    81
    +    public void afterInit(TargetCatchUI ui) {
    
    78 82
             super.afterInit(ui);
    
    79 83
     
    
    80 84
             // lors de la modification d'une species (sur une entree non sauvee)
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/seine/TargetDiscardCatchUIHandler.java
    ... ... @@ -71,7 +71,7 @@ public class TargetDiscardCatchUIHandler extends ContentTableUIHandler<SetSeineT
    71 71
         private static final Logger log = LogManager.getLogger(TargetDiscardCatchUIHandler.class);
    
    72 72
     
    
    73 73
         @Override
    
    74
    -    public void afterInit(TargetDiscardCatchUI ui) {
    
    74
    +    protected void onAfterInitAddReferentialFilters() {
    
    75 75
             addReferentialFilter(TargetCatchDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    76 76
                 String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListSeineTargetCatchId();
    
    77 77
     
    
    ... ... @@ -79,6 +79,10 @@ public class TargetDiscardCatchUIHandler extends ContentTableUIHandler<SetSeineT
    79 79
                 List<SpeciesReference> result = getTripSeineService().getSpeciesByListAndTrip(tripId, speciesListId).toList();
    
    80 80
                 return DtoReferenceCollection.filterEnabled(result);
    
    81 81
             });
    
    82
    +    }
    
    83
    +
    
    84
    +    @Override
    
    85
    +    public void afterInit(TargetDiscardCatchUI ui) {
    
    82 86
             super.afterInit(ui);
    
    83 87
     
    
    84 88
             // lors de la modification d'une species (sur une entree non sauvee)
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/seine/TargetSampleUIHandler.java
    ... ... @@ -136,7 +136,7 @@ public class TargetSampleUIHandler<U extends ContentTableUI<TargetSampleDto, Tar
    136 136
         }
    
    137 137
     
    
    138 138
         @Override
    
    139
    -    public void afterInit(U ui) {
    
    139
    +    protected void onAfterInitAddReferentialFilters() {
    
    140 140
             addReferentialFilter(TargetLengthDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
    
    141 141
                 List<SpeciesReference> result = TargetSampleUIHandler.this.getTargetSampleService().getSampleSpecies(getModel().getSelectedId(), discarded).toList();
    
    142 142
                 return DtoReferenceCollection.filterEnabled(result);
    
    ... ... @@ -146,7 +146,6 @@ public class TargetSampleUIHandler<U extends ContentTableUI<TargetSampleDto, Tar
    146 146
                 checkSizeMeasureTypes(result);
    
    147 147
                 return DtoReferenceCollection.filterEnabled(result);
    
    148 148
             });
    
    149
    -        super.afterInit(ui);
    
    150 149
         }
    
    151 150
     
    
    152 151
         @Override
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/seine/TripSeineUIHandler.java
    ... ... @@ -65,7 +65,7 @@ class TripSeineUIHandler extends ContentOpenableUIHandler<TripSeineDto, TripSein
    65 65
         }
    
    66 66
     
    
    67 67
         @Override
    
    68
    -    public void afterInit(TripSeineUI ui) {
    
    68
    +    protected void onAfterInitAddReferentialFilters() {
    
    69 69
             addReferentialFilter(TripSeineDto.PROPERTY_CAPTAIN, (ReferentialReferencesFilter<PersonDto, PersonReference>) incomingReferences -> {
    
    70 70
                 List<PersonReference> result = PersonHelper.filterCaptainReferences(incomingReferences);
    
    71 71
                 return DtoReferenceCollection.filterEnabled(result);
    
    ... ... @@ -83,6 +83,10 @@ class TripSeineUIHandler extends ContentOpenableUIHandler<TripSeineDto, TripSein
    83 83
                 List<VesselReference> result = VesselHelper.filterVesselReferencesByVesselTypeIds(incomingReferences, config.getLonglineVesselTypeIds());
    
    84 84
                 return DtoReferenceCollection.filterEnabled(result);
    
    85 85
             });
    
    86
    +    }
    
    87
    +
    
    88
    +    @Override
    
    89
    +    public void afterInit(TripSeineUI ui) {
    
    86 90
             super.afterInit(ui);
    
    87 91
     
    
    88 92
             TripMapUI tripMap = ui.getTripMap();