mailman.cloud.codelutin.com
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Observe-commits

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2013 -----
  • December
  • November
  • October
  • September
observe-commits@list.forge.codelutin.com

December 2020

  • 1 participants
  • 96 discussions
[Git][ultreiaio/ird-observe][develop] [jgitflow-maven-plugin]updating poms for 8.0.2-SNAPSHOT development[skip ci]
by Tony CHEMIT 14 Dec '20

14 Dec '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: b7c2c2ab by Tony Chemit at 2020-12-14T13:20:28+01:00 [jgitflow-maven-plugin]updating poms for 8.0.2-SNAPSHOT development[skip ci] - - - - - 30 changed files: - client/configuration/pom.xml - client/core/pom.xml - client/datasource/actions/pom.xml - client/datasource/editor/api-test/pom.xml - client/datasource/editor/api/pom.xml - client/datasource/editor/common/pom.xml - client/datasource/editor/ll/pom.xml - client/datasource/editor/pom.xml - client/datasource/editor/ps/pom.xml - client/datasource/editor/spi/pom.xml - client/datasource/pom.xml - client/i18n/pom.xml - client/pom.xml - client/runner/pom.xml - models/dto/pom.xml - models/persistence/pom.xml - models/pom.xml - observe/pom.xml - pom.xml - server/configuration/pom.xml - server/core/pom.xml - server/i18n/pom.xml - server/pom.xml - server/runner/pom.xml - services/api/pom.xml - services/client-impl/pom.xml - services/i18n/pom.xml - services/local-impl/pom.xml - services/pom.xml - services/provider/pom.xml The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/b7c2c2ab03dcbae61f69bd1ce… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/b7c2c2ab03dcbae61f69bd1ce… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe] Pushed new branch release/8.0.1
by Tony CHEMIT 14 Dec '20

14 Dec '20
Tony CHEMIT pushed new branch release/8.0.1 at ultreiaio / ird-observe -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/tree/release/8.0.1 You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] update CHANGELOG [skip ci]
by Tony CHEMIT 14 Dec '20

14 Dec '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 531ffaf2 by Tony Chemit at 2020-12-14T13:19:41+01:00 update CHANGELOG [skip ci] - - - - - 1 changed file: - CHANGELOG.md Changes: ===================================== CHANGELOG.md ===================================== @@ -1,7 +1,47 @@ # ObServe changelog * Author [Tony Chemit](mailto:dev@tchemit.fr) - * Last generated at 2020-11-04 11:57. + * Last generated at 2020-12-14 13:19. + +## Version [8.0.1](https://gitlab.com/ultreiaio/ird-observe/-/milestones/173) + +**Closed at 2020-12-14.** + + +### Issues + * [[Anomalie 1588]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1588) **Impossible d'enregister une caléee ll observation** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT) + * [[Anomalie 1596]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1596) **La reprise sur erreur en mode serveur doit être revue** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT) + * [[Anomalie 1598]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1598) **Lors de l'ouverture de l'application, si la base locale est déjà occupée par une autre application, message erroné** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT) + * [[Anomalie 1620]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1620) **Champs avec needcomment=true** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Anomalie 1632]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1632) **[LL][Logbook] landingpart.landing devrait être une FK** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Anomalie 1633]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1633) **[LL][Logbook] ll_landing.landingpart contient 3 champs certainement en trop** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Anomalie 1636]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1636) **Nombre de marées par programme non affiché dans l'arbre, avant clic sur chaque programme** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Anomalie 1638]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1638) **Reconnaissance des paramètres de sécurité** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Anomalie 1639]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1639) **Suppression d'entrée en synchro avancée** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Anomalie 1641]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1641) **'+' / Nouvelle route non à propos** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Anomalie 1644]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1644) **CTROL+F8 non fonctionnel (sous Mac)** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Anomalie 1645]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1645) **Calée : racourcis inopportuns** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Anomalie 1647]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1647) **Bug sur suppression estimation banc** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Anomalie 1648]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1648) **Boutons de navigation devraient avoir disparu** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Anomalie 1649]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1649) **Les listes déroulantes permettent de chosir des entrées de référentiel désactivées** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Evolution 495]](https://gitlab.com/ultreiaio/ird-observe/-/issues/495) **[Référentiel] Corriger un nom de champ** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT) + * [[Evolution 974]](https://gitlab.com/ultreiaio/ird-observe/-/issues/974) **Ajouter une option de configuration permettant de s'affranchir des ouvertures/clôtures** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Evolution 1249]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1249) **Amélioration des fonctionnalités de synchronisation avancées** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT) + * [[Evolution 1512]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1512) **Gestion du versionning des marées** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Evolution 1592]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1592) **Auto-chargement des rôles pour les utilisateurs de la base ciblées dans les assistants de création/mise à jour** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT) + * [[Evolution 1605]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1605) **Nouveau texte de popup pour le cas 'Vous devez mettre à jour le form marée avant de pouvoir saisir le livre de bord'** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Evolution 1613]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1613) **Ajouter un nouveau bouton sur le formulaire d'une ligne sélectionnée dans un écran de type table créer/enregister ET nouveau** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT) + * [[Evolution 1625]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1625) **[LL][Observations] Horodatage hook timers par défaut** (Thanks to Tony CHEMIT) (Reported by Philippe Sabarros) + * [[Evolution 1626]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1626) **Manque le champ lightsticksperbasket** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Evolution 1627]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1627) **[LL][Logbooks] table ll_landing.datasource à compléter** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Evolution 1628]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1628) **[LL][Logbookd] Renommer table compagnies** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Evolution 1629]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1629) **[LL][Logbooks] Ajout d'un champ** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Evolution 1643]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1643) **Déploiement du calendrier** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Evolution 1646]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1646) **Méthodes de mesure par défaut** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil) + * [[Evolution 1658]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1658) **Revoir les clefs d'unicité sur la base** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT) + * [[Tâche 1532]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1532) **Remplacer le moteur de scripting utilisé** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT) + * [[Tâche 1611]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1611) **Revoir si on doit laisser le lien Catch.set si la capture est associée à un élément de la ligne (section, basket, branchline)** (Thanks to Pascal Cauquil) (Reported by Tony CHEMIT) + * [[Tâche 1623]](https://gitlab.com/ultreiaio/ird-observe/-/issues/1623) **Optimisation de la migration 8.0** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT) ## Version [8.0.0](https://gitlab.com/ultreiaio/ird-observe/-/milestones/149) View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/531ffaf282988a33b30b9a462… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/531ffaf282988a33b30b9a462… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 6 commits: Remove unused property (and more over in v9 this will be common)
by Tony CHEMIT 14 Dec '20

14 Dec '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 38ef3812 by Tony Chemit at 2020-12-14T11:04:41+01:00 Remove unused property (and more over in v9 this will be common) - - - - - 551a32be by Tony Chemit at 2020-12-14T12:35:37+01:00 clean dcp code (need a second review, but better than before) - - - - - 6b9fa85f by Tony Chemit at 2020-12-14T12:37:03+01:00 Fix messages view (but yet again need a second review, there is still a lots of code to manage validation on a form, it should be more easier and directly linked to the editing state of model) - - - - - b1950fd4 by Tony Chemit at 2020-12-14T13:10:47+01:00 Fix vessel filter on Trip form - - - - - 06645989 by Tony Chemit at 2020-12-14T13:10:56+01:00 use last pom - - - - - 2ca5de47 by Tony Chemit at 2020-12-14T13:13:29+01:00 '+' / Nouvelle route non à propos - Closes #1641 - - - - - 30 changed files: - client/core/src/main/java/fr/ird/observe/client/datasource/api/cache/ReferencesFilterHelper.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentMessageTableModel.java → client/core/src/main/java/fr/ird/observe/client/util/BeanLabel.java - client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializer.java - + client/core/src/main/resources/icons/action-add-preset.png - client/core/src/main/resources/observe-ui.properties - client/datasource/editor/api/pom.xml - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/DataSourceEditor.jcss - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/DataSourceEditorHandler.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/DataSourceEditorModel.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUI.jaxx - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIHandler.java - client/core/src/main/java/fr/ird/observe/client/util/ObserveSwingValidatorMessageTableModel.java → client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/validation/ContentMessageTableModel.java - client/core/src/main/java/fr/ird/observe/client/util/ObserveValidatorMessageTableRenderer.java → client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/validation/ContentMessageTableRenderer.java - client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/common/TripListUI.jaxx - client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/common/TripUIModel.java - client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/landing/LandingListUI.jaxx - client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/logbook/ActivityListUI.jaxx - client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/logbook/SampleListUI.jaxx - client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/ActivityListUI.jaxx - client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/composition/SetDetailCompositionUIValidationHelper.java - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/ObservePsKeyStrokes.java - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripListUI.jaxx - − client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripListUIHandler.java - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripUIModel.java - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectBuoyPresetUI.jaxx - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectBuoyPresetUI.jcss - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectBuoyPresetUIHandler.java - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetUI.jaxx - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetUI.jcss - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetUIHandler.java The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/575a645f92a9724f81c85aa4… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/575a645f92a9724f81c85aa4… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 5 commits: Revoir les clefs d'unicité sur la base - Closes #1658
by Tony CHEMIT 13 Dec '20

13 Dec '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 659321ef by Tony Chemit at 2020-12-13T15:44:05+01:00 Revoir les clefs d&#39;unicité sur la base - Closes #1658 - - - - - 9b8d3ab8 by Tony Chemit at 2020-12-13T19:21:47+01:00 Suppression d&#39;entrée en synchro avancée - Closes #1639 - - - - - 65c3d6df by Tony Chemit at 2020-12-13T20:30:05+01:00 Revoir les clefs d&#39;unicité sur la base (correction dans la migration) - closes #1658 - - - - - 7f3e8dc7 by Tony Chemit at 2020-12-13T20:30:46+01:00 Fix i18n key - - - - - 575a645f by Tony Chemit at 2020-12-13T20:31:11+01:00 Fix some init issues with new Jaxx API - - - - - 29 changed files: - client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializer.java - client/datasource/actions/src/main/i18n/getters/java.getter - client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/ReferentialSynchroModel.java - client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/ReferentialSynchronizeResources.java - client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/actions/ReferentialSynchroUIActionSupport.java - client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/actions/Start.java - client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/task/SwingReferentialSynchronizeTask.java - client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/task/SwingWithReplaceDataTask.java - client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/ReferentialSelectionTreePaneHandler.java - client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/ReferentialSynchronizeTreeModel.java - client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/actions/RegisterDeactivateWithReplacement.java - client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/actions/RegisterDelete.java - client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/actions/RegisterTaskActionSupport.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/list/actions/GotoSelectedData.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/navigation/NavigationUIHandler.java - client/datasource/editor/api/src/main/resources/fr/ird/observe/client/datasource/editor/api/content/data/list/ContentListUI.keys - client/i18n/src/main/i18n/translations/observe_en_GB.properties - client/i18n/src/main/i18n/translations/observe_es_ES.properties - client/i18n/src/main/i18n/translations/observe_fr_FR.properties - models/persistence/src/main/java/fr/ird/observe/entities/data/ps/observation/SetImpl.java - models/persistence/src/main/models/Observe-20-data-ps-observation.model - models/persistence/src/main/resources/db/migration/8.0/50_ps_observation_create-common.sql - services/api/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/task/ReferentialSynchronizeTaskType.java - tests/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz - tests/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz - tests/test/src/main/resources/db/8.0/empty_h2.sql.gz - tests/test/src/main/resources/db/8.0/empty_pg.sql.gz - tests/test/src/main/resources/db/8.0/referentiel.sql.gz Changes: ===================================== client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializer.java ===================================== @@ -46,6 +46,7 @@ import org.nuiton.jaxx.widgets.text.BigTextEditor; import javax.swing.AbstractButton; import javax.swing.JComponent; import javax.swing.JLabel; +import javax.swing.JSplitPane; import javax.swing.JTree; import javax.swing.KeyStroke; import java.awt.Component; @@ -55,7 +56,6 @@ import java.util.Objects; public class DefaultUIInitializer<UI extends JComponent & JAXXObject> extends UIInitializerSupport<UI, DefaultUIInitializerContext<UI>> implements WithClientConfig, WithClientUIContext { - public static final String OBSERVE_ACTION = "observeAction"; public static final String CLIENT_PROPERTY_FORCE_LOAD = "forceLoad"; public static final String CLIENT_PROPERTY_LIST_NO_LOAD = "listNoLoad"; // public static final String DELEGATE_CONTENT_UI = "delegateContentUI"; @@ -113,6 +113,7 @@ public class DefaultUIInitializer<UI extends JComponent & JAXXObject> extends UI .onComponents(CoordinatesEditor.class, this::init) .onComponents(BeanEnumEditor.class, this::init) .onComponents(JLabel.class, this::init) + .onComponents(JSplitPane.class, this::init) .onComponents(JTree.class, this::init) .startSecondPass(); } @@ -131,12 +132,13 @@ public class DefaultUIInitializer<UI extends JComponent & JAXXObject> extends UI } } + private void init(JSplitPane editor) { + initializerContext.checkFirstPass(); + UIInitHelper.init(editor); + } + protected void init(AbstractButton editor) { initializerContext.checkFirstPass(); - String actionId = (String) editor.getClientProperty(OBSERVE_ACTION); - if (actionId != null) { - throw new IllegalStateException(String.format("Can't use observeAction... on ui:%s - %s", ui.getClass().getName(), actionId)); - } } protected void init(BeanCheckBox editor) { ===================================== client/datasource/actions/src/main/i18n/getters/java.getter ===================================== @@ -143,7 +143,9 @@ observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromLeft observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromRight observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromRightWithReplacement observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromLeft +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromLeftWithReplacement observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromRight +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromRightWithReplacement observe.ui.datasource.editor.actions.synchro.referential.task.include.properties observe.ui.datasource.editor.actions.synchro.referential.task.prepare observe.ui.datasource.editor.actions.synchro.referential.task.revertFromLeft ===================================== client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/ReferentialSynchroModel.java ===================================== @@ -45,6 +45,8 @@ import fr.ird.observe.services.service.actions.synchro.referential.ng.Referentia import fr.ird.observe.services.service.actions.synchro.referential.ng.ReferentialSynchronizeServiceEngine; import fr.ird.observe.services.service.actions.synchro.referential.ng.task.ReferentialSynchronizeTaskType; import fr.ird.observe.services.service.referential.differential.DifferentialEngine; +import fr.ird.observe.services.service.usage.DtoUsageCountRequest; +import fr.ird.observe.services.service.usage.DtoUsageCountResult; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.nuiton.jaxx.runtime.swing.wizard.ext.WizardState; @@ -422,4 +424,8 @@ public class ReferentialSynchroModel extends AdminActionModel implements WithDec } return ImmutableList.copyOf(references.values()); } + + public <R extends ReferentialDtoReference> DtoUsageCountResult<?> getUsageCount(boolean left, R reference) { + return (left ? getLeftSource() : getRightSource()).getUsageService().count(new DtoUsageCountRequest<>(reference.getDtoType(), reference.getId())); + } } ===================================== client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/ReferentialSynchronizeResources.java ===================================== @@ -22,15 +22,8 @@ package fr.ird.observe.client.datasource.actions.synchronize.referential.ng; * #L% */ -import com.google.common.collect.ImmutableSet; -import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.task.SwingReferentialSynchronizeTask; -import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.task.SwingWithIncludedPropertyNamesTask; -import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.task.SwingWithReplaceDataTask; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree.node.ReferentialSynchroNodeSupport; import fr.ird.observe.client.util.UIHelper; -import fr.ird.observe.dto.reference.ReferentialDtoReference; -import fr.ird.observe.dto.referential.differential.Differential; -import fr.ird.observe.dto.referential.differential.DifferentialPropertyList; import fr.ird.observe.services.service.actions.synchro.referential.ng.task.ReferentialSynchronizeTaskType; import javax.swing.Icon; @@ -72,10 +65,6 @@ public enum ReferentialSynchronizeResources { null, ReferentialSynchronizeTaskType.UPDATE, ReferentialSynchroNodeSupport::isCanUpdate) { - @Override - public SwingReferentialSynchronizeTask createTask(boolean left, Differential differential, ReferentialDtoReference replaceReference, ImmutableSet<String> includedPropertyNames, DifferentialPropertyList includedProperties) { - return new SwingWithIncludedPropertyNamesTask(this, left, differential, includedPropertyNames, includedProperties); - } }, COPY( "copyToRight", @@ -99,13 +88,16 @@ public enum ReferentialSynchronizeResources { n("observe.ui.datasource.editor.actions.synchro.referential.action.deleteFromRight.tip"), ReferentialSynchroModel.DELETE_LEFT_PROPERTY_NAME, ReferentialSynchroModel.DELETE_RIGHT_PROPERTY_NAME, - KeyStroke.getKeyStroke("pressed F6"), - KeyStroke.getKeyStroke("shift pressed F6"), + KeyStroke.getKeyStroke("pressed F5"), + KeyStroke.getKeyStroke("shift pressed F5"), ReferentialSynchronizeTaskType.DELETE, ReferentialSynchroNodeSupport::isCanDelete) { @Override - public SwingReferentialSynchronizeTask createTask(boolean left, Differential differential, ReferentialDtoReference replaceReference, ImmutableSet<String> includedPropertyNames, DifferentialPropertyList includedProperties) { - return new SwingWithReplaceDataTask(this, left, differential, replaceReference); + public String getTaskReplaceLabel(boolean left) { + if (left) { + return n("observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromLeftWithReplacement"); + } + return n("observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromRightWithReplacement"); } }, REVERT( @@ -120,12 +112,7 @@ public enum ReferentialSynchronizeResources { KeyStroke.getKeyStroke("pressed F2"), KeyStroke.getKeyStroke("shift pressed F2"), ReferentialSynchronizeTaskType.REVERT, - ReferentialSynchroNodeSupport::isCanRevert) { - @Override - public SwingReferentialSynchronizeTask createTask(boolean left, Differential differential, ReferentialDtoReference replaceReference, ImmutableSet<String> includedPropertyNames, DifferentialPropertyList includedProperties) { - return new SwingWithIncludedPropertyNamesTask(this, left, differential, includedPropertyNames, includedProperties); - } - }, + ReferentialSynchroNodeSupport::isCanRevert), DEACTIVATE( "deactivateFromLeft", "deactivateFromRight", @@ -151,12 +138,7 @@ public enum ReferentialSynchronizeResources { KeyStroke.getKeyStroke("pressed F4"), KeyStroke.getKeyStroke("shift pressed F4"), ReferentialSynchronizeTaskType.DEACTIVATE_WITH_REPLACEMENT, - ReferentialSynchroNodeSupport::isCanDelete) { - @Override - public SwingReferentialSynchronizeTask createTask(boolean left, Differential differential, ReferentialDtoReference replaceReference, ImmutableSet<String> includedPropertyNames, DifferentialPropertyList includedProperties) { - return new SwingWithReplaceDataTask(this, left, differential, replaceReference); - } - }; + ReferentialSynchroNodeSupport::isCanDelete); private final String leftActionName; private final String leftTaskI18nKey; @@ -215,6 +197,10 @@ public enum ReferentialSynchronizeResources { return left ? leftTaskI18nKey : rightTaskI18nKey; } + public String getTaskReplaceLabel(boolean left) { + return getTaskLabel(left); + } + public String getActionTip(boolean left) { return left ? leftActionTipI18nKey : rightActionTipI18nKey; } @@ -235,14 +221,6 @@ public enum ReferentialSynchronizeResources { return taskType != null && taskType.withProperties(); } - public boolean withReplace() { - return taskType != null && taskType.withReplace(); - } - - public SwingReferentialSynchronizeTask createTask(boolean left, Differential differential, ReferentialDtoReference replaceReference, ImmutableSet<String> includedPropertyNames, DifferentialPropertyList includedProperties) { - return new SwingReferentialSynchronizeTask(this, left, differential); - } - public KeyStroke getKeyStroke(boolean left) { return left ? leftKeyStroke : rightKeyStroke; } ===================================== client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/actions/ReferentialSynchroUIActionSupport.java ===================================== @@ -23,56 +23,12 @@ package fr.ird.observe.client.datasource.actions.synchronize.referential.ng.acti */ import fr.ird.observe.client.datasource.actions.actions.AdminTabUIActionSupport; -import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialSynchroModel; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialSynchroUI; -import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree.ReferentialSynchronizeTreeModel; - -import javax.swing.KeyStroke; abstract class ReferentialSynchroUIActionSupport extends AdminTabUIActionSupport<ReferentialSynchroUI> { - ReferentialSynchroUIActionSupport(String label, String shortDescription, String actionIcon, KeyStroke acceleratorKey) { - super(label, shortDescription, actionIcon, acceleratorKey); - } - ReferentialSynchroUIActionSupport(String label, String shortDescription, String actionIcon, char acceleratorKey) { super(label, shortDescription, actionIcon, acceleratorKey); } - - protected void updateLeftEnableActions(ReferentialSynchronizeTreeModel treeModel) { - - ReferentialSynchroModel stepModel = ui.getStepModel(); - - treeModel.updateSelectedActions(); - stepModel.setCopyLeft(treeModel.isCanAdd() || treeModel.isCanUpdate()); - stepModel.setDeleteLeft(treeModel.isCanDelete()); - stepModel.setDeactivateLeft(treeModel.isCanDelete()); - stepModel.setDeactivateWithReplaceLeft(treeModel.isCanDelete()); - stepModel.setRevertLeft(treeModel.isCanRevert()); - stepModel.setSkipLeft(treeModel.isCanSkip()); - } - - protected void updateRightEnableActions(ReferentialSynchronizeTreeModel treeModel) { - - ReferentialSynchroModel stepModel = ui.getStepModel(); - - treeModel.updateSelectedActions(); - stepModel.setCopyRight(treeModel.isCanAdd() || treeModel.isCanUpdate()); - stepModel.setDeleteRight(treeModel.isCanDelete()); - stepModel.setDeactivateRight(treeModel.isCanDelete()); - stepModel.setDeactivateWithReplaceRight(treeModel.isCanDelete()); - stepModel.setRevertRight(treeModel.isCanRevert()); - stepModel.setSkipRight(treeModel.isCanSkip()); - } - - - protected void updateActions(ReferentialSynchronizeTreeModel treeModel) { - if (treeModel.isLeft()) { - updateLeftEnableActions(treeModel); - } else { - updateRightEnableActions(treeModel); - } - } - } ===================================== client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/actions/Start.java ===================================== @@ -30,6 +30,7 @@ import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree. import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree.ReferentialSelectionTreePane; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree.ReferentialSynchronizeTreeModel; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree.ReferentialSynchronizeTreeModelsBuilder; +import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree.actions.RegisterTaskActionSupport; import fr.ird.observe.client.datasource.api.ObserveSwingDataSource; import fr.ird.observe.client.datasource.editor.api.wizard.connexion.DataSourceSelectorModel; import fr.ird.observe.dto.ProgressionModel; @@ -93,13 +94,13 @@ public class Start extends ReferentialSynchroUIActionSupport { stepModel.getLeftTreeModel(), model.getConfigModel().getLeftSourceModel(), t("observe.ui.datasource.editor.actions.synchro.referential.message.referential.leftData.loaded"), - evt -> updateLeftEnableActions(stepModel.getLeftTreeModel())); + evt -> RegisterTaskActionSupport.updateActions(stepModel, stepModel.getLeftTreeModel())); initTree(ui.getRightTreePane(), stepModel.getRightTreeModel(), model.getConfigModel().getRightSourceModel(), t("observe.ui.datasource.editor.actions.synchro.referential.message.referential.rightData.loaded"), - evt -> updateRightEnableActions(stepModel.getRightTreeModel())); + evt -> RegisterTaskActionSupport.updateActions(stepModel, stepModel.getRightTreeModel())); return WizardState.NEED_FIX; } ===================================== client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/task/SwingReferentialSynchronizeTask.java ===================================== @@ -49,21 +49,23 @@ public class SwingReferentialSynchronizeTask implements WithDecoratorService { private final String i18nKey; private final Differential differential; private final Icon icon; - // private final ReferentialSynchronizeResources resource; private final boolean left; private final ReferentialSynchronizeTaskType taskType; - public SwingReferentialSynchronizeTask(ReferentialSynchronizeResources resource, boolean left, Differential differential) { -// this.resource = resource; - this.left = left; + public SwingReferentialSynchronizeTask(String i18nKey, Differential differential, Icon icon, boolean left, ReferentialSynchronizeTaskType taskType) { + this.i18nKey = i18nKey; this.differential = differential; - this.icon = resource.getIcon(left); - this.i18nKey = resource.getTaskLabel(left); - this.taskType = resource.getTaskType(); + this.icon = icon; + this.left = left; + this.taskType = taskType; this.dataStr = differential.getLabel(getDecoratorService()); this.typeStr = t(ContentReferentialUII18nHelper.getType(differential.getDtoType())); } + public SwingReferentialSynchronizeTask(ReferentialSynchronizeResources resource, boolean left, Differential differential) { + this(resource.getTaskLabel(left), differential, resource.getIcon(left), left, resource.getTaskType()); + } + public final Differential getDifferential() { return differential; } ===================================== client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/task/SwingWithReplaceDataTask.java ===================================== @@ -28,7 +28,6 @@ import fr.ird.observe.dto.referential.differential.Differential; import fr.ird.observe.services.service.actions.synchro.referential.ng.task.ReferentialSynchronizeTask; import java.util.Date; -import java.util.Objects; import static io.ultreia.java4all.i18n.I18n.t; @@ -42,8 +41,8 @@ public class SwingWithReplaceDataTask extends SwingReferentialSynchronizeTask { private final String replaceDataStr; public SwingWithReplaceDataTask(ReferentialSynchronizeResources resource, boolean left, Differential differential, ReferentialDtoReference replaceData) { - super(resource, left, differential); - this.replaceData = Objects.requireNonNull(replaceData); + super(resource.getTaskReplaceLabel(left), differential, resource.getIcon(left), left, resource.getTaskType()); + this.replaceData = replaceData; this.replaceDataStr = getDecoratorService().getReferentialReferenceDecorator(replaceData.getClass()).toString(replaceData); } ===================================== client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/ReferentialSelectionTreePaneHandler.java ===================================== @@ -32,6 +32,7 @@ import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree. import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree.actions.RegisterDelete; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree.actions.RegisterRevert; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree.actions.SelectUnselect; +import fr.ird.observe.client.util.init.DefaultUIInitializer; import org.nuiton.jaxx.runtime.spi.UIHandler; import java.awt.BorderLayout; @@ -42,6 +43,11 @@ import java.awt.BorderLayout; */ public class ReferentialSelectionTreePaneHandler implements UIHandler<ReferentialSelectionTreePane> { + @Override + public void afterInit(ReferentialSelectionTreePane ui) { + DefaultUIInitializer.doInit(ui); + } + void init(ReferentialSelectionTreePane ui) { ReferentialSynchroUI parent = ui.getContextValue(ReferentialSynchroUI.class, ReferentialSynchroUIHandler.ADMIN_TAB_UI); ReferentialSynchroModel stepModel = parent.getStepModel(); ===================================== client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/ReferentialSynchronizeTreeModel.java ===================================== @@ -33,7 +33,6 @@ import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree. import fr.ird.observe.dto.referential.ReferentialDto; import javax.swing.tree.DefaultTreeModel; -import javax.swing.tree.TreeNode; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.util.Collection; @@ -87,7 +86,7 @@ public class ReferentialSynchronizeTreeModel extends DefaultTreeModel { if (node instanceof ReferentialTypeSynchroNode) { ReferentialTypeSynchroNode node1 = (ReferentialTypeSynchroNode) node; node1.updateSelect(value); - Enumeration<? extends TreeNode> children = node1.children(); + Enumeration<?> children = node1.children(); while (children.hasMoreElements()) { ReferentialSynchroNodeSupport childNode = (ReferentialSynchroNodeSupport) children.nextElement(); updateSelected(value, childNode); ===================================== client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/actions/RegisterDeactivateWithReplacement.java ===================================== @@ -37,6 +37,11 @@ public class RegisterDeactivateWithReplacement extends RegisterTaskActionSupport super(ui, ReferentialSynchronizeResources.DEACTIVATE_WITH_REPLACEMENT, left); } + protected <R extends ReferentialDtoReference> boolean shouldReplace(R reference) { + // always ask a replacement for this task + return true; + } + @Override protected String getReplaceTitle(ReferentialDtoReference reference) { return t("observe.ui.datasource.editor.actions.synchro.referential.replaceBeforeDeactivate.title", typeStr, referenceStr); ===================================== client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/actions/RegisterDelete.java ===================================== @@ -22,9 +22,11 @@ package fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree * #L% */ +import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialSynchroModel; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialSynchronizeResources; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree.ReferentialSelectionTreePane; import fr.ird.observe.dto.reference.ReferentialDtoReference; +import fr.ird.observe.services.service.usage.DtoUsageCountResult; import static io.ultreia.java4all.i18n.I18n.t; @@ -42,4 +44,11 @@ public class RegisterDelete extends RegisterTaskActionSupport { return t("observe.ui.datasource.editor.actions.synchro.referential.replaceBeforeDelete.title", typeStr, referenceStr); } + @Override + protected <R extends ReferentialDtoReference> boolean shouldReplace(R reference) { + // check if there is some data using it + ReferentialSynchroModel stepModel = parentUI.getStepModel(); + DtoUsageCountResult<?> usages = stepModel.getUsageCount(isLeft(), reference); + return !usages.isEmpty(); + } } ===================================== client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/actions/RegisterTaskActionSupport.java ===================================== @@ -24,9 +24,6 @@ package fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import fr.ird.observe.client.datasource.actions.AdminStep; -import fr.ird.observe.client.datasource.actions.AdminTabUI; -import fr.ird.observe.client.datasource.actions.AdminUI; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialReplaceUI; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialReplaceUIHandler; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialSynchroModel; @@ -34,6 +31,7 @@ import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.Refer import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialSynchronizeResources; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.task.SwingReferentialSynchronizeTask; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.task.SwingWithIncludedPropertyNamesTask; +import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.task.SwingWithReplaceDataTask; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree.ReferentialSelectionTree; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree.ReferentialSelectionTreePane; import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.tree.ReferentialSynchronizeTreeModel; @@ -80,16 +78,32 @@ import static io.ultreia.java4all.i18n.I18n.t; public abstract class RegisterTaskActionSupport extends ReferentialSelectionTreePaneActionSupport implements WithDecoratorService { private static final Logger log = LogManager.getLogger(RegisterTaskActionSupport.class); + protected final ReferentialSynchroUI parentUI; final Predicate<ReferentialSynchroNodeSupport> predicate; final ReferentialSelectionTreePane ui; private final boolean left; - private final boolean needReplace; private final ReferentialSynchronizeTaskType taskType; private final ReferentialSynchronizeResources resource; - private final ReferentialSynchroUI parentUI; String typeStr; String referenceStr; + public static void updateActions(ReferentialSynchroModel stepModel, ReferentialSynchronizeTreeModel treeModel) { + treeModel.updateSelectedActions(); + if (treeModel.isLeft()) { + stepModel.setCopyLeft(treeModel.isCanAdd() || treeModel.isCanUpdate()); + stepModel.setDeleteLeft(treeModel.isCanDelete()); + stepModel.setDeactivateLeft(treeModel.isCanDelete()); + stepModel.setDeactivateWithReplaceLeft(treeModel.isCanDelete()); + stepModel.setRevertLeft(treeModel.isCanRevert()); + } else { + stepModel.setCopyRight(treeModel.isCanAdd() || treeModel.isCanUpdate()); + stepModel.setDeleteRight(treeModel.isCanDelete()); + stepModel.setDeactivateRight(treeModel.isCanDelete()); + stepModel.setDeactivateWithReplaceRight(treeModel.isCanDelete()); + stepModel.setRevertRight(treeModel.isCanRevert()); + } + } + RegisterTaskActionSupport(ReferentialSelectionTreePane ui, ReferentialSynchronizeResources resource, boolean left) { super("", null, null, Objects.requireNonNull(resource).getKeyStroke(left)); this.resource = resource; @@ -104,7 +118,7 @@ public abstract class RegisterTaskActionSupport extends ReferentialSelectionTree this.ui = ui; this.left = left; this.taskType = resource.getTaskType(); - this.needReplace = resource.withReplace(); +// this.needReplace = resource.withReplace(); parentUI = ui.getContextValue(ReferentialSynchroUI.class, "synchroParent"); Predicate<ReferentialSynchroNodeSupport> predicate = resource.getPredicate(); @@ -127,7 +141,15 @@ public abstract class RegisterTaskActionSupport extends ReferentialSelectionTree } protected final SwingReferentialSynchronizeTask createTask(boolean left, Differential differential, ReferentialDtoReference replaceReference, ImmutableSet<String> includedPropertyNames, DifferentialPropertyList includedModifiedProperties) { - return getResource().createTask(left, differential, replaceReference, includedPropertyNames, includedModifiedProperties); + ReferentialSynchronizeResources resource = getResource(); + if (replaceReference != null) { + return new SwingWithReplaceDataTask(resource, left, differential, replaceReference); + } + if (resource.withProperties()) { + return new SwingWithIncludedPropertyNamesTask(resource, left, differential, includedPropertyNames, includedModifiedProperties); + + } + return new SwingReferentialSynchronizeTask(resource, left, differential); } public ReferentialSynchronizeResources getResource() { @@ -147,7 +169,7 @@ public abstract class RegisterTaskActionSupport extends ReferentialSelectionTree ReferentialSynchronizeTreeModel treeModel = getTreeModel(); createTasks(); treeModel.clearSelection(); - updateActions(treeModel); + updateActions(parentUI.getStepModel(), treeModel); SwingUtilities.invokeLater(getTree()::repaint); } @@ -189,6 +211,11 @@ public abstract class RegisterTaskActionSupport extends ReferentialSelectionTree } } + protected <R extends ReferentialDtoReference> boolean shouldReplace(R reference) { + // by default never ask for a replacement + return false; + } + @SuppressWarnings("unchecked") public <R extends ReferentialDtoReference> void process(ReferentialSynchroNodeSupport node, Collection<SwingReferentialSynchronizeTask> addedTasks, @@ -198,7 +225,7 @@ public abstract class RegisterTaskActionSupport extends ReferentialSelectionTree R reference = (R) node.getReferentialReference(); R replaceReference = null; - if (needReplace) { + if (shouldReplace(reference)) { Class<R> type = (Class<R>) reference.getReferenceType(); List<R> references = new LinkedList<>(parentUI.getStepModel().getPossibleReplaceUniverse(left, reference)); @@ -301,63 +328,14 @@ public abstract class RegisterTaskActionSupport extends ReferentialSelectionTree } public String sendMessage(String message) { - AdminStep step = parentUI.getStep(); - addMessage(step, message); + addMessage(message); return message; } - - public void addMessage(AdminStep step, String text) { + public void addMessage(String text) { JTextArea progression = parentUI.getProgression(); progression.append(text + "\n"); progression.setCaretPosition(progression.getDocument().getLength()); } - public void addMessage(AdminTabUI ui, AdminStep step, String text) { - JTextArea progression = ui.getProgression(); - progression.append(text + "\n"); - progression.setCaretPosition(progression.getDocument().getLength()); - } - - - protected AdminUI getParentUI() { - return parentUI.getContextValue(AdminUI.class, "parent"); - } - - - protected void updateLeftEnableActions(ReferentialSynchronizeTreeModel treeModel) { - - ReferentialSynchroModel stepModel = parentUI.getStepModel(); - - treeModel.updateSelectedActions(); - stepModel.setCopyLeft(treeModel.isCanAdd() || treeModel.isCanUpdate()); - stepModel.setDeleteLeft(treeModel.isCanDelete()); - stepModel.setDeactivateLeft(treeModel.isCanDelete()); - stepModel.setDeactivateWithReplaceLeft(treeModel.isCanDelete()); - stepModel.setRevertLeft(treeModel.isCanRevert()); - stepModel.setSkipLeft(treeModel.isCanSkip()); - } - - protected void updateRightEnableActions(ReferentialSynchronizeTreeModel treeModel) { - - ReferentialSynchroModel stepModel = parentUI.getStepModel(); - - treeModel.updateSelectedActions(); - stepModel.setCopyRight(treeModel.isCanAdd() || treeModel.isCanUpdate()); - stepModel.setDeleteRight(treeModel.isCanDelete()); - stepModel.setDeactivateRight(treeModel.isCanDelete()); - stepModel.setDeactivateWithReplaceRight(treeModel.isCanDelete()); - stepModel.setRevertRight(treeModel.isCanRevert()); - stepModel.setSkipRight(treeModel.isCanSkip()); - } - - - protected void updateActions(ReferentialSynchronizeTreeModel treeModel) { - if (treeModel.isLeft()) { - updateLeftEnableActions(treeModel); - } else { - updateRightEnableActions(treeModel); - } - } - } ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java ===================================== @@ -74,6 +74,7 @@ import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JScrollBar; +import javax.swing.JSplitPane; import javax.swing.JTabbedPane; import javax.swing.JToolBar; import javax.swing.KeyStroke; @@ -193,6 +194,7 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup .onComponents(BeanEnumEditor.class, this::init) .onComponents(ObserveSwingValidator.class, this::init) .onComponents(JLabel.class, this::init) + .onComponents(JSplitPane.class, this::init) .onComponents(BigTextEditor.class, this::init) .onComponents(UrlEditor.class, this::init) .onComponents(NormalTextEditor.class, this::init) ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/list/actions/GotoSelectedData.java ===================================== @@ -44,7 +44,7 @@ public final class GotoSelectedData<D extends DataDto, R extends DataDtoReferenc public GotoSelectedData(Class<D> dataType) { super(dataType, null, null, "go-down", ObserveKeyStrokesEditorApi.KEY_STROKE_ALT_ENTER); - setText(ContentListUII18nHelper.getListActionGoToSelected(getDataType())); + setText(ContentListUII18nHelper.getActionGoToSelected(getDataType())); } @Override ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/navigation/NavigationUIHandler.java ===================================== @@ -93,7 +93,7 @@ public class NavigationUIHandler implements UIHandler<NavigationUI> { @Override public void afterInit(NavigationUI ui) { UIInitializerResult initializerResult = new Init(ui).initUI(); - actionsToReload = ReloadAction.collect(initializerResult.getComponents(AbstractButton.class)); + actionsToReload = ReloadAction.collect(initializerResult.getSubComponents(AbstractButton.class)); } public void updateActions(NavigationNode selectedNode) { ===================================== client/datasource/editor/api/src/main/resources/fr/ird/observe/client/datasource/editor/api/content/data/list/ContentListUI.keys ===================================== @@ -1,12 +1,12 @@ type list.title list.message.none -list.action.goToSelected list.navigation.node action.create action.create.tip action.goToOpen action.goToOpen.short +action.goToSelected action.move.tip action.move action.move.choose.parent.title ===================================== client/i18n/src/main/i18n/translations/observe_en_GB.properties ===================================== @@ -1405,8 +1405,10 @@ observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromLeft observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromLeftWithReplacement=Disable in left database\: <i>%s</i> - «<b>%s</b>» to replace by «<b>%s</b>» observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromRight=Disable in right database\: <i>%s</i> - «<b>%s</b>» observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromRightWithReplacement=Disable in right database\: <i>%s</i> - «<b>%s</b>» to replace by «<b>%s</b>» -observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromLeft=Delete in left database\: <i>%s</i> - «<b>%s</b>» to replace by «<b>%s</b>» -observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromRight=Delete in right database\: <i>%s</i> - «<b>%s</b>» to replace by «<b>%s</b>» +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromLeft=Delete in left database\: <i>%s</i> - «<b>%s</b>» with no replacement +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromLeftWithReplacement=Delete in left database\: <i>%s</i> - «<b>%s</b>» to replace by «<b>%s</b>» +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromRight=Delete in right database\: <i>%s</i> - «<b>%s</b>» with no replacement +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromRightWithReplacement=Delete in right database\: <i>%s</i> - «<b>%s</b>» to replace by «<b>%s</b>» observe.ui.datasource.editor.actions.synchro.referential.task.include.properties=Included properties\: %s observe.ui.datasource.editor.actions.synchro.referential.task.prepare=Register action %s\n * old left last update date \: %s\n * old right last update date \: %s\n * new last update date \: %s observe.ui.datasource.editor.actions.synchro.referential.task.revertFromLeft=Revert in left database\: <i>%s</i> - «<b>%s</b>» ===================================== client/i18n/src/main/i18n/translations/observe_es_ES.properties ===================================== @@ -1405,8 +1405,10 @@ observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromLeft observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromLeftWithReplacement=Desactivar en la base de la iquierda \: <i>%s</i> - «<b>%s</b>» debe ser reemplazado por «<b>%s</b>» observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromRight=Desactivar en la base de la derecha \: <i>%s</i> - «<b>%s</b>» observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromRightWithReplacement=Desactivar en la base de la derecha \: <i>%s</i> - «<b>%s</b>» debe ser reemplazado por «<b>%s</b>» -observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromLeft=Eliminar en la base de la izquierda\: <i>%s</i> - «<b>%s</b>» debe ser reemplazado por «<b>%s</b>» -observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromRight=Eliminar en la base de la izquierda \: <i>%s</i> - «<b>%s</b>» debe ser reemplazado por «<b>%s</b>» +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromLeft=Eliminar en la base de la izquierda\: <i>%s</i> - «<b>%s</b>» +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromLeftWithReplacement=Eliminar en la base de la izquierda\: <i>%s</i> - «<b>%s</b>» debe ser reemplazado por «<b>%s</b>» +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromRight=Eliminar en la base de la izquierda \: <i>%s</i> - «<b>%s</b>» +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromRightWithReplacement=Eliminar en la base de la izquierda \: <i>%s</i> - «<b>%s</b>» debe ser reemplazado por «<b>%s</b>» observe.ui.datasource.editor.actions.synchro.referential.task.include.properties=Included properties\: %s \#TODO observe.ui.datasource.editor.actions.synchro.referential.task.prepare=Registro de la acción %s\n * old left last update date \: %s\n * old right last update date \: %s\n * new last update date \: %s \#TODO observe.ui.datasource.editor.actions.synchro.referential.task.revertFromLeft=Volver atrás en la base de la izquierda \: <i>%s</i> - «<b>%s</b>» ===================================== client/i18n/src/main/i18n/translations/observe_fr_FR.properties ===================================== @@ -1405,8 +1405,10 @@ observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromLeft observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromLeftWithReplacement=Désactiver dans la base de gauche \: <i>%s</i> - «<b>%s</b>» à remplacer par «<b>%s</b>» observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromRight=Désactiver dans la base de droite \: <i>%s</i> - «<b>%s</b>» observe.ui.datasource.editor.actions.synchro.referential.task.deactivateFromRightWithReplacement=Désactiver dans la base de droite \: <i>%s</i> - «<b>%s</b>» à remplacer par «<b>%s</b>» -observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromLeft=Supprimer dans la base de gauche \: <i>%s</i> - «<b>%s</b>» à remplacer par «<b>%s</b>» -observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromRight=Supprimer dans la base de droite \: <i>%s</i> - «<b>%s</b>» à remplacer par «<b>%s</b>» +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromLeft=Supprimer dans la base de gauche \: <i>%s</i> - «<b>%s</b>» sans remplacement +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromLeftWithReplacement=Supprimer dans la base de gauche \: <i>%s</i> - «<b>%s</b>» à remplacer par «<b>%s</b>» +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromRight=Supprimer dans la base de droite \: <i>%s</i> - «<b>%s</b>» sans remplacement +observe.ui.datasource.editor.actions.synchro.referential.task.deleteFromRightWithReplacement=Supprimer dans la base de droite \: <i>%s</i> - «<b>%s</b>» à remplacer par «<b>%s</b>» observe.ui.datasource.editor.actions.synchro.referential.task.include.properties=Propriétés incluses \: %s observe.ui.datasource.editor.actions.synchro.referential.task.prepare=Enregistrement de l'action %s\n * ancienne date de mise à jour à gauche \: %s\n * ancienne date de mise à jourà droite \: %s\n * nouvelle date de mise à jour \: %s observe.ui.datasource.editor.actions.synchro.referential.task.revertFromLeft=Revenir en arrière dans la base de gauche \: <i>%s</i> - «<b>%s</b>» ===================================== models/persistence/src/main/java/fr/ird/observe/entities/data/ps/observation/SetImpl.java ===================================== @@ -22,7 +22,6 @@ package fr.ird.observe.entities.data.ps.observation; import com.google.common.collect.ImmutableSet; -import fr.ird.observe.dto.IdDto; import fr.ird.observe.dto.ProtectedIdsPs; import fr.ird.observe.dto.data.DataDto; import fr.ird.observe.dto.data.ps.observation.DiscardedTargetCatchDto; @@ -44,7 +43,6 @@ import fr.ird.observe.entities.referential.ps.common.SpeciesFate; import org.nuiton.util.DateUtil; import org.nuiton.util.NumberUtil; -import java.util.Collection; import java.util.Date; import java.util.List; import java.util.Objects; @@ -185,11 +183,11 @@ public class SetImpl extends SetAbstract { @Override public <D extends DataDto> void toDto(ReferentialLocale referentialLocale, D dto) { if (dto instanceof SetDiscardedTargetCatchDto) { - toSetTargetCatchDto(true, referentialLocale, dto, DiscardedTargetCatchDto.class); + toSetDiscardedTargetCatchDto(referentialLocale, (SetDiscardedTargetCatchDto) dto); return; } if (dto instanceof SetKeptTargetCatchDto) { - toSetTargetCatchDto(false, referentialLocale, dto, KeptTargetCatchDto.class); + toSetKeptTargetCatchDto(referentialLocale, (SetKeptTargetCatchDto) dto); return; } if (dto instanceof SetNonTargetCatchDto) { @@ -221,11 +219,11 @@ public class SetImpl extends SetAbstract { @Override public <D extends DataDto> void fromDto(ReferentialLocale referentialLocale, D dto) { if (dto instanceof SetDiscardedTargetCatchDto) { - fromSetTargetCatchDto(true, referentialLocale, dto); + fromSetDiscardedTargetCatchDto(referentialLocale, (SetDiscardedTargetCatchDto) dto); return; } if (dto instanceof SetKeptTargetCatchDto) { - fromSetTargetCatchDto(false, referentialLocale, dto); + fromSetKeptTargetCatchDto(referentialLocale, (SetKeptTargetCatchDto) dto); return; } if (dto instanceof SetNonTargetCatchDto) { @@ -253,18 +251,36 @@ public class SetImpl extends SetAbstract { } } - private <D extends DataDto, C extends DataDto> void toSetTargetCatchDto(boolean discarded, ReferentialLocale referentialLocale, D dto, Class<C> dtoCatchType) { + private void toSetKeptTargetCatchDto(ReferentialLocale referentialLocale, SetKeptTargetCatchDto dto) { super.toDto(referentialLocale, dto); - List<C> dtoList = EntityHelper.toDataDtoList(referentialLocale, getTargetCatch(discarded), dtoCatchType); - dto.set(SetKeptTargetCatchDto.PROPERTY_TARGET_CATCH, dtoList); + List<KeptTargetCatchDto> dtoList = EntityHelper.toDataDtoList(referentialLocale, getTargetCatch(false), KeptTargetCatchDto.class); + dto.setTargetCatch(dtoList); // is there some sample? - TargetSample targetSample = getTargetSample(discarded); + TargetSample targetSample = getTargetSample(false); if (targetSample != null) { // get usable species ids java.util.Set<String> speciesId = DtoReferenceAware.ids(targetSample.getTargetLength().stream().map(TargetLength::getSpecies)); // mark catch if there is associated samples to it dtoList.forEach(catchDto -> { - SpeciesReference species = catchDto.get(KeptTargetCatchDto.PROPERTY_SPECIES); + SpeciesReference species = catchDto.getSpecies(); + boolean hasSample = speciesId.contains(species.getId()); + catchDto.set(KeptTargetCatchDto.PROPERTY_HAS_SAMPLE, hasSample); + }); + } + } + + private void toSetDiscardedTargetCatchDto(ReferentialLocale referentialLocale, SetDiscardedTargetCatchDto dto) { + super.toDto(referentialLocale, dto); + List<DiscardedTargetCatchDto> dtoList = EntityHelper.toDataDtoList(referentialLocale, getTargetCatch(true), DiscardedTargetCatchDto.class); + dto.setTargetCatch(dtoList); + // is there some sample? + TargetSample targetSample = getTargetSample(true); + if (targetSample != null) { + // get usable species ids + java.util.Set<String> speciesId = DtoReferenceAware.ids(targetSample.getTargetLength().stream().map(TargetLength::getSpecies)); + // mark catch if there is associated samples to it + dtoList.forEach(catchDto -> { + SpeciesReference species = catchDto.getSpecies(); boolean hasSample = speciesId.contains(species.getId()); catchDto.set(KeptTargetCatchDto.PROPERTY_HAS_SAMPLE, hasSample); }); @@ -297,19 +313,33 @@ public class SetImpl extends SetAbstract { } } - private <D extends DataDto> void fromSetTargetCatchDto(boolean discarded, ReferentialLocale referentialLocale, D dto) { + private void fromSetKeptTargetCatchDto(ReferentialLocale referentialLocale, SetKeptTargetCatchDto dto) { + // keep other catches + List<TargetCatch> otherTargetCatches = getTargetCatch(true); + // do normal copy + super.fromDto(referentialLocale, dto); + // delete any sample which not using the given species ids + TargetSample targetSample = getTargetSample(false); + if (targetSample != null) { + List<KeptTargetCatchDto> targetCatch = dto.getTargetCatch(); + Set<String> speciesIds = DtoReferenceAware.ids(targetCatch.stream().map(KeptTargetCatchDto::getSpecies)); + // remove sample from species ids + targetSample.getTargetLength().removeIf(targetLength -> !speciesIds.contains(targetLength.getSpecies().getTopiaId())); + } + // push back other catches + otherTargetCatches.forEach(this::addTargetCatch); + } + + private void fromSetDiscardedTargetCatchDto(ReferentialLocale referentialLocale, SetDiscardedTargetCatchDto dto) { // keep other catches - List<TargetCatch> otherTargetCatches = getTargetCatch(!discarded); + List<TargetCatch> otherTargetCatches = getTargetCatch(false); // do normal copy super.fromDto(referentialLocale, dto); - List<TargetCatch> newCatches = getTargetCatch(discarded); - // set back set in any catches - newCatches.forEach(t -> t.setSet(this)); // delete any sample which not using the given species ids - TargetSample targetSample = getTargetSample(discarded); + TargetSample targetSample = getTargetSample(true); if (targetSample != null) { - Collection<? extends IdDto> targetCatch = dto.get("targetCatch"); - Set<String> speciesIds = DtoReferenceAware.ids(targetCatch.stream().map(t -> t.get("species"))); + List<DiscardedTargetCatchDto> targetCatch = dto.getTargetCatch(); + Set<String> speciesIds = DtoReferenceAware.ids(targetCatch.stream().map(DiscardedTargetCatchDto::getSpecies)); // remove sample from species ids targetSample.getTargetLength().removeIf(targetLength -> !speciesIds.contains(targetLength.getSpecies().getTopiaId())); } ===================================== models/persistence/src/main/models/Observe-20-data-ps-observation.model ===================================== @@ -181,22 +181,20 @@ setEndSetTime(endSetTime Date) getEndPursingTime() Date setEndPursingTime(endPursingTime Date) -data.ps.observation.TargetCatch > data.DataEntity | naturalIdMutable entity +data.ps.observation.TargetCatch > data.DataEntity | entity comment + {*:1} String | hibernateAttributeType=text catchWeight + {*:1} Float | sqlType=numeric -well + {*:1} String | naturalId notNull=false +well + {*:1} String broughtOnDeck + {*:1} Boolean -discarded + {*:1} boolean | naturalId -set {*:1} data.ps.observation.Set | naturalId inverse skipModelNavigation -weightCategory {*:1} referential.ps.observation.WeightCategory | naturalId -reasonForDiscard {*:0..1} referential.ps.observation.ReasonForDiscard | naturalId notNull=false +discarded + {*:1} boolean +weightCategory {*:1} referential.ps.observation.WeightCategory +reasonForDiscard {*:0..1} referential.ps.observation.ReasonForDiscard weightMeasureMethod {*:0..1} referential.common.WeightMeasureMethod getSpecies() referential.common.Species setSpecies(species referential.common.Species) isKept() boolean isUsableForSample() boolean - data.ps.observation.TargetLength > data.DataEntity >> data.ps.observation.LengthWeightComputableAware | entity constants=totalWeight length + {*:1} Float | sqlType=numeric isLengthComputed + {*:1} boolean ===================================== models/persistence/src/main/resources/db/migration/8.0/50_ps_observation_create-common.sql ===================================== @@ -33,7 +33,7 @@ CREATE TABLE ps_observation.reasonfornullset(topiaId VARCHAR(255) NOT NULL CONST CREATE TABLE ps_observation.set(topiaId VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_set PRIMARY KEY, topiaVersion BIGINT NOT NULL, topiaCreateDate TIMESTAMP NOT NULL, starttime TIME, endpursingtimestamp TIMESTAMP, endsettimestamp TIMESTAMP, maxgeardepth INTEGER, currentspeed NUMERIC, currentdirection INTEGER, schooltopdepth INTEGER, schoolmeandepth INTEGER, schoolthickness INTEGER, supportvesselname VARCHAR(255), comment VARCHAR(1025), schooltype VARCHAR(255), currentmeasuredepth INTEGER, reasonfornullset VARCHAR(255), lastUpdateDate TIMESTAMP DEFAULT now() NOT NULL, targetcatchcompositionestimatedbyobserver BOOLEAN DEFAULT FALSE, targetdiscardcatchcompositionestimatedbyobserver BOOLEAN DEFAULT FALSE, homeId VARCHAR(255)); CREATE TABLE ps_observation.nontargetcatchrelease(topiaId VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_non_target_catch_release PRIMARY KEY, topiaVersion BIGINT NOT NULL, topiaCreateDate TIMESTAMP NOT NULL, lastUpdateDate TIMESTAMP NOT NULL, length NUMERIC, count INTEGER, acquisitionmode INTEGER, comment VARCHAR(1025), species VARCHAR(255), sex VARCHAR(255), speciesgroupreleasemode VARCHAR(255), set VARCHAR(255), set_idx INTEGER, status VARCHAR(255) NOT NULL, conformity VARCHAR(255), releasingtime VARCHAR(255), lengthmeasuremethod VARCHAR(255), homeId VARCHAR(255)); CREATE TABLE ps_observation.nontargetsample(topiaId VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetsample PRIMARY KEY, topiaVersion BIGINT NOT NULL, topiaCreateDate TIMESTAMP NOT NULL, comment VARCHAR(1025), set VARCHAR(255), lastUpdateDate TIMESTAMP DEFAULT now() NOT NULL, homeId VARCHAR(255)); -CREATE TABLE ps_observation.schoolestimate(topiaId VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_schoolestimate PRIMARY KEY, topiaVersion BIGINT NOT NULL, set VARCHAR(255) NOT NULL, species VARCHAR(255) NOT NULL, topiaCreateDate TIMESTAMP NOT NULL, totalweight INTEGER, meanweight INTEGER, lastUpdateDate TIMESTAMP DEFAULT now() NOT NULL, weightmeasuremethod VARCHAR(255), CONSTRAINT uk_schoolestimate_species_set unique(species, set), homeId VARCHAR(255)); +CREATE TABLE ps_observation.schoolestimate(topiaId VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_schoolestimate PRIMARY KEY, topiaVersion BIGINT NOT NULL, set VARCHAR(255), species VARCHAR(255) NOT NULL, topiaCreateDate TIMESTAMP NOT NULL, totalweight INTEGER, meanweight INTEGER, lastUpdateDate TIMESTAMP DEFAULT now() NOT NULL, weightmeasuremethod VARCHAR(255), CONSTRAINT uk_schoolestimate_species_set unique(species, set), homeId VARCHAR(255)); CREATE TABLE ps_observation.nontargetcatch(topiaId VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetcatch PRIMARY KEY, topiaVersion BIGINT NOT NULL, topiaCreateDate TIMESTAMP NOT NULL, catchweight NUMERIC, catchweightcomputedsource INTEGER, meanweight NUMERIC, meanweightcomputedsource INTEGER, meanlength NUMERIC, meanlengthcomputedsource INTEGER, totalcount INTEGER, totalcountcomputedsource INTEGER, comment VARCHAR(1025), reasonfordiscard VARCHAR(255), species VARCHAR(255), speciesfate VARCHAR(255), set VARCHAR(255), lastUpdateDate TIMESTAMP DEFAULT now() NOT NULL, well VARCHAR(255), set_idx INTEGER, lengthmeasuremethod VARCHAR(255), weightmeasuremethod VARCHAR(255), homeId VARCHAR(255)); CREATE TABLE ps_observation.nontargetlength(topiaId VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetlength PRIMARY KEY, topiaVersion BIGINT NOT NULL, topiaCreateDate TIMESTAMP NOT NULL, length NUMERIC, islengthcomputed BOOLEAN, picturesreferences VARCHAR(255), weight NUMERIC, isweightcomputed BOOLEAN, count INTEGER, acquisitionmode INTEGER, species VARCHAR(255), nontargetsample VARCHAR(255), sex VARCHAR(255), lastUpdateDate TIMESTAMP DEFAULT now() NOT NULL, sizemeasuretype VARCHAR(255), weightmeasuretype VARCHAR(255), tagnumber VARCHAR(255), speciesfate VARCHAR(255), nontargetsample_idx INTEGER, lengthmeasuremethod VARCHAR(255), weightmeasuremethod VARCHAR(255), homeId VARCHAR(255)); CREATE TABLE ps_observation.speciesstatus(topiaId VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_speciesstatus PRIMARY KEY, topiaVersion BIGINT NOT NULL, topiaCreateDate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needComment BOOLEAN DEFAULT FALSE, lastUpdateDate TIMESTAMP DEFAULT now() NOT NULL, homeId VARCHAR(255)); @@ -48,5 +48,5 @@ CREATE TABLE ps_observation.objectobservedspecies(topiaId VARCHAR(255) NOT NULL CREATE TABLE ps_observation.objectschoolestimate(topiaId VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_objectschoolestimate PRIMARY KEY, topiaVersion BIGINT NOT NULL, topiaCreateDate TIMESTAMP NOT NULL, totalweight INTEGER, species VARCHAR(255), floatingobject VARCHAR(255), lastUpdateDate TIMESTAMP DEFAULT now() NOT NULL, weightmeasuremethod VARCHAR(255), homeId VARCHAR(255)); CREATE TABLE ps_observation.transmittingbuoy(topiaId VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_transmittingbuoy PRIMARY KEY, topiaVersion BIGINT NOT NULL, topiaCreateDate TIMESTAMP NOT NULL, code VARCHAR(255), comment VARCHAR(1024), transmittingBuoyOwnership VARCHAR(255), transmittingbuoytype VARCHAR(255), transmittingbuoyoperation VARCHAR(255), floatingobject VARCHAR(255), country VARCHAR(255), vessel VARCHAR(255), lastUpdateDate TIMESTAMP DEFAULT now() NOT NULL, homeId VARCHAR(255)); CREATE TABLE ps_observation.weightcategory(topiaId VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_weightcategory PRIMARY KEY, topiaVersion BIGINT NOT NULL, topiaCreateDate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), species VARCHAR(255), needComment BOOLEAN DEFAULT FALSE, lastUpdateDate TIMESTAMP DEFAULT now() NOT NULL, homeId VARCHAR(255)); -CREATE TABLE ps_observation.targetcatch(topiaId VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_targetcatch PRIMARY KEY, topiaVersion BIGINT NOT NULL, well VARCHAR(255), discarded BOOLEAN NOT NULL, set VARCHAR(255) NOT NULL, weightcategory VARCHAR(255) NOT NULL, reasonfordiscard VARCHAR(255), topiaCreateDate TIMESTAMP NOT NULL, catchweight NUMERIC, broughtondeck BOOLEAN, comment VARCHAR(1025), lastUpdateDate TIMESTAMP DEFAULT now() NOT NULL, set_idx INTEGER, weightmeasuremethod VARCHAR(255), CONSTRAINT uk_targetcatch_well_reasonfordiscard_weightcategory_discarded_s unique(well, reasonfordiscard, weightcategory, discarded, set), homeId VARCHAR(255)); +CREATE TABLE ps_observation.targetcatch(topiaId VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_targetcatch PRIMARY KEY, topiaVersion BIGINT NOT NULL, well VARCHAR(255), discarded BOOLEAN NOT NULL, set VARCHAR(255), weightcategory VARCHAR(255) NOT NULL, reasonfordiscard VARCHAR(255), topiaCreateDate TIMESTAMP NOT NULL, catchweight NUMERIC, broughtondeck BOOLEAN, comment VARCHAR(1025), lastUpdateDate TIMESTAMP DEFAULT now() NOT NULL, set_idx INTEGER, weightmeasuremethod VARCHAR(255), CONSTRAINT uk_targetcatch_well_reasonfordiscard_weightcategory_discarded_s unique(well, reasonfordiscard, weightcategory, discarded, set), homeId VARCHAR(255)); CREATE TABLE ps_observation.activity_observedsystem(activity VARCHAR(255) NOT NULL, observedsystem VARCHAR(255) NOT NULL, CONSTRAINT pk_ps_observation_activity_observedsystem PRIMARY KEY(activity, observedsystem)); ===================================== services/api/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/task/ReferentialSynchronizeTaskType.java ===================================== @@ -30,27 +30,21 @@ package fr.ird.observe.services.service.actions.synchro.referential.ng.task; */ public enum ReferentialSynchronizeTaskType { - ADD(false, false, true), - UPDATE(false, true, true), - REVERT(false, true, false), - DELETE(true, false, false), - DEACTIVATE(false, false, false), - DEACTIVATE_WITH_REPLACEMENT(true, false, false); + ADD(false, true), + UPDATE(true, true), + REVERT(true, false), + DELETE(false, false), + DEACTIVATE(false, false), + DEACTIVATE_WITH_REPLACEMENT(false, false); - private final boolean withReplace; private final boolean withProperties; private final boolean toOtherSide; - ReferentialSynchronizeTaskType(boolean withReplace, boolean withProperties, boolean toOtherSide) { - this.withReplace = withReplace; + ReferentialSynchronizeTaskType(boolean withProperties, boolean toOtherSide) { this.withProperties = withProperties; this.toOtherSide = toOtherSide; } - public boolean withReplace() { - return withReplace; - } - public boolean withProperties() { return withProperties; } ===================================== tests/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz ===================================== Binary files a/tests/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz and b/tests/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz differ ===================================== tests/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz ===================================== Binary files a/tests/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz and b/tests/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz differ ===================================== tests/test/src/main/resources/db/8.0/empty_h2.sql.gz ===================================== Binary files a/tests/test/src/main/resources/db/8.0/empty_h2.sql.gz and b/tests/test/src/main/resources/db/8.0/empty_h2.sql.gz differ ===================================== tests/test/src/main/resources/db/8.0/empty_pg.sql.gz ===================================== Binary files a/tests/test/src/main/resources/db/8.0/empty_pg.sql.gz and b/tests/test/src/main/resources/db/8.0/empty_pg.sql.gz differ ===================================== tests/test/src/main/resources/db/8.0/referentiel.sql.gz ===================================== Binary files a/tests/test/src/main/resources/db/8.0/referentiel.sql.gz and b/tests/test/src/main/resources/db/8.0/referentiel.sql.gz differ View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/41b33c60a9516846f415c155… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/41b33c60a9516846f415c155… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 6 commits: Add showReset css class
by Tony CHEMIT 13 Dec '20

13 Dec '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: d8798942 by Tony Chemit at 2020-12-13T14:06:25+01:00 Add showReset css class - - - - - 57fd399c by Tony Chemit at 2020-12-13T14:18:14+01:00 Avoid NPe if route date is null - - - - - a822e8be by Tony Chemit at 2020-12-13T14:40:27+01:00 Fix edit referential flow - - - - - 0fd7d3c0 by Tony Chemit at 2020-12-13T14:40:58+01:00 Replace BeanDateEditor by DateEditor - - - - - 17e8b3e6 by Tony Chemit at 2020-12-13T14:52:28+01:00 Méthodes de mesure par défaut - Closes #1646 - - - - - 41b33c60 by Tony Chemit at 2020-12-13T14:52:54+01:00 Bug sur suppression estimation banc - Closes #1647 - - - - - 26 changed files: - client/core/src/main/resources/fr/ird/observe/client/ui/ObserveCommon.jcss - client/datasource/editor/api/src/main/i18n/getters/java.getter - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUIHandler.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUIModel.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUIModelStates.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/actions/BackToListReferential.java - client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/FpaZoneUI.jaxx - client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/LengthLengthParameterUI.jaxx - client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/LengthWeightParameterUI.jaxx - client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/ProgramUI.jaxx - client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/ShipOwnerUI.jaxx - client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/VesselUI.jaxx - client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/common/TripUI.jaxx - client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/landing/LandingUI.jaxx - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripUI.jaxx - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/RouteUI.jaxx - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/SetKeptTargetCatchUIModel.java - client/i18n/src/main/i18n/translations/observe_en_GB.properties - client/i18n/src/main/i18n/translations/observe_es_ES.properties - client/i18n/src/main/i18n/translations/observe_fr_FR.properties - models/dto/src/main/java/fr/ird/observe/dto/ProtectedIdsPs.java - models/persistence/src/main/java/fr/ird/observe/entities/data/ps/observation/SetImpl.java - models/persistence/src/main/models/Observe-20-data-ps-observation.model - services/validation-spi/src/main/java/fr/ird/observe/validation/validators/ActivitySimpleSpeedDtoValidator.java - services/validation-spi/src/main/java/fr/ird/observe/validation/validators/ActivitySpeedDtoValidator.java Changes: ===================================== client/core/src/main/resources/fr/ird/observe/client/ui/ObserveCommon.jcss ===================================== @@ -104,6 +104,10 @@ disabledIcon:{fr.ird.observe.client.util.UIHelper.getUIManagerActionIcon("data-observe")}; } +.showReset { + showReset:true; +} + JToolBar { borderPainted:false; floatable:false; ===================================== client/datasource/editor/api/src/main/i18n/getters/java.getter ===================================== @@ -275,7 +275,6 @@ observe.ui.datasource.storage.server.sessionExpire.reload observe.ui.datasource.storage.server.sessionExpire.title observe.ui.datasource.storage.serverConfiguration.presets.save observe.ui.datasource.storage.step.label -observe.ui.datepicker.show observe.ui.menu.navigation.ll observe.ui.menu.navigation.ps observe.ui.message.db.closed ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java ===================================== @@ -24,7 +24,6 @@ package fr.ird.observe.client.datasource.editor.api.content; import fr.ird.observe.client.WithClientUIContext; import fr.ird.observe.client.configuration.WithClientConfig; -import fr.ird.observe.client.datasource.editor.api.ObserveKeyStrokesEditorApi; import fr.ird.observe.client.datasource.editor.api.content.actions.GoToTab; import fr.ird.observe.client.datasource.editor.api.content.data.map.ObserveMapPane; import fr.ird.observe.client.datasource.editor.api.content.data.map.TripMapUI; @@ -44,7 +43,6 @@ import fr.ird.observe.dto.decoration.decorators.ReferentialReferenceDecorator; import fr.ird.observe.dto.reference.DataDtoReference; import fr.ird.observe.dto.reference.ReferentialDtoReference; import io.ultreia.java4all.bean.JavaBean; -import io.ultreia.java4all.i18n.I18n; import io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox; import io.ultreia.java4all.jaxx.widgets.choice.BooleanEditor; import io.ultreia.java4all.jaxx.widgets.combobox.BeanEnumEditor; @@ -56,10 +54,8 @@ import org.nuiton.jaxx.runtime.swing.Table; import org.nuiton.jaxx.validator.JAXXValidator; import org.nuiton.jaxx.validator.swing.SwingValidatorUtil; import org.nuiton.jaxx.widgets.BeanUIUtil; -import org.nuiton.jaxx.widgets.datetime.BeanDateEditor; +import org.nuiton.jaxx.widgets.datetime.DateEditor; import org.nuiton.jaxx.widgets.datetime.DateTimeEditor; -import org.nuiton.jaxx.widgets.datetime.ExtendedBasicDatePickerUI; -import org.nuiton.jaxx.widgets.datetime.JAXXDatePicker; import org.nuiton.jaxx.widgets.datetime.TimeEditor; import org.nuiton.jaxx.widgets.gis.absolute.CoordinatesEditor; import org.nuiton.jaxx.widgets.number.NumberEditor; @@ -73,7 +69,6 @@ import org.nuiton.jaxx.widgets.text.NormalTextEditor; import org.nuiton.jaxx.widgets.text.UrlEditor; import javax.swing.ActionMap; -import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JComponent; import javax.swing.JLabel; @@ -107,14 +102,13 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup public static final Class<?>[] MANAGED_TYPES = new Class<?>[]{ JComponent.class, JToolBar.class, - JAXXDatePicker.class, BlockingLayerUI.class, BeanCheckBox.class, NumberEditor.class, JaxxComboBox.class, BeanListHeader.class, FilterableDoubleList.class, - BeanDateEditor.class, + DateEditor.class, TimeEditor.class, DateTimeEditor.class, CoordinatesEditor.class, @@ -192,10 +186,9 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup .onComponents(CoordinatesEditor.class, true, this::init) .onComponents(TemperatureEditor.class, true, this::init) .onComponents(JToolBar.class, this::init) - .onComponents(JAXXDatePicker.class, this::init) .onComponents(BeanCheckBox.class, this::init) .onComponents(NumberEditor.class, this::init) - .onComponents(BeanDateEditor.class, this::init) + .onComponents(DateEditor.class, this::init) .onComponents(BooleanEditor.class, this::init) .onComponents(BeanEnumEditor.class, this::init) .onComponents(ObserveSwingValidator.class, this::init) @@ -410,22 +403,6 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup editor.init(); } - protected void init(JAXXDatePicker editor) { - initializerContext.checkFirstPass(); - editor.setFormats("dd/MM/yyyy"); - ExtendedBasicDatePickerUI ui = new ExtendedBasicDatePickerUI() { - @Override - protected JButton createPopupButton() { - JButton popupButton = super.createPopupButton(); - if (popupButton != null) { - popupButton.setToolTipText(ObserveKeyStrokesEditorApi.suffixTextWithKeyStroke(I18n.t("observe.ui.datepicker.show"), ObserveKeyStrokesEditorApi.KEY_STROKE_GO_DOWN)); - } - return popupButton; - } - }; - editor.setUI(ui); - } - protected void init(BooleanEditor editor) { initializerContext.checkFirstPass(); editor.init(); @@ -441,21 +418,9 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup editor.init(I18nEnumHelper::getLabel); } - protected void init(BeanDateEditor editor) { + protected void init(DateEditor editor) { initializerContext.checkFirstPass(); editor.setLocale(getClientConfig().getLocale()); - ExtendedBasicDatePickerUI ui = new ExtendedBasicDatePickerUI() { - @Override - protected JButton createPopupButton() { - JButton popupButton = super.createPopupButton(); - if (popupButton != null) { - popupButton.setToolTipText(ObserveKeyStrokesEditorApi.suffixTextWithKeyStroke(I18n.t("observe.ui.datepicker.show"), ObserveKeyStrokesEditorApi.KEY_STROKE_GO_DOWN)); - } - return popupButton; - } - }; - ui.setShowPopupButton(true); - editor.setUI(ui); editor.init(); } ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUIHandler.java ===================================== @@ -122,6 +122,12 @@ public class ContentReferentialUIHandler<D extends ReferentialDto, R extends Ref protected ContentOpen<U> createContentOpen(U ui) { ContentReferentialUIOpenExecutor<D, R, U> executor = new ContentReferentialUIOpenExecutor<>(); return new ContentOpen<>(ui, executor, executor); +// return new ContentOpen<U>(ui, executor, executor) { +// @Override +// public boolean applyBeforeSave(Close close) { +// return super.applyBeforeSave(close==Close.CLOSE?Close.RESET : close); +// } +// }; } @Override ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUIModel.java ===================================== @@ -24,12 +24,14 @@ package fr.ird.observe.client.datasource.editor.api.content.referential; import com.google.common.collect.ImmutableSet; import fr.ird.observe.client.configuration.ClientConfig; import fr.ird.observe.client.datasource.api.cache.ReferencesCache; +import fr.ird.observe.client.datasource.editor.api.content.ContentUI; import fr.ird.observe.client.datasource.editor.api.content.ContentUIModel; import fr.ird.observe.client.datasource.editor.api.content.actions.id.ChangeIdRequest; import fr.ird.observe.client.datasource.editor.api.content.actions.id.ShowIdRequest; import fr.ird.observe.client.datasource.editor.api.content.actions.save.SaveRequest; import fr.ird.observe.client.datasource.editor.api.content.referential.usage.UsageForDesactivateUIHandler; import fr.ird.observe.client.datasource.editor.api.navigation.tree.NavigationNode; +import fr.ird.observe.client.util.init.DefaultUIInitializerResult; import fr.ird.observe.dto.form.Form; import fr.ird.observe.dto.reference.ReferentialDtoReference; import fr.ird.observe.dto.referential.ReferenceStatus; @@ -75,6 +77,12 @@ public abstract class ContentReferentialUIModel<D extends ReferentialDto, R exte return getSource().getContext().newModelStates(getSource().getInitializer()); } + @Override + public void init(ContentUI ui, DefaultUIInitializerResult initializerResult) { + super.init(ui, initializerResult); + getReferenceCache().registerComponents(initializerResult); + } + public void openForm(Form<D> form) { getReferenceCache().loadReferentialReferenceSetsInModel(form); setForm(form); ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUIModelStates.java ===================================== @@ -58,6 +58,24 @@ public class ContentReferentialUIModelStates<D extends ReferentialDto, R extends this.bean = Objects.requireNonNull(bean); } + @Override + public boolean canQuit() { + if (!isEnabled()) { + // model disabled, no check + return true; + } + if (!isEditing()) { + // model not editing, no check + return true; + } + if (isReadingMode()) { + // model in reading mode, no check + return true; + } + // can quit only if model not modified + return !isGlobalModified(); + } + public String[] getNaturalIds() { return naturalIds; } ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/actions/BackToListReferential.java ===================================== @@ -51,6 +51,10 @@ public final class BackToListReferential<D extends ReferentialDto, R extends Ref ContentOpen.Close close = contentOpen.tryToClose(); if (close == ContentOpen.Close.CANCEL) { return; + }if (close == ContentOpen.Close.CLOSE) { + // special case, in this form we always need to stop editing (editing does not means editable...) + //FIXME Review the form to stop using the editing property for this + close = ContentOpen.Close.RESET; } boolean canQuit = contentOpen.applyBeforeSave(close); if (!canQuit) { ===================================== client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/FpaZoneUI.jaxx ===================================== @@ -27,7 +27,7 @@ fr.ird.observe.dto.referential.common.FpaZoneDto fr.ird.observe.dto.referential.common.FpaZoneReference - org.nuiton.jaxx.widgets.datetime.BeanDateEditor + org.nuiton.jaxx.widgets.datetime.DateEditor org.nuiton.jaxx.widgets.text.NormalTextEditor io.ultreia.java4all.jaxx.widgets.combobox.BeanEnumEditor io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox @@ -79,8 +79,8 @@ </cell> <cell anchor='west' weightx="1" fill="both"> <JPanel layout='{new GridLayout()}'> - <BeanDateEditor id='startDate'/> - <BeanDateEditor id='endDate'/> + <DateEditor id='startDate' styleClass='showReset'/> + <DateEditor id='endDate' styleClass='showReset'/> </JPanel> </cell> </row> ===================================== client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/LengthLengthParameterUI.jaxx ===================================== @@ -39,7 +39,7 @@ org.nuiton.jaxx.widgets.text.NormalTextEditor io.ultreia.java4all.jaxx.widgets.combobox.BeanEnumEditor io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox - org.nuiton.jaxx.widgets.datetime.BeanDateEditor + org.nuiton.jaxx.widgets.datetime.DateEditor javax.swing.JScrollPane javax.swing.JTable @@ -105,8 +105,8 @@ </cell> <cell anchor='west' weightx="1" fill="both"> <JPanel layout='{new GridLayout()}'> - <BeanDateEditor id='startDate'/> - <BeanDateEditor id='endDate'/> + <DateEditor id='startDate' styleClass='showReset'/> + <DateEditor id='endDate' styleClass='showReset'/> </JPanel> </cell> </row> ===================================== client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/LengthWeightParameterUI.jaxx ===================================== @@ -38,7 +38,7 @@ org.nuiton.jaxx.widgets.text.NormalTextEditor io.ultreia.java4all.jaxx.widgets.combobox.BeanEnumEditor io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox - org.nuiton.jaxx.widgets.datetime.BeanDateEditor + org.nuiton.jaxx.widgets.datetime.DateEditor javax.swing.JScrollPane javax.swing.JTable @@ -131,8 +131,8 @@ public void decorateUniqueKeyTable(JTable table, TableCellRenderer renderer, JSc </cell> <cell anchor='west' weightx="1" fill="both"> <JPanel layout='{new GridLayout()}'> - <BeanDateEditor id='startDate'/> - <BeanDateEditor id='endDate'/> + <DateEditor id='startDate' styleClass='showReset'/> + <DateEditor id='endDate' styleClass='showReset'/> </JPanel> </cell> </row> ===================================== client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/ProgramUI.jaxx ===================================== @@ -34,7 +34,7 @@ io.ultreia.java4all.jaxx.widgets.combobox.BeanEnumEditor io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox - org.nuiton.jaxx.widgets.datetime.BeanDateEditor + org.nuiton.jaxx.widgets.datetime.DateEditor org.nuiton.jaxx.widgets.text.BigTextEditor org.nuiton.jaxx.widgets.text.NormalTextEditor @@ -117,8 +117,8 @@ </cell> <cell anchor='west'> <JPanel layout='{new GridLayout()}'> - <BeanDateEditor id='startDate'/> - <BeanDateEditor id='endDate'/> + <DateEditor id='startDate' styleClass='showReset'/> + <DateEditor id='endDate' styleClass='showReset'/> </JPanel> </cell> </row> ===================================== client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/ShipOwnerUI.jaxx ===================================== @@ -32,7 +32,7 @@ org.nuiton.jaxx.widgets.text.NormalTextEditor io.ultreia.java4all.jaxx.widgets.combobox.BeanEnumEditor io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox - org.nuiton.jaxx.widgets.datetime.BeanDateEditor + org.nuiton.jaxx.widgets.datetime.DateEditor static fr.ird.observe.client.util.UIHelper.getStringValue fr.ird.observe.dto.referential.ReferenceStatus </import> @@ -100,8 +100,8 @@ </cell> <cell anchor='west' weightx="1" fill="both"> <JPanel layout='{new GridLayout()}'> - <BeanDateEditor id='startDate'/> - <BeanDateEditor id='endDate'/> + <DateEditor id='startDate' styleClass='showReset'/> + <DateEditor id='endDate' styleClass='showReset'/> </JPanel> </cell> </row> ===================================== client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/VesselUI.jaxx ===================================== @@ -36,7 +36,7 @@ org.nuiton.jaxx.widgets.text.NormalTextEditor io.ultreia.java4all.jaxx.widgets.combobox.BeanEnumEditor io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox - org.nuiton.jaxx.widgets.datetime.BeanDateEditor + org.nuiton.jaxx.widgets.datetime.DateEditor static fr.ird.observe.client.util.UIHelper.getStringValue fr.ird.observe.dto.referential.ReferenceStatus @@ -209,7 +209,7 @@ <JLabel id='changeDateLabel'/> </cell> <cell anchor='west'> - <BeanDateEditor id='changeDate'/> + <DateEditor id='changeDate' styleClass='showReset'/> </cell> </row> <row> ===================================== client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/common/TripUI.jaxx ===================================== @@ -34,7 +34,7 @@ fr.ird.observe.dto.referential.ll.common.ObservationMethodReference fr.ird.observe.client.datasource.editor.api.content.data.open.ContentOpenableUIModelStates io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox - org.nuiton.jaxx.widgets.datetime.BeanDateEditor + org.nuiton.jaxx.widgets.datetime.DateEditor fr.ird.observe.client.datasource.editor.api.content.data.map.TripMapUI @@ -131,7 +131,7 @@ <JLabel id='startDateLabel'/> </cell> <cell anchor='west' weightx="0.5"> - <BeanDateEditor id='startDate'/> + <DateEditor id='startDate'/> </cell> </row> @@ -151,7 +151,7 @@ <JLabel id='endDateLabel'/> </cell> <cell anchor='west' weightx="0.5"> - <BeanDateEditor id='endDate'/> + <DateEditor id='endDate'/> </cell> </row> ===================================== client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/landing/LandingUI.jaxx ===================================== @@ -34,7 +34,7 @@ fr.ird.observe.client.ObserveSwingApplicationContext fr.ird.observe.client.datasource.editor.api.content.data.table.ContentTableUIModelStates fr.ird.observe.client.datasource.editor.api.content.data.open.ContentOpenableUIModelStates - org.nuiton.jaxx.widgets.datetime.BeanDateEditor + org.nuiton.jaxx.widgets.datetime.DateEditor org.nuiton.jaxx.widgets.text.BigTextEditor org.nuiton.jaxx.widgets.number.NumberEditor @@ -141,7 +141,7 @@ <JLabel id='startDateLabel'/> </cell> <cell anchor='east' weightx="1"> - <BeanDateEditor id='startDate'/> + <DateEditor id='startDate'/> </cell> </row> @@ -151,7 +151,7 @@ <JLabel id='endDateLabel'/> </cell> <cell anchor='east' weightx="1"> - <BeanDateEditor id='endDate'/> + <DateEditor id='endDate'/> </cell> </row> <row> ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripUI.jaxx ===================================== @@ -34,7 +34,7 @@ fr.ird.observe.client.datasource.editor.api.content.data.map.TripMapUI fr.ird.observe.client.datasource.editor.api.content.data.open.ContentOpenableUIModelStates - org.nuiton.jaxx.widgets.datetime.BeanDateEditor + org.nuiton.jaxx.widgets.datetime.DateEditor io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox org.nuiton.jaxx.widgets.number.NumberEditor @@ -177,7 +177,7 @@ <JLabel id='startDateLabel'/> </cell> <cell anchor='west' weightx="0.5"> - <BeanDateEditor id='startDate'/> + <DateEditor id='startDate'/> </cell> </row> @@ -187,7 +187,7 @@ <JLabel id='endDateLabel'/> </cell> <cell anchor='west' weightx="0.5"> - <BeanDateEditor id='endDate'/> + <DateEditor id='endDate'/> </cell> </row> ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/RouteUI.jaxx ===================================== @@ -24,8 +24,7 @@ <import> fr.ird.observe.dto.data.ps.observation.RouteDto fr.ird.observe.client.datasource.editor.api.content.data.open.ContentOpenableUIModelStates - org.nuiton.jaxx.widgets.datetime.BeanDateEditor - + org.nuiton.jaxx.widgets.datetime.DateEditor org.nuiton.jaxx.widgets.number.NumberEditor org.nuiton.jaxx.widgets.text.BigTextEditor @@ -50,7 +49,7 @@ <JLabel id='dateLabel'/> </cell> <cell anchor='east' weightx="1"> - <BeanDateEditor id='date'/> + <DateEditor id='date'/> </cell> </row> <row> ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/SetKeptTargetCatchUIModel.java ===================================== @@ -22,12 +22,16 @@ package fr.ird.observe.client.datasource.editor.ps.data.observation; * #L% */ +import fr.ird.observe.client.ClientUIContextApplicationComponent; import fr.ird.observe.client.configuration.ClientConfig; +import fr.ird.observe.client.datasource.api.ObserveSwingDataSource; import fr.ird.observe.client.datasource.api.cache.ReferencesCache; import fr.ird.observe.client.datasource.api.cache.ReferencesFilterHelper; import fr.ird.observe.client.datasource.editor.api.content.data.table.AskToDelete; +import fr.ird.observe.dto.ProtectedIdsPs; import fr.ird.observe.dto.data.ps.observation.KeptTargetCatchDto; import fr.ird.observe.dto.data.ps.observation.SetKeptTargetCatchDto; +import fr.ird.observe.dto.referential.common.WeightMeasureMethodReference; import fr.ird.observe.services.ObserveServicesProvider; import io.ultreia.java4all.i18n.I18n; @@ -40,9 +44,11 @@ import java.util.List; * @since XXX */ public class SetKeptTargetCatchUIModel extends GeneratedSetKeptTargetCatchUIModel { - + private final WeightMeasureMethodReference defaultWeightMeasureMethod; public SetKeptTargetCatchUIModel(SetKeptTargetCatchUINavigationNode source) { super(source); + ObserveSwingDataSource dataSource = ClientUIContextApplicationComponent.value().getDataSourcesManager().getMainDataSource(); + defaultWeightMeasureMethod = dataSource.getReferentialReferenceSet(WeightMeasureMethodReference.class).tryGetReferenceById(ProtectedIdsPs.PS_OBSERVATION_KEPT_TARGET_CATCH_DEFAULT_WEIGHT_MEASURE_METHOD_ID).orElseThrow(IllegalStateException::new); } @Override @@ -59,4 +65,15 @@ public class SetKeptTargetCatchUIModel extends GeneratedSetKeptTargetCatchUIMode return ask.needDelete(this.getClientUIContext().getDecoratorService(), originalBean, bean); } + + public WeightMeasureMethodReference getDefaultWeightMeasureMethod() { + return defaultWeightMeasureMethod; + } + + @Override + public KeptTargetCatchDto newTableEditBean() { + KeptTargetCatchDto result = super.newTableEditBean(); + result.setWeightMeasureMethod(getDefaultWeightMeasureMethod()); + return result; + } } ===================================== client/i18n/src/main/i18n/translations/observe_en_GB.properties ===================================== @@ -1591,7 +1591,6 @@ observe.ui.datasource.storage.useRemoteStorage.config=Configure remote data sour observe.ui.datasource.storage.useRemoteStorage.description=Please configure connexion to remote data source\nYou must validate your connexion to continue. observe.ui.datasource.storage.useServerStorage.config=Configure remote server to use observe.ui.datasource.storage.useServerStorage.description=Please configure connexion to remote server\nYou must validate your connexion to continue. -observe.ui.datepicker.show=To show date picker dialog observe.ui.menu.actions=Actions observe.ui.menu.configuration=Configuration observe.ui.menu.configuration.tip=To configure application ===================================== client/i18n/src/main/i18n/translations/observe_es_ES.properties ===================================== @@ -1591,7 +1591,6 @@ observe.ui.datasource.storage.useRemoteStorage.config=Configurar la base remota observe.ui.datasource.storage.useRemoteStorage.description=Configure la conexión a la base remota\nAntes de continuar, debe validar la conexión. observe.ui.datasource.storage.useServerStorage.config=Configurar el servidor remoto a utilizar observe.ui.datasource.storage.useServerStorage.description=Configure su conexión al servidor remoto\nAntes de que pueda continuar, tiene que validar la conexión. -observe.ui.datepicker.show=To show date picker dialog \#TODO observe.ui.menu.actions=Acciones observe.ui.menu.configuration=Configuración observe.ui.menu.configuration.tip=Menú de configuración ===================================== client/i18n/src/main/i18n/translations/observe_fr_FR.properties ===================================== @@ -1591,7 +1591,6 @@ observe.ui.datasource.storage.useRemoteStorage.config=Configurer la base distant observe.ui.datasource.storage.useRemoteStorage.description=Veuillez configurer votre connexion à la base distante\nAvant de pouvoir poursuivre, vous devez valider la connexion. observe.ui.datasource.storage.useServerStorage.config=Configurer le serveur distant à utiliser observe.ui.datasource.storage.useServerStorage.description=Veuillez configurer votre connexion au serveur distant\nAvant de pouvoir poursuivre, vous devez valider la connexion. -observe.ui.datepicker.show=Pour ouvrir l'éditeur de date observe.ui.menu.actions=Actions observe.ui.menu.configuration=Configuration observe.ui.menu.configuration.tip=Menu de configuration ===================================== models/dto/src/main/java/fr/ird/observe/dto/ProtectedIdsPs.java ===================================== @@ -56,6 +56,7 @@ public interface ProtectedIdsPs { String PS_OBSERVATION_FOB_OBSERVED_SYSTEM = "fr.ird.referential.ps.observation.ObservedSystem#0#1.2"; ImmutableSet<String> PS_OBSERVATION_FOB_OBSERVED_SYSTEM_EXCLUDE_OPERATIONS = ImmutableSet.of("fr.ird.referential.ps.common.ObjectOperation#0#10", "fr.ird.referential.ps.common.ObjectOperation#0#1"); String PS_OBSERVATION_SCHOOL_ESTIMATE_DEFAULT_WEIGHT_MEASURE_METHOD_ID = "fr.ird.referential.common.WeightMeasureMethod#666#04"; + String PS_OBSERVATION_KEPT_TARGET_CATCH_DEFAULT_WEIGHT_MEASURE_METHOD_ID = "fr.ird.referential.common.WeightMeasureMethod#666#01"; String PS_LOGBOOK_TRIP_DEFAULT_DATA_QUALITY_ID = "fr.ird.referential.common.DataQuality#0#5"; String PS_LOGBOOK_TRIP_DEFAULT_DEPARTURE_WELL_STATES_ID = "fr.ird.referential.ps.logbook.WellsState#666#03"; String PS_LOGBOOK_TRIP_DEFAULT_LANDING_WELL_STATES_ID = "fr.ird.referential.ps.logbook.WellsState#666#03"; ===================================== models/persistence/src/main/java/fr/ird/observe/entities/data/ps/observation/SetImpl.java ===================================== @@ -35,7 +35,6 @@ import fr.ird.observe.dto.data.ps.observation.SetDto; import fr.ird.observe.dto.data.ps.observation.SetKeptTargetCatchDto; import fr.ird.observe.dto.data.ps.observation.SetNonTargetCatchDto; import fr.ird.observe.dto.data.ps.observation.SetNonTargetCatchReleaseDto; -import fr.ird.observe.dto.data.ps.observation.SetSchoolEstimateDto; import fr.ird.observe.dto.reference.DtoReferenceAware; import fr.ird.observe.dto.referential.ReferentialLocale; import fr.ird.observe.dto.referential.common.SpeciesReference; @@ -234,9 +233,6 @@ public class SetImpl extends SetAbstract { return; } super.fromDto(referentialLocale, dto); - if (dto instanceof SetSchoolEstimateDto) { - getSchoolEstimate().forEach(t -> t.setSet(this)); - } } private void fromSetNonTargetCatchDto(ReferentialLocale referentialLocale, SetNonTargetCatchDto dto) { ===================================== models/persistence/src/main/models/Observe-20-data-ps-observation.model ===================================== @@ -130,11 +130,10 @@ endLogValue + {*:1} Float | sqlType=numeric checkLevel + {*:1} int activity + {*} data.ps.observation.Activity | unique orderBy=time -data.ps.observation.SchoolEstimate > data.DataEntity | naturalIdMutable entity +data.ps.observation.SchoolEstimate > data.DataEntity | entity totalWeight + {*:1} Integer meanWeight + {*:1} Integer -set {*:1} data.ps.observation.Set | naturalId skipModelNavigation -species {*:1} referential.common.Species | naturalId +species {*:1} referential.common.Species weightMeasureMethod {*:0..1} referential.common.WeightMeasureMethod data.ps.observation.Set > data.DataEntity >> data.SetAware | entity constants=targetSampleCapture,endSetDate,endPursingDate,endSetTime,endPursingTime @@ -157,7 +156,7 @@ nonTargetCatch + {*} data.ps.observation.NonTargetCatch | ordered reasonForNullSet {*:0..1} referential.ps.observation.ReasonForNullSet nonTargetSample + {*} data.ps.observation.NonTargetSample | unique targetSample + {*} data.ps.observation.TargetSample | unique -targetCatch + {*} data.ps.observation.TargetCatch | ordered +targetCatch + {*} data.ps.observation.TargetCatch | ordered inverse=false schoolEstimate + {*} data.ps.observation.SchoolEstimate | orderBy=topiaCreateDate nonTargetCatchRelease + {*} data.ps.observation.NonTargetCatchRelease | ordered hasDiscardedTargetCatch() boolean @@ -188,7 +187,7 @@ catchWeight + {*:1} Float | sqlType=numeric well + {*:1} String | naturalId notNull=false broughtOnDeck + {*:1} Boolean discarded + {*:1} boolean | naturalId -set {*:1} data.ps.observation.Set | naturalId skipModelNavigation +set {*:1} data.ps.observation.Set | naturalId inverse skipModelNavigation weightCategory {*:1} referential.ps.observation.WeightCategory | naturalId reasonForDiscard {*:0..1} referential.ps.observation.ReasonForDiscard | naturalId notNull=false weightMeasureMethod {*:0..1} referential.common.WeightMeasureMethod ===================================== services/validation-spi/src/main/java/fr/ird/observe/validation/validators/ActivitySimpleSpeedDtoValidator.java ===================================== @@ -179,6 +179,11 @@ public class ActivitySimpleSpeedDtoValidator extends FieldValidatorSupport { RouteDto route = (RouteDto) stack.findValue("currentPsObservationRoute"); Objects.requireNonNull(route, " could not find currentPsObservationRoute in valueStack"); + if (route.getDate() == null) { + // cas limite (pas de date sur la route) + log.debug(String.format("Missing route date : %s, skip speed computation", route.getId())); + return; + } ActivityStubDto previousActivity; ===================================== services/validation-spi/src/main/java/fr/ird/observe/validation/validators/ActivitySpeedDtoValidator.java ===================================== @@ -77,6 +77,7 @@ public class ActivitySpeedDtoValidator extends FieldValidatorSupport { private CollectionFieldExpressionValidator delegate; private boolean enable; private Float speed; + public Float getSpeed() { return speed; } @@ -145,6 +146,11 @@ public class ActivitySpeedDtoValidator extends FieldValidatorSupport { return true; } + if (route.getDate() == null) { + // cas limite (pas de date sur la route) + LOG.debug(String.format("Missing route date : %s, skip speed computation", route.getId())); + return true; + } GPSPoint previousPoint = newPoint(route, previousActivity); GPSPoint currentPoint = newPoint(route, currentActivity); @@ -178,6 +184,7 @@ public class ActivitySpeedDtoValidator extends FieldValidatorSupport { public float getComputedSpeed() { return computedSpeed; } + public float getSpeed() { return ActivitySpeedDtoValidator.this.getSpeed(); } View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/67b3e8822a805060e8532361… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/67b3e8822a805060e8532361… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] Déploiement du calendrier - Closes #1643
by Tony CHEMIT 13 Dec '20

13 Dec '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 67b3e882 by Tony Chemit at 2020-12-13T01:11:36+01:00 Déploiement du calendrier - Closes #1643 - - - - - 5 changed files: - client/datasource/editor/api/src/main/i18n/getters/java.getter - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java - client/i18n/src/main/i18n/translations/observe_en_GB.properties - client/i18n/src/main/i18n/translations/observe_es_ES.properties - client/i18n/src/main/i18n/translations/observe_fr_FR.properties Changes: ===================================== client/datasource/editor/api/src/main/i18n/getters/java.getter ===================================== @@ -275,6 +275,7 @@ observe.ui.datasource.storage.server.sessionExpire.reload observe.ui.datasource.storage.server.sessionExpire.title observe.ui.datasource.storage.serverConfiguration.presets.save observe.ui.datasource.storage.step.label +observe.ui.datepicker.show observe.ui.menu.navigation.ll observe.ui.menu.navigation.ps observe.ui.message.db.closed ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java ===================================== @@ -24,6 +24,7 @@ package fr.ird.observe.client.datasource.editor.api.content; import fr.ird.observe.client.WithClientUIContext; import fr.ird.observe.client.configuration.WithClientConfig; +import fr.ird.observe.client.datasource.editor.api.ObserveKeyStrokesEditorApi; import fr.ird.observe.client.datasource.editor.api.content.actions.GoToTab; import fr.ird.observe.client.datasource.editor.api.content.data.map.ObserveMapPane; import fr.ird.observe.client.datasource.editor.api.content.data.map.TripMapUI; @@ -43,6 +44,7 @@ import fr.ird.observe.dto.decoration.decorators.ReferentialReferenceDecorator; import fr.ird.observe.dto.reference.DataDtoReference; import fr.ird.observe.dto.reference.ReferentialDtoReference; import io.ultreia.java4all.bean.JavaBean; +import io.ultreia.java4all.i18n.I18n; import io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox; import io.ultreia.java4all.jaxx.widgets.choice.BooleanEditor; import io.ultreia.java4all.jaxx.widgets.combobox.BeanEnumEditor; @@ -56,6 +58,7 @@ import org.nuiton.jaxx.validator.swing.SwingValidatorUtil; import org.nuiton.jaxx.widgets.BeanUIUtil; import org.nuiton.jaxx.widgets.datetime.BeanDateEditor; import org.nuiton.jaxx.widgets.datetime.DateTimeEditor; +import org.nuiton.jaxx.widgets.datetime.ExtendedBasicDatePickerUI; import org.nuiton.jaxx.widgets.datetime.JAXXDatePicker; import org.nuiton.jaxx.widgets.datetime.TimeEditor; import org.nuiton.jaxx.widgets.gis.absolute.CoordinatesEditor; @@ -70,6 +73,7 @@ import org.nuiton.jaxx.widgets.text.NormalTextEditor; import org.nuiton.jaxx.widgets.text.UrlEditor; import javax.swing.ActionMap; +import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JComponent; import javax.swing.JLabel; @@ -409,6 +413,17 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup protected void init(JAXXDatePicker editor) { initializerContext.checkFirstPass(); editor.setFormats("dd/MM/yyyy"); + ExtendedBasicDatePickerUI ui = new ExtendedBasicDatePickerUI() { + @Override + protected JButton createPopupButton() { + JButton popupButton = super.createPopupButton(); + if (popupButton != null) { + popupButton.setToolTipText(ObserveKeyStrokesEditorApi.suffixTextWithKeyStroke(I18n.t("observe.ui.datepicker.show"), ObserveKeyStrokesEditorApi.KEY_STROKE_GO_DOWN)); + } + return popupButton; + } + }; + editor.setUI(ui); } protected void init(BooleanEditor editor) { @@ -429,6 +444,18 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup protected void init(BeanDateEditor editor) { initializerContext.checkFirstPass(); editor.setLocale(getClientConfig().getLocale()); + ExtendedBasicDatePickerUI ui = new ExtendedBasicDatePickerUI() { + @Override + protected JButton createPopupButton() { + JButton popupButton = super.createPopupButton(); + if (popupButton != null) { + popupButton.setToolTipText(ObserveKeyStrokesEditorApi.suffixTextWithKeyStroke(I18n.t("observe.ui.datepicker.show"), ObserveKeyStrokesEditorApi.KEY_STROKE_GO_DOWN)); + } + return popupButton; + } + }; + ui.setShowPopupButton(true); + editor.setUI(ui); editor.init(); } ===================================== client/i18n/src/main/i18n/translations/observe_en_GB.properties ===================================== @@ -1591,6 +1591,7 @@ observe.ui.datasource.storage.useRemoteStorage.config=Configure remote data sour observe.ui.datasource.storage.useRemoteStorage.description=Please configure connexion to remote data source\nYou must validate your connexion to continue. observe.ui.datasource.storage.useServerStorage.config=Configure remote server to use observe.ui.datasource.storage.useServerStorage.description=Please configure connexion to remote server\nYou must validate your connexion to continue. +observe.ui.datepicker.show=To show date picker dialog observe.ui.menu.actions=Actions observe.ui.menu.configuration=Configuration observe.ui.menu.configuration.tip=To configure application ===================================== client/i18n/src/main/i18n/translations/observe_es_ES.properties ===================================== @@ -1591,6 +1591,7 @@ observe.ui.datasource.storage.useRemoteStorage.config=Configurar la base remota observe.ui.datasource.storage.useRemoteStorage.description=Configure la conexión a la base remota\nAntes de continuar, debe validar la conexión. observe.ui.datasource.storage.useServerStorage.config=Configurar el servidor remoto a utilizar observe.ui.datasource.storage.useServerStorage.description=Configure su conexión al servidor remoto\nAntes de que pueda continuar, tiene que validar la conexión. +observe.ui.datepicker.show=To show date picker dialog \#TODO observe.ui.menu.actions=Acciones observe.ui.menu.configuration=Configuración observe.ui.menu.configuration.tip=Menú de configuración ===================================== client/i18n/src/main/i18n/translations/observe_fr_FR.properties ===================================== @@ -1591,6 +1591,7 @@ observe.ui.datasource.storage.useRemoteStorage.config=Configurer la base distant observe.ui.datasource.storage.useRemoteStorage.description=Veuillez configurer votre connexion à la base distante\nAvant de pouvoir poursuivre, vous devez valider la connexion. observe.ui.datasource.storage.useServerStorage.config=Configurer le serveur distant à utiliser observe.ui.datasource.storage.useServerStorage.description=Veuillez configurer votre connexion au serveur distant\nAvant de pouvoir poursuivre, vous devez valider la connexion. +observe.ui.datepicker.show=Pour ouvrir l'éditeur de date observe.ui.menu.actions=Actions observe.ui.menu.configuration=Configuration observe.ui.menu.configuration.tip=Menu de configuration View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/67b3e8822a805060e8532361c… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/67b3e8822a805060e8532361c… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] CTROL+F8 non fonctionnel (sous Mac) - Closes #1644
by Tony CHEMIT 12 Dec '20

12 Dec '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: a3a7921a by Tony Chemit at 2020-12-13T00:27:40+01:00 CTROL+F8 non fonctionnel (sous Mac) - Closes #1644 - - - - - 1 changed file: - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/GoToTab.java Changes: ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/GoToTab.java ===================================== @@ -43,11 +43,11 @@ public class GoToTab extends ContentUIActionSupport<ContentUI> { private final int tabIndex; public static void installMain(ContentUI ui) { - install0(ui, DefaultUIInitializer.MAIN_TABBED_PANE, "ctrl pressed F"); + install0(ui, DefaultUIInitializer.MAIN_TABBED_PANE, "shift pressed F"); } public static void installSub(ContentUI ui) { - install0(ui, DefaultUIInitializer.SUB_TABBED_PANE, "shift ctrl pressed F"); + install0(ui, DefaultUIInitializer.SUB_TABBED_PANE, "shift alt pressed F"); } private static void install0(ContentUI ui, String tabbedPaneName, String keyStrokePrefix) { View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/a3a7921a1b94bc6aa961bf15c… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/a3a7921a1b94bc6aa961bf15c… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 2 commits: clean code
by Tony CHEMIT 12 Dec '20

12 Dec '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: cf387649 by Tony Chemit at 2020-12-13T00:04:23+01:00 clean code - - - - - 60857167 by Tony Chemit at 2020-12-13T00:04:47+01:00 Boutons de navigation devraient avoir disparu - Closes #1648 - - - - - 2 changed files: - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/table/ContentTableUIHandler.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/table/ContentTableUIInitializer.java Changes: ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/table/ContentTableUIHandler.java ===================================== @@ -116,6 +116,7 @@ public class ContentTableUIHandler<D extends DataDto, C extends DataDto, U exten } protected void onTableModelChanged() { + ui.getSelectToolbar().setVisible(getTableModel().getRowCount()>1); } @Override ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/table/ContentTableUIInitializer.java ===================================== @@ -40,6 +40,7 @@ import javax.swing.SwingUtilities; import javax.swing.table.DefaultTableCellRenderer; import java.awt.Component; import java.awt.FocusTraversalPolicy; +import java.util.Objects; /** * To initialize ui. @@ -83,7 +84,7 @@ public class ContentTableUIInitializer<D extends DataDto, C extends DataDto, U e UIHelper.setLayerUI(ui.getExtraZone(), ui.getBlockLayerUI()); } // layer pour dispatcher le focus entre le tableau et l'éditeurt - UIHelper.getLayer(ui.getTableScrollPane()).setUI(new ContentTableNavigationLayerUI(ui)); + Objects.requireNonNull(UIHelper.getLayer(ui.getTableScrollPane())).setUI(new ContentTableNavigationLayerUI(ui)); // on ajoute un layer pour bloquer l'édition des entrées si nécessaire et redispatcher le focus UIHelper.setLayerUI(ui.getEditor(), ui.getEditorBlockLayerUI()); @@ -94,8 +95,6 @@ public class ContentTableUIInitializer<D extends DataDto, C extends DataDto, U e tableModel.addPropertyChangeListener(ContentTableUITableModel.SELECTED_ROW_PROPERTY, evt -> this.onSelectedItemChanged((Integer) evt.getNewValue())); -// getModel().getStates().addPropertyChangeListener(ContentTableUIModelStates.PROPERTY_SHOW_DATA, evt -> onShowDataChanged((Boolean) evt.getNewValue())); - ui.getSelectFirstTableEntry().setEnabled(false); ui.getSelectPreviousTableEntry().setEnabled(false); ui.getSelectNextTableEntry().setEnabled(false); View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/72e4001bc515a4869391cea6… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/72e4001bc515a4869391cea6… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 3 commits: Bien vérifier le fonctionnement des flags observe/calculé - Closes #1650
by Tony CHEMIT 12 Dec '20

12 Dec '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 110a9699 by Tony Chemit at 2020-12-12T23:48:12+01:00 Bien vérifier le fonctionnement des flags observe/calculé - Closes #1650 - - - - - 3c13b948 by Tony Chemit at 2020-12-12T23:54:11+01:00 Calée : racourcis inopportuns - Closes #1645 - - - - - 72e4001b by Tony Chemit at 2020-12-12T23:54:24+01:00 remove unused code - - - - - 3 changed files: - client/core/src/main/resources/fr/ird/observe/client/ui/ObserveCommon.jcss - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/table/ContentTableUINavigationContext.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/table/ContentTableUINavigationHandler.java Changes: ===================================== client/core/src/main/resources/fr/ird/observe/client/ui/ObserveCommon.jcss ===================================== @@ -100,8 +100,8 @@ } .computedDataInformation { - icon:{fr.ird.observe.client.util.UIHelper.getUIManagerActionIcon("data-observe")}; - disabledIcon:{fr.ird.observe.client.util.UIHelper.getUIManagerActionIcon("data-calcule")}; + icon:{fr.ird.observe.client.util.UIHelper.getUIManagerActionIcon("data-calcule")}; + disabledIcon:{fr.ird.observe.client.util.UIHelper.getUIManagerActionIcon("data-observe")}; } JToolBar { ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/table/ContentTableUINavigationContext.java ===================================== @@ -33,10 +33,6 @@ import fr.ird.observe.dto.data.DataDto; */ public class ContentTableUINavigationContext extends NavigationContext<ContentTableUINavigationContext> { - protected boolean computeShowSata(ContentTableUINavigationInitializer initializer) { - return true; - } - public <D extends DataDto, C extends DataDto> ContentTableUIModelStates<D, C> newModelStates(ContentTableUINavigationInitializer initializer) { return new ContentTableUIModelStates<>(newReferenceCache(), initializer.getScope().newMainBean(), initializer.getScope().newChildBean(), initializer.getSelectedId(), initializer.getScope().isStandalone()); } ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/table/ContentTableUINavigationHandler.java ===================================== @@ -47,6 +47,9 @@ public abstract class ContentTableUINavigationHandler<N extends ContentTableUINa @Override public Color getColor() { + if (!getNode().getInitializer().isShowData()) { + return Color.GRAY; + } return super.getColor(); } View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/27f807f4543bfedca1fbf08d… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/27f807f4543bfedca1fbf08d… You're receiving this email because of your account on gitlab.com.
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.