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

Commits:

14 changed files:

Changes:

  • client/src/main/java/fr/ird/observe/client/ui/content/ContentListUIObserveLayoutFocusTraversalPolicy.java
    1 1
     package fr.ird.observe.client.ui.content;
    
    2 2
     
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * ObServe :: Client
    
    6
    + * %%
    
    7
    + * Copyright (C) 2008 - 2018 IRD, Code Lutin, 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
    +
    
    3 25
     import fr.ird.observe.client.ui.content.list.ContentListUI;
    
    4 26
     
    
    5 27
     import javax.swing.JComponent;
    

  • client/src/main/java/fr/ird/observe/client/ui/content/ObserveLayoutFocusTraversalPolicy.java
    1 1
     package fr.ird.observe.client.ui.content;
    
    2 2
     
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * ObServe :: Client
    
    6
    + * %%
    
    7
    + * Copyright (C) 2008 - 2018 IRD, Code Lutin, 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
    +
    
    3 25
     import fr.ird.observe.client.ui.content.open.ContentOpenableUI;
    
    4 26
     import fr.ird.observe.client.ui.content.ref.ContentReferenceUI;
    
    5 27
     import fr.ird.observe.client.ui.content.table.ContentTableUI;
    

  • client/src/main/java/fr/ird/observe/client/ui/storage/StorageUIModel.java
    ... ... @@ -8,12 +8,12 @@
    8 8
      * it under the terms of the GNU General Public License as
    
    9 9
      * published by the Free Software Foundation, either version 3 of the
    
    10 10
      * License, or (at your option) any later version.
    
    11
    - * 
    
    11
    + *
    
    12 12
      * This program is distributed in the hope that it will be useful,
    
    13 13
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    14 14
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    15 15
      * GNU General Public License for more details.
    
    16
    - * 
    
    16
    + *
    
    17 17
      * You should have received a copy of the GNU General Public
    
    18 18
      * License along with this program.  If not, see
    
    19 19
      * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    ... ... @@ -57,8 +57,8 @@ import fr.ird.observe.services.service.sql.AddSqlScriptProducerRequest;
    57 57
     import fr.ird.observe.services.service.sql.SqlScriptProducerService;
    
    58 58
     import org.apache.commons.lang3.StringUtils;
    
    59 59
     import org.apache.commons.lang3.tuple.Pair;
    
    60
    -import org.apache.logging.log4j.Logger;
    
    61 60
     import org.apache.logging.log4j.LogManager;
    
    61
    +import org.apache.logging.log4j.Logger;
    
    62 62
     import org.nuiton.jaxx.runtime.JAXXContext;
    
    63 63
     import org.nuiton.jaxx.runtime.swing.wizard.WizardModel;
    
    64 64
     import org.nuiton.jaxx.runtime.swing.wizard.WizardUILancher;
    
    ... ... @@ -74,6 +74,7 @@ import java.net.URL;
    74 74
     import java.util.ArrayList;
    
    75 75
     import java.util.List;
    
    76 76
     import java.util.Objects;
    
    77
    +import java.util.Optional;
    
    77 78
     import java.util.Set;
    
    78 79
     
    
    79 80
     import static fr.ird.observe.client.ui.admin.AdminUIModel.LOG_PROPERTY_CHANGE_LISTENER;
    
    ... ... @@ -631,7 +632,7 @@ public class StorageUIModel extends WizardModel<StorageStep> {
    631 632
         public void setCanUseLocalService(boolean canUseLocalService) {
    
    632 633
             this.canUseLocalService = canUseLocalService;
    
    633 634
             firePgConfigChanged(CAN_USE_LOCALE_SERVICE_PROPERTY_NAME, null,
    
    634
    -                canUseLocalService);
    
    635
    +                            canUseLocalService);
    
    635 636
         }
    
    636 637
     
    
    637 638
         public boolean isCanCreateLocalService() {
    
    ... ... @@ -641,7 +642,7 @@ public class StorageUIModel extends WizardModel<StorageStep> {
    641 642
         public void setCanCreateLocalService(boolean canCreateLocalService) {
    
    642 643
             this.canCreateLocalService = canCreateLocalService;
    
    643 644
             firePgConfigChanged(CAN_CREATE_LOCALE_SERVICE_PROPERTY_NAME, null,
    
    644
    -                canCreateLocalService);
    
    645
    +                            canCreateLocalService);
    
    645 646
         }
    
    646 647
     
    
    647 648
         public boolean isCanUseRemoteService() {
    
    ... ... @@ -700,8 +701,8 @@ public class StorageUIModel extends WizardModel<StorageStep> {
    700 701
             CreationMode oldValue = this.referentielImportMode;
    
    701 702
             this.referentielImportMode = referentielImportMode;
    
    702 703
             firePropertyChange(REFERENTIEL_IMPORT_MODE_PROPERTY_NAME,
    
    703
    -                oldValue,
    
    704
    -                referentielImportMode);
    
    704
    +                           oldValue,
    
    705
    +                           referentielImportMode);
    
    705 706
     
    
    706 707
             if (oldValue != referentielImportMode) {
    
    707 708
                 updateUniverse();
    
    ... ... @@ -717,8 +718,8 @@ public class StorageUIModel extends WizardModel<StorageStep> {
    717 718
             CreationMode oldValue = this.dataImportMode;
    
    718 719
             this.dataImportMode = dataImportMode;
    
    719 720
             firePropertyChange(DATA_IMPORT_MODE_PROPERTY_NAME,
    
    720
    -                oldValue,
    
    721
    -                dataImportMode);
    
    721
    +                           oldValue,
    
    722
    +                           dataImportMode);
    
    722 723
             if (oldValue != dataImportMode) {
    
    723 724
     
    
    724 725
                 // reset selected data to import
    
    ... ... @@ -1109,6 +1110,8 @@ public class StorageUIModel extends WizardModel<StorageStep> {
    1109 1110
                     break;
    
    1110 1111
                 case USE_SERVER:
    
    1111 1112
                     txt = restConfig.getServerUrl() == null ? "" : restConfig.getServerUrl().toString();
    
    1113
    +                Optional<String> optionalDatabaseName = restConfig.getOptionalDatabaseName();
    
    1114
    +                txt += " - " + t("observe.storage.server.dataBase.name") + " " + (optionalDatabaseName.orElse(t("observe.storage.server.default.dataBase")));
    
    1112 1115
                     break;
    
    1113 1116
                 case USE_REMOTE:
    
    1114 1117
                     txt = pgConfig.getJdbcUrl();
    

  • client/src/main/java/fr/ird/observe/client/ui/tree/selection/SelectionTree.java
    ... ... @@ -97,6 +97,14 @@ public class SelectionTree extends JXTree {
    97 97
                     }
    
    98 98
                 }
    
    99 99
             });
    
    100
    +        oppositeTree.addMouseListener(new MouseAdapter() {
    
    101
    +            @Override
    
    102
    +            public void mouseClicked(MouseEvent e) {
    
    103
    +                if (e.getClickCount() == 2) {
    
    104
    +                    oppositeTree.selectUnSelectWithOpposite(SelectionTree.this);
    
    105
    +                }
    
    106
    +            }
    
    107
    +        });
    
    100 108
         }
    
    101 109
     
    
    102 110
         private void selectUnSelectWithOpposite(SelectionTree oppositeTree) {
    

  • client/src/main/resources/i18n/client_en_GB.properties
    ... ... @@ -1444,7 +1444,9 @@ observe.storage.report.no.create.mode=Create mode not needed
    1444 1444
     observe.storage.required.rw.on.data=You don't have sufficient credentials to perform this operation.\n\nTo perform this operation, you need Read/Write permissions on data.
    
    1445 1445
     observe.storage.security.administrateur=Owner of database
    
    1446 1446
     observe.storage.server.dataBase=Databases
    
    1447
    +observe.storage.server.dataBase.name=Database
    
    1447 1448
     observe.storage.server.db=(remote server)
    
    1449
    +observe.storage.server.default.dataBase=default
    
    1448 1450
     observe.storage.server.presets.title=Remote servers
    
    1449 1451
     observe.storage.server.sessionExpire=Server connexion is no more active. You can\n\n\t - Close server connexion, \n\t - Change data source, \n\t - Re-connect to server.\n\n BE WARE \: Local modifications will be lost\!
    
    1450 1452
     observe.storage.server.sessionExpire.change=Change
    

  • client/src/main/resources/i18n/client_es_ES.properties
    ... ... @@ -1444,7 +1444,9 @@ observe.storage.report.no.create.mode=No se necesita seleccionar un modo de crea
    1444 1444
     observe.storage.required.rw.on.data=No tiene los permisos necesarios para realizar esta operación.\n\nDebe tener permios de lectura y escritura de los datos del obaservador.
    
    1445 1445
     observe.storage.security.administrateur=Propietario de la base
    
    1446 1446
     observe.storage.server.dataBase=Base de datos
    
    1447
    +observe.storage.server.dataBase.name=Database \#TODO
    
    1447 1448
     observe.storage.server.db=(servidor remoto)
    
    1449
    +observe.storage.server.default.dataBase=default \#TODO
    
    1448 1450
     observe.storage.server.presets.title=Serveurs distants \#TODO
    
    1449 1451
     observe.storage.server.sessionExpire=La conexión con el servidor ya no está activa. Qué quiere hacer ?\n\n\t - Cerrar la conexión con el servidor, \n\t - Cambiar de fuente de datos, \n\t - Se re-connectar con el servidor.\n\n CUIDADO \: Las modificaciones en curso se perderán \!
    
    1450 1452
     observe.storage.server.sessionExpire.change=Cambiar
    

  • client/src/main/resources/i18n/client_fr_FR.properties
    ... ... @@ -1444,7 +1444,9 @@ observe.storage.report.no.create.mode=Mode de création de base non requis
    1444 1444
     observe.storage.required.rw.on.data=Vous n'avez pas les droits suffisants pour effectuer cette opération.\n\nPour effectuer cette opération vous devez avoir les droits de lecture et d'écriture sur les données observateur.
    
    1445 1445
     observe.storage.security.administrateur=Propriétaire de la base
    
    1446 1446
     observe.storage.server.dataBase=Base de données
    
    1447
    +observe.storage.server.dataBase.name=Base
    
    1447 1448
     observe.storage.server.db=(serveur distant)
    
    1449
    +observe.storage.server.default.dataBase=par défaut
    
    1448 1450
     observe.storage.server.presets.title=Serveurs distants
    
    1449 1451
     observe.storage.server.sessionExpire=La connexion avec le serveur n'est plus active. Que voulez-faire ?\n\n\t - Fermer la connexion avec le serveur, \n\t - Changer de source de données, \n\t - Se re-conncter au serveur.\n\n ATTENTION \: Les modifications en cours seront perdu \!
    
    1450 1452
     observe.storage.server.sessionExpire.change=Changer
    

  • dto/src/main/java/fr/ird/observe/binder/referential/seine/WeightCategoryDtoReferenceBinder.java
    ... ... @@ -41,8 +41,9 @@ public class WeightCategoryDtoReferenceBinder extends ReferentialDtoReferenceBin
    41 41
         @Override
    
    42 42
         public WeightCategoryReference toReference(ReferentialLocale referentialLocale, WeightCategoryDto dto) {
    
    43 43
     
    
    44
    -        return new WeightCategoryReference(dto, dto.getLabel(referentialLocale),
    
    44
    +        return new WeightCategoryReference(dto,
    
    45 45
                                                dto.getCode(),
    
    46
    +                                           dto.getLabel(referentialLocale),
    
    46 47
                                                dto.getSpecies().getId());
    
    47 48
     
    
    48 49
         }
    

  • persistence/src/main/java/fr/ird/observe/binder/referential/seine/WeightCategoryEntityDtoBinder.java
    ... ... @@ -40,22 +40,16 @@ public class WeightCategoryEntityDtoBinder extends ReferentialEntityDtoBinderSup
    40 40
     
    
    41 41
         @Override
    
    42 42
         public void copyToEntity(ReferentialLocale referentialLocale, WeightCategoryDto dto, WeightCategory entity) {
    
    43
    -
    
    44
    -
    
    45 43
             copyDtoReferentialFieldsToEntity(dto, entity);
    
    46 44
             copyDtoI18nFieldsToEntity(dto, entity);
    
    47 45
             entity.setSpecies(toEntity(dto.getSpecies()));
    
    48
    -
    
    49 46
         }
    
    50 47
     
    
    51 48
         @Override
    
    52 49
         public void copyToDto(ReferentialLocale referentialLocale, WeightCategory entity, WeightCategoryDto dto) {
    
    53
    -
    
    54
    -
    
    55 50
             copyEntityReferentialFieldsToDto(entity, dto);
    
    56 51
             copyEntityI18nFieldsToDto(entity, dto);
    
    57 52
             dto.setSpecies(toReferentialReference(referentialLocale, entity.getSpecies()));
    
    58
    -
    
    59 53
         }
    
    60 54
     
    
    61 55
     }

  • persistence/src/main/java/fr/ird/observe/binder/referential/seine/WeightCategoryEntityReferenceBinder.java
    ... ... @@ -41,10 +41,9 @@ public class WeightCategoryEntityReferenceBinder extends ReferentialEntityRefere
    41 41
     
    
    42 42
         @Override
    
    43 43
         public WeightCategoryReference toReference(ReferentialLocale referentialLocale, WeightCategory dto) {
    
    44
    -
    
    45
    -        return new WeightCategoryReference(dto, dto.getLabel(referentialLocale),
    
    44
    +        return new WeightCategoryReference(dto,
    
    46 45
                                                dto.getCode(),
    
    46
    +                                           dto.getLabel(referentialLocale),
    
    47 47
                                                dto.getSpecies().getTopiaId());
    
    48
    -
    
    49 48
         }
    
    50 49
     }

  • persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_6_0.java
    ... ... @@ -205,6 +205,7 @@ public class DataSourceMigrationForVersion_6_0 extends MigrationVersionResource
    205 205
                     .put("DML", "fr.ird.observe.entities.referentiel.SizeMeasureType#1433499470887#0.950930784922093")
    
    206 206
                     .put("CDML", "fr.ird.observe.entities.referentiel.SizeMeasureType#1433499471278#0.425988764036447")
    
    207 207
                     .put("PFL", "fr.ird.observe.entities.referentiel.SizeMeasureType#1433499472220#0.885759855154902")
    
    208
    +                .put("SCL", "fr.ird.observe.entities.referentiel.SizeMeasureType#1479120383659#0.03964411579456617")
    
    208 209
                     .build();
    
    209 210
     
    
    210 211
             ImmutableMap.Builder<String, String> existingSizeMeasureMappingBuilder = ImmutableMap.builder();
    

  • validation/src/main/resources/i18n/validation_en_GB.properties
    ... ... @@ -31,7 +31,7 @@ observe.common.ActivitySeineDto.vesselSpeed=Vessel speed
    31 31
     observe.common.ActivitySeineDto.wind=Wind
    
    32 32
     observe.common.BaitsCompositionDto.baitSettingStatus=Bait setting status
    
    33 33
     observe.common.BaitsCompositionDto.baitType=Bait type
    
    34
    -observe.common.BaitsCompositionDto.individualSize=Size
    
    34
    +observe.common.BaitsCompositionDto.individualSize=Size (cm)
    
    35 35
     observe.common.BaitsCompositionDto.individualWeight=Weight
    
    36 36
     observe.common.BaitsCompositionDto.proportion=Proportion
    
    37 37
     observe.common.BasketDto.floatline1Length=floatline 1 length
    
    ... ... @@ -258,7 +258,7 @@ observe.common.TargetCatchDto.species=Species
    258 258
     observe.common.TargetCatchDto.weightCategory=Weight category
    
    259 259
     observe.common.TargetCatchDto.well=Well
    
    260 260
     observe.common.TargetLengthDto.count=Count
    
    261
    -observe.common.TargetLengthDto.length=Length
    
    261
    +observe.common.TargetLengthDto.length=Length (cm)
    
    262 262
     observe.common.TargetLengthDto.sex=Sex
    
    263 263
     observe.common.TargetLengthDto.sizeMeasureType=Size measure type
    
    264 264
     observe.common.TargetLengthDto.species=Species
    

  • validation/src/main/resources/i18n/validation_es_ES.properties
    ... ... @@ -260,7 +260,7 @@ observe.common.TargetCatchDto.species=Especie
    260 260
     observe.common.TargetCatchDto.weightCategory=Categoría de peso
    
    261 261
     observe.common.TargetCatchDto.well=Cuba
    
    262 262
     observe.common.TargetLengthDto.count=Número
    
    263
    -observe.common.TargetLengthDto.length=Longitud eslora total
    
    263
    +observe.common.TargetLengthDto.length=Tamaño (cm)
    
    264 264
     observe.common.TargetLengthDto.sex=Sexo
    
    265 265
     observe.common.TargetLengthDto.sizeMeasureType=Tipo de medida
    
    266 266
     observe.common.TargetLengthDto.species=Especie
    

  • validation/src/main/resources/i18n/validation_fr_FR.properties
    ... ... @@ -258,7 +258,7 @@ observe.common.TargetCatchDto.species=Espèce
    258 258
     observe.common.TargetCatchDto.weightCategory=Catégorie de poids
    
    259 259
     observe.common.TargetCatchDto.well=Cuve
    
    260 260
     observe.common.TargetLengthDto.count=Nombre
    
    261
    -observe.common.TargetLengthDto.length=Longueur hors tout
    
    261
    +observe.common.TargetLengthDto.length=Taille (en cm)
    
    262 262
     observe.common.TargetLengthDto.sex=Sexe
    
    263 263
     observe.common.TargetLengthDto.sizeMeasureType=Type de mensuration
    
    264 264
     observe.common.TargetLengthDto.species=Espèce