Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 81475e9b by Tony CHEMIT at 2018-09-11T11:59:59Z [PS] Un classement de liste déroulante est inversé - Closes #1039 - - - - - b302a443 by Tony CHEMIT at 2018-09-11T12:01:02Z add license headers - - - - - d3be666d by Tony CHEMIT at 2018-09-11T13:08:26Z Affichage du nom de base dans les écrans de synchro avancée - Closes #1041 - - - - - f2ac1c8a by Tony CHEMIT at 2018-09-11T13:40:23Z Synchro avancée de marées : sélection de marées impossible à droite ? - Closes #1043 - - - - - 29518b8f by Tony CHEMIT at 2018-09-11T14:28:01Z [PS] Un libellé à corriger - Closes #1040 - - - - - 229c9061 by Tony CHEMIT at 2018-09-11T14:38:37Z Types de mesures par défaut manquants pour 94 espèces dans le référentiel - Closes #1013 - - - - - 14 changed files: - client/src/main/java/fr/ird/observe/client/ui/content/ContentListUIObserveLayoutFocusTraversalPolicy.java - client/src/main/java/fr/ird/observe/client/ui/content/ObserveLayoutFocusTraversalPolicy.java - client/src/main/java/fr/ird/observe/client/ui/storage/StorageUIModel.java - client/src/main/java/fr/ird/observe/client/ui/tree/selection/SelectionTree.java - client/src/main/resources/i18n/client_en_GB.properties - client/src/main/resources/i18n/client_es_ES.properties - client/src/main/resources/i18n/client_fr_FR.properties - dto/src/main/java/fr/ird/observe/binder/referential/seine/WeightCategoryDtoReferenceBinder.java - persistence/src/main/java/fr/ird/observe/binder/referential/seine/WeightCategoryEntityDtoBinder.java - persistence/src/main/java/fr/ird/observe/binder/referential/seine/WeightCategoryEntityReferenceBinder.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_6_0.java - validation/src/main/resources/i18n/validation_en_GB.properties - validation/src/main/resources/i18n/validation_es_ES.properties - validation/src/main/resources/i18n/validation_fr_FR.properties Changes: ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ContentListUIObserveLayoutFocusTraversalPolicy.java ===================================== @@ -1,5 +1,27 @@ package fr.ird.observe.client.ui.content; +/*- + * #%L + * ObServe :: Client + * %% + * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import fr.ird.observe.client.ui.content.list.ContentListUI; import javax.swing.JComponent; ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ObserveLayoutFocusTraversalPolicy.java ===================================== @@ -1,5 +1,27 @@ package fr.ird.observe.client.ui.content; +/*- + * #%L + * ObServe :: Client + * %% + * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import fr.ird.observe.client.ui.content.open.ContentOpenableUI; import fr.ird.observe.client.ui.content.ref.ContentReferenceUI; 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 @@ * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. @@ -57,8 +57,8 @@ import fr.ird.observe.services.service.sql.AddSqlScriptProducerRequest; import fr.ird.observe.services.service.sql.SqlScriptProducerService; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; -import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuiton.jaxx.runtime.JAXXContext; import org.nuiton.jaxx.runtime.swing.wizard.WizardModel; import org.nuiton.jaxx.runtime.swing.wizard.WizardUILancher; @@ -74,6 +74,7 @@ import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.Optional; import java.util.Set; import static fr.ird.observe.client.ui.admin.AdminUIModel.LOG_PROPERTY_CHANGE_LISTENER; @@ -631,7 +632,7 @@ public class StorageUIModel extends WizardModel<StorageStep> { public void setCanUseLocalService(boolean canUseLocalService) { this.canUseLocalService = canUseLocalService; firePgConfigChanged(CAN_USE_LOCALE_SERVICE_PROPERTY_NAME, null, - canUseLocalService); + canUseLocalService); } public boolean isCanCreateLocalService() { @@ -641,7 +642,7 @@ public class StorageUIModel extends WizardModel<StorageStep> { public void setCanCreateLocalService(boolean canCreateLocalService) { this.canCreateLocalService = canCreateLocalService; firePgConfigChanged(CAN_CREATE_LOCALE_SERVICE_PROPERTY_NAME, null, - canCreateLocalService); + canCreateLocalService); } public boolean isCanUseRemoteService() { @@ -700,8 +701,8 @@ public class StorageUIModel extends WizardModel<StorageStep> { CreationMode oldValue = this.referentielImportMode; this.referentielImportMode = referentielImportMode; firePropertyChange(REFERENTIEL_IMPORT_MODE_PROPERTY_NAME, - oldValue, - referentielImportMode); + oldValue, + referentielImportMode); if (oldValue != referentielImportMode) { updateUniverse(); @@ -717,8 +718,8 @@ public class StorageUIModel extends WizardModel<StorageStep> { CreationMode oldValue = this.dataImportMode; this.dataImportMode = dataImportMode; firePropertyChange(DATA_IMPORT_MODE_PROPERTY_NAME, - oldValue, - dataImportMode); + oldValue, + dataImportMode); if (oldValue != dataImportMode) { // reset selected data to import @@ -1109,6 +1110,8 @@ public class StorageUIModel extends WizardModel<StorageStep> { break; case USE_SERVER: txt = restConfig.getServerUrl() == null ? "" : restConfig.getServerUrl().toString(); + Optional<String> optionalDatabaseName = restConfig.getOptionalDatabaseName(); + txt += " - " + t("observe.storage.server.dataBase.name") + " " + (optionalDatabaseName.orElse(t("observe.storage.server.default.dataBase"))); break; case USE_REMOTE: 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 { } } }); + oppositeTree.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + if (e.getClickCount() == 2) { + oppositeTree.selectUnSelectWithOpposite(SelectionTree.this); + } + } + }); } 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 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. observe.storage.security.administrateur=Owner of database observe.storage.server.dataBase=Databases +observe.storage.server.dataBase.name=Database observe.storage.server.db=(remote server) +observe.storage.server.default.dataBase=default observe.storage.server.presets.title=Remote servers 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\! 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 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. observe.storage.security.administrateur=Propietario de la base observe.storage.server.dataBase=Base de datos +observe.storage.server.dataBase.name=Database \#TODO observe.storage.server.db=(servidor remoto) +observe.storage.server.default.dataBase=default \#TODO observe.storage.server.presets.title=Serveurs distants \#TODO 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 \! 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 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. observe.storage.security.administrateur=Propriétaire de la base observe.storage.server.dataBase=Base de données +observe.storage.server.dataBase.name=Base observe.storage.server.db=(serveur distant) +observe.storage.server.default.dataBase=par défaut observe.storage.server.presets.title=Serveurs distants 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 \! 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 @Override public WeightCategoryReference toReference(ReferentialLocale referentialLocale, WeightCategoryDto dto) { - return new WeightCategoryReference(dto, dto.getLabel(referentialLocale), + return new WeightCategoryReference(dto, dto.getCode(), + dto.getLabel(referentialLocale), dto.getSpecies().getId()); } ===================================== persistence/src/main/java/fr/ird/observe/binder/referential/seine/WeightCategoryEntityDtoBinder.java ===================================== @@ -40,22 +40,16 @@ public class WeightCategoryEntityDtoBinder extends ReferentialEntityDtoBinderSup @Override public void copyToEntity(ReferentialLocale referentialLocale, WeightCategoryDto dto, WeightCategory entity) { - - copyDtoReferentialFieldsToEntity(dto, entity); copyDtoI18nFieldsToEntity(dto, entity); entity.setSpecies(toEntity(dto.getSpecies())); - } @Override public void copyToDto(ReferentialLocale referentialLocale, WeightCategory entity, WeightCategoryDto dto) { - - copyEntityReferentialFieldsToDto(entity, dto); copyEntityI18nFieldsToDto(entity, dto); dto.setSpecies(toReferentialReference(referentialLocale, entity.getSpecies())); - } } ===================================== persistence/src/main/java/fr/ird/observe/binder/referential/seine/WeightCategoryEntityReferenceBinder.java ===================================== @@ -41,10 +41,9 @@ public class WeightCategoryEntityReferenceBinder extends ReferentialEntityRefere @Override public WeightCategoryReference toReference(ReferentialLocale referentialLocale, WeightCategory dto) { - - return new WeightCategoryReference(dto, dto.getLabel(referentialLocale), + return new WeightCategoryReference(dto, dto.getCode(), + dto.getLabel(referentialLocale), dto.getSpecies().getTopiaId()); - } } ===================================== persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_6_0.java ===================================== @@ -205,6 +205,7 @@ public class DataSourceMigrationForVersion_6_0 extends MigrationVersionResource .put("DML", "fr.ird.observe.entities.referentiel.SizeMeasureType#1433499470887#0.950930784922093") .put("CDML", "fr.ird.observe.entities.referentiel.SizeMeasureType#1433499471278#0.425988764036447") .put("PFL", "fr.ird.observe.entities.referentiel.SizeMeasureType#1433499472220#0.885759855154902") + .put("SCL", "fr.ird.observe.entities.referentiel.SizeMeasureType#1479120383659#0.03964411579456617") .build(); 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 observe.common.ActivitySeineDto.wind=Wind observe.common.BaitsCompositionDto.baitSettingStatus=Bait setting status observe.common.BaitsCompositionDto.baitType=Bait type -observe.common.BaitsCompositionDto.individualSize=Size +observe.common.BaitsCompositionDto.individualSize=Size (cm) observe.common.BaitsCompositionDto.individualWeight=Weight observe.common.BaitsCompositionDto.proportion=Proportion observe.common.BasketDto.floatline1Length=floatline 1 length @@ -258,7 +258,7 @@ observe.common.TargetCatchDto.species=Species observe.common.TargetCatchDto.weightCategory=Weight category observe.common.TargetCatchDto.well=Well observe.common.TargetLengthDto.count=Count -observe.common.TargetLengthDto.length=Length +observe.common.TargetLengthDto.length=Length (cm) observe.common.TargetLengthDto.sex=Sex observe.common.TargetLengthDto.sizeMeasureType=Size measure type observe.common.TargetLengthDto.species=Species ===================================== validation/src/main/resources/i18n/validation_es_ES.properties ===================================== @@ -260,7 +260,7 @@ observe.common.TargetCatchDto.species=Especie observe.common.TargetCatchDto.weightCategory=Categoría de peso observe.common.TargetCatchDto.well=Cuba observe.common.TargetLengthDto.count=Número -observe.common.TargetLengthDto.length=Longitud eslora total +observe.common.TargetLengthDto.length=Tamaño (cm) observe.common.TargetLengthDto.sex=Sexo observe.common.TargetLengthDto.sizeMeasureType=Tipo de medida observe.common.TargetLengthDto.species=Especie ===================================== validation/src/main/resources/i18n/validation_fr_FR.properties ===================================== @@ -258,7 +258,7 @@ observe.common.TargetCatchDto.species=Espèce observe.common.TargetCatchDto.weightCategory=Catégorie de poids observe.common.TargetCatchDto.well=Cuve observe.common.TargetLengthDto.count=Nombre -observe.common.TargetLengthDto.length=Longueur hors tout +observe.common.TargetLengthDto.length=Taille (en cm) observe.common.TargetLengthDto.sex=Sexe observe.common.TargetLengthDto.sizeMeasureType=Type de mensuration observe.common.TargetLengthDto.species=Espèce View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/33431054908f662dd6a687b3b1e... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/33431054908f662dd6a687b3b1e... You're receiving this email because of your account on gitlab.com.