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

Download
Threads by month
  • ----- 2026 -----
  • August
  • July
  • 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

October 2018

  • 1 participants
  • 104 discussions
[Git][ultreiaio/ird-observe][develop-7.x] Script update-obstuna.* pourrait être renommé...- Closes #1146
by Tony CHEMIT Oct. 16, 2018

Oct. 16, 2018
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: a10cdcd8 by Tony CHEMIT at 2018-10-16T22:00:06Z Script update-obstuna.* pourrait être renommé...- Closes #1146 - - - - - 28 changed files: - client/src/main/assembly/dist/obstuna-admin/README.txt → client/src/main/assembly/dist/scripts/postgresql/README.txt - client/src/main/assembly/dist/obstuna-admin/apply-extra.sh → client/src/main/assembly/dist/scripts/postgresql/apply-extra.sh - client/src/main/assembly/dist/obstuna-admin/create-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/create.bat - client/src/main/assembly/dist/obstuna-admin/create-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/create.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-empty-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-empty-obstuna.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-ird_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-ird_obstuna.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-test_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-test_obstuna.sh - client/src/main/assembly/dist/obstuna-admin/drop-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/drop.bat - client/src/main/assembly/dist/obstuna-admin/drop-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/drop.sh - client/src/main/assembly/dist/obstuna-admin/extra/01_create-postgis-1-activity.sql → client/src/main/assembly/dist/scripts/postgresql/extra/01_create-postgis-1-activity.sql - client/src/main/assembly/dist/obstuna-admin/extra/02_create-postgis-2-harbour.sql → client/src/main/assembly/dist/scripts/postgresql/extra/02_create-postgis-2-harbour.sql - client/src/main/assembly/dist/obstuna-admin/extra/03_create-postgis-3-activity-seine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/03_create-postgis-3-activity-seine.sql - client/src/main/assembly/dist/obstuna-admin/extra/04_create-postgis-4-activity-longine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/04_create-postgis-4-activity-longine.sql - client/src/main/assembly/dist/obstuna-admin/extra/05_function_enhanced_sets_school_types.sql → client/src/main/assembly/dist/scripts/postgresql/extra/05_function_enhanced_sets_school_types.sql - client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update-security.bat - client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update-security.sh - client/src/main/assembly/dist/obstuna-admin/update-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update.bat - client/src/main/assembly/dist/obstuna-admin/update-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update.sh - + client/src/main/assembly/dist/scripts/server/README.txt - client/src/main/assembly/dist/obstuna-admin/create-server.bat → client/src/main/assembly/dist/scripts/server/create.bat - client/src/main/assembly/dist/obstuna-admin/create-server.sh → client/src/main/assembly/dist/scripts/server/create.sh - client/src/main/assembly/dist/obstuna-admin/drop-server.bat → client/src/main/assembly/dist/scripts/server/drop.bat - client/src/main/assembly/dist/obstuna-admin/drop-server.sh → client/src/main/assembly/dist/scripts/server/drop.sh - client/src/main/assembly/dist/obstuna-admin/update-security-server.bat → client/src/main/assembly/dist/scripts/server/update-security.bat - client/src/main/assembly/dist/obstuna-admin/update-security-server.sh → client/src/main/assembly/dist/scripts/server/update-security.sh - client/src/main/assembly/dist/obstuna-admin/update-server.bat → client/src/main/assembly/dist/scripts/server/update.bat - client/src/main/assembly/dist/obstuna-admin/update-server.sh → client/src/main/assembly/dist/scripts/server/update.sh - src/site/markdown/install-serverPG.md Changes: ===================================== client/src/main/assembly/dist/obstuna-admin/README.txt → client/src/main/assembly/dist/scripts/postgresql/README.txt ===================================== @@ -8,80 +8,36 @@ Lancer le script (sh) puis -./create-obstuna.sh +./create.sh ou -./create-obstuna.bat +./create.bat Pour mettre à jour une base obstuna v1 vers vXXX ------------------------------------------------ -./update-obstuna.sh +./update.sh ou -./update-obstuna.bat +./update.bat Pour mettre à jour la sécurité sur une base obstuna --------------------------------------------------- -./update-security-obstuna.sh +./update-security.sh ou -./update-security-obstuna.bat +./update-security.bat Pour vider une base obstuna --------------------------- -./drop-obstuna.sh +./drop.sh ou -./drop-obstuna.bat - - -Pour créer une nouvelle base via server ------------------------------------------- - -Lancer le script (sh) - -./createdb/create-ird_obstuna.sh - -puis - -./create-server.sh - -ou - -./create-server.bat - - -Pour mettre à jour une base via serveur ---------------------------------------- - -./update-server.sh - -ou - -./update-server.bat - -Pour mettre à jour la sécurité sur une base via serveur -------------------------------------------------------- - -./update-security-server.sh - -ou - -./update-security-server.bat - -Pour vider une base via serveur -------------------------------- - -./drop-server.sh - -ou - -./drop-server.bat +./drop.bat ===================================== client/src/main/assembly/dist/obstuna-admin/apply-extra.sh → client/src/main/assembly/dist/scripts/postgresql/apply-extra.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/create.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/create.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-empty-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-empty-obstuna.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-ird_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-ird_obstuna.sh ===================================== @@ -33,4 +33,4 @@ # Usage : # ./create-ird_obstuna.sh -./create-empty-obstuna.sh obstuna admin "adamiano lfloch pcauquil utilisateur referentiel" +create-empty-obstuna.sh obstuna admin "adamiano lfloch pcauquil utilisateur referentiel" ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-test_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-test_obstuna.sh ===================================== @@ -33,4 +33,4 @@ # Usage : # ./create-test_obstuna.sh -./create-empty-obstuna.sh obstuna-test admin "technicien1 technicien2 technicien3 utilisateur referentiel" +create-empty-obstuna.sh obstuna-test admin "technicien1 technicien2 technicien3 utilisateur referentiel" ===================================== client/src/main/assembly/dist/obstuna-admin/drop-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/drop.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/drop.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/01_create-postgis-1-activity.sql → client/src/main/assembly/dist/scripts/postgresql/extra/01_create-postgis-1-activity.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/02_create-postgis-2-harbour.sql → client/src/main/assembly/dist/scripts/postgresql/extra/02_create-postgis-2-harbour.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/03_create-postgis-3-activity-seine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/03_create-postgis-3-activity-seine.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/04_create-postgis-4-activity-longine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/04_create-postgis-4-activity-longine.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/05_function_enhanced_sets_school_types.sql → client/src/main/assembly/dist/scripts/postgresql/extra/05_function_enhanced_sets_school_types.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update-security.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update-security.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update.sh ===================================== ===================================== client/src/main/assembly/dist/scripts/server/README.txt ===================================== @@ -0,0 +1,26 @@ +Pour mettre à jour une base via serveur +--------------------------------------- + +./update.sh + +ou + +./update.bat + +Pour mettre à jour la sécurité sur une base via serveur +------------------------------------------------------- + +./update-security.sh + +ou + +./update-security.bat + +Pour vider une base via serveur +------------------------------- + +./drop.sh + +ou + +./drop.bat ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.bat → client/src/main/assembly/dist/scripts/server/create.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.sh → client/src/main/assembly/dist/scripts/server/create.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.bat → client/src/main/assembly/dist/scripts/server/drop.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.sh → client/src/main/assembly/dist/scripts/server/drop.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.bat → client/src/main/assembly/dist/scripts/server/update-security.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.sh → client/src/main/assembly/dist/scripts/server/update-security.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.bat → client/src/main/assembly/dist/scripts/server/update.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.sh → client/src/main/assembly/dist/scripts/server/update.sh ===================================== ===================================== src/site/markdown/install-serverPG.md ===================================== @@ -41,7 +41,7 @@ Il existe une script qui permet de faire ça en tant qu'utilisateur *postgres*. ``` sudo su postgres - (cd obstuna-admin/createdb ; ./create-ird_obstuna.sh) + (cd scripts/postgresl/createdb ; ./create-ird_obstuna.sh) ``` Ce script va créer : @@ -56,7 +56,7 @@ Ce script a été conçu pour la configuration de l'ird, il ne fait qu'appeler un autre script bash avec les bons paramètres. ``` - obstuna-admin/createdb/create-empty-obstuna.sh + scripts/postgresl/createdb/create-empty.sh ``` Il est donc très facile d'écrire un nouveau script de configuration avec le @@ -71,7 +71,7 @@ Par exemple pour créer une base avec la configuration suivante on lance la commande : ``` - ( cd obstuna-admin/createdb ; ./create-empty-obstuna.sh obstuna-test admin-test "technicien-test utilisateur-test referentiel-test") + ( cd scripts/postgresl/createdb ; ./create-empty.sh obstuna-test admin-test "technicien-test utilisateur-test referentiel-test") ``` ### Phase 1 (base de test) @@ -81,7 +81,7 @@ un autre script : ``` sudo su postgres - (cd obstuna-admin/createdb ; ./create-test_obstuna.sh) + (cd scripts/postgresl/createdb ; ./create-test_obstuna.sh) ``` Cela crée une base avec la configuration suivante : @@ -130,12 +130,12 @@ Il suffit enfin de lancer l'application en mode *création de base obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./create-obstuna.sh) + (cd scripts/postgresl ; ./create.sh) ``` ou ``` - ./obstuna-admin/create-obstuna.bat + ./scripts/postgresl/create.bat ``` Cela va effectuer les opérations suivantes après configuration de la base cible, @@ -146,7 +146,7 @@ de la base d'import de référentiel et des rôles de sécurité : - remplir le référentiel à partir de celui d'une autre base obstuna à jour (topia-service-migration) - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin create** +Note : le script appelle l'application avec l'action **--admin create** ## Mise à jour d'une base obstuna @@ -155,12 +155,12 @@ ObServe, il suffit de lancer l'application en mode *mise à jour obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./update-obstuna.sh) + (cd scripts/postgresl ; ./update.sh) ``` ou ``` - ./obstuna-admin/update-obstuna.bat + ./scripts/postgresl/update.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible et des rôles de sécurité : @@ -168,7 +168,7 @@ cible et des rôles de sécurité : - mettre à jour le schéma et les données via le service de migration intégré (topia) - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin update** +Note : le script appelle l'application avec l'action **--admin update** ## Mise à jour de la sécurité @@ -184,19 +184,19 @@ de lancer Observe en mode *mise à jour sécurité obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./update-security-obstuna.sh) + (cd scripts/postgresl ; ./update-security.sh) ``` ou ``` - ./obstuna-admin/update-security-obstuna.bat + ./scripts/postgresl/update-security.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible et des rôles de sécurité : - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin security** +Note : le script appelle l'application avec l'action **--admin security** ## Vider une base obstuna @@ -204,19 +204,19 @@ Pour vider une base obstuna (ne vue de la recréer par exemple), il suffit de lancer ObServe en mode *suppression obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./drop-obstuna.sh) + (cd scripts/postgresl ; ./drop.sh) ``` ou ``` - ./obstuna-admin/drop-obstuna.bat + ./scripts/postgresl/drop.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible : - supprimer toutes les tables gérer de la base -Note : le script appelle l'application avec l'action **--obstuna-admin drop** +Note : le script appelle l'application avec l'action **--admin drop** ## Appliquer des scripts sql supplémentaires @@ -225,7 +225,7 @@ Depuis la version 3.0, il est possible de lancer sur la base de scripts sql supp On lance ensuite la commande ``` - (cd obstuna-admin; ./apply-extra.sh) + (cd scripts/postgresl ; ./apply-extra.sh) ``` Le script demande View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/a10cdcd815999ebe8fc40892c06… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/a10cdcd815999ebe8fc40892c06… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] Script update-obstuna.* pourrait être renommé...- Closes #1146
by Tony CHEMIT Oct. 16, 2018

Oct. 16, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 28ed23ea by Tony CHEMIT at 2018-10-16T21:59:29Z Script update-obstuna.* pourrait être renommé...- Closes #1146 - - - - - 28 changed files: - client/src/main/assembly/dist/obstuna-admin/README.txt → client/src/main/assembly/dist/scripts/postgresql/README.txt - client/src/main/assembly/dist/obstuna-admin/apply-extra.sh → client/src/main/assembly/dist/scripts/postgresql/apply-extra.sh - client/src/main/assembly/dist/obstuna-admin/create-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/create.bat - client/src/main/assembly/dist/obstuna-admin/create-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/create.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-empty-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-empty-obstuna.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-ird_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-ird_obstuna.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-test_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-test_obstuna.sh - client/src/main/assembly/dist/obstuna-admin/drop-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/drop.bat - client/src/main/assembly/dist/obstuna-admin/drop-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/drop.sh - client/src/main/assembly/dist/obstuna-admin/extra/01_create-postgis-1-activity.sql → client/src/main/assembly/dist/scripts/postgresql/extra/01_create-postgis-1-activity.sql - client/src/main/assembly/dist/obstuna-admin/extra/02_create-postgis-2-harbour.sql → client/src/main/assembly/dist/scripts/postgresql/extra/02_create-postgis-2-harbour.sql - client/src/main/assembly/dist/obstuna-admin/extra/03_create-postgis-3-activity-seine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/03_create-postgis-3-activity-seine.sql - client/src/main/assembly/dist/obstuna-admin/extra/04_create-postgis-4-activity-longine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/04_create-postgis-4-activity-longine.sql - client/src/main/assembly/dist/obstuna-admin/extra/05_function_enhanced_sets_school_types.sql → client/src/main/assembly/dist/scripts/postgresql/extra/05_function_enhanced_sets_school_types.sql - client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update-security.bat - client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update-security.sh - client/src/main/assembly/dist/obstuna-admin/update-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update.bat - client/src/main/assembly/dist/obstuna-admin/update-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update.sh - + client/src/main/assembly/dist/scripts/server/README.txt - client/src/main/assembly/dist/obstuna-admin/create-server.bat → client/src/main/assembly/dist/scripts/server/create.bat - client/src/main/assembly/dist/obstuna-admin/create-server.sh → client/src/main/assembly/dist/scripts/server/create.sh - client/src/main/assembly/dist/obstuna-admin/drop-server.bat → client/src/main/assembly/dist/scripts/server/drop.bat - client/src/main/assembly/dist/obstuna-admin/drop-server.sh → client/src/main/assembly/dist/scripts/server/drop.sh - client/src/main/assembly/dist/obstuna-admin/update-security-server.bat → client/src/main/assembly/dist/scripts/server/update-security.bat - client/src/main/assembly/dist/obstuna-admin/update-security-server.sh → client/src/main/assembly/dist/scripts/server/update-security.sh - client/src/main/assembly/dist/obstuna-admin/update-server.bat → client/src/main/assembly/dist/scripts/server/update.bat - client/src/main/assembly/dist/obstuna-admin/update-server.sh → client/src/main/assembly/dist/scripts/server/update.sh - src/site/markdown/install-serverPG.md Changes: ===================================== client/src/main/assembly/dist/obstuna-admin/README.txt → client/src/main/assembly/dist/scripts/postgresql/README.txt ===================================== @@ -8,80 +8,36 @@ Lancer le script (sh) puis -./create-obstuna.sh +./create.sh ou -./create-obstuna.bat +./create.bat Pour mettre à jour une base obstuna v1 vers vXXX ------------------------------------------------ -./update-obstuna.sh +./update.sh ou -./update-obstuna.bat +./update.bat Pour mettre à jour la sécurité sur une base obstuna --------------------------------------------------- -./update-security-obstuna.sh +./update-security.sh ou -./update-security-obstuna.bat +./update-security.bat Pour vider une base obstuna --------------------------- -./drop-obstuna.sh +./drop.sh ou -./drop-obstuna.bat - - -Pour créer une nouvelle base via server ------------------------------------------- - -Lancer le script (sh) - -./createdb/create-ird_obstuna.sh - -puis - -./create-server.sh - -ou - -./create-server.bat - - -Pour mettre à jour une base via serveur ---------------------------------------- - -./update-server.sh - -ou - -./update-server.bat - -Pour mettre à jour la sécurité sur une base via serveur -------------------------------------------------------- - -./update-security-server.sh - -ou - -./update-security-server.bat - -Pour vider une base via serveur -------------------------------- - -./drop-server.sh - -ou - -./drop-server.bat +./drop.bat ===================================== client/src/main/assembly/dist/obstuna-admin/apply-extra.sh → client/src/main/assembly/dist/scripts/postgresql/apply-extra.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/create.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/create.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-empty-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-empty-obstuna.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-ird_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-ird_obstuna.sh ===================================== @@ -33,4 +33,4 @@ # Usage : # ./create-ird_obstuna.sh -./create-empty-obstuna.sh obstuna admin "adamiano lfloch pcauquil utilisateur referentiel" +create-empty-obstuna.sh obstuna admin "adamiano lfloch pcauquil utilisateur referentiel" ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-test_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-test_obstuna.sh ===================================== @@ -33,4 +33,4 @@ # Usage : # ./create-test_obstuna.sh -./create-empty-obstuna.sh obstuna-test admin "technicien1 technicien2 technicien3 utilisateur referentiel" +create-empty-obstuna.sh obstuna-test admin "technicien1 technicien2 technicien3 utilisateur referentiel" ===================================== client/src/main/assembly/dist/obstuna-admin/drop-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/drop.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/drop.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/01_create-postgis-1-activity.sql → client/src/main/assembly/dist/scripts/postgresql/extra/01_create-postgis-1-activity.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/02_create-postgis-2-harbour.sql → client/src/main/assembly/dist/scripts/postgresql/extra/02_create-postgis-2-harbour.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/03_create-postgis-3-activity-seine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/03_create-postgis-3-activity-seine.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/04_create-postgis-4-activity-longine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/04_create-postgis-4-activity-longine.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/05_function_enhanced_sets_school_types.sql → client/src/main/assembly/dist/scripts/postgresql/extra/05_function_enhanced_sets_school_types.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update-security.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update-security.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update.sh ===================================== ===================================== client/src/main/assembly/dist/scripts/server/README.txt ===================================== @@ -0,0 +1,26 @@ +Pour mettre à jour une base via serveur +--------------------------------------- + +./update.sh + +ou + +./update.bat + +Pour mettre à jour la sécurité sur une base via serveur +------------------------------------------------------- + +./update-security.sh + +ou + +./update-security.bat + +Pour vider une base via serveur +------------------------------- + +./drop.sh + +ou + +./drop.bat ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.bat → client/src/main/assembly/dist/scripts/server/create.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.sh → client/src/main/assembly/dist/scripts/server/create.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.bat → client/src/main/assembly/dist/scripts/server/drop.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.sh → client/src/main/assembly/dist/scripts/server/drop.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.bat → client/src/main/assembly/dist/scripts/server/update-security.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.sh → client/src/main/assembly/dist/scripts/server/update-security.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.bat → client/src/main/assembly/dist/scripts/server/update.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.sh → client/src/main/assembly/dist/scripts/server/update.sh ===================================== ===================================== src/site/markdown/install-serverPG.md ===================================== @@ -41,7 +41,7 @@ Il existe une script qui permet de faire ça en tant qu'utilisateur *postgres*. ``` sudo su postgres - (cd obstuna-admin/createdb ; ./create-ird_obstuna.sh) + (cd scripts/postgresl/createdb ; ./create-ird_obstuna.sh) ``` Ce script va créer : @@ -56,7 +56,7 @@ Ce script a été conçu pour la configuration de l'ird, il ne fait qu'appeler un autre script bash avec les bons paramètres. ``` - obstuna-admin/createdb/create-empty-obstuna.sh + scripts/postgresl/createdb/create-empty.sh ``` Il est donc très facile d'écrire un nouveau script de configuration avec le @@ -71,7 +71,7 @@ Par exemple pour créer une base avec la configuration suivante on lance la commande : ``` - ( cd obstuna-admin/createdb ; ./create-empty-obstuna.sh obstuna-test admin-test "technicien-test utilisateur-test referentiel-test") + ( cd scripts/postgresl/createdb ; ./create-empty.sh obstuna-test admin-test "technicien-test utilisateur-test referentiel-test") ``` ### Phase 1 (base de test) @@ -81,7 +81,7 @@ un autre script : ``` sudo su postgres - (cd obstuna-admin/createdb ; ./create-test_obstuna.sh) + (cd scripts/postgresl/createdb ; ./create-test_obstuna.sh) ``` Cela crée une base avec la configuration suivante : @@ -130,12 +130,12 @@ Il suffit enfin de lancer l'application en mode *création de base obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./create-obstuna.sh) + (cd scripts/postgresl ; ./create.sh) ``` ou ``` - ./obstuna-admin/create-obstuna.bat + ./scripts/postgresl/create.bat ``` Cela va effectuer les opérations suivantes après configuration de la base cible, @@ -146,7 +146,7 @@ de la base d'import de référentiel et des rôles de sécurité : - remplir le référentiel à partir de celui d'une autre base obstuna à jour (topia-service-migration) - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin create** +Note : le script appelle l'application avec l'action **--admin create** ## Mise à jour d'une base obstuna @@ -155,12 +155,12 @@ ObServe, il suffit de lancer l'application en mode *mise à jour obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./update-obstuna.sh) + (cd scripts/postgresl ; ./update.sh) ``` ou ``` - ./obstuna-admin/update-obstuna.bat + ./scripts/postgresl/update.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible et des rôles de sécurité : @@ -168,7 +168,7 @@ cible et des rôles de sécurité : - mettre à jour le schéma et les données via le service de migration intégré (topia) - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin update** +Note : le script appelle l'application avec l'action **--admin update** ## Mise à jour de la sécurité @@ -184,19 +184,19 @@ de lancer Observe en mode *mise à jour sécurité obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./update-security-obstuna.sh) + (cd scripts/postgresl ; ./update-security.sh) ``` ou ``` - ./obstuna-admin/update-security-obstuna.bat + ./scripts/postgresl/update-security.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible et des rôles de sécurité : - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin security** +Note : le script appelle l'application avec l'action **--admin security** ## Vider une base obstuna @@ -204,19 +204,19 @@ Pour vider une base obstuna (ne vue de la recréer par exemple), il suffit de lancer ObServe en mode *suppression obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./drop-obstuna.sh) + (cd scripts/postgresl ; ./drop.sh) ``` ou ``` - ./obstuna-admin/drop-obstuna.bat + ./scripts/postgresl/drop.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible : - supprimer toutes les tables gérer de la base -Note : le script appelle l'application avec l'action **--obstuna-admin drop** +Note : le script appelle l'application avec l'action **--admin drop** ## Appliquer des scripts sql supplémentaires @@ -225,7 +225,7 @@ Depuis la version 3.0, il est possible de lancer sur la base de scripts sql supp On lance ensuite la commande ``` - (cd obstuna-admin; ./apply-extra.sh) + (cd scripts/postgresl ; ./apply-extra.sh) ``` Le script demande View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/28ed23ea5ac4dbcfd598e8aacc1… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/28ed23ea5ac4dbcfd598e8aacc1… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-7.x] Nom du script de lancement .exe - Closes #1146
by Tony CHEMIT Oct. 16, 2018

Oct. 16, 2018
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: c28cbf62 by Tony CHEMIT at 2018-10-16T21:58:52Z Nom du script de lancement .exe - Closes #1146 - - - - - 28 changed files: - client/src/main/assembly/dist/obstuna-admin/README.txt → client/src/main/assembly/dist/scripts/postgresql/README.txt - client/src/main/assembly/dist/obstuna-admin/apply-extra.sh → client/src/main/assembly/dist/scripts/postgresql/apply-extra.sh - client/src/main/assembly/dist/obstuna-admin/create-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/create.bat - client/src/main/assembly/dist/obstuna-admin/create-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/create.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-empty-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-empty-obstuna.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-ird_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-ird_obstuna.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-test_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-test_obstuna.sh - client/src/main/assembly/dist/obstuna-admin/drop-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/drop.bat - client/src/main/assembly/dist/obstuna-admin/drop-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/drop.sh - client/src/main/assembly/dist/obstuna-admin/extra/01_create-postgis-1-activity.sql → client/src/main/assembly/dist/scripts/postgresql/extra/01_create-postgis-1-activity.sql - client/src/main/assembly/dist/obstuna-admin/extra/02_create-postgis-2-harbour.sql → client/src/main/assembly/dist/scripts/postgresql/extra/02_create-postgis-2-harbour.sql - client/src/main/assembly/dist/obstuna-admin/extra/03_create-postgis-3-activity-seine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/03_create-postgis-3-activity-seine.sql - client/src/main/assembly/dist/obstuna-admin/extra/04_create-postgis-4-activity-longine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/04_create-postgis-4-activity-longine.sql - client/src/main/assembly/dist/obstuna-admin/extra/05_function_enhanced_sets_school_types.sql → client/src/main/assembly/dist/scripts/postgresql/extra/05_function_enhanced_sets_school_types.sql - client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update-security.bat - client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update-security.sh - client/src/main/assembly/dist/obstuna-admin/update-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update.bat - client/src/main/assembly/dist/obstuna-admin/update-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update.sh - + client/src/main/assembly/dist/scripts/server/README.txt - client/src/main/assembly/dist/obstuna-admin/create-server.bat → client/src/main/assembly/dist/scripts/server/create.bat - client/src/main/assembly/dist/obstuna-admin/create-server.sh → client/src/main/assembly/dist/scripts/server/create.sh - client/src/main/assembly/dist/obstuna-admin/drop-server.bat → client/src/main/assembly/dist/scripts/server/drop.bat - client/src/main/assembly/dist/obstuna-admin/drop-server.sh → client/src/main/assembly/dist/scripts/server/drop.sh - client/src/main/assembly/dist/obstuna-admin/update-security-server.bat → client/src/main/assembly/dist/scripts/server/update-security.bat - client/src/main/assembly/dist/obstuna-admin/update-security-server.sh → client/src/main/assembly/dist/scripts/server/update-security.sh - client/src/main/assembly/dist/obstuna-admin/update-server.bat → client/src/main/assembly/dist/scripts/server/update.bat - client/src/main/assembly/dist/obstuna-admin/update-server.sh → client/src/main/assembly/dist/scripts/server/update.sh - src/site/markdown/install-serverPG.md Changes: ===================================== client/src/main/assembly/dist/obstuna-admin/README.txt → client/src/main/assembly/dist/scripts/postgresql/README.txt ===================================== @@ -8,80 +8,36 @@ Lancer le script (sh) puis -./create-obstuna.sh +./create.sh ou -./create-obstuna.bat +./create.bat Pour mettre à jour une base obstuna v1 vers vXXX ------------------------------------------------ -./update-obstuna.sh +./update.sh ou -./update-obstuna.bat +./update.bat Pour mettre à jour la sécurité sur une base obstuna --------------------------------------------------- -./update-security-obstuna.sh +./update-security.sh ou -./update-security-obstuna.bat +./update-security.bat Pour vider une base obstuna --------------------------- -./drop-obstuna.sh +./drop.sh ou -./drop-obstuna.bat - - -Pour créer une nouvelle base via server ------------------------------------------- - -Lancer le script (sh) - -./createdb/create-ird_obstuna.sh - -puis - -./create-server.sh - -ou - -./create-server.bat - - -Pour mettre à jour une base via serveur ---------------------------------------- - -./update-server.sh - -ou - -./update-server.bat - -Pour mettre à jour la sécurité sur une base via serveur -------------------------------------------------------- - -./update-security-server.sh - -ou - -./update-security-server.bat - -Pour vider une base via serveur -------------------------------- - -./drop-server.sh - -ou - -./drop-server.bat +./drop.bat ===================================== client/src/main/assembly/dist/obstuna-admin/apply-extra.sh → client/src/main/assembly/dist/scripts/postgresql/apply-extra.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/create.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/create.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-empty-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-empty-obstuna.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-ird_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-ird_obstuna.sh ===================================== @@ -33,4 +33,4 @@ # Usage : # ./create-ird_obstuna.sh -./create-empty-obstuna.sh obstuna admin "adamiano lfloch pcauquil utilisateur referentiel" +create-empty-obstuna.sh obstuna admin "adamiano lfloch pcauquil utilisateur referentiel" ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-test_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-test_obstuna.sh ===================================== @@ -33,4 +33,4 @@ # Usage : # ./create-test_obstuna.sh -./create-empty-obstuna.sh obstuna-test admin "technicien1 technicien2 technicien3 utilisateur referentiel" +create-empty-obstuna.sh obstuna-test admin "technicien1 technicien2 technicien3 utilisateur referentiel" ===================================== client/src/main/assembly/dist/obstuna-admin/drop-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/drop.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/drop.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/01_create-postgis-1-activity.sql → client/src/main/assembly/dist/scripts/postgresql/extra/01_create-postgis-1-activity.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/02_create-postgis-2-harbour.sql → client/src/main/assembly/dist/scripts/postgresql/extra/02_create-postgis-2-harbour.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/03_create-postgis-3-activity-seine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/03_create-postgis-3-activity-seine.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/04_create-postgis-4-activity-longine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/04_create-postgis-4-activity-longine.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/05_function_enhanced_sets_school_types.sql → client/src/main/assembly/dist/scripts/postgresql/extra/05_function_enhanced_sets_school_types.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update-security.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update-security.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update.sh ===================================== ===================================== client/src/main/assembly/dist/scripts/server/README.txt ===================================== @@ -0,0 +1,26 @@ +Pour mettre à jour une base via serveur +--------------------------------------- + +./update.sh + +ou + +./update.bat + +Pour mettre à jour la sécurité sur une base via serveur +------------------------------------------------------- + +./update-security.sh + +ou + +./update-security.bat + +Pour vider une base via serveur +------------------------------- + +./drop.sh + +ou + +./drop.bat ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.bat → client/src/main/assembly/dist/scripts/server/create.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.sh → client/src/main/assembly/dist/scripts/server/create.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.bat → client/src/main/assembly/dist/scripts/server/drop.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.sh → client/src/main/assembly/dist/scripts/server/drop.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.bat → client/src/main/assembly/dist/scripts/server/update-security.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.sh → client/src/main/assembly/dist/scripts/server/update-security.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.bat → client/src/main/assembly/dist/scripts/server/update.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.sh → client/src/main/assembly/dist/scripts/server/update.sh ===================================== ===================================== src/site/markdown/install-serverPG.md ===================================== @@ -41,7 +41,7 @@ Il existe une script qui permet de faire ça en tant qu'utilisateur *postgres*. ``` sudo su postgres - (cd obstuna-admin/createdb ; ./create-ird_obstuna.sh) + (cd scripts/postgresl/createdb ; ./create-ird_obstuna.sh) ``` Ce script va créer : @@ -56,7 +56,7 @@ Ce script a été conçu pour la configuration de l'ird, il ne fait qu'appeler un autre script bash avec les bons paramètres. ``` - obstuna-admin/createdb/create-empty-obstuna.sh + scripts/postgresl/createdb/create-empty.sh ``` Il est donc très facile d'écrire un nouveau script de configuration avec le @@ -71,7 +71,7 @@ Par exemple pour créer une base avec la configuration suivante on lance la commande : ``` - ( cd obstuna-admin/createdb ; ./create-empty-obstuna.sh obstuna-test admin-test "technicien-test utilisateur-test referentiel-test") + ( cd scripts/postgresl/createdb ; ./create-empty.sh obstuna-test admin-test "technicien-test utilisateur-test referentiel-test") ``` ### Phase 1 (base de test) @@ -81,7 +81,7 @@ un autre script : ``` sudo su postgres - (cd obstuna-admin/createdb ; ./create-test_obstuna.sh) + (cd scripts/postgresl/createdb ; ./create-test_obstuna.sh) ``` Cela crée une base avec la configuration suivante : @@ -130,12 +130,12 @@ Il suffit enfin de lancer l'application en mode *création de base obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./create-obstuna.sh) + (cd scripts/postgresl ; ./create.sh) ``` ou ``` - ./obstuna-admin/create-obstuna.bat + ./scripts/postgresl/create.bat ``` Cela va effectuer les opérations suivantes après configuration de la base cible, @@ -146,7 +146,7 @@ de la base d'import de référentiel et des rôles de sécurité : - remplir le référentiel à partir de celui d'une autre base obstuna à jour (topia-service-migration) - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin create** +Note : le script appelle l'application avec l'action **--admin create** ## Mise à jour d'une base obstuna @@ -155,12 +155,12 @@ ObServe, il suffit de lancer l'application en mode *mise à jour obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./update-obstuna.sh) + (cd scripts/postgresl ; ./update.sh) ``` ou ``` - ./obstuna-admin/update-obstuna.bat + ./scripts/postgresl/update.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible et des rôles de sécurité : @@ -168,7 +168,7 @@ cible et des rôles de sécurité : - mettre à jour le schéma et les données via le service de migration intégré (topia) - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin update** +Note : le script appelle l'application avec l'action **--admin update** ## Mise à jour de la sécurité @@ -184,19 +184,19 @@ de lancer Observe en mode *mise à jour sécurité obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./update-security-obstuna.sh) + (cd scripts/postgresl ; ./update-security.sh) ``` ou ``` - ./obstuna-admin/update-security-obstuna.bat + ./scripts/postgresl/update-security.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible et des rôles de sécurité : - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin security** +Note : le script appelle l'application avec l'action **--admin security** ## Vider une base obstuna @@ -204,19 +204,19 @@ Pour vider une base obstuna (ne vue de la recréer par exemple), il suffit de lancer ObServe en mode *suppression obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./drop-obstuna.sh) + (cd scripts/postgresl ; ./drop.sh) ``` ou ``` - ./obstuna-admin/drop-obstuna.bat + ./scripts/postgresl/drop.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible : - supprimer toutes les tables gérer de la base -Note : le script appelle l'application avec l'action **--obstuna-admin drop** +Note : le script appelle l'application avec l'action **--admin drop** ## Appliquer des scripts sql supplémentaires @@ -225,7 +225,7 @@ Depuis la version 3.0, il est possible de lancer sur la base de scripts sql supp On lance ensuite la commande ``` - (cd obstuna-admin; ./apply-extra.sh) + (cd scripts/postgresl ; ./apply-extra.sh) ``` Le script demande View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/c28cbf62bbbcc332556175f9891… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/c28cbf62bbbcc332556175f9891… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] Nom du script de lancement .exe - Closes #1147
by Tony CHEMIT Oct. 16, 2018

Oct. 16, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 39c95592 by Tony CHEMIT at 2018-10-16T21:56:56Z Nom du script de lancement .exe - Closes #1147 - - - - - 28 changed files: - client/src/main/assembly/dist/obstuna-admin/README.txt → client/src/main/assembly/dist/scripts/postgresql/README.txt - client/src/main/assembly/dist/obstuna-admin/apply-extra.sh → client/src/main/assembly/dist/scripts/postgresql/apply-extra.sh - client/src/main/assembly/dist/obstuna-admin/create-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/create.bat - client/src/main/assembly/dist/obstuna-admin/create-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/create.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-empty-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-empty-obstuna.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-ird_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-ird_obstuna.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-test_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-test_obstuna.sh - client/src/main/assembly/dist/obstuna-admin/drop-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/drop.bat - client/src/main/assembly/dist/obstuna-admin/drop-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/drop.sh - client/src/main/assembly/dist/obstuna-admin/extra/01_create-postgis-1-activity.sql → client/src/main/assembly/dist/scripts/postgresql/extra/01_create-postgis-1-activity.sql - client/src/main/assembly/dist/obstuna-admin/extra/02_create-postgis-2-harbour.sql → client/src/main/assembly/dist/scripts/postgresql/extra/02_create-postgis-2-harbour.sql - client/src/main/assembly/dist/obstuna-admin/extra/03_create-postgis-3-activity-seine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/03_create-postgis-3-activity-seine.sql - client/src/main/assembly/dist/obstuna-admin/extra/04_create-postgis-4-activity-longine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/04_create-postgis-4-activity-longine.sql - client/src/main/assembly/dist/obstuna-admin/extra/05_function_enhanced_sets_school_types.sql → client/src/main/assembly/dist/scripts/postgresql/extra/05_function_enhanced_sets_school_types.sql - client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update-security.bat - client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update-security.sh - client/src/main/assembly/dist/obstuna-admin/update-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update.bat - client/src/main/assembly/dist/obstuna-admin/update-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update.sh - + client/src/main/assembly/dist/scripts/server/README.txt - client/src/main/assembly/dist/obstuna-admin/create-server.bat → client/src/main/assembly/dist/scripts/server/create.bat - client/src/main/assembly/dist/obstuna-admin/create-server.sh → client/src/main/assembly/dist/scripts/server/create.sh - client/src/main/assembly/dist/obstuna-admin/drop-server.bat → client/src/main/assembly/dist/scripts/server/drop.bat - client/src/main/assembly/dist/obstuna-admin/drop-server.sh → client/src/main/assembly/dist/scripts/server/drop.sh - client/src/main/assembly/dist/obstuna-admin/update-security-server.bat → client/src/main/assembly/dist/scripts/server/update-security.bat - client/src/main/assembly/dist/obstuna-admin/update-security-server.sh → client/src/main/assembly/dist/scripts/server/update-security.sh - client/src/main/assembly/dist/obstuna-admin/update-server.bat → client/src/main/assembly/dist/scripts/server/update.bat - client/src/main/assembly/dist/obstuna-admin/update-server.sh → client/src/main/assembly/dist/scripts/server/update.sh - src/site/markdown/install-serverPG.md Changes: ===================================== client/src/main/assembly/dist/obstuna-admin/README.txt → client/src/main/assembly/dist/scripts/postgresql/README.txt ===================================== @@ -8,80 +8,36 @@ Lancer le script (sh) puis -./create-obstuna.sh +./create.sh ou -./create-obstuna.bat +./create.bat Pour mettre à jour une base obstuna v1 vers vXXX ------------------------------------------------ -./update-obstuna.sh +./update.sh ou -./update-obstuna.bat +./update.bat Pour mettre à jour la sécurité sur une base obstuna --------------------------------------------------- -./update-security-obstuna.sh +./update-security.sh ou -./update-security-obstuna.bat +./update-security.bat Pour vider une base obstuna --------------------------- -./drop-obstuna.sh +./drop.sh ou -./drop-obstuna.bat - - -Pour créer une nouvelle base via server ------------------------------------------- - -Lancer le script (sh) - -./createdb/create-ird_obstuna.sh - -puis - -./create-server.sh - -ou - -./create-server.bat - - -Pour mettre à jour une base via serveur ---------------------------------------- - -./update-server.sh - -ou - -./update-server.bat - -Pour mettre à jour la sécurité sur une base via serveur -------------------------------------------------------- - -./update-security-server.sh - -ou - -./update-security-server.bat - -Pour vider une base via serveur -------------------------------- - -./drop-server.sh - -ou - -./drop-server.bat +./drop.bat ===================================== client/src/main/assembly/dist/obstuna-admin/apply-extra.sh → client/src/main/assembly/dist/scripts/postgresql/apply-extra.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/create.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/create.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-empty-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-empty-obstuna.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-ird_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-ird_obstuna.sh ===================================== @@ -33,4 +33,4 @@ # Usage : # ./create-ird_obstuna.sh -./create-empty-obstuna.sh obstuna admin "adamiano lfloch pcauquil utilisateur referentiel" +create-empty-obstuna.sh obstuna admin "adamiano lfloch pcauquil utilisateur referentiel" ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-test_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-test_obstuna.sh ===================================== @@ -33,4 +33,4 @@ # Usage : # ./create-test_obstuna.sh -./create-empty-obstuna.sh obstuna-test admin "technicien1 technicien2 technicien3 utilisateur referentiel" +create-empty-obstuna.sh obstuna-test admin "technicien1 technicien2 technicien3 utilisateur referentiel" ===================================== client/src/main/assembly/dist/obstuna-admin/drop-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/drop.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/drop.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/01_create-postgis-1-activity.sql → client/src/main/assembly/dist/scripts/postgresql/extra/01_create-postgis-1-activity.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/02_create-postgis-2-harbour.sql → client/src/main/assembly/dist/scripts/postgresql/extra/02_create-postgis-2-harbour.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/03_create-postgis-3-activity-seine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/03_create-postgis-3-activity-seine.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/04_create-postgis-4-activity-longine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/04_create-postgis-4-activity-longine.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/05_function_enhanced_sets_school_types.sql → client/src/main/assembly/dist/scripts/postgresql/extra/05_function_enhanced_sets_school_types.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update-security.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update-security.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update.sh ===================================== ===================================== client/src/main/assembly/dist/scripts/server/README.txt ===================================== @@ -0,0 +1,26 @@ +Pour mettre à jour une base via serveur +--------------------------------------- + +./update.sh + +ou + +./update.bat + +Pour mettre à jour la sécurité sur une base via serveur +------------------------------------------------------- + +./update-security.sh + +ou + +./update-security.bat + +Pour vider une base via serveur +------------------------------- + +./drop.sh + +ou + +./drop.bat ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.bat → client/src/main/assembly/dist/scripts/server/create.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.sh → client/src/main/assembly/dist/scripts/server/create.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.bat → client/src/main/assembly/dist/scripts/server/drop.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.sh → client/src/main/assembly/dist/scripts/server/drop.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.bat → client/src/main/assembly/dist/scripts/server/update-security.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.sh → client/src/main/assembly/dist/scripts/server/update-security.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.bat → client/src/main/assembly/dist/scripts/server/update.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.sh → client/src/main/assembly/dist/scripts/server/update.sh ===================================== ===================================== src/site/markdown/install-serverPG.md ===================================== @@ -41,7 +41,7 @@ Il existe une script qui permet de faire ça en tant qu'utilisateur *postgres*. ``` sudo su postgres - (cd obstuna-admin/createdb ; ./create-ird_obstuna.sh) + (cd scripts/postgresl/createdb ; ./create-ird_obstuna.sh) ``` Ce script va créer : @@ -56,7 +56,7 @@ Ce script a été conçu pour la configuration de l'ird, il ne fait qu'appeler un autre script bash avec les bons paramètres. ``` - obstuna-admin/createdb/create-empty-obstuna.sh + scripts/postgresl/createdb/create-empty.sh ``` Il est donc très facile d'écrire un nouveau script de configuration avec le @@ -71,7 +71,7 @@ Par exemple pour créer une base avec la configuration suivante on lance la commande : ``` - ( cd obstuna-admin/createdb ; ./create-empty-obstuna.sh obstuna-test admin-test "technicien-test utilisateur-test referentiel-test") + ( cd scripts/postgresl/createdb ; ./create-empty.sh obstuna-test admin-test "technicien-test utilisateur-test referentiel-test") ``` ### Phase 1 (base de test) @@ -81,7 +81,7 @@ un autre script : ``` sudo su postgres - (cd obstuna-admin/createdb ; ./create-test_obstuna.sh) + (cd scripts/postgresl/createdb ; ./create-test_obstuna.sh) ``` Cela crée une base avec la configuration suivante : @@ -130,12 +130,12 @@ Il suffit enfin de lancer l'application en mode *création de base obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./create-obstuna.sh) + (cd scripts/postgresl ; ./create.sh) ``` ou ``` - ./obstuna-admin/create-obstuna.bat + ./scripts/postgresl/create.bat ``` Cela va effectuer les opérations suivantes après configuration de la base cible, @@ -146,7 +146,7 @@ de la base d'import de référentiel et des rôles de sécurité : - remplir le référentiel à partir de celui d'une autre base obstuna à jour (topia-service-migration) - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin create** +Note : le script appelle l'application avec l'action **--admin create** ## Mise à jour d'une base obstuna @@ -155,12 +155,12 @@ ObServe, il suffit de lancer l'application en mode *mise à jour obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./update-obstuna.sh) + (cd scripts/postgresl ; ./update.sh) ``` ou ``` - ./obstuna-admin/update-obstuna.bat + ./scripts/postgresl/update.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible et des rôles de sécurité : @@ -168,7 +168,7 @@ cible et des rôles de sécurité : - mettre à jour le schéma et les données via le service de migration intégré (topia) - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin update** +Note : le script appelle l'application avec l'action **--admin update** ## Mise à jour de la sécurité @@ -184,19 +184,19 @@ de lancer Observe en mode *mise à jour sécurité obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./update-security-obstuna.sh) + (cd scripts/postgresl ; ./update-security.sh) ``` ou ``` - ./obstuna-admin/update-security-obstuna.bat + ./scripts/postgresl/update-security.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible et des rôles de sécurité : - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin security** +Note : le script appelle l'application avec l'action **--admin security** ## Vider une base obstuna @@ -204,19 +204,19 @@ Pour vider une base obstuna (ne vue de la recréer par exemple), il suffit de lancer ObServe en mode *suppression obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./drop-obstuna.sh) + (cd scripts/postgresl ; ./drop.sh) ``` ou ``` - ./obstuna-admin/drop-obstuna.bat + ./scripts/postgresl/drop.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible : - supprimer toutes les tables gérer de la base -Note : le script appelle l'application avec l'action **--obstuna-admin drop** +Note : le script appelle l'application avec l'action **--admin drop** ## Appliquer des scripts sql supplémentaires @@ -225,7 +225,7 @@ Depuis la version 3.0, il est possible de lancer sur la base de scripts sql supp On lance ensuite la commande ``` - (cd obstuna-admin; ./apply-extra.sh) + (cd scripts/postgresl ; ./apply-extra.sh) ``` Le script demande View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/39c95592bb11f0f9a311adecef7… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/39c95592bb11f0f9a311adecef7… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-7.x] Nom du script de lancement .exe - Closes #1147
by Tony CHEMIT Oct. 16, 2018

Oct. 16, 2018
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 0e52b91a by Tony CHEMIT at 2018-10-16T21:56:22Z Nom du script de lancement .exe - Closes #1147 - - - - - 28 changed files: - client/src/main/assembly/dist/obstuna-admin/README.txt → client/src/main/assembly/dist/scripts/postgresql/README.txt - client/src/main/assembly/dist/obstuna-admin/apply-extra.sh → client/src/main/assembly/dist/scripts/postgresql/apply-extra.sh - client/src/main/assembly/dist/obstuna-admin/create-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/create.bat - client/src/main/assembly/dist/obstuna-admin/create-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/create.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-empty-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-empty-obstuna.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-ird_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-ird_obstuna.sh - client/src/main/assembly/dist/obstuna-admin/createdb/create-test_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-test_obstuna.sh - client/src/main/assembly/dist/obstuna-admin/drop-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/drop.bat - client/src/main/assembly/dist/obstuna-admin/drop-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/drop.sh - client/src/main/assembly/dist/obstuna-admin/extra/01_create-postgis-1-activity.sql → client/src/main/assembly/dist/scripts/postgresql/extra/01_create-postgis-1-activity.sql - client/src/main/assembly/dist/obstuna-admin/extra/02_create-postgis-2-harbour.sql → client/src/main/assembly/dist/scripts/postgresql/extra/02_create-postgis-2-harbour.sql - client/src/main/assembly/dist/obstuna-admin/extra/03_create-postgis-3-activity-seine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/03_create-postgis-3-activity-seine.sql - client/src/main/assembly/dist/obstuna-admin/extra/04_create-postgis-4-activity-longine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/04_create-postgis-4-activity-longine.sql - client/src/main/assembly/dist/obstuna-admin/extra/05_function_enhanced_sets_school_types.sql → client/src/main/assembly/dist/scripts/postgresql/extra/05_function_enhanced_sets_school_types.sql - client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update-security.bat - client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update-security.sh - client/src/main/assembly/dist/obstuna-admin/update-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update.bat - client/src/main/assembly/dist/obstuna-admin/update-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update.sh - + client/src/main/assembly/dist/scripts/server/README.txt - client/src/main/assembly/dist/obstuna-admin/create-server.bat → client/src/main/assembly/dist/scripts/server/create.bat - client/src/main/assembly/dist/obstuna-admin/create-server.sh → client/src/main/assembly/dist/scripts/server/create.sh - client/src/main/assembly/dist/obstuna-admin/drop-server.bat → client/src/main/assembly/dist/scripts/server/drop.bat - client/src/main/assembly/dist/obstuna-admin/drop-server.sh → client/src/main/assembly/dist/scripts/server/drop.sh - client/src/main/assembly/dist/obstuna-admin/update-security-server.bat → client/src/main/assembly/dist/scripts/server/update-security.bat - client/src/main/assembly/dist/obstuna-admin/update-security-server.sh → client/src/main/assembly/dist/scripts/server/update-security.sh - client/src/main/assembly/dist/obstuna-admin/update-server.bat → client/src/main/assembly/dist/scripts/server/update.bat - client/src/main/assembly/dist/obstuna-admin/update-server.sh → client/src/main/assembly/dist/scripts/server/update.sh - src/site/markdown/install-serverPG.md Changes: ===================================== client/src/main/assembly/dist/obstuna-admin/README.txt → client/src/main/assembly/dist/scripts/postgresql/README.txt ===================================== @@ -8,80 +8,36 @@ Lancer le script (sh) puis -./create-obstuna.sh +./create.sh ou -./create-obstuna.bat +./create.bat Pour mettre à jour une base obstuna v1 vers vXXX ------------------------------------------------ -./update-obstuna.sh +./update.sh ou -./update-obstuna.bat +./update.bat Pour mettre à jour la sécurité sur une base obstuna --------------------------------------------------- -./update-security-obstuna.sh +./update-security.sh ou -./update-security-obstuna.bat +./update-security.bat Pour vider une base obstuna --------------------------- -./drop-obstuna.sh +./drop.sh ou -./drop-obstuna.bat - - -Pour créer une nouvelle base via server ------------------------------------------- - -Lancer le script (sh) - -./createdb/create-ird_obstuna.sh - -puis - -./create-server.sh - -ou - -./create-server.bat - - -Pour mettre à jour une base via serveur ---------------------------------------- - -./update-server.sh - -ou - -./update-server.bat - -Pour mettre à jour la sécurité sur une base via serveur -------------------------------------------------------- - -./update-security-server.sh - -ou - -./update-security-server.bat - -Pour vider une base via serveur -------------------------------- - -./drop-server.sh - -ou - -./drop-server.bat +./drop.bat ===================================== client/src/main/assembly/dist/obstuna-admin/apply-extra.sh → client/src/main/assembly/dist/scripts/postgresql/apply-extra.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/create.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/create.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-empty-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-empty-obstuna.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-ird_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-ird_obstuna.sh ===================================== @@ -33,4 +33,4 @@ # Usage : # ./create-ird_obstuna.sh -./create-empty-obstuna.sh obstuna admin "adamiano lfloch pcauquil utilisateur referentiel" +create-empty-obstuna.sh obstuna admin "adamiano lfloch pcauquil utilisateur referentiel" ===================================== client/src/main/assembly/dist/obstuna-admin/createdb/create-test_obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/createdb/create-test_obstuna.sh ===================================== @@ -33,4 +33,4 @@ # Usage : # ./create-test_obstuna.sh -./create-empty-obstuna.sh obstuna-test admin "technicien1 technicien2 technicien3 utilisateur referentiel" +create-empty-obstuna.sh obstuna-test admin "technicien1 technicien2 technicien3 utilisateur referentiel" ===================================== client/src/main/assembly/dist/obstuna-admin/drop-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/drop.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/drop.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/01_create-postgis-1-activity.sql → client/src/main/assembly/dist/scripts/postgresql/extra/01_create-postgis-1-activity.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/02_create-postgis-2-harbour.sql → client/src/main/assembly/dist/scripts/postgresql/extra/02_create-postgis-2-harbour.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/03_create-postgis-3-activity-seine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/03_create-postgis-3-activity-seine.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/04_create-postgis-4-activity-longine.sql → client/src/main/assembly/dist/scripts/postgresql/extra/04_create-postgis-4-activity-longine.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/extra/05_function_enhanced_sets_school_types.sql → client/src/main/assembly/dist/scripts/postgresql/extra/05_function_enhanced_sets_school_types.sql ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update-security.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update-security.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-obstuna.bat → client/src/main/assembly/dist/scripts/postgresql/update.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-obstuna.sh → client/src/main/assembly/dist/scripts/postgresql/update.sh ===================================== ===================================== client/src/main/assembly/dist/scripts/server/README.txt ===================================== @@ -0,0 +1,26 @@ +Pour mettre à jour une base via serveur +--------------------------------------- + +./update.sh + +ou + +./update.bat + +Pour mettre à jour la sécurité sur une base via serveur +------------------------------------------------------- + +./update-security.sh + +ou + +./update-security.bat + +Pour vider une base via serveur +------------------------------- + +./drop.sh + +ou + +./drop.bat ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.bat → client/src/main/assembly/dist/scripts/server/create.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.sh → client/src/main/assembly/dist/scripts/server/create.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.bat → client/src/main/assembly/dist/scripts/server/drop.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.sh → client/src/main/assembly/dist/scripts/server/drop.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.bat → client/src/main/assembly/dist/scripts/server/update-security.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.sh → client/src/main/assembly/dist/scripts/server/update-security.sh ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.bat → client/src/main/assembly/dist/scripts/server/update.bat ===================================== ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.sh → client/src/main/assembly/dist/scripts/server/update.sh ===================================== ===================================== src/site/markdown/install-serverPG.md ===================================== @@ -41,7 +41,7 @@ Il existe une script qui permet de faire ça en tant qu'utilisateur *postgres*. ``` sudo su postgres - (cd obstuna-admin/createdb ; ./create-ird_obstuna.sh) + (cd scripts/postgresl/createdb ; ./create-ird_obstuna.sh) ``` Ce script va créer : @@ -56,7 +56,7 @@ Ce script a été conçu pour la configuration de l'ird, il ne fait qu'appeler un autre script bash avec les bons paramètres. ``` - obstuna-admin/createdb/create-empty-obstuna.sh + scripts/postgresl/createdb/create-empty.sh ``` Il est donc très facile d'écrire un nouveau script de configuration avec le @@ -71,7 +71,7 @@ Par exemple pour créer une base avec la configuration suivante on lance la commande : ``` - ( cd obstuna-admin/createdb ; ./create-empty-obstuna.sh obstuna-test admin-test "technicien-test utilisateur-test referentiel-test") + ( cd scripts/postgresl/createdb ; ./create-empty.sh obstuna-test admin-test "technicien-test utilisateur-test referentiel-test") ``` ### Phase 1 (base de test) @@ -81,7 +81,7 @@ un autre script : ``` sudo su postgres - (cd obstuna-admin/createdb ; ./create-test_obstuna.sh) + (cd scripts/postgresl/createdb ; ./create-test_obstuna.sh) ``` Cela crée une base avec la configuration suivante : @@ -130,12 +130,12 @@ Il suffit enfin de lancer l'application en mode *création de base obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./create-obstuna.sh) + (cd scripts/postgresl ; ./create.sh) ``` ou ``` - ./obstuna-admin/create-obstuna.bat + ./scripts/postgresl/create.bat ``` Cela va effectuer les opérations suivantes après configuration de la base cible, @@ -146,7 +146,7 @@ de la base d'import de référentiel et des rôles de sécurité : - remplir le référentiel à partir de celui d'une autre base obstuna à jour (topia-service-migration) - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin create** +Note : le script appelle l'application avec l'action **--admin create** ## Mise à jour d'une base obstuna @@ -155,12 +155,12 @@ ObServe, il suffit de lancer l'application en mode *mise à jour obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./update-obstuna.sh) + (cd scripts/postgresl ; ./update.sh) ``` ou ``` - ./obstuna-admin/update-obstuna.bat + ./scripts/postgresl/update.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible et des rôles de sécurité : @@ -168,7 +168,7 @@ cible et des rôles de sécurité : - mettre à jour le schéma et les données via le service de migration intégré (topia) - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin update** +Note : le script appelle l'application avec l'action **--admin update** ## Mise à jour de la sécurité @@ -184,19 +184,19 @@ de lancer Observe en mode *mise à jour sécurité obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./update-security-obstuna.sh) + (cd scripts/postgresl ; ./update-security.sh) ``` ou ``` - ./obstuna-admin/update-security-obstuna.bat + ./scripts/postgresl/update-security.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible et des rôles de sécurité : - appliquer la sécurité sur les rôles de la base -Note : le script appelle l'application avec l'action **--obstuna-admin security** +Note : le script appelle l'application avec l'action **--admin security** ## Vider une base obstuna @@ -204,19 +204,19 @@ Pour vider une base obstuna (ne vue de la recréer par exemple), il suffit de lancer ObServe en mode *suppression obstuna* via le raccourci suivant : ``` - (cd obstuna-admin ; ./drop-obstuna.sh) + (cd scripts/postgresl ; ./drop.sh) ``` ou ``` - ./obstuna-admin/drop-obstuna.bat + ./scripts/postgresl/drop.bat ``` Ce mode va effectuer les opérations suivantes après configuration de la base cible : - supprimer toutes les tables gérer de la base -Note : le script appelle l'application avec l'action **--obstuna-admin drop** +Note : le script appelle l'application avec l'action **--admin drop** ## Appliquer des scripts sql supplémentaires @@ -225,7 +225,7 @@ Depuis la version 3.0, il est possible de lancer sur la base de scripts sql supp On lance ensuite la commande ``` - (cd obstuna-admin; ./apply-extra.sh) + (cd scripts/postgresl ; ./apply-extra.sh) ``` Le script demande View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/0e52b91aeea049472cc241c408f… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/0e52b91aeea049472cc241c408f… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] [PS] Place du formulaire libération dans l'arbre - Closes #1154
by Tony CHEMIT Oct. 16, 2018

Oct. 16, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 4db231fe by Tony CHEMIT at 2018-10-16T21:27:02Z [PS] Place du formulaire libération dans l'arbre - Closes #1154 - - - - - 3 changed files: - client/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/seine/SetSeineNavigationTreeNode.java - client/src/main/resources/i18n/client_es_ES.properties - client/src/main/resources/i18n/client_fr_FR.properties Changes: ===================================== client/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/seine/SetSeineNavigationTreeNode.java ===================================== @@ -47,8 +47,8 @@ public class SetSeineNavigationTreeNode extends ReferenceNavigationTreeNodeSuppo add(new KeptTargetSampleSeineNavigationTreeNode()); add(new DiscardedTargetSampleSeineNavigationTreeNode()); add(new NonTargetCatchSeineNavigationTreeNode()); - add(new NonTargetCatchReleasedSeineNavigationTreeNode()); add(new NonTargetSampleSeineNavigationTreeNode()); + add(new NonTargetCatchReleasedSeineNavigationTreeNode()); } } ===================================== client/src/main/resources/i18n/client_es_ES.properties ===================================== @@ -1826,7 +1826,7 @@ observe.ui.tree.seine.floatingObject.unsaved=Nuevo DCP observe.ui.tree.seine.keptTargetCatch=Captura de atún observe.ui.tree.seine.keptTargetSample=Muestreo atún capturado observe.ui.tree.seine.nonTargetCatch=Fauna accesoria conservada o descartada -observe.ui.tree.seine.nonTargetCatchRelease=Faunes accessoires libérées \#TODO +observe.ui.tree.seine.nonTargetCatchRelease=Modo de liberación observe.ui.tree.seine.nonTargetSample=Muestreos de fauna accesoria observe.ui.tree.seine.objectObservedSpecies=Fauna observada observe.ui.tree.seine.objectOperation=Baliza ===================================== client/src/main/resources/i18n/client_fr_FR.properties ===================================== @@ -1826,7 +1826,7 @@ observe.ui.tree.seine.floatingObject.unsaved=Nouveau DCP observe.ui.tree.seine.keptTargetCatch=Thons conservés observe.ui.tree.seine.keptTargetSample=Échantillons thons conservés observe.ui.tree.seine.nonTargetCatch=Espèces accessoires conservées ou rejetées -observe.ui.tree.seine.nonTargetCatchRelease=Espèces accessoires libérées +observe.ui.tree.seine.nonTargetCatchRelease=Modes de libération observe.ui.tree.seine.nonTargetSample=Échantillons espèces accessoires observe.ui.tree.seine.objectObservedSpecies=Faune observée observe.ui.tree.seine.objectOperation=Balise View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/4db231fe376d5a6e0628e231b15… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/4db231fe376d5a6e0628e231b15… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-7.x] [PS] Place du formulaire libération dans l'arbre - Closes #1154
by Tony CHEMIT Oct. 16, 2018

Oct. 16, 2018
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 12257a1b by Tony CHEMIT at 2018-10-16T21:26:12Z [PS] Place du formulaire libération dans l'arbre - Closes #1154 - - - - - 3 changed files: - client/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/seine/SetSeineNavigationTreeNode.java - client/src/main/resources/i18n/client_es_ES.properties - client/src/main/resources/i18n/client_fr_FR.properties Changes: ===================================== client/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/seine/SetSeineNavigationTreeNode.java ===================================== @@ -46,8 +46,8 @@ public class SetSeineNavigationTreeNode extends ReferenceNavigationTreeNodeSuppo add(new KeptTargetSampleSeineNavigationTreeNode()); add(new DiscardedTargetSampleSeineNavigationTreeNode()); add(new NonTargetCatchSeineNavigationTreeNode()); - add(new NonTargetCatchReleasedSeineNavigationTreeNode()); add(new NonTargetSampleSeineNavigationTreeNode()); + add(new NonTargetCatchReleasedSeineNavigationTreeNode()); } } ===================================== client/src/main/resources/i18n/client_es_ES.properties ===================================== @@ -1506,7 +1506,7 @@ observe.ui.tree.seine.discardedTargetSample=Muestreo atún descartado observe.ui.tree.seine.keptTargetCatch=Captura de atún observe.ui.tree.seine.keptTargetSample=Muestreo atún capturado observe.ui.tree.seine.nonTargetCatch=Fauna accesoria conservada o descartada -observe.ui.tree.seine.nonTargetCatchRelease=Faunes accessoires libérées \#TODO +observe.ui.tree.seine.nonTargetCatchRelease=Modo de liberación observe.ui.tree.seine.nonTargetSample=Muestreos de fauna accesoria observe.ui.tree.seine.objectObservedSpecies=Fauna observada observe.ui.tree.seine.objectOperation=Baliza ===================================== client/src/main/resources/i18n/client_fr_FR.properties ===================================== @@ -1506,7 +1506,7 @@ observe.ui.tree.seine.discardedTargetSample=Échantillons thons rejetés observe.ui.tree.seine.keptTargetCatch=Thons conservés observe.ui.tree.seine.keptTargetSample=Échantillons thons conservés observe.ui.tree.seine.nonTargetCatch=Espèces accessoires conservées ou rejetées -observe.ui.tree.seine.nonTargetCatchRelease=Espèces accessoires libérées +observe.ui.tree.seine.nonTargetCatchRelease=Modes de libération observe.ui.tree.seine.nonTargetSample=Échantillons espèces accessoires observe.ui.tree.seine.objectObservedSpecies=Faune observée observe.ui.tree.seine.objectOperation=Balise View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/12257a1b97a3c54e385bf714853… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/12257a1b97a3c54e385bf714853… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] Calcul de l'activité d'observation sur l'écran de l'activité logbook - closes #1150
by Tony CHEMIT Oct. 16, 2018

Oct. 16, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: f2f85a78 by Tony CHEMIT at 2018-10-16T16:36:40Z Calcul de l&#39;activité d&#39;observation sur l&#39;écran de l&#39;activité logbook - closes #1150 - - - - - 23 changed files: - client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java - + client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/ChooseRelatedObservedActivityUIAction.java - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIModel.java - client/src/main/resources/i18n/client_en_GB.properties - client/src/main/resources/i18n/client_es_ES.properties - client/src/main/resources/i18n/client_fr_FR.properties - dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineAware.java - dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineLogbookDto.java - dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineObsDto.java - dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java - dto/src/main/resources/i18n/dto_en_GB.properties - dto/src/main/resources/i18n/dto_es_ES.properties - dto/src/main/resources/i18n/dto_fr_FR.properties - services/pom.xml - services/src/main/java/fr/ird/observe/services/service/actions/pairing/ActivityLonglinePairingEngine.java - services/src/main/java/fr/ird/observe/services/service/actions/pairing/TripLonglinePairingContext.java - dto/src/main/java/fr/ird/observe/dto/data/pairing/ActivityLonglinePairingResult.java → services/src/main/java/fr/ird/observe/services/service/data/longline/pairing/ActivityLonglinePairingResult.java - dto/src/main/java/fr/ird/observe/dto/data/pairing/ActivityLonglinePairingResultItem.java → services/src/main/java/fr/ird/observe/services/service/data/longline/pairing/ActivityLonglinePairingResultItem.java - + services/src/main/java/fr/ird/observe/services/service/data/longline/pairing/ActivityLonglinePairingResultItemDecorator.java - dto/src/main/java/fr/ird/observe/dto/data/pairing/TripLonglinePairingResult.java → services/src/main/java/fr/ird/observe/services/service/data/longline/pairing/TripLonglinePairingResult.java Changes: ===================================== client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java ===================================== @@ -75,6 +75,7 @@ public abstract class ObserveKeyStrokes { public static final KeyStroke KEY_STROKE_CONFIGURE_SYNCHRO_FROM_BOTH = KeyStroke.getKeyStroke("ctrl pressed C"); public static final KeyStroke KEY_STROKE_COPY_VALUES_AND_SAVE = KeyStroke.getKeyStroke("ctrl pressed T"); + public static final KeyStroke KEY_STROKE_CHOOSE_RELATED_OBSERVATION_ACTIVITY = KeyStroke.getKeyStroke("ctrl pressed T"); public static final KeyStroke KEY_STROKE_SELECT_TRANSSHIPMENT = KeyStroke.getKeyStroke("ctrl pressed T"); public static final KeyStroke KEY_STROKE_SAVE_TABLE_ENTRY = KeyStroke.getKeyStroke("ctrl pressed S"); public static final KeyStroke KEY_STROKE_PRESSED_ENTER = KeyStroke.getKeyStroke("pressed ENTER"); ===================================== client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/ChooseRelatedObservedActivityUIAction.java ===================================== @@ -0,0 +1,145 @@ +package fr.ird.observe.client.ui.actions.content.data.longline; + +/*- + * #%L + * ObServe :: Client + * %% + * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import fr.ird.observe.client.ObserveSwingApplicationContext; +import fr.ird.observe.client.ui.ObserveKeyStrokes; +import fr.ird.observe.client.ui.ObserveMainUI; +import fr.ird.observe.client.ui.actions.content.api.AbstractContentUIAction; +import fr.ird.observe.client.ui.content.api.ContentUI; +import fr.ird.observe.client.ui.content.data.longline.logbook.ActivityLonglineLogbookUI; +import fr.ird.observe.client.ui.content.data.longline.logbook.ActivityLonglineLogbookUIModel; +import fr.ird.observe.client.ui.content.ref.usage.UsageUIHandlerSupport; +import fr.ird.observe.client.ui.util.UIHelper; +import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookDto; +import fr.ird.observe.dto.data.longline.ActivityLonglineObsDto; +import fr.ird.observe.dto.data.longline.ActivityLonglineObsReference; +import fr.ird.observe.services.service.data.longline.pairing.ActivityLonglinePairingResult; +import fr.ird.observe.services.service.data.longline.pairing.ActivityLonglinePairingResultItem; +import fr.ird.observe.dto.decoration.DecoratorService; +import fr.ird.observe.dto.decoration.ObserveI18nLabelsBuilder; +import fr.ird.observe.services.service.data.longline.pairing.ActivityLonglinePairingResultItemDecorator; +import fr.ird.observe.services.service.actions.pairing.ActivityLonglinePairingConfig; +import fr.ird.observe.services.service.actions.pairing.ActivityLonglinePairingEngine; +import fr.ird.observe.services.service.actions.pairing.TripLonglinePairingContext; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.nuiton.jaxx.widgets.select.BeanFilterableComboBox; + +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +import static org.nuiton.i18n.I18n.n; +import static org.nuiton.i18n.I18n.t; + +/** + * Created by tchemit on 16/10/2018. + * + * @author Tony Chemit - dev(a)tchemit.fr + */ +public class ChooseRelatedObservedActivityUIAction extends AbstractContentUIAction { + + public static final String ACTION_NAME = ChooseRelatedObservedActivityUIAction.class.getName(); + private static final Logger log = LogManager.getLogger(ChooseRelatedObservedActivityUIAction.class); + private final ActivityLonglinePairingResultItemDecorator decorator; + + public ChooseRelatedObservedActivityUIAction(ObserveMainUI mainUI) { + super(mainUI, ACTION_NAME, n("observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity"), n("observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity"), "data-calcule", ObserveKeyStrokes.KEY_STROKE_CHOOSE_RELATED_OBSERVATION_ACTIVITY); + ObserveSwingApplicationContext applicationContext = ObserveSwingApplicationContext.get(); + DecoratorService decoratorService = applicationContext.getDecoratorService(); + decorator = new ActivityLonglinePairingResultItemDecorator(decoratorService, applicationContext.getConfig().getLocale()); + } + + @Override + protected void actionPerformed(ContentUI contentUI) { + + ActivityLonglineLogbookUI ui = (ActivityLonglineLogbookUI) contentUI; + ActivityLonglineLogbookUIModel model = ui.getModel(); + + ActivityLonglinePairingEngine pairingEngine = new ActivityLonglinePairingEngine(getServicesProvider(), ui.getConfig()); + + ActivityLonglineLogbookDto bean = model.getBean(); + + TripLonglinePairingContext pairingContext = pairingEngine.newTripContext(model.getSelectedParentId(), model.getAllActivityObs()); + + ActivityLonglinePairingResult activityLonglinePairingResult = pairingEngine.computeForActivityLogbook(pairingContext, bean); + + Optional<ActivityLonglineObsReference> optionalActivityLonglineObs = askNewParent(activityLonglinePairingResult.getItems(), pairingEngine.getConfig()); + + if (optionalActivityLonglineObs.isPresent()) { + ActivityLonglineObsReference activityLonglineObs = optionalActivityLonglineObs.get(); + log.info("will use new related activity obs: " + activityLonglineObs); + bean.setRelatedObservedActivity(activityLonglineObs); + } + } + + private Optional<ActivityLonglineObsReference> askNewParent(List<ActivityLonglinePairingResultItem> pairingResult, ActivityLonglinePairingConfig pairingConfig) { + + BeanFilterableComboBox<ActivityLonglinePairingResultItem> editor = new BeanFilterableComboBox<>(); + editor.setI18nPrefix("observe.common."); + editor.setBeanType(ActivityLonglinePairingResultItem.class); + editor.setI18nLabelBuilder(ObserveI18nLabelsBuilder.createFromReferenceType(ActivityLonglineObsDto.class)); + + editor.init(decorator, new ArrayList<>(pairingResult)); + +// JComboBox combobox = editor.getCombobox(); +// @SuppressWarnings("unchecked") ListCellRenderer toolTipRenderer = new ComboBoxListCellRenderer(combobox.getRenderer()); +// combobox.setRenderer(toolTipRenderer); + + String continueActionText = t("observe.choice.continue"); + Object[] options = {continueActionText, t("observe.choice.cancel")}; + JPanel panel = new JPanel(new BorderLayout()); + panel.add(BorderLayout.NORTH, new JLabel(t("observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.message", + pairingConfig.getLonglineActivityPairingMaxTime(), pairingConfig.getLonglineActivityPairingMaxDistance()))); + panel.add(BorderLayout.CENTER, editor); + + JOptionPane pane = new JOptionPane(panel, JOptionPane.QUESTION_MESSAGE, JOptionPane.DEFAULT_OPTION, null, options, options[0]); + + JButton jButton = UsageUIHandlerSupport.findButton(pane, continueActionText); + Objects.requireNonNull(jButton); + jButton.setEnabled(false); + editor.addPropertyChangeListener("selectedItem", evt -> jButton.setEnabled(evt.getNewValue() != null)); + + int response = UIHelper.askUser(ObserveSwingApplicationContext.get().getMainUI(), pane, t("observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.title"), options); + + ActivityLonglinePairingResultItem newActivityLonglineObs = null; + switch (response) { + case 0: + newActivityLonglineObs = editor.getComboBoxModel().getSelectedItem(); + log.info(String.format("Selected new related observed activity id: %s", newActivityLonglineObs)); + break; + default: + log.info("Use cancel choice of related observed activity"); + } + return Optional.ofNullable(newActivityLonglineObs).map(ActivityLonglinePairingResultItem::getObservationActivity); + } + +} + ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUI.jaxx ===================================== @@ -41,8 +41,9 @@ fr.ird.observe.client.ui.actions.content.data.longline.delete.DeleteActivityLonglineLogbookUIAction fr.ird.observe.client.ui.actions.content.data.longline.move.MoveSingleActivityLonglineLogbookUIAction fr.ird.observe.client.ui.actions.content.data.longline.save.SaveActivityLonglineLogbookUIAction + fr.ird.observe.client.ui.actions.content.data.longline.ChooseRelatedObservedActivityUIAction - fr.ird.observe.dto.data.pairing.ActivityLonglinePairingResultItem + fr.ird.observe.services.service.data.longline.pairing.ActivityLonglinePairingResultItem fr.ird.observe.client.ui.util.JComment @@ -190,7 +191,10 @@ <JLabel id='relatedObservedActivityLabel'/> </cell> <cell anchor='east' fill="both"> - <BeanFilterableComboBox id='relatedObservedActivity' genericType='ActivityLonglinePairingResultItem' constructorParams='this'/> + <JPanel layout="{new BorderLayout()}"> + <BeanFilterableComboBox id='relatedObservedActivity' genericType='ActivityLonglineObsReference' constructorParams='this' constraints='BorderLayout.CENTER'/> + <JButton id='chooseRelatedObservedActivity' constraints='BorderLayout.EAST'/> + </JPanel> </cell> </row> ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUI.jcss ===================================== @@ -84,10 +84,8 @@ #relatedObservedActivity { _listNoLoad:true; - bean:{model}; - property:activityObs; - data:{model.getActivityObsCandidates()}; - selectedItem:{model.getActivityObs()}; + data:{model.getActivityObs()}; + selectedItem:{bean.getRelatedObservedActivity()}; } #reopen { @@ -119,3 +117,9 @@ enabled:{!model.isModified() && model.isValid() && model.isSetOperation() && ! bean.isHasSetLongline()}; _observeAction:{AddActivityLonglineLogbookSetUIAction.ACTION_NAME}; } + +#chooseRelatedObservedActivity { + visible:{!model.isReadingMode()}; + enabled:{model.isValid()}; + _observeAction:{ChooseRelatedObservedActivityUIAction.ACTION_NAME}; +} \ No newline at end of file ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIHandler.java ===================================== @@ -22,44 +22,19 @@ package fr.ird.observe.client.ui.content.data.longline.logbook; * #L% */ -import com.google.common.collect.ImmutableSet; import fr.ird.observe.client.ui.content.api.data.open.ContentOpenableUIHandler; -import fr.ird.observe.client.ui.content.api.data.open.ContentOpenableUIInitializer; import fr.ird.observe.client.ui.content.api.ui.ObserveLayoutFocusTraversalPolicy; import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookDto; import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookReference; -import fr.ird.observe.dto.data.longline.ActivityLonglineObsDto; import fr.ird.observe.dto.data.longline.ActivityLonglineObsReference; -import fr.ird.observe.dto.data.pairing.ActivityLonglinePairingResult; -import fr.ird.observe.dto.data.pairing.ActivityLonglinePairingResultItem; -import fr.ird.observe.dto.decoration.ObserveI18nDecoratorHelper; -import fr.ird.observe.dto.decoration.ObserveI18nLabelsBuilder; import fr.ird.observe.dto.form.Form; -import fr.ird.observe.services.service.actions.pairing.ActivityLonglinePairingEngine; -import fr.ird.observe.services.service.actions.pairing.TripLonglinePairingContext; -import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.nuiton.decorator.Decorator; -import org.nuiton.decorator.JXPathDecorator; import org.nuiton.jaxx.runtime.spi.UIHandler; -import org.nuiton.jaxx.widgets.select.BeanFilterableComboBox; -import javax.swing.JComboBox; -import javax.swing.JComponent; -import javax.swing.JLabel; -import javax.swing.JList; -import javax.swing.KeyStroke; -import javax.swing.ListCellRenderer; import java.awt.Component; import java.awt.Container; -import java.awt.Dimension; -import java.awt.event.KeyEvent; -import java.beans.PropertyChangeListener; -import java.util.Collections; -import java.util.Optional; - -import static org.nuiton.i18n.I18n.t; +import java.util.List; /** * Created on 8/29/14. @@ -69,65 +44,13 @@ import static org.nuiton.i18n.I18n.t; */ class ActivityLonglineLogbookUIHandler extends ContentOpenableUIHandler<ActivityLonglineLogbookDto, ActivityLonglineLogbookReference, ActivityLonglineLogbookUI> implements UIHandler<ActivityLonglineLogbookUI> { - private static final ImmutableSet<String> PAIRING_PROPERTIES = ImmutableSet.of( - ActivityLonglineLogbookDto.PROPERTY_LATITUDE, - ActivityLonglineLogbookDto.PROPERTY_LONGITUDE, - ActivityLonglineLogbookDto.PROPERTY_TIME_STAMP, - ActivityLonglineLogbookUIModel.PROPERTY_VALID); - private static final Logger log = LogManager.getLogger(ActivityLonglineLogbookUIHandler.class); - private final PropertyChangeListener onRecomputePairing; - private final PropertyChangeListener onActivityObsChanged; - private ActivityLonglinePairingEngine pairingEngine; - private boolean adjusting; - - ActivityLonglineLogbookUIHandler() { - onRecomputePairing = e -> onRecomputePairing(e.getPropertyName()); - onActivityObsChanged = e -> onActivityObsChanged(); - } @Override public ActivityLonglineLogbookUIModel getModel() { return ui.getModel(); } - @Override - protected ContentOpenableUIInitializer<ActivityLonglineLogbookUI> createContentUIInitializer(ActivityLonglineLogbookUI ui) { - return new ContentOpenableUIInitializer<ActivityLonglineLogbookUI>(ui) { - - @SuppressWarnings("unchecked") - protected void init(BeanFilterableComboBox comboBox) { - if (!"relatedObservedActivity".equals(comboBox.getName())) { - super.init(comboBox); - return; - } - - comboBox.getCombobox().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0), "none"); - Class referenceType = comboBox.getBeanType(); - comboBox.setI18nLabelBuilder(ObserveI18nLabelsBuilder.createFromReferenceType(ActivityLonglineObsDto.class)); - comboBox.setI18nPrefix("observe.common."); - comboBox.setMinimumSize(new Dimension(0, 24)); - - if (StringUtils.isEmpty(comboBox.getProperty())) { - comboBox.setProperty(comboBox.getName()); - } - - log.info("Init relatedObservedActivity comboBox"); - Decorator decorator = decoratorService.getDecoratorByType(referenceType); - - String entityLabel = t(ObserveI18nDecoratorHelper.getTypeI18nKey(ActivityLonglineObsDto.class)); - comboBox.setPopupTitleText(t("observe.common.DataDto.type", entityLabel)); - - comboBox.init((JXPathDecorator) decorator, Collections.emptyList()); - - JComboBox combobox = comboBox.getCombobox(); - - @SuppressWarnings("unchecked") ListCellRenderer toolTipRenderer = new ComboBoxListCellRenderer(combobox.getRenderer()); - combobox.setRenderer(toolTipRenderer); - } - }; - } - @Override protected ObserveLayoutFocusTraversalPolicy<ActivityLonglineLogbookUI> createFocusTraversalPolicy() { return new ObserveLayoutFocusTraversalPolicy<ActivityLonglineLogbookUI>() { @@ -148,101 +71,6 @@ class ActivityLonglineLogbookUIHandler extends ContentOpenableUIHandler<Activity }; } - @Override - public void afterInit(ActivityLonglineLogbookUI ui) { - super.afterInit(ui); - pairingEngine = getDataSource().newActivityLonglinePairingEngine(ui.getConfig()); - } - - private void onRecomputePairing(String propertyName) { - if (adjusting || !PAIRING_PROPERTIES.contains(propertyName)) { - return; - } - log.info(prefix + "Need to recompute pairing data."); - ActivityLonglineLogbookUIModel model = getModel(); - if (!model.isValid()) { - log.info(prefix + "Reject: model is not valid."); - return; - } - adjusting = true; - try { - ActivityLonglineLogbookDto bean = model.getBean(); - ActivityLonglinePairingResult activityLonglinePairingResult = pairingEngine.computeForActivityLogbook(model.getPairingContext(), bean); - ActivityLonglinePairingResultItem pairingActivityObs = model.getActivityObs(); - ActivityLonglineObsReference relatedObservedActivity = model.getBean().getRelatedObservedActivity(); - - model.setActivityObsCandidates(activityLonglinePairingResult.getItems()); - - if (pairingActivityObs == null) { - - if (relatedObservedActivity != null) { - // use dto value - Optional<ActivityLonglinePairingResultItem> first = model.getActivityObsCandidates().stream().filter(e -> e.getObservationActivity().equals(relatedObservedActivity)).findFirst(); - if (!first.isPresent()) { - // Should never occurs ? - bean.setRelatedObservedActivity(null); - } else { - pairingActivityObs = first.get(); - model.setActivityObs(pairingActivityObs); - bean.setRelatedObservedActivity(pairingActivityObs.getObservationActivity()); - } - } - } else { - if (!model.getActivityObsCandidates().contains(pairingActivityObs)) { - // can not keep this pairing, - model.setActivityObs(null); - bean.setRelatedObservedActivity(null); - } else { - // keep this pairing - // use pairing value - bean.setRelatedObservedActivity(pairingActivityObs.getObservationActivity()); - } - } - } finally { - adjusting = false; - } - } - - private void onActivityObsChanged() { - if (adjusting) { - return; - } - adjusting = true; - try { - ActivityLonglineLogbookUIModel model = getModel(); - ActivityLonglinePairingResultItem activityObs = model.getActivityObs(); - model.getBean().setRelatedObservedActivity(activityObs == null ? null : activityObs.getObservationActivity()); - } finally { - adjusting = false; - } - } - - @Override - protected void onOpenBeforeOpenModel() { - ActivityLonglineLogbookUIModel model = getModel(); - ActivityLonglineLogbookDto bean = model.getBean(); - model.removePropertyChangeListener(ActivityLonglineLogbookUIModel.PROPERTY_VALID, onRecomputePairing); - bean.removePropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_LATITUDE, onRecomputePairing); - bean.removePropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_LONGITUDE, onRecomputePairing); - bean.removePropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_TIME_STAMP, onRecomputePairing); - bean.removePropertyChangeListener("activityObs", onActivityObsChanged); - - super.onOpenBeforeOpenModel(); - } - - @Override - protected void onOpenAfterOpenModel() { - super.onOpenAfterOpenModel(); - ActivityLonglineLogbookUIModel model = getModel(); - ActivityLonglineLogbookDto bean = model.getBean(); - model.addPropertyChangeListener(ActivityLonglineLogbookUIModel.PROPERTY_VALID, onRecomputePairing); - bean.addPropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_LATITUDE, onRecomputePairing); - bean.addPropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_LONGITUDE, onRecomputePairing); - bean.addPropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_TIME_STAMP, onRecomputePairing); - bean.addPropertyChangeListener("activityObs", onActivityObsChanged); - onRecomputePairing(ActivityLonglineLogbookUIModel.PROPERTY_VALID); - } - @Override protected void onOpenModel() { super.onOpenModel(); @@ -260,37 +88,8 @@ class ActivityLonglineLogbookUIHandler extends ContentOpenableUIHandler<Activity form = getActivityLonglineLogbookService().loadForm(activityId); } - TripLonglinePairingContext pairingContext = pairingEngine.newTripContext(tripId); - model.openForm(form, pairingContext); + List<ActivityLonglineObsReference> allActivityLonglineObs = getActivityLonglineObsService().getActivityLonglineByTripLongline(tripId).toList(); + model.openForm(form, allActivityLonglineObs); } - - private static class ComboBoxListCellRenderer<E extends ActivityLonglinePairingResultItem> implements ListCellRenderer<E> { - - private final ListCellRenderer<? super E> renderer; - - ComboBoxListCellRenderer(ListCellRenderer<? super E> renderer) { - this.renderer = renderer; - } - - @Override - public Component getListCellRendererComponent(JList<? extends E> list, - E value, - int index, - boolean isSelected, - boolean cellHasFocus) { - Component comp = renderer.getListCellRendererComponent( - list, - value, - index, - isSelected, - cellHasFocus - ); - if (comp instanceof JLabel) { - JLabel jcomp = (JLabel) comp; - jcomp.setToolTipText(jcomp.getText()); - } - return comp; - } - } } ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIModel.java ===================================== @@ -22,20 +22,23 @@ package fr.ird.observe.client.ui.content.data.longline.logbook; * #L% */ +import com.google.common.collect.ImmutableList; import fr.ird.observe.client.ui.content.api.data.open.ContentOpenableUIModel; import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookDto; import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookReference; -import fr.ird.observe.dto.data.pairing.ActivityLonglinePairingResultItem; +import fr.ird.observe.dto.data.longline.ActivityLonglineObsReference; import fr.ird.observe.dto.form.Form; import fr.ird.observe.dto.referential.longline.VesselActivityLonglineHelper; import fr.ird.observe.dto.referential.longline.VesselActivityLonglineReference; -import fr.ird.observe.services.service.actions.pairing.TripLonglinePairingContext; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuiton.i18n.I18n; import org.nuiton.util.DateUtil; -import java.util.ArrayList; +import java.util.Collections; import java.util.Date; import java.util.List; +import java.util.stream.Collectors; /** * Created on 9/26/14. @@ -45,22 +48,26 @@ import java.util.List; */ public class ActivityLonglineLogbookUIModel extends ContentOpenableUIModel<ActivityLonglineLogbookDto, ActivityLonglineLogbookReference> { - public static final String PROPERTY_SET_OPERATION = "setOperation"; public static final String PROPERTY_DATE = "date"; public static final String PROPERTY_TIME = "time"; + private static final String PROPERTY_SET_OPERATION = "setOperation"; private static final long serialVersionUID = 1L; - - private TripLonglinePairingContext pairingContext; - private List<ActivityLonglinePairingResultItem> activityObsCandidates; - private ActivityLonglinePairingResultItem activityObs; + private static final Logger log = LogManager.getLogger(ActivityLonglineLogbookUIModel.class); + private List<ActivityLonglineObsReference> allActivityObs; + private List<ActivityLonglineObsReference> activityObs; + private boolean opening = false; public ActivityLonglineLogbookUIModel() { super(ActivityLonglineLogbookDto.class, I18n.n("observe.common.ActivityLonglineLogbookDto.message.not.open")); getBean().addPropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_VESSEL_ACTIVITY_LONGLINE, evt -> { boolean oldValue = VesselActivityLonglineHelper.isSetOperation((VesselActivityLonglineReference) evt.getOldValue()); - boolean newValue = VesselActivityLonglineHelper.isSetOperation((VesselActivityLonglineReference) evt.getNewValue()); + VesselActivityLonglineReference vesselActivityLonglineReference = (VesselActivityLonglineReference) evt.getNewValue(); + boolean newValue = VesselActivityLonglineHelper.isSetOperation(vesselActivityLonglineReference); firePropertyChange(PROPERTY_SET_OPERATION, oldValue, newValue); + if (!opening) { + updateActivityObs(); + } }); } @@ -94,31 +101,45 @@ public class ActivityLonglineLogbookUIModel extends ContentOpenableUIModel<Activ } } - public void openForm(Form<ActivityLonglineLogbookDto> form, TripLonglinePairingContext pairingContext) { - this.pairingContext = pairingContext; - super.openForm(form); - } - - public TripLonglinePairingContext getPairingContext() { - return pairingContext; + public void openForm(Form<ActivityLonglineLogbookDto> form, List<ActivityLonglineObsReference> allActivityObs) { + this.allActivityObs = ImmutableList.copyOf(allActivityObs); + opening = true; + try { + super.openForm(form); + } finally { + opening = false; + } + updateActivityObs(); } - public List<ActivityLonglinePairingResultItem> getActivityObsCandidates() { - return activityObsCandidates; + public List<ActivityLonglineObsReference> getActivityObs() { + return activityObs; } - public void setActivityObsCandidates(List<ActivityLonglinePairingResultItem> activityObsCandidates) { - this.activityObsCandidates = activityObsCandidates == null ? null : new ArrayList<>(activityObsCandidates); - firePropertyChange("activityObsCandidates", null, this.activityObsCandidates); + public void setActivityObs(List<ActivityLonglineObsReference> activityObs) { + // only used for jaxx binding } - public ActivityLonglinePairingResultItem getActivityObs() { - return activityObs; + public List<ActivityLonglineObsReference> getAllActivityObs() { + return allActivityObs; } - public void setActivityObs(ActivityLonglinePairingResultItem activityObs) { - ActivityLonglinePairingResultItem oldValue = getActivityObs(); - this.activityObs = activityObs; - firePropertyChange("activityObs", oldValue, activityObs); + private void updateActivityObs() { + log.info(getPrefix() + "Will update release observed actities..."); + ActivityLonglineLogbookDto bean = getBean(); + if (allActivityObs == null || bean.getVesselActivityLonglineId() == null) { + activityObs = Collections.emptyList(); + } else { + String vesselActivityLonglineId = bean.getVesselActivityLonglineId(); + activityObs = allActivityObs.stream().filter(e -> vesselActivityLonglineId.equals(e.getVesselActivityLonglineId())).collect(Collectors.toList()); + } + log.info(getPrefix() + "Found " + activityObs.size() + " related observed activities."); + ActivityLonglineObsReference relatedObservedActivity = bean.getRelatedObservedActivity(); + boolean removeRelatedObservedActivity = !opening && relatedObservedActivity != null && !activityObs.contains(relatedObservedActivity); + firePropertyChange("activityObs", null, activityObs); + if (removeRelatedObservedActivity) { + log.info(getPrefix() + "Removed not matching related observed activity: " + relatedObservedActivity); + bean.setRelatedObservedActivity(null); + } } } ===================================== client/src/main/resources/i18n/client_en_GB.properties ===================================== @@ -363,6 +363,9 @@ observe.common.ActivityLogbookDto.action.goToOpen.short=Logbook - Open activity observe.common.ActivityLogbookDto.action.goToOpen.tip=Go to open activity (Logbook) observe.common.ActivityLonglineLogbookDto.action.addSet=Add the fishing operation observe.common.ActivityLonglineLogbookDto.action.addSet.tip=Add the fishing operation associated with this activity +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity=Choose activity +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.message=Choose an activity beyoung the universe of possible ones (time minus than %s (minutes) and distance minus than %s (km))\: +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.title=Choose the related observed activity observe.common.ActivityLonglineLogbookDto.action.moves=Change trip observe.common.ActivityLonglineLogbookDto.action.moves.tip=Change trip of activities observe.common.ActivityLonglineLogbookDto.list.message.none=< No activity for current trip > ===================================== client/src/main/resources/i18n/client_es_ES.properties ===================================== @@ -363,6 +363,9 @@ observe.common.ActivityLogbookDto.action.goToOpen.short=Logbook - Open activity observe.common.ActivityLogbookDto.action.goToOpen.tip=Go to open activity (Logbook) \#TODO observe.common.ActivityLonglineLogbookDto.action.addSet=Añadir la operación de pesca observe.common.ActivityLonglineLogbookDto.action.addSet.tip=Añadir la operación de pesca asociada a esta actividad +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity=Choose activity \#TODO +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.message=Choose an activity beyoung the universe of possible ones (time minus than %s (minutes) and distance minus than %s (km))\: \#TODO +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.title=Choose the related observed activity \#TODO observe.common.ActivityLonglineLogbookDto.action.moves=Cambiar de marea observe.common.ActivityLonglineLogbookDto.action.moves.tip=Cambiar la marea de las actividades seleccionas observe.common.ActivityLonglineLogbookDto.list.message.none=< Ninguna actividad por la marea actual > ===================================== client/src/main/resources/i18n/client_fr_FR.properties ===================================== @@ -363,6 +363,9 @@ observe.common.ActivityLogbookDto.action.goToOpen.short=Livre de bord - Activit observe.common.ActivityLogbookDto.action.goToOpen.tip=Accéder à l'activité ouverte (Livre de bord) observe.common.ActivityLonglineLogbookDto.action.addSet=Ajouter l'opération de pêche observe.common.ActivityLonglineLogbookDto.action.addSet.tip=Ajouter l'opération de pêche associée à cette activité +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity=Choisir l'activité +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.message=Veuillez choisir une activité parmis celles possible (durée de moins de %s minutes et distance moins de %s kms) \: +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.title=Choisir l'activité d'observation associée observe.common.ActivityLonglineLogbookDto.action.moves=Changer de marée observe.common.ActivityLonglineLogbookDto.action.moves.tip=Changer la marée des activités sélectionnées observe.common.ActivityLonglineLogbookDto.list.message.none=< Aucune activité pour la marée courante > ===================================== dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineAware.java ===================================== @@ -51,4 +51,6 @@ public interface ActivityLonglineAware extends ObserveDto { Float getLatitude(); Float getLongitude(); + + String getVesselActivityLonglineId(); } ===================================== dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineLogbookDto.java ===================================== @@ -70,4 +70,8 @@ public class ActivityLonglineLogbookDto extends GeneratedActivityLonglineLogbook return ActivityLonglineAware.newGPSPoint(this); } + @Override + public String getVesselActivityLonglineId() { + return vesselActivityLongline == null ? null : vesselActivityLongline.getId(); + } } ===================================== dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineObsDto.java ===================================== @@ -69,4 +69,9 @@ public class ActivityLonglineObsDto extends GeneratedActivityLonglineObsDto impl public GPSPoint getGPSPoint() { return ActivityLonglineAware.newGPSPoint(this); } + + @Override + public String getVesselActivityLonglineId() { + return vesselActivityLongline == null ? null : vesselActivityLongline.getId(); + } } ===================================== dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java ===================================== @@ -83,7 +83,6 @@ import fr.ird.observe.dto.data.longline.TripLonglineActivityObsDto; import fr.ird.observe.dto.data.longline.TripLonglineReference; import fr.ird.observe.dto.data.longline.WeightMeasureObsDto; import fr.ird.observe.dto.data.longline.WeightMeasureObsReference; -import fr.ird.observe.dto.data.pairing.ActivityLonglinePairingResultItem; import fr.ird.observe.dto.data.seine.ActivitySeineDto; import fr.ird.observe.dto.data.seine.ActivitySeineReference; import fr.ird.observe.dto.data.seine.ActivitySeineStubDto; @@ -306,8 +305,6 @@ public class DecoratorService extends DecoratorProvider { private String haulingIdentifier; private String settingIdentifier; - private String pairingTime; - private String pairingDistance; private String libelle; private Locale locale; @@ -317,8 +314,6 @@ public class DecoratorService extends DecoratorProvider { libelle = referentialLocale.getLibelle(); settingIdentifier = l(locale, "observe.common.settingIdentifier"); haulingIdentifier = l(locale, "observe.common.haulingIdentifier"); - pairingTime = l(locale, "observe.common.pairingTime"); - pairingDistance = l(locale, "observe.common.pairingDistance"); } @Override @@ -346,10 +341,6 @@ public class DecoratorService extends DecoratorProvider { registerObserveDecorator(ServerDataSourceConfiguration.class, "${name}$s", " "); registerObserveDecorator(WITH_URL, ServerDataSourceConfiguration.class, "${name}$s##${url}$s"); registerObserveDecorator(FloatingObjectPreset.class, "${name}$s", " "); - - registerObserveDecorator(ActivityLonglinePairingResultItem.class, - "${observationActivity/timeStamp}$td/%1$tm/%1$tY %1$tH:%1$tM##${observationActivity/vesselActivityLonglineLabel}$s##" + pairingTime + " ${computedTime}$s##" + pairingDistance + " ${computedDistance}$s", " "); - } ===================================== dto/src/main/resources/i18n/dto_en_GB.properties ===================================== @@ -298,8 +298,8 @@ observe.common.lengthWeightFormula=Length weight formula observe.common.no.unit=No unit observe.common.nocode=Nocode observe.common.none=None -observe.common.pairingDistance=Distance (km) -observe.common.pairingTime=Time (minutes) +observe.common.pairingDistance=Distance (in kms) +observe.common.pairingTime=Time (in minutes) observe.common.program=Program observe.common.scientificLabel=Scientific label observe.common.settingIdentifier=Setting ===================================== dto/src/main/resources/i18n/dto_es_ES.properties ===================================== @@ -296,8 +296,8 @@ observe.common.lengthWeightFormula=Relación de peso observe.common.no.unit=No unit \#TODO observe.common.nocode=codigo ausente observe.common.none=Ninguno -observe.common.pairingDistance=Distance (km) \#TODO -observe.common.pairingTime=Time (minutes) \#TODO +observe.common.pairingDistance=Distance (in kms) \#TODO +observe.common.pairingTime=Time (in minutes) \#TODO observe.common.program=Programa observe.common.scientificLabel=Texto científico observe.common.settingIdentifier=Calada ===================================== dto/src/main/resources/i18n/dto_fr_FR.properties ===================================== @@ -298,8 +298,8 @@ observe.common.lengthWeightFormula=Relation Poids observe.common.no.unit=Pas d'unité observe.common.nocode=code absent observe.common.none=Aucun -observe.common.pairingDistance=Distance (km) -observe.common.pairingTime=Temps (mn) +observe.common.pairingDistance=Distance (en kms) +observe.common.pairingTime=Temps (en minutes) observe.common.program=Programme observe.common.scientificLabel=Libellé scientifique observe.common.settingIdentifier=Filage ===================================== services/pom.xml ===================================== @@ -118,6 +118,10 @@ <groupId>org.apache.commons</groupId> <artifactId>commons-collections4</artifactId> </dependency> + <dependency> + <groupId>commons-jxpath</groupId> + <artifactId>commons-jxpath</artifactId> + </dependency> <dependency> <groupId>com.google.guava</groupId> ===================================== services/src/main/java/fr/ird/observe/services/service/actions/pairing/ActivityLonglinePairingEngine.java ===================================== @@ -27,12 +27,13 @@ import com.google.common.collect.ImmutableMap; import fr.ird.observe.dto.data.longline.ActivityLonglineAware; import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookReference; import fr.ird.observe.dto.data.longline.ActivityLonglineObsReference; -import fr.ird.observe.dto.data.pairing.ActivityLonglinePairingResult; -import fr.ird.observe.dto.data.pairing.ActivityLonglinePairingResultItem; -import fr.ird.observe.dto.data.pairing.TripLonglinePairingResult; +import fr.ird.observe.services.service.data.longline.pairing.ActivityLonglinePairingResult; +import fr.ird.observe.services.service.data.longline.pairing.ActivityLonglinePairingResultItem; +import fr.ird.observe.services.service.data.longline.pairing.TripLonglinePairingResult; import fr.ird.observe.services.ObserveServicesProvider; import java.util.ArrayList; +import java.util.Collection; import java.util.Date; import java.util.List; import java.util.Set; @@ -53,11 +54,13 @@ public class ActivityLonglinePairingEngine { this.config = config; } - public TripLonglinePairingContext newTripContext(String tripLonglineId) { - Set<ActivityLonglineObsReference> activityLonglineObsReferenceSet = servicesProvider.getActivityLonglineObsService().getActivityLonglineByTripLongline(tripLonglineId).toSet(); - return new TripLonglinePairingContext(config, tripLonglineId, ImmutableList.copyOf(activityLonglineObsReferenceSet)); + public ActivityLonglinePairingConfig getConfig() { + return config; } + public TripLonglinePairingContext newTripContext(String tripLonglineId, Collection<ActivityLonglineObsReference> allActivityLonglineObs) { + return new TripLonglinePairingContext(config, tripLonglineId, ImmutableList.copyOf(allActivityLonglineObs)); + } public TripLonglinePairingResult computeForTrip(TripLonglinePairingContext context) { ImmutableMap.Builder<ActivityLonglineLogbookReference, ActivityLonglinePairingResult> resultBuilder = ImmutableMap.builder(); @@ -70,7 +73,7 @@ public class ActivityLonglinePairingEngine { } public ActivityLonglinePairingResult computeForActivityLogbook(TripLonglinePairingContext context, ActivityLonglineAware activityLonglineLogbook) { - ImmutableList<ActivityLonglineObsReference> activityLonglineObsList = context.getActivityLonglineObsList(); + ImmutableList<ActivityLonglineObsReference> activityLonglineObsList = context.getActivityLonglineObsList(activityLonglineLogbook.getVesselActivityLonglineId()); List<ActivityLonglinePairingResultItem> itemBuilder = new ArrayList<>(activityLonglineObsList.size()); long longlineActivityPairingMaxTime = context.getConfig().getLonglineActivityPairingMaxTime(); long longlineActivityPairingMaxDistance = context.getConfig().getLonglineActivityPairingMaxDistance(); @@ -84,7 +87,7 @@ public class ActivityLonglinePairingEngine { private ActivityLonglinePairingResultItem toActivityResultItem(ActivityLonglineAware activityLonglineLogbook, ActivityLonglineObsReference activityLonglineObsReference, double maxTime, double maxDistance) { Date logbookTimeStamp = activityLonglineLogbook.getTimeStamp(); Date obsTimeStamp = activityLonglineObsReference.getTimeStamp(); - double computedTime = Math.abs(TimeUnit.MINUTES.convert(logbookTimeStamp.getTime() - obsTimeStamp.getTime(), TimeUnit.MILLISECONDS)); + long computedTime = Math.abs(TimeUnit.MINUTES.convert(logbookTimeStamp.getTime() - obsTimeStamp.getTime(), TimeUnit.MILLISECONDS)); double computedDistance = activityLonglineLogbook.getGPSPoint().getDistanceInKm(activityLonglineObsReference.getGPSPoint()); return new ActivityLonglinePairingResultItem(activityLonglineObsReference, computedTime, computedDistance, computedTime < maxTime, computedDistance < maxDistance); } ===================================== services/src/main/java/fr/ird/observe/services/service/actions/pairing/TripLonglinePairingContext.java ===================================== @@ -26,6 +26,8 @@ import com.google.common.collect.ImmutableList; import fr.ird.observe.dto.ObserveDto; import fr.ird.observe.dto.data.longline.ActivityLonglineObsReference; +import java.util.stream.Collectors; + /** * Created by tchemit on 15/10/2018. * @@ -35,28 +37,24 @@ public class TripLonglinePairingContext implements ObserveDto { private final ActivityLonglinePairingConfig config; private final String tripLonglineId; - private final ImmutableList<ActivityLonglineObsReference> activityLonglineObsList; + private final ImmutableList<ActivityLonglineObsReference> allActivityLonglineObs; - public TripLonglinePairingContext(ActivityLonglinePairingConfig config, String tripLonglineId, ImmutableList<ActivityLonglineObsReference> activityLonglineObsList) { + public TripLonglinePairingContext(ActivityLonglinePairingConfig config, String tripLonglineId, ImmutableList<ActivityLonglineObsReference> allActivityLonglineObs) { this.config = config; this.tripLonglineId = tripLonglineId; - this.activityLonglineObsList = activityLonglineObsList; + this.allActivityLonglineObs = allActivityLonglineObs; } public ActivityLonglinePairingConfig getConfig() { return config; } - - public ImmutableList<ActivityLonglineObsReference> getActivityLonglineObsList() { - return activityLonglineObsList; + public ImmutableList<ActivityLonglineObsReference> getActivityLonglineObsList(String vesselActivityLonglineId) { + return ImmutableList.copyOf(allActivityLonglineObs.stream().filter(e -> vesselActivityLonglineId.equals(e.getVesselActivityLonglineId())).collect(Collectors.toList())); } public String getTripLonglineId() { return tripLonglineId; } - public boolean isEnabled() { - return !activityLonglineObsList.isEmpty(); - } } ===================================== dto/src/main/java/fr/ird/observe/dto/data/pairing/ActivityLonglinePairingResult.java → services/src/main/java/fr/ird/observe/services/service/data/longline/pairing/ActivityLonglinePairingResult.java ===================================== @@ -1,8 +1,8 @@ -package fr.ird.observe.dto.data.pairing; +package fr.ird.observe.services.service.data.longline.pairing; /*- * #%L - * ObServe :: Dto + * ObServe :: Services API * %% * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io * %% @@ -10,19 +10,18 @@ package fr.ird.observe.dto.data.pairing; * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ - import com.google.common.collect.ImmutableList; import fr.ird.observe.dto.ObserveDto; ===================================== dto/src/main/java/fr/ird/observe/dto/data/pairing/ActivityLonglinePairingResultItem.java → services/src/main/java/fr/ird/observe/services/service/data/longline/pairing/ActivityLonglinePairingResultItem.java ===================================== @@ -1,8 +1,8 @@ -package fr.ird.observe.dto.data.pairing; +package fr.ird.observe.services.service.data.longline.pairing; /*- * #%L - * ObServe :: Dto + * ObServe :: Services API * %% * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io * %% @@ -10,21 +10,21 @@ package fr.ird.observe.dto.data.pairing; * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ - import fr.ird.observe.dto.ObserveDto; import fr.ird.observe.dto.data.longline.ActivityLonglineObsReference; +import io.ultreia.java4all.lang.Numbers; import java.util.Objects; @@ -36,15 +36,15 @@ import java.util.Objects; public class ActivityLonglinePairingResultItem implements ObserveDto { private final ActivityLonglineObsReference observationActivity; - private final double computedTime; + private final long computedTime; private final double computedDistance; private final boolean timeValid; private final boolean distanceValid; - public ActivityLonglinePairingResultItem(ActivityLonglineObsReference observationActivity, double computedTime, double computedDistance, boolean timeValid, boolean distanceValid) { + public ActivityLonglinePairingResultItem(ActivityLonglineObsReference observationActivity, long computedTime, double computedDistance, boolean timeValid, boolean distanceValid) { this.observationActivity = observationActivity; this.computedTime = computedTime; - this.computedDistance = computedDistance; + this.computedDistance = Numbers.roundOneDigit((float) computedDistance); this.timeValid = timeValid; this.distanceValid = distanceValid; } @@ -53,7 +53,7 @@ public class ActivityLonglinePairingResultItem implements ObserveDto { return observationActivity; } - public double getComputedTime() { + public long getComputedTime() { return computedTime; } ===================================== services/src/main/java/fr/ird/observe/services/service/data/longline/pairing/ActivityLonglinePairingResultItemDecorator.java ===================================== @@ -0,0 +1,65 @@ +package fr.ird.observe.services.service.data.longline.pairing; + +/*- + * #%L + * ObServe :: Services API + * %% + * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import fr.ird.observe.dto.data.longline.ActivityLonglineObsReference; +import fr.ird.observe.dto.decoration.DecoratorService; +import fr.ird.observe.dto.decoration.decorators.DataReferenceDecorator; +import fr.ird.observe.dto.decoration.decorators.ObserveDecorator; +import org.apache.commons.jxpath.JXPathContext; + +import java.util.Locale; + +import static org.nuiton.i18n.I18n.l; + +/** + * Created by tchemit on 16/10/2018. + * + * @author Tony Chemit - dev(a)tchemit.fr + */ +public class ActivityLonglinePairingResultItemDecorator extends ObserveDecorator<ActivityLonglinePairingResultItem> { + + private final Locale locale; + private final DataReferenceDecorator<ActivityLonglineObsReference> activityDecorator; + + public ActivityLonglinePairingResultItemDecorator(DecoratorService decoratorService, Locale locale) { + super(ActivityLonglinePairingResultItem.class, "${observationActivity}$s##${computedTime}$s##${computedDistance}$s"); + this.locale = locale; + activityDecorator = decoratorService.getDataReferenceDecorator(ActivityLonglineObsReference.class); + } + + @SuppressWarnings("unchecked") + @Override + protected Comparable<Comparable<?>> getTokenValue(JXPathContext jxcontext, String token) { + Object value0 = jxcontext.getValue(token); + switch (token) { + case "computedTime": + return (Comparable) l(locale, "observe.common.pairingTime", value0); + case "computedDistance": + return (Comparable) l(locale, "observe.common.pairingDistance", value0); + case "observationActivity": + return (Comparable) activityDecorator.toString(value0); + } + return super.getTokenValue(jxcontext, token); + } +} ===================================== dto/src/main/java/fr/ird/observe/dto/data/pairing/TripLonglinePairingResult.java → services/src/main/java/fr/ird/observe/services/service/data/longline/pairing/TripLonglinePairingResult.java ===================================== @@ -1,8 +1,8 @@ -package fr.ird.observe.dto.data.pairing; +package fr.ird.observe.services.service.data.longline.pairing; /*- * #%L - * ObServe :: Dto + * ObServe :: Services API * %% * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io * %% @@ -10,19 +10,18 @@ package fr.ird.observe.dto.data.pairing; * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ - import com.google.common.collect.ImmutableMap; import fr.ird.observe.dto.ObserveDto; import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookReference; View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/f2f85a78cf07144c43ab2c3af1d… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/f2f85a78cf07144c43ab2c3af1d… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 2 commits: Correction sur l'API d'ouverture et fermeture (l'id est supprimé trop tôt...…
by Tony CHEMIT Oct. 16, 2018

Oct. 16, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: c2abb164 by Tony CHEMIT at 2018-10-16T14:37:04Z Correction sur l&#39;API d&#39;ouverture et fermeture (l&#39;id est supprimé trop tôt... plus bien repaindre l&#39;abre de navigation) - - - - - d0ac7447 by Tony CHEMIT at 2018-10-16T14:37:33Z Calcul de l&#39;activité d&#39;observation sur l&#39;écran de l&#39;activité logbook - Closes #1150 - - - - - 19 changed files: - client/src/main/java/fr/ird/observe/client/navigation/RouteCloseCallback.java - client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/data/open/CloseOpenDataUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/data/open/CreateOpenDataUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/data/open/MoveSingleDataUIActionSupport.java - + client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/ChooseRelatedObservedActivityUIAction.java - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIModel.java - client/src/main/resources/i18n/client_en_GB.properties - client/src/main/resources/i18n/client_es_ES.properties - client/src/main/resources/i18n/client_fr_FR.properties - dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineAware.java - dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineLogbookDto.java - dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineObsDto.java - dto/src/main/java/fr/ird/observe/navigation/model/edit/ObserveEditModelManager.java - services/src/main/java/fr/ird/observe/services/service/actions/pairing/ActivityLonglinePairingEngine.java - services/src/main/java/fr/ird/observe/services/service/actions/pairing/TripLonglinePairingContext.java Changes: ===================================== client/src/main/java/fr/ird/observe/client/navigation/RouteCloseCallback.java ===================================== @@ -43,6 +43,7 @@ import org.nuiton.util.DateUtil; import javax.swing.JOptionPane; import javax.swing.tree.MutableTreeNode; +import java.util.Objects; import static fr.ird.observe.client.ui.content.api.ContentUIHandler.getNavigationTree; import static org.nuiton.i18n.I18n.t; @@ -75,7 +76,7 @@ public class RouteCloseCallback implements ObserveEditNodeCloseCallback { return; } - boolean activityFinDeVeilleFound = mainDataSource.getRouteService().isActivityFinDeVeilleFound(node.getId()); + boolean activityFinDeVeilleFound = mainDataSource.getRouteService().isActivityFinDeVeilleFound(Objects.requireNonNull(node.getId())); // on doit vérifier qu'il existe une activité de fin de veille (type activity vessel == 16) ===================================== client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java ===================================== @@ -75,6 +75,7 @@ public abstract class ObserveKeyStrokes { public static final KeyStroke KEY_STROKE_CONFIGURE_SYNCHRO_FROM_BOTH = KeyStroke.getKeyStroke("ctrl pressed C"); public static final KeyStroke KEY_STROKE_COPY_VALUES_AND_SAVE = KeyStroke.getKeyStroke("ctrl pressed T"); + public static final KeyStroke KEY_STROKE_CHOOSE_RELATED_OBSERVATION_ACTIVITY = KeyStroke.getKeyStroke("ctrl pressed T"); public static final KeyStroke KEY_STROKE_SELECT_TRANSSHIPMENT = KeyStroke.getKeyStroke("ctrl pressed T"); public static final KeyStroke KEY_STROKE_SAVE_TABLE_ENTRY = KeyStroke.getKeyStroke("ctrl pressed S"); public static final KeyStroke KEY_STROKE_PRESSED_ENTER = KeyStroke.getKeyStroke("pressed ENTER"); ===================================== client/src/main/java/fr/ird/observe/client/ui/actions/content/api/data/open/CloseOpenDataUIAction.java ===================================== @@ -33,16 +33,18 @@ import fr.ird.observe.client.ui.content.api.data.open.ContentOpenableUIModel; import fr.ird.observe.client.ui.tree.navigation.NavigationTree; import fr.ird.observe.client.ui.util.UIHelper; import fr.ird.observe.dto.data.DataDto; -import fr.ird.observe.dto.data.longline.TripLonglineDto; -import fr.ird.observe.dto.data.seine.TripSeineDto; import fr.ird.observe.dto.reference.DataDtoReference; import fr.ird.observe.navigation.model.edit.CloseEditNodeRequest; import fr.ird.observe.navigation.model.edit.CloseEditNodeVetoException; import fr.ird.observe.navigation.model.edit.ObserveEditModelManager; import fr.ird.observe.navigation.model.edit.ObserveEditNode; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuiton.validator.NuitonValidatorScope; -import static fr.ird.observe.client.ui.content.api.ContentUIHandler.getNavigationTree; +import javax.swing.tree.MutableTreeNode; +import javax.swing.tree.TreeNode; + import static fr.ird.observe.client.ui.content.api.ContentUIHandler.removeAllMessages; import static fr.ird.observe.dto.decoration.ObserveI18nDecoratorHelper.getTypeI18nKey; import static org.nuiton.i18n.I18n.n; @@ -58,6 +60,7 @@ public class CloseOpenDataUIAction extends AbstractContentUIAction { public static final String ACTION_NAME = CloseOpenDataUIAction.class.getName(); private static final long serialVersionUID = 1L; + private static final Logger log = LogManager.getLogger(CloseOpenDataUIAction.class); public CloseOpenDataUIAction(ObserveMainUI mainUI) { super(mainUI, ACTION_NAME, @@ -75,7 +78,12 @@ public class CloseOpenDataUIAction extends AbstractContentUIAction { ObserveEditModelManager navigationEditManager = applicationContext.getNavigationEditManager(); CloseEditNodeRequest closeRequest = navigationEditManager.createCloseEditNodeRequest(nodeToClose); navigationEditManager.applyCloseEditNodeRequest(closeRequest); - ObserveSwingApplicationContext.get().saveNavigationToConfig(false); + applicationContext.saveNavigationToConfig(false); + NavigationTree tree = applicationContext.getMainUI().getNavigationUI().getTree(); + TreeNode[] path = tree.getSelectedNode().getPath(); + MutableTreeNode nodeToReload = (MutableTreeNode) path[path.length - 1]; + log.info("Will reload node and all his children: " + nodeToReload); + tree.reloadNode(nodeToReload, true); } @SuppressWarnings("unchecked") @@ -110,8 +118,8 @@ public class CloseOpenDataUIAction extends AbstractContentUIAction { removeAllMessages(ui); ContentUIHandler.addMessage(ui, NuitonValidatorScope.INFO, getTypeI18nKey(bean.getClass()), t(model.getCloseMessage())); - NavigationTree treeHelper = getNavigationTree(); - treeHelper.reloadSelectedNode(bean instanceof TripSeineDto || bean instanceof TripLonglineDto, true); +// NavigationTree treeHelper = getNavigationTree(); +// treeHelper.reloadSelectedNode(bean instanceof TripSeineDto || bean instanceof TripLonglineDto, true); ui.getHandler().updateActions(); ui.getHandler().grabFocusOnForm(); ===================================== client/src/main/java/fr/ird/observe/client/ui/actions/content/api/data/open/CreateOpenDataUIAction.java ===================================== @@ -49,17 +49,14 @@ public class CreateOpenDataUIAction extends AbstractContentUIAction { public static void closeAndCreate(MultipleReferenceContainerNode<?, ?> parentNode, NavigationTree tree, ContentEditUIModel<?, ?> model) { try { CloseOpenDataUIAction.closeData(model.getEditNode()); + tree.addUnsavedNode(parentNode); } catch (CloseEditNodeVetoException e1) { UIHelper.handlingError(e1); - return; } - - tree.addUnsavedNode(parentNode); } @Override protected void actionPerformed(ContentUI contentUI) { - MultipleReferenceContainerNode<?, ?> parentNode; NavigationTree tree = getMainUI().getNavigationUI().getTree(); ContentEditUIModel<?, ?> model; ===================================== client/src/main/java/fr/ird/observe/client/ui/actions/content/api/data/open/MoveSingleDataUIActionSupport.java ===================================== @@ -137,10 +137,6 @@ public abstract class MoveSingleDataUIActionSupport<ChildDto extends IdDto, Chil protected void closeNode(ObserveEditNode<?> editNode) throws CloseEditNodeVetoException { CloseOpenDataUIAction.closeData(editNode); -// String id = editNode.getId(); -// if (dataId.equals(id)) { -// editNode.setId(null); -// } } protected void adaptNavigationTree(NavigationTree tree, R request, DtoReference newParentReference) { ===================================== client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/ChooseRelatedObservedActivityUIAction.java ===================================== @@ -0,0 +1,140 @@ +package fr.ird.observe.client.ui.actions.content.data.longline; + +/*- + * #%L + * ObServe :: Client + * %% + * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import fr.ird.observe.client.ObserveSwingApplicationContext; +import fr.ird.observe.client.ui.ObserveKeyStrokes; +import fr.ird.observe.client.ui.ObserveMainUI; +import fr.ird.observe.client.ui.actions.content.api.AbstractContentUIAction; +import fr.ird.observe.client.ui.content.api.ContentUI; +import fr.ird.observe.client.ui.content.data.longline.logbook.ActivityLonglineLogbookUI; +import fr.ird.observe.client.ui.content.data.longline.logbook.ActivityLonglineLogbookUIModel; +import fr.ird.observe.client.ui.content.ref.usage.UsageUIHandlerSupport; +import fr.ird.observe.client.ui.util.UIHelper; +import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookDto; +import fr.ird.observe.dto.data.longline.ActivityLonglineObsDto; +import fr.ird.observe.dto.data.longline.ActivityLonglineObsReference; +import fr.ird.observe.dto.data.pairing.ActivityLonglinePairingResult; +import fr.ird.observe.dto.data.pairing.ActivityLonglinePairingResultItem; +import fr.ird.observe.dto.decoration.ObserveI18nLabelsBuilder; +import fr.ird.observe.services.service.actions.pairing.ActivityLonglinePairingConfig; +import fr.ird.observe.services.service.actions.pairing.ActivityLonglinePairingEngine; +import fr.ird.observe.services.service.actions.pairing.TripLonglinePairingContext; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.nuiton.decorator.JXPathDecorator; +import org.nuiton.jaxx.widgets.select.BeanFilterableComboBox; + +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +import static org.nuiton.i18n.I18n.n; +import static org.nuiton.i18n.I18n.t; + +/** + * Created by tchemit on 16/10/2018. + * + * @author Tony Chemit - dev(a)tchemit.fr + */ +public class ChooseRelatedObservedActivityUIAction extends AbstractContentUIAction { + + public static final String ACTION_NAME = ChooseRelatedObservedActivityUIAction.class.getName(); + private static final Logger log = LogManager.getLogger(ChooseRelatedObservedActivityUIAction.class); + + public ChooseRelatedObservedActivityUIAction(ObserveMainUI mainUI) { + super(mainUI, ACTION_NAME, n("observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity"), n("observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity"), "data-calcule", ObserveKeyStrokes.KEY_STROKE_CHOOSE_RELATED_OBSERVATION_ACTIVITY); + } + + @Override + protected void actionPerformed(ContentUI contentUI) { + + ActivityLonglineLogbookUI ui = (ActivityLonglineLogbookUI) contentUI; + ActivityLonglineLogbookUIModel model = ui.getModel(); + + ActivityLonglinePairingEngine pairingEngine = new ActivityLonglinePairingEngine(getServicesProvider(), ui.getConfig()); + + ActivityLonglineLogbookDto bean = model.getBean(); + + TripLonglinePairingContext pairingContext = pairingEngine.newTripContext(model.getSelectedParentId(), model.getAllActivityObs()); + + ActivityLonglinePairingResult activityLonglinePairingResult = pairingEngine.computeForActivityLogbook(pairingContext, bean); + + Optional<ActivityLonglineObsReference> optionalActivityLonglineObs = askNewParent(activityLonglinePairingResult.getItems(), pairingEngine.getConfig()); + + if (optionalActivityLonglineObs.isPresent()) { + ActivityLonglineObsReference activityLonglineObs = optionalActivityLonglineObs.get(); + log.info("will use new related activity obs: " + activityLonglineObs); + bean.setRelatedObservedActivity(activityLonglineObs); + } + + } + + private Optional<ActivityLonglineObsReference> askNewParent(List<ActivityLonglinePairingResultItem> pairingResult, ActivityLonglinePairingConfig pairingConfig) { + + BeanFilterableComboBox<ActivityLonglinePairingResultItem> editor = new BeanFilterableComboBox<>(); + editor.setI18nPrefix("observe.common."); + editor.setBeanType(ActivityLonglinePairingResultItem.class); + editor.setI18nLabelBuilder(ObserveI18nLabelsBuilder.createFromReferenceType(ActivityLonglineObsDto.class)); + + editor.init((JXPathDecorator<ActivityLonglinePairingResultItem>) ObserveSwingApplicationContext.get().getDecoratorService().getDecoratorByType(ActivityLonglinePairingResultItem.class), pairingResult); + +// JComboBox combobox = editor.getCombobox(); +// @SuppressWarnings("unchecked") ListCellRenderer toolTipRenderer = new ComboBoxListCellRenderer(combobox.getRenderer()); +// combobox.setRenderer(toolTipRenderer); + + String continueActionText = t("observe.choice.continue"); + Object[] options = {continueActionText, t("observe.choice.cancel")}; + JPanel panel = new JPanel(new BorderLayout()); + panel.add(BorderLayout.NORTH, new JLabel(t("observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.message", + pairingConfig.getLonglineActivityPairingMaxTime(), pairingConfig.getLonglineActivityPairingMaxDistance()))); + panel.add(BorderLayout.CENTER, editor); + + JOptionPane pane = new JOptionPane(panel, JOptionPane.QUESTION_MESSAGE, JOptionPane.DEFAULT_OPTION, null, options, options[0]); + + JButton jButton = UsageUIHandlerSupport.findButton(pane, continueActionText); + Objects.requireNonNull(jButton); + jButton.setEnabled(false); + editor.addPropertyChangeListener("selectedItem", evt -> jButton.setEnabled(evt.getNewValue() != null)); + + int response = UIHelper.askUser(ObserveSwingApplicationContext.get().getMainUI(), pane, t("observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.title"), options); + + ActivityLonglinePairingResultItem newActivityLonglineObs = null; + switch (response) { + case 0: + newActivityLonglineObs = editor.getComboBoxModel().getSelectedItem(); + log.info(String.format("Selected new related observed activity id: %s", newActivityLonglineObs)); + break; + default: + log.info("Use cancel choice of related observed activity"); + } + return Optional.ofNullable(newActivityLonglineObs).map(ActivityLonglinePairingResultItem::getObservationActivity); + } + +} + ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUI.jaxx ===================================== @@ -41,6 +41,7 @@ fr.ird.observe.client.ui.actions.content.data.longline.delete.DeleteActivityLonglineLogbookUIAction fr.ird.observe.client.ui.actions.content.data.longline.move.MoveSingleActivityLonglineLogbookUIAction fr.ird.observe.client.ui.actions.content.data.longline.save.SaveActivityLonglineLogbookUIAction + fr.ird.observe.client.ui.actions.content.data.longline.ChooseRelatedObservedActivityUIAction fr.ird.observe.dto.data.pairing.ActivityLonglinePairingResultItem @@ -190,7 +191,10 @@ <JLabel id='relatedObservedActivityLabel'/> </cell> <cell anchor='east' fill="both"> - <BeanFilterableComboBox id='relatedObservedActivity' genericType='ActivityLonglinePairingResultItem' constructorParams='this'/> + <JPanel layout="{new BorderLayout()}"> + <BeanFilterableComboBox id='relatedObservedActivity' genericType='ActivityLonglineObsReference' constructorParams='this' constraints='BorderLayout.CENTER'/> + <JButton id='chooseRelatedObservedActivity' constraints='BorderLayout.EAST'/> + </JPanel> </cell> </row> ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUI.jcss ===================================== @@ -84,10 +84,8 @@ #relatedObservedActivity { _listNoLoad:true; - bean:{model}; - property:activityObs; - data:{model.getActivityObsCandidates()}; - selectedItem:{model.getActivityObs()}; + data:{model.getActivityObs()}; + selectedItem:{bean.getRelatedObservedActivity()}; } #reopen { @@ -119,3 +117,9 @@ enabled:{!model.isModified() && model.isValid() && model.isSetOperation() && ! bean.isHasSetLongline()}; _observeAction:{AddActivityLonglineLogbookSetUIAction.ACTION_NAME}; } + +#chooseRelatedObservedActivity { + visible:{!model.isReadingMode()}; + enabled:{model.isValid()}; + _observeAction:{ChooseRelatedObservedActivityUIAction.ACTION_NAME}; +} \ No newline at end of file ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIHandler.java ===================================== @@ -22,44 +22,19 @@ package fr.ird.observe.client.ui.content.data.longline.logbook; * #L% */ -import com.google.common.collect.ImmutableSet; import fr.ird.observe.client.ui.content.api.data.open.ContentOpenableUIHandler; -import fr.ird.observe.client.ui.content.api.data.open.ContentOpenableUIInitializer; import fr.ird.observe.client.ui.content.api.ui.ObserveLayoutFocusTraversalPolicy; import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookDto; import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookReference; -import fr.ird.observe.dto.data.longline.ActivityLonglineObsDto; import fr.ird.observe.dto.data.longline.ActivityLonglineObsReference; -import fr.ird.observe.dto.data.pairing.ActivityLonglinePairingResult; -import fr.ird.observe.dto.data.pairing.ActivityLonglinePairingResultItem; -import fr.ird.observe.dto.decoration.ObserveI18nDecoratorHelper; -import fr.ird.observe.dto.decoration.ObserveI18nLabelsBuilder; import fr.ird.observe.dto.form.Form; -import fr.ird.observe.services.service.actions.pairing.ActivityLonglinePairingEngine; -import fr.ird.observe.services.service.actions.pairing.TripLonglinePairingContext; -import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.nuiton.decorator.Decorator; -import org.nuiton.decorator.JXPathDecorator; import org.nuiton.jaxx.runtime.spi.UIHandler; -import org.nuiton.jaxx.widgets.select.BeanFilterableComboBox; -import javax.swing.JComboBox; -import javax.swing.JComponent; -import javax.swing.JLabel; -import javax.swing.JList; -import javax.swing.KeyStroke; -import javax.swing.ListCellRenderer; import java.awt.Component; import java.awt.Container; -import java.awt.Dimension; -import java.awt.event.KeyEvent; -import java.beans.PropertyChangeListener; -import java.util.Collections; -import java.util.Optional; - -import static org.nuiton.i18n.I18n.t; +import java.util.List; /** * Created on 8/29/14. @@ -69,65 +44,13 @@ import static org.nuiton.i18n.I18n.t; */ class ActivityLonglineLogbookUIHandler extends ContentOpenableUIHandler<ActivityLonglineLogbookDto, ActivityLonglineLogbookReference, ActivityLonglineLogbookUI> implements UIHandler<ActivityLonglineLogbookUI> { - private static final ImmutableSet<String> PAIRING_PROPERTIES = ImmutableSet.of( - ActivityLonglineLogbookDto.PROPERTY_LATITUDE, - ActivityLonglineLogbookDto.PROPERTY_LONGITUDE, - ActivityLonglineLogbookDto.PROPERTY_TIME_STAMP, - ActivityLonglineLogbookUIModel.PROPERTY_VALID); - private static final Logger log = LogManager.getLogger(ActivityLonglineLogbookUIHandler.class); - private final PropertyChangeListener onRecomputePairing; - private final PropertyChangeListener onActivityObsChanged; - private ActivityLonglinePairingEngine pairingEngine; - private boolean adjusting; - - ActivityLonglineLogbookUIHandler() { - onRecomputePairing = e -> onRecomputePairing(e.getPropertyName()); - onActivityObsChanged = e -> onActivityObsChanged(); - } @Override public ActivityLonglineLogbookUIModel getModel() { return ui.getModel(); } - @Override - protected ContentOpenableUIInitializer<ActivityLonglineLogbookUI> createContentUIInitializer(ActivityLonglineLogbookUI ui) { - return new ContentOpenableUIInitializer<ActivityLonglineLogbookUI>(ui) { - - @SuppressWarnings("unchecked") - protected void init(BeanFilterableComboBox comboBox) { - if (!"relatedObservedActivity".equals(comboBox.getName())) { - super.init(comboBox); - return; - } - - comboBox.getCombobox().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0), "none"); - Class referenceType = comboBox.getBeanType(); - comboBox.setI18nLabelBuilder(ObserveI18nLabelsBuilder.createFromReferenceType(ActivityLonglineObsDto.class)); - comboBox.setI18nPrefix("observe.common."); - comboBox.setMinimumSize(new Dimension(0, 24)); - - if (StringUtils.isEmpty(comboBox.getProperty())) { - comboBox.setProperty(comboBox.getName()); - } - - log.info("Init relatedObservedActivity comboBox"); - Decorator decorator = decoratorService.getDecoratorByType(referenceType); - - String entityLabel = t(ObserveI18nDecoratorHelper.getTypeI18nKey(ActivityLonglineObsDto.class)); - comboBox.setPopupTitleText(t("observe.common.DataDto.type", entityLabel)); - - comboBox.init((JXPathDecorator) decorator, Collections.emptyList()); - - JComboBox combobox = comboBox.getCombobox(); - - @SuppressWarnings("unchecked") ListCellRenderer toolTipRenderer = new ComboBoxListCellRenderer(combobox.getRenderer()); - combobox.setRenderer(toolTipRenderer); - } - }; - } - @Override protected ObserveLayoutFocusTraversalPolicy<ActivityLonglineLogbookUI> createFocusTraversalPolicy() { return new ObserveLayoutFocusTraversalPolicy<ActivityLonglineLogbookUI>() { @@ -148,101 +71,6 @@ class ActivityLonglineLogbookUIHandler extends ContentOpenableUIHandler<Activity }; } - @Override - public void afterInit(ActivityLonglineLogbookUI ui) { - super.afterInit(ui); - pairingEngine = getDataSource().newActivityLonglinePairingEngine(ui.getConfig()); - } - - private void onRecomputePairing(String propertyName) { - if (adjusting || !PAIRING_PROPERTIES.contains(propertyName)) { - return; - } - log.info(prefix + "Need to recompute pairing data."); - ActivityLonglineLogbookUIModel model = getModel(); - if (!model.isValid()) { - log.info(prefix + "Reject: model is not valid."); - return; - } - adjusting = true; - try { - ActivityLonglineLogbookDto bean = model.getBean(); - ActivityLonglinePairingResult activityLonglinePairingResult = pairingEngine.computeForActivityLogbook(model.getPairingContext(), bean); - ActivityLonglinePairingResultItem pairingActivityObs = model.getActivityObs(); - ActivityLonglineObsReference relatedObservedActivity = model.getBean().getRelatedObservedActivity(); - - model.setActivityObsCandidates(activityLonglinePairingResult.getItems()); - - if (pairingActivityObs == null) { - - if (relatedObservedActivity != null) { - // use dto value - Optional<ActivityLonglinePairingResultItem> first = model.getActivityObsCandidates().stream().filter(e -> e.getObservationActivity().equals(relatedObservedActivity)).findFirst(); - if (!first.isPresent()) { - // Should never occurs ? - bean.setRelatedObservedActivity(null); - } else { - pairingActivityObs = first.get(); - model.setActivityObs(pairingActivityObs); - bean.setRelatedObservedActivity(pairingActivityObs.getObservationActivity()); - } - } - } else { - if (!model.getActivityObsCandidates().contains(pairingActivityObs)) { - // can not keep this pairing, - model.setActivityObs(null); - bean.setRelatedObservedActivity(null); - } else { - // keep this pairing - // use pairing value - bean.setRelatedObservedActivity(pairingActivityObs.getObservationActivity()); - } - } - } finally { - adjusting = false; - } - } - - private void onActivityObsChanged() { - if (adjusting) { - return; - } - adjusting = true; - try { - ActivityLonglineLogbookUIModel model = getModel(); - ActivityLonglinePairingResultItem activityObs = model.getActivityObs(); - model.getBean().setRelatedObservedActivity(activityObs == null ? null : activityObs.getObservationActivity()); - } finally { - adjusting = false; - } - } - - @Override - protected void onOpenBeforeOpenModel() { - ActivityLonglineLogbookUIModel model = getModel(); - ActivityLonglineLogbookDto bean = model.getBean(); - model.removePropertyChangeListener(ActivityLonglineLogbookUIModel.PROPERTY_VALID, onRecomputePairing); - bean.removePropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_LATITUDE, onRecomputePairing); - bean.removePropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_LONGITUDE, onRecomputePairing); - bean.removePropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_TIME_STAMP, onRecomputePairing); - bean.removePropertyChangeListener("activityObs", onActivityObsChanged); - - super.onOpenBeforeOpenModel(); - } - - @Override - protected void onOpenAfterOpenModel() { - super.onOpenAfterOpenModel(); - ActivityLonglineLogbookUIModel model = getModel(); - ActivityLonglineLogbookDto bean = model.getBean(); - model.addPropertyChangeListener(ActivityLonglineLogbookUIModel.PROPERTY_VALID, onRecomputePairing); - bean.addPropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_LATITUDE, onRecomputePairing); - bean.addPropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_LONGITUDE, onRecomputePairing); - bean.addPropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_TIME_STAMP, onRecomputePairing); - bean.addPropertyChangeListener("activityObs", onActivityObsChanged); - onRecomputePairing(ActivityLonglineLogbookUIModel.PROPERTY_VALID); - } - @Override protected void onOpenModel() { super.onOpenModel(); @@ -260,37 +88,8 @@ class ActivityLonglineLogbookUIHandler extends ContentOpenableUIHandler<Activity form = getActivityLonglineLogbookService().loadForm(activityId); } - TripLonglinePairingContext pairingContext = pairingEngine.newTripContext(tripId); - model.openForm(form, pairingContext); + List<ActivityLonglineObsReference> allActivityLonglineObs = getActivityLonglineObsService().getActivityLonglineByTripLongline(tripId).toList(); + model.openForm(form, allActivityLonglineObs); } - - private static class ComboBoxListCellRenderer<E extends ActivityLonglinePairingResultItem> implements ListCellRenderer<E> { - - private final ListCellRenderer<? super E> renderer; - - ComboBoxListCellRenderer(ListCellRenderer<? super E> renderer) { - this.renderer = renderer; - } - - @Override - public Component getListCellRendererComponent(JList<? extends E> list, - E value, - int index, - boolean isSelected, - boolean cellHasFocus) { - Component comp = renderer.getListCellRendererComponent( - list, - value, - index, - isSelected, - cellHasFocus - ); - if (comp instanceof JLabel) { - JLabel jcomp = (JLabel) comp; - jcomp.setToolTipText(jcomp.getText()); - } - return comp; - } - } } ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIModel.java ===================================== @@ -22,20 +22,23 @@ package fr.ird.observe.client.ui.content.data.longline.logbook; * #L% */ +import com.google.common.collect.ImmutableList; import fr.ird.observe.client.ui.content.api.data.open.ContentOpenableUIModel; import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookDto; import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookReference; -import fr.ird.observe.dto.data.pairing.ActivityLonglinePairingResultItem; +import fr.ird.observe.dto.data.longline.ActivityLonglineObsReference; import fr.ird.observe.dto.form.Form; import fr.ird.observe.dto.referential.longline.VesselActivityLonglineHelper; import fr.ird.observe.dto.referential.longline.VesselActivityLonglineReference; -import fr.ird.observe.services.service.actions.pairing.TripLonglinePairingContext; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuiton.i18n.I18n; import org.nuiton.util.DateUtil; -import java.util.ArrayList; +import java.util.Collections; import java.util.Date; import java.util.List; +import java.util.stream.Collectors; /** * Created on 9/26/14. @@ -45,22 +48,26 @@ import java.util.List; */ public class ActivityLonglineLogbookUIModel extends ContentOpenableUIModel<ActivityLonglineLogbookDto, ActivityLonglineLogbookReference> { - public static final String PROPERTY_SET_OPERATION = "setOperation"; public static final String PROPERTY_DATE = "date"; public static final String PROPERTY_TIME = "time"; + private static final String PROPERTY_SET_OPERATION = "setOperation"; private static final long serialVersionUID = 1L; - - private TripLonglinePairingContext pairingContext; - private List<ActivityLonglinePairingResultItem> activityObsCandidates; - private ActivityLonglinePairingResultItem activityObs; + private static final Logger log = LogManager.getLogger(ActivityLonglineLogbookUIModel.class); + private List<ActivityLonglineObsReference> allActivityObs; + private List<ActivityLonglineObsReference> activityObs; + private boolean opening = false; public ActivityLonglineLogbookUIModel() { super(ActivityLonglineLogbookDto.class, I18n.n("observe.common.ActivityLonglineLogbookDto.message.not.open")); getBean().addPropertyChangeListener(ActivityLonglineLogbookDto.PROPERTY_VESSEL_ACTIVITY_LONGLINE, evt -> { boolean oldValue = VesselActivityLonglineHelper.isSetOperation((VesselActivityLonglineReference) evt.getOldValue()); - boolean newValue = VesselActivityLonglineHelper.isSetOperation((VesselActivityLonglineReference) evt.getNewValue()); + VesselActivityLonglineReference vesselActivityLonglineReference = (VesselActivityLonglineReference) evt.getNewValue(); + boolean newValue = VesselActivityLonglineHelper.isSetOperation(vesselActivityLonglineReference); firePropertyChange(PROPERTY_SET_OPERATION, oldValue, newValue); + if (!opening) { + updateActivityObs(); + } }); } @@ -94,31 +101,45 @@ public class ActivityLonglineLogbookUIModel extends ContentOpenableUIModel<Activ } } - public void openForm(Form<ActivityLonglineLogbookDto> form, TripLonglinePairingContext pairingContext) { - this.pairingContext = pairingContext; - super.openForm(form); - } - - public TripLonglinePairingContext getPairingContext() { - return pairingContext; + public void openForm(Form<ActivityLonglineLogbookDto> form, List<ActivityLonglineObsReference> allActivityObs) { + this.allActivityObs = ImmutableList.copyOf(allActivityObs); + opening = true; + try { + super.openForm(form); + } finally { + opening = false; + } + updateActivityObs(); } - public List<ActivityLonglinePairingResultItem> getActivityObsCandidates() { - return activityObsCandidates; + public List<ActivityLonglineObsReference> getActivityObs() { + return activityObs; } - public void setActivityObsCandidates(List<ActivityLonglinePairingResultItem> activityObsCandidates) { - this.activityObsCandidates = activityObsCandidates == null ? null : new ArrayList<>(activityObsCandidates); - firePropertyChange("activityObsCandidates", null, this.activityObsCandidates); + public void setActivityObs(List<ActivityLonglineObsReference> activityObs) { + // only used for jaxx binding } - public ActivityLonglinePairingResultItem getActivityObs() { - return activityObs; + public List<ActivityLonglineObsReference> getAllActivityObs() { + return allActivityObs; } - public void setActivityObs(ActivityLonglinePairingResultItem activityObs) { - ActivityLonglinePairingResultItem oldValue = getActivityObs(); - this.activityObs = activityObs; - firePropertyChange("activityObs", oldValue, activityObs); + private void updateActivityObs() { + log.info(getPrefix() + "Will update release observed actities..."); + ActivityLonglineLogbookDto bean = getBean(); + if (allActivityObs == null || bean.getVesselActivityLonglineId() == null) { + activityObs = Collections.emptyList(); + } else { + String vesselActivityLonglineId = bean.getVesselActivityLonglineId(); + activityObs = allActivityObs.stream().filter(e -> vesselActivityLonglineId.equals(e.getVesselActivityLonglineId())).collect(Collectors.toList()); + } + log.info(getPrefix() + "Found " + activityObs.size() + " related observed activities."); + ActivityLonglineObsReference relatedObservedActivity = bean.getRelatedObservedActivity(); + boolean removeRelatedObservedActivity = !opening && relatedObservedActivity != null && !activityObs.contains(relatedObservedActivity); + firePropertyChange("activityObs", null, activityObs); + if (removeRelatedObservedActivity) { + log.info(getPrefix() + "Removed not matching related observed activity: " + relatedObservedActivity); + bean.setRelatedObservedActivity(null); + } } } ===================================== client/src/main/resources/i18n/client_en_GB.properties ===================================== @@ -363,6 +363,9 @@ observe.common.ActivityLogbookDto.action.goToOpen.short=Logbook - Open activity observe.common.ActivityLogbookDto.action.goToOpen.tip=Go to open activity (Logbook) observe.common.ActivityLonglineLogbookDto.action.addSet=Add the fishing operation observe.common.ActivityLonglineLogbookDto.action.addSet.tip=Add the fishing operation associated with this activity +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity=Choose activity +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.message=Choose an activity beyoung the universe of possible ones (time minus than %s (minutes) and distance minus than %s (km))\: +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.title=Choose the related observed activity observe.common.ActivityLonglineLogbookDto.action.moves=Change trip observe.common.ActivityLonglineLogbookDto.action.moves.tip=Change trip of activities observe.common.ActivityLonglineLogbookDto.list.message.none=< No activity for current trip > ===================================== client/src/main/resources/i18n/client_es_ES.properties ===================================== @@ -363,6 +363,9 @@ observe.common.ActivityLogbookDto.action.goToOpen.short=Logbook - Open activity observe.common.ActivityLogbookDto.action.goToOpen.tip=Go to open activity (Logbook) \#TODO observe.common.ActivityLonglineLogbookDto.action.addSet=Añadir la operación de pesca observe.common.ActivityLonglineLogbookDto.action.addSet.tip=Añadir la operación de pesca asociada a esta actividad +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity=Choose activity \#TODO +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.message=Choose an activity beyoung the universe of possible ones (time minus than %s (minutes) and distance minus than %s (km))\: \#TODO +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.title=Choose the related observed activity \#TODO observe.common.ActivityLonglineLogbookDto.action.moves=Cambiar de marea observe.common.ActivityLonglineLogbookDto.action.moves.tip=Cambiar la marea de las actividades seleccionas observe.common.ActivityLonglineLogbookDto.list.message.none=< Ninguna actividad por la marea actual > ===================================== client/src/main/resources/i18n/client_fr_FR.properties ===================================== @@ -363,6 +363,9 @@ observe.common.ActivityLogbookDto.action.goToOpen.short=Livre de bord - Activit observe.common.ActivityLogbookDto.action.goToOpen.tip=Accéder à l'activité ouverte (Livre de bord) observe.common.ActivityLonglineLogbookDto.action.addSet=Ajouter l'opération de pêche observe.common.ActivityLonglineLogbookDto.action.addSet.tip=Ajouter l'opération de pêche associée à cette activité +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity=Choisir l'activité +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.message=Veuillez choisir une activité parmis celles possible (durée de moins de %s minutes et distance moins de %s kms) \: +observe.common.ActivityLonglineLogbookDto.action.chooseRelatedObservedActivity.title=Choisir l'activité d'observation associée observe.common.ActivityLonglineLogbookDto.action.moves=Changer de marée observe.common.ActivityLonglineLogbookDto.action.moves.tip=Changer la marée des activités sélectionnées observe.common.ActivityLonglineLogbookDto.list.message.none=< Aucune activité pour la marée courante > ===================================== dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineAware.java ===================================== @@ -51,4 +51,6 @@ public interface ActivityLonglineAware extends ObserveDto { Float getLatitude(); Float getLongitude(); + + String getVesselActivityLonglineId(); } ===================================== dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineLogbookDto.java ===================================== @@ -70,4 +70,8 @@ public class ActivityLonglineLogbookDto extends GeneratedActivityLonglineLogbook return ActivityLonglineAware.newGPSPoint(this); } + @Override + public String getVesselActivityLonglineId() { + return vesselActivityLongline == null ? null : vesselActivityLongline.getId(); + } } ===================================== dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineObsDto.java ===================================== @@ -69,4 +69,9 @@ public class ActivityLonglineObsDto extends GeneratedActivityLonglineObsDto impl public GPSPoint getGPSPoint() { return ActivityLonglineAware.newGPSPoint(this); } + + @Override + public String getVesselActivityLonglineId() { + return vesselActivityLongline == null ? null : vesselActivityLongline.getId(); + } } ===================================== dto/src/main/java/fr/ird/observe/navigation/model/edit/ObserveEditModelManager.java ===================================== @@ -179,11 +179,11 @@ public class ObserveEditModelManager { log.debug("Will close edit node from incoming: " + node); ObserveEditNode realEditNode = editModel.forNodeType(node.getClass()).orElseThrow(IllegalStateException::new); log.info("Close edit node: " + node); - realEditNode.setId(null); for (ObserveEditNodeCloseCallback c : closeCallbacks.get(node.getClass())) { log.info("Apply callback on closed edit node: " + realEditNode + " - " + c); c.onEditNodeClosed(node, adjusting); } + realEditNode.setId(null); } private void openNode(ObserveEditNode<?> node, boolean adjusting) { ===================================== services/src/main/java/fr/ird/observe/services/service/actions/pairing/ActivityLonglinePairingEngine.java ===================================== @@ -33,6 +33,7 @@ import fr.ird.observe.dto.data.pairing.TripLonglinePairingResult; import fr.ird.observe.services.ObserveServicesProvider; import java.util.ArrayList; +import java.util.Collection; import java.util.Date; import java.util.List; import java.util.Set; @@ -53,11 +54,13 @@ public class ActivityLonglinePairingEngine { this.config = config; } - public TripLonglinePairingContext newTripContext(String tripLonglineId) { - Set<ActivityLonglineObsReference> activityLonglineObsReferenceSet = servicesProvider.getActivityLonglineObsService().getActivityLonglineByTripLongline(tripLonglineId).toSet(); - return new TripLonglinePairingContext(config, tripLonglineId, ImmutableList.copyOf(activityLonglineObsReferenceSet)); + public ActivityLonglinePairingConfig getConfig() { + return config; } + public TripLonglinePairingContext newTripContext(String tripLonglineId, Collection<ActivityLonglineObsReference> allActivityLonglineObs) { + return new TripLonglinePairingContext(config, tripLonglineId, ImmutableList.copyOf(allActivityLonglineObs)); + } public TripLonglinePairingResult computeForTrip(TripLonglinePairingContext context) { ImmutableMap.Builder<ActivityLonglineLogbookReference, ActivityLonglinePairingResult> resultBuilder = ImmutableMap.builder(); @@ -70,7 +73,7 @@ public class ActivityLonglinePairingEngine { } public ActivityLonglinePairingResult computeForActivityLogbook(TripLonglinePairingContext context, ActivityLonglineAware activityLonglineLogbook) { - ImmutableList<ActivityLonglineObsReference> activityLonglineObsList = context.getActivityLonglineObsList(); + ImmutableList<ActivityLonglineObsReference> activityLonglineObsList = context.getActivityLonglineObsList(activityLonglineLogbook.getVesselActivityLonglineId()); List<ActivityLonglinePairingResultItem> itemBuilder = new ArrayList<>(activityLonglineObsList.size()); long longlineActivityPairingMaxTime = context.getConfig().getLonglineActivityPairingMaxTime(); long longlineActivityPairingMaxDistance = context.getConfig().getLonglineActivityPairingMaxDistance(); ===================================== services/src/main/java/fr/ird/observe/services/service/actions/pairing/TripLonglinePairingContext.java ===================================== @@ -26,6 +26,8 @@ import com.google.common.collect.ImmutableList; import fr.ird.observe.dto.ObserveDto; import fr.ird.observe.dto.data.longline.ActivityLonglineObsReference; +import java.util.stream.Collectors; + /** * Created by tchemit on 15/10/2018. * @@ -35,28 +37,24 @@ public class TripLonglinePairingContext implements ObserveDto { private final ActivityLonglinePairingConfig config; private final String tripLonglineId; - private final ImmutableList<ActivityLonglineObsReference> activityLonglineObsList; + private final ImmutableList<ActivityLonglineObsReference> allActivityLonglineObs; - public TripLonglinePairingContext(ActivityLonglinePairingConfig config, String tripLonglineId, ImmutableList<ActivityLonglineObsReference> activityLonglineObsList) { + public TripLonglinePairingContext(ActivityLonglinePairingConfig config, String tripLonglineId, ImmutableList<ActivityLonglineObsReference> allActivityLonglineObs) { this.config = config; this.tripLonglineId = tripLonglineId; - this.activityLonglineObsList = activityLonglineObsList; + this.allActivityLonglineObs = allActivityLonglineObs; } public ActivityLonglinePairingConfig getConfig() { return config; } - - public ImmutableList<ActivityLonglineObsReference> getActivityLonglineObsList() { - return activityLonglineObsList; + public ImmutableList<ActivityLonglineObsReference> getActivityLonglineObsList(String vesselActivityLonglineId) { + return ImmutableList.copyOf(allActivityLonglineObs.stream().filter(e -> vesselActivityLonglineId.equals(e.getVesselActivityLonglineId())).collect(Collectors.toList())); } public String getTripLonglineId() { return tripLonglineId; } - public boolean isEnabled() { - return !activityLonglineObsList.isEmpty(); - } } View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/5ed5600489dc68fa3c8d833cdc… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/5ed5600489dc68fa3c8d833cdc… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] [PS][FOB] Plusieurs mappings anciens types FAD / Nouveaux matériaux sont erronés…
by Tony CHEMIT Oct. 16, 2018

Oct. 16, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 5ed56004 by Tony CHEMIT at 2018-10-16T11:25:23Z [PS][FOB] Plusieurs mappings anciens types FAD / Nouveaux matériaux sont erronés - Closes #1136 (la der des ders...) - - - - - 22 changed files: - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/dcp/FloatingObjectPartsTreeNode.java - client/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUIModel.java - client/src/main/resources/i18n/client_en_GB.properties - client/src/main/resources/i18n/client_es_ES.properties - client/src/main/resources/i18n/client_fr_FR.properties - dto/src/main/java/fr/ird/observe/dto/referential/seine/ObjectMaterialDto.java - dto/src/main/models/Observe-02-referential-seine.model - persistence/src/main/java/fr/ird/observe/binder/referential/seine/ObjectMaterialEntityDtoBinder.java - persistence/src/main/models/Observe-02-referential-seine.model - persistence/src/main/resources/db/migration/6.1/12_update_object_material-common.sql - − persistence/src/test/java/fr/ird/observe/persistence/migration/GenerateReferentialObjectMaterial.java - test/src/main/resources/db/7.0/dataForTestLongline.sql.gz - test/src/main/resources/db/7.0/dataForTestSeine.sql.gz - test/src/main/resources/db/7.0/empty_h2.sql.gz - test/src/main/resources/db/7.0/empty_pg.sql.gz - test/src/main/resources/db/7.4/dataForTestLongline.sql.gz - test/src/main/resources/db/7.4/dataForTestSeine.sql.gz - test/src/main/resources/db/7.4/empty_h2.sql.gz - test/src/main/resources/db/7.4/empty_pg.sql.gz - test/src/main/resources/db/7.4/referentiel.sql.gz Changes: ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/seine/dcp/FloatingObjectPartsTreeNode.java ===================================== @@ -183,7 +183,6 @@ public class FloatingObjectPartsTreeNode extends AbstractMutableTreeTableNode im private void getShell(ImmutableSet.Builder<FloatingObjectPartsTreeNode> allNodesBuilder) { allNodesBuilder.add(this); - for (FloatingObjectPartsTreeNode child : this) { child.getShell(allNodesBuilder); } @@ -195,7 +194,6 @@ public class FloatingObjectPartsTreeNode extends AbstractMutableTreeTableNode im } void computeNeedAtLeastOnSelectValidState(boolean whenArriving, boolean whenLeaving) { - boolean needSelect = isEditable(); FloatingObjectPartsTreeNodeContext userObject = getUserObject(); if (whenArriving) { @@ -204,7 +202,6 @@ public class FloatingObjectPartsTreeNode extends AbstractMutableTreeTableNode im if (whenLeaving) { userObject.needOneSelectionOnLeaving = (!needSelect || withValue(2)) && isAtLeastOneSelected(2); } - if (userObject.needOneSelectionOnArriving || userObject.needOneSelectionOnLeaving) { log.info("Validate node " + this); } @@ -244,7 +241,6 @@ public class FloatingObjectPartsTreeNode extends AbstractMutableTreeTableNode im if (userObject.getValueAt(1) != null || userObject.getValueAt(2) != null) { log.info("Validate node " + this); } - } // void computeFormulaValidState(boolean whenArriving, boolean whenLeaving) { @@ -359,8 +355,7 @@ public class FloatingObjectPartsTreeNode extends AbstractMutableTreeTableNode im // enabled if parent is enabled and dto is enabled this.enabled = parent.enabled && dto.isEnabled(); // editable if dto is selectable (we also make sure that the object material type is here too) - this.editable = dto.isSelectable() && dto.getObjectMaterialType() != null; - + this.editable = dto.getObjectMaterialType() != null; this.useValidation = enabled && editable && dto.withValidation(); if (!useValidation) { valueValidOnArriving = true; ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUI.jaxx ===================================== @@ -127,14 +127,6 @@ </cell> </row> - <!-- selectable --> - <row> - <cell anchor='east' weightx="1" fill="both" columns="2"> - <JCheckBox id='selectable' styleClass="i18n" - onItemStateChanged='getBean().setSelectable(selectable.isSelected())'/> - </cell> - </row> - <!-- childrenMultiSelectable / childSelectionMandatory --> <row> <cell anchor='east' weightx="1" fill="both" columns="2"> ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUI.jcss ===================================== @@ -50,10 +50,6 @@ _propertyName:{ObjectMaterialDto.PROPERTY_VALIDATION}; } -#selectable { - selected:{bean.isSelectable()}; -} - #childrenMultiSelectable { selected:{bean.isChildrenMultiSelectable()}; } ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUIModel.java ===================================== @@ -44,7 +44,6 @@ public class ObjectMaterialUIModel extends ContentReferenceUIModel<ObjectMateria ObjectMaterialDto.PROPERTY_STANDARD_CODE, ObjectMaterialDto.PROPERTY_OBJECT_MATERIAL_TYPE, ObjectMaterialDto.PROPERTY_VALIDATION, - ObjectMaterialDto.PROPERTY_SELECTABLE, ObjectMaterialDto.PROPERTY_CHILD_SELECTION_MANDATORY, ObjectMaterialDto.PROPERTY_CHILDREN_MULTI_SELECTABLE }, @@ -54,7 +53,6 @@ public class ObjectMaterialUIModel extends ContentReferenceUIModel<ObjectMateria ObjectMaterialUI.BINDING_LEGACY_CODE_TEXT, ObjectMaterialUI.BINDING_STANDARD_CODE_TEXT, ObjectMaterialUI.BINDING_VALIDATION_TEXT, - ObjectMaterialUI.BINDING_SELECTABLE_SELECTED, ObjectMaterialUI.BINDING_CHILD_SELECTION_MANDATORY_SELECTED, ObjectMaterialUI.BINDING_CHILDREN_MULTI_SELECTABLE_SELECTED }); ===================================== client/src/main/resources/i18n/client_en_GB.properties ===================================== @@ -944,7 +944,6 @@ observe.common.ObjectMaterialDto.childSelectionMandatory=child selection mandato observe.common.ObjectMaterialDto.childrenMultiSelectable=children multi selectable observe.common.ObjectMaterialDto.legacyCodeStandardCode=Legacy code / Standard code observe.common.ObjectMaterialDto.parentCode=Parent -observe.common.ObjectMaterialDto.selectable=Selectable observe.common.ObjectMaterialDto.validationInformation=Validation formula must contains variable x observe.common.ObjectObservedSpeciesDto.action.create=Insert this object observed species observe.common.ObjectObservedSpeciesDto.action.create.tip=Insert this object observed species ===================================== client/src/main/resources/i18n/client_es_ES.properties ===================================== @@ -944,7 +944,6 @@ observe.common.ObjectMaterialDto.childSelectionMandatory=Sélection d'un fils ob observe.common.ObjectMaterialDto.childrenMultiSelectable=Sélection multiple des fils \#TODO observe.common.ObjectMaterialDto.legacyCodeStandardCode=Ancien code / Code standard \#TODO observe.common.ObjectMaterialDto.parentCode=Parent \#TODO -observe.common.ObjectMaterialDto.selectable=Sélectionnable \#TODO observe.common.ObjectMaterialDto.validationInformation=La formule de validation doit contenir la variable x \#TODO observe.common.ObjectObservedSpeciesDto.action.create=Insertar observe.common.ObjectObservedSpeciesDto.action.create.tip=Insertar la especie de fauna observada ===================================== client/src/main/resources/i18n/client_fr_FR.properties ===================================== @@ -944,7 +944,6 @@ observe.common.ObjectMaterialDto.childSelectionMandatory=Sélection d'un fils ob observe.common.ObjectMaterialDto.childrenMultiSelectable=Sélection multiple des fils observe.common.ObjectMaterialDto.legacyCodeStandardCode=Ancien code / Code standard observe.common.ObjectMaterialDto.parentCode=Parent -observe.common.ObjectMaterialDto.selectable=Sélectionnable observe.common.ObjectMaterialDto.validationInformation=La formule de validation doit contenir la variable x observe.common.ObjectObservedSpeciesDto.action.create=Insérer observe.common.ObjectObservedSpeciesDto.action.create.tip=Insérer l'espèce faune observée ===================================== dto/src/main/java/fr/ird/observe/dto/referential/seine/ObjectMaterialDto.java ===================================== @@ -55,4 +55,5 @@ public class ObjectMaterialDto extends GeneratedObjectMaterialDto { ObjectMaterialReference parent = getParent(); return parent != null && parent.getParentId() != null; } + } ===================================== dto/src/main/models/Observe-02-referential-seine.model ===================================== @@ -9,7 +9,6 @@ referential.seine.NonTargetCatchReleasingTime > referential.I18nReferential referential.seine.ObjectMaterial > referential.I18nReferential | references=code,label,parentId,objectMaterialTypeId,validation,biodegradable,nonEntangling legacyCode + {*:1} String standardCode + {*:1} String -selectable + {*:1} boolean biodegradable + {*:1} boolean nonEntangling + {*:1} boolean childrenMultiSelectable + {*:1} boolean ===================================== persistence/src/main/java/fr/ird/observe/binder/referential/seine/ObjectMaterialEntityDtoBinder.java ===================================== @@ -47,7 +47,6 @@ public class ObjectMaterialEntityDtoBinder extends ReferentialEntityDtoBinderSup entity.setStandardCode(dto.getStandardCode()); entity.setParent(toEntity(dto.getParent())); entity.setObjectMaterialType(toEntity(dto.getObjectMaterialType())); - entity.setSelectable(dto.isSelectable()); entity.setValidation(dto.getValidation()); entity.setChildrenMultiSelectable(dto.isChildrenMultiSelectable()); entity.setChildSelectionMandatory(dto.isChildSelectionMandatory()); @@ -64,7 +63,6 @@ public class ObjectMaterialEntityDtoBinder extends ReferentialEntityDtoBinderSup dto.setParent(toReferentialReference(referentialLocale, entity.getParent())); dto.setObjectMaterialType(toReferentialReference(referentialLocale, entity.getObjectMaterialType())); dto.setValidation(entity.getValidation()); - dto.setSelectable(entity.isSelectable()); dto.setChildrenMultiSelectable(entity.isChildrenMultiSelectable()); dto.setChildSelectionMandatory(entity.isChildSelectionMandatory()); ===================================== persistence/src/main/models/Observe-02-referential-seine.model ===================================== @@ -15,7 +15,6 @@ referentiel.seine.NonTargetCatchReleasingTime > referentiel.I18nReferentialEntit referentiel.seine.ObjectMaterial > referentiel.I18nReferentialEntity | entity legacyCode + {*:1} String | hibernateAttributeType=text standardCode + {*:1} String -selectable + {*:1} boolean | notNull biodegradable + {*:1} boolean | notNull nonEntangling + {*:1} boolean | notNull childrenMultiSelectable + {*:1} boolean | notNull ===================================== persistence/src/main/resources/db/migration/6.1/12_update_object_material-common.sql ===================================== @@ -41,4 +41,4 @@ INSERT INTO observe_seine.objectMaterial (topiaid, topiaversion, topiacreatedate UPDATE observe_seine.objectmaterial SET legacyCode ='22*, 23*', topiaVersion = topiaVersion + 1 WHERE topiaid = 'fr.ird.observe.entities.referentiel.seine.ObjectMaterial#0#0.3'; UPDATE observe_seine.objectmaterial SET legacyCode = NULL, topiaVersion = topiaVersion + 1 WHERE topiaid='fr.ird.observe.entities.referentiel.seine.ObjectMaterial#0#0.2'; INSERT INTO observe_seine.objectMaterial (topiaid, topiaversion, topiacreatedate, lastupdatedate, needComment, status, legacyCode, standardCode, code, parent, label1, label2, label3, selectable, childrenMultiSelectable, childSelectionMandatory, objectMaterialType, validation, biodegradable, nonEntangling) values ( 'fr.ird.observe.entities.referentiel.seine.ObjectMaterial#0#0.100', 0, CURRENT_DATE, CURRENT_TIMESTAMP, true, 0, '16', null, '6-6' , 'fr.ird.observe.entities.referentiel.seine.ObjectMaterial#0#0.77' , ' Raft or buoy drifting', 'Radeau ou bouée en dérive','Parilla o buoy a la deriva', true, false, false, 'fr.ird.observe.entities.referentiel.seine.ObjectMaterialType#0#0', NULL, false, false); - +ALTER TABLE observe_seine.objectmaterial DROP COLUMN selectable; \ No newline at end of file ===================================== persistence/src/test/java/fr/ird/observe/persistence/migration/GenerateReferentialObjectMaterial.java deleted ===================================== @@ -1,185 +0,0 @@ -package fr.ird.observe.persistence.migration; - -/*- - * #%L - * ObServe :: Persistence - * %% - * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ - -import com.google.common.collect.ImmutableMap; -import fr.ird.observe.dto.referential.ReferenceStatus; -import fr.ird.observe.entities.referentiel.seine.ObjectMaterial; -import fr.ird.observe.entities.referentiel.seine.ObjectMaterialImpl; -import org.apache.commons.lang3.mutable.MutableInt; -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; -import org.junit.Test; -import org.nuiton.csv.Common; -import org.nuiton.csv.Import; -import org.nuiton.csv.ext.AbstractImportModel; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.Collection; - -/** - * Created by tchemit on 31/07/17. - * - * @author Tony Chemit - dev(a)tchemit.fr - */ -public class GenerateReferentialObjectMaterial { - - // Lines to fxi and readd to file - - - /** Logger. */ - private static final Logger log = LogManager.getLogger(GenerateReferentialObjectMaterial.class); - - private static final String INSERT = "INSERT INTO observe_seine.objectMaterial (topiaid, topiaversion, topiacreatedate, lastupdatedate, needComment, status, legacyCode, standardCode, code, parent, label1, label2, label3, selectable, childrenMultiSelectable, childSelectionMandatory, objectMaterialType, validation, biodegradable, nonEntangling) values (%-65s, 0, CURRENT_DATE, CURRENT_TIMESTAMP, false, %s, %-15s, %-10s, %-15s, %-65s, %-50s, %-50s, %-50s, %-5s, %-5s, %-5s, %-66s, %-30s, %-5s, %-5s);"; - - @Test - public void generate() throws IOException { - - - Path dir = new File("").getAbsoluteFile().toPath() - .resolve("src") - .resolve("main") - .resolve("resources") - .resolve("db") - .resolve("migration") - .resolve("6.6.1"); - - Path sourcePath = dir.resolve("referential-ObjectMaterial.csv"); - Path targetPath = dir.resolve("09_fill_object_material-common.sql"); - - Collection<ObjectMaterial> data = loadData(sourcePath); - - try (BufferedWriter writer = Files.newBufferedWriter(targetPath)) { - - for (ObjectMaterial datum : data) { - - String row = String.format(INSERT - , getValue(datum.getTopiaId()) - , datum.getStatus().ordinal() - , getValue(datum.getLegacyCode()) - , getValue(datum.getStandardCode()) - , getValue(datum.getCode()) - , getValue(datum.getParent() == null ? "" : datum.getParent().getTopiaId()) - , getValue(datum.getLabel1()) - , getValue(datum.getLabel2()) - , getValue(datum.getLabel3()) - , datum.isSelectable() - , datum.isChildrenMultiSelectable() - , datum.isChildSelectionMandatory() - , getValue(datum.getLabel5() == null ? "" : datum.getLabel5()) - , getValue(datum.getValidation()) - , datum.isBiodegradable() - , datum.isNonEntangling() - ); - writer.append(row); - writer.newLine(); - - } - } - - } - - private String getValue(String value) { - return value.isEmpty() ? "NULL" : ("'" + value + "'"); - } - - private Collection<ObjectMaterial> loadData(Path sourcePath) throws IOException { - - ImmutableMap.Builder<String, ObjectMaterial> result = ImmutableMap.builder(); - MutableInt idIndex = new MutableInt(0); - try (BufferedReader reader = Files.newBufferedReader(sourcePath)) { - Import.newImport(new ImportModel(), reader).forEach(objectMaterial -> { - - objectMaterial.setTopiaId("fr.ird.observe.entities.referentiel.seine.ObjectMaterial#0#0." + idIndex.incrementAndGet()); - - log.info(String.format("Loading %s (%s)", objectMaterial.getCode(), objectMaterial.getTopiaId())); - String dataType = objectMaterial.getLabel5(); - objectMaterial.setLabel5(null); - if (dataType != null) { - switch (dataType.trim().toLowerCase()) { - case "boolean": - objectMaterial.setLabel5("fr.ird.observe.entities.referentiel.seine.ObjectMaterialType#0#0"); - break; - case "integer": - objectMaterial.setLabel5("fr.ird.observe.entities.referentiel.seine.ObjectMaterialType#0#2"); - break; - case "string": - objectMaterial.setLabel5("fr.ird.observe.entities.referentiel.seine.ObjectMaterialType#0#3"); - break; - case "float1": - objectMaterial.setLabel5("fr.ird.observe.entities.referentiel.seine.ObjectMaterialType#0#1"); - break; - - } - } - String status = objectMaterial.getLabel6(); - objectMaterial.setLabel6(null); - Boolean statusB = status == null ? null : Boolean.valueOf(status); - objectMaterial.setStatus(statusB != null && statusB ? ReferenceStatus.enabled : ReferenceStatus.disabled); - result.put(objectMaterial.getCode(), objectMaterial); - }); - } - ImmutableMap<String, ObjectMaterial> map = result.build(); - for (ObjectMaterial objectMaterial : map.values()) { - String parentCode = objectMaterial.getLabel4(); - objectMaterial.setLabel4(null); - if (parentCode != null) { - ObjectMaterial parent = map.get(parentCode); - objectMaterial.setParent(parent); - } - } - return map.values(); - } - - private static class ImportModel extends AbstractImportModel<ObjectMaterial> { - - ImportModel() { - super(','); - newMandatoryColumn(ObjectMaterial.PROPERTY_CODE); - newMandatoryColumn(ObjectMaterial.PROPERTY_LEGACY_CODE); - newMandatoryColumn(ObjectMaterial.PROPERTY_STANDARD_CODE); - newMandatoryColumn(ObjectMaterial.PROPERTY_BIODEGRADABLE, Common.PRIMITIVE_BOOLEAN); - newMandatoryColumn(ObjectMaterial.PROPERTY_NON_ENTANGLING, Common.PRIMITIVE_BOOLEAN); - newMandatoryColumn(ObjectMaterial.PROPERTY_SELECTABLE, Common.PRIMITIVE_BOOLEAN); - newMandatoryColumn(ObjectMaterial.PROPERTY_CHILD_SELECTION_MANDATORY, Common.PRIMITIVE_BOOLEAN); - newMandatoryColumn(ObjectMaterial.PROPERTY_CHILDREN_MULTI_SELECTABLE, Common.PRIMITIVE_BOOLEAN); - newMandatoryColumn(ObjectMaterial.PROPERTY_LABEL1); - newMandatoryColumn(ObjectMaterial.PROPERTY_LABEL2); - newMandatoryColumn(ObjectMaterial.PROPERTY_LABEL3); - newMandatoryColumn(ObjectMaterial.PROPERTY_VALIDATION); - newMandatoryColumn("parent", ObjectMaterial.PROPERTY_LABEL4); - newMandatoryColumn("dataType", ObjectMaterial.PROPERTY_LABEL5); - newMandatoryColumn("status", ObjectMaterial.PROPERTY_LABEL6); - } - - @Override - public ObjectMaterial newEmptyInstance() { - return new ObjectMaterialImpl(); - } - } -} ===================================== test/src/main/resources/db/7.0/dataForTestLongline.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/7.0/dataForTestSeine.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/7.0/empty_h2.sql.gz ===================================== @@ -89,7 +89,7 @@ create table OBSERVE_SEINE.nonTargetCatchReleaseStatus (topiaId varchar(255) not create table OBSERVE_SEINE.nonTargetCatchReleasingTime (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.nonTargetLength (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, length numeric, isLengthComputed boolean, picturesReferences varchar(255), weight numeric, isWeightComputed boolean, count integer, acquisitionMode integer, tagNumber varchar(255), species varchar(255), sex varchar(255), speciesFate varchar(255), sizeMeasureType varchar(255), nonTargetSample varchar(255), nonTargetSample_idx integer, primary key (topiaId)); create table OBSERVE_SEINE.nonTargetSample (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, comment varchar(2147483647), set varchar(255), primary key (topiaId)); -create table OBSERVE_SEINE.objectMaterial (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), legacyCode varchar(2147483647), standardCode varchar(255), selectable boolean not null, biodegradable boolean not null, nonEntangling boolean not null, childrenMultiSelectable boolean not null, childSelectionMandatory boolean not null, parent varchar(255), objectMaterialType varchar(255), validation varchar(255), primary key (topiaId)); +create table OBSERVE_SEINE.objectMaterial (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), legacyCode varchar(2147483647), standardCode varchar(255), biodegradable boolean not null, nonEntangling boolean not null, childrenMultiSelectable boolean not null, childSelectionMandatory boolean not null, parent varchar(255), objectMaterialType varchar(255), validation varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectMaterialType (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectObservedSpecies (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, count integer, statut integer, species varchar(255), speciesStatus varchar(255), floatingObject varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectOperation (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), whenArriving boolean not null, whenLeaving boolean not null, primary key (topiaId)); ===================================== test/src/main/resources/db/7.0/empty_pg.sql.gz ===================================== @@ -89,7 +89,7 @@ create table OBSERVE_SEINE.nonTargetCatchReleaseStatus (topiaId varchar(255) not create table OBSERVE_SEINE.nonTargetCatchReleasingTime (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.nonTargetLength (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, length numeric, isLengthComputed boolean, picturesReferences varchar(255), weight numeric, isWeightComputed boolean, count int4, acquisitionMode int4, tagNumber varchar(255), species varchar(255), sex varchar(255), speciesFate varchar(255), sizeMeasureType varchar(255), nonTargetSample varchar(255), nonTargetSample_idx int4, primary key (topiaId)); create table OBSERVE_SEINE.nonTargetSample (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, comment text, set varchar(255), primary key (topiaId)); -create table OBSERVE_SEINE.objectMaterial (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), legacyCode text, standardCode varchar(255), selectable boolean not null, biodegradable boolean not null, nonEntangling boolean not null, childrenMultiSelectable boolean not null, childSelectionMandatory boolean not null, parent varchar(255), objectMaterialType varchar(255), validation varchar(255), primary key (topiaId)); +create table OBSERVE_SEINE.objectMaterial (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), legacyCode text, standardCode varchar(255), biodegradable boolean not null, nonEntangling boolean not null, childrenMultiSelectable boolean not null, childSelectionMandatory boolean not null, parent varchar(255), objectMaterialType varchar(255), validation varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectMaterialType (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectObservedSpecies (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, count int4, statut int4, species varchar(255), speciesStatus varchar(255), floatingObject varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectOperation (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), whenArriving boolean not null, whenLeaving boolean not null, primary key (topiaId)); ===================================== test/src/main/resources/db/7.4/dataForTestLongline.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/7.4/dataForTestSeine.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/7.4/empty_h2.sql.gz ===================================== @@ -113,7 +113,7 @@ create table OBSERVE_SEINE.nonTargetCatchReleaseStatus (topiaId varchar(255) not create table OBSERVE_SEINE.nonTargetCatchReleasingTime (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.nonTargetLength (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, length numeric, isLengthComputed boolean, picturesReferences varchar(255), weight numeric, isWeightComputed boolean, count integer, acquisitionMode integer, tagNumber varchar(255), species varchar(255), sex varchar(255), speciesFate varchar(255), sizeMeasureType varchar(255), weightMeasureMethod varchar(255), lengthMeasureMethod varchar(255), nonTargetSample varchar(255), nonTargetSample_idx integer, primary key (topiaId)); create table OBSERVE_SEINE.nonTargetSample (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, comment varchar(2147483647), set varchar(255), primary key (topiaId)); -create table OBSERVE_SEINE.objectMaterial (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), legacyCode varchar(2147483647), standardCode varchar(255), selectable boolean not null, biodegradable boolean not null, nonEntangling boolean not null, childrenMultiSelectable boolean not null, childSelectionMandatory boolean not null, parent varchar(255), objectMaterialType varchar(255), validation varchar(255), primary key (topiaId)); +create table OBSERVE_SEINE.objectMaterial (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), legacyCode varchar(2147483647), standardCode varchar(255), biodegradable boolean not null, nonEntangling boolean not null, childrenMultiSelectable boolean not null, childSelectionMandatory boolean not null, parent varchar(255), objectMaterialType varchar(255), validation varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectMaterialType (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectObservedSpecies (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, count integer, statut integer, species varchar(255), speciesStatus varchar(255), floatingObject varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectOperation (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), whenArriving boolean not null, whenLeaving boolean not null, primary key (topiaId)); ===================================== test/src/main/resources/db/7.4/empty_pg.sql.gz ===================================== @@ -113,7 +113,7 @@ create table OBSERVE_SEINE.nonTargetCatchReleaseStatus (topiaId varchar(255) not create table OBSERVE_SEINE.nonTargetCatchReleasingTime (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.nonTargetLength (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, length numeric, isLengthComputed boolean, picturesReferences varchar(255), weight numeric, isWeightComputed boolean, count int4, acquisitionMode int4, tagNumber varchar(255), species varchar(255), sex varchar(255), speciesFate varchar(255), sizeMeasureType varchar(255), weightMeasureMethod varchar(255), lengthMeasureMethod varchar(255), nonTargetSample varchar(255), nonTargetSample_idx int4, primary key (topiaId)); create table OBSERVE_SEINE.nonTargetSample (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, comment text, set varchar(255), primary key (topiaId)); -create table OBSERVE_SEINE.objectMaterial (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), legacyCode text, standardCode varchar(255), selectable boolean not null, biodegradable boolean not null, nonEntangling boolean not null, childrenMultiSelectable boolean not null, childSelectionMandatory boolean not null, parent varchar(255), objectMaterialType varchar(255), validation varchar(255), primary key (topiaId)); +create table OBSERVE_SEINE.objectMaterial (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), legacyCode text, standardCode varchar(255), biodegradable boolean not null, nonEntangling boolean not null, childrenMultiSelectable boolean not null, childSelectionMandatory boolean not null, parent varchar(255), objectMaterialType varchar(255), validation varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectMaterialType (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectObservedSpecies (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, count int4, statut int4, species varchar(255), speciesStatus varchar(255), floatingObject varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectOperation (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), whenArriving boolean not null, whenLeaving boolean not null, primary key (topiaId)); ===================================== test/src/main/resources/db/7.4/referentiel.sql.gz ===================================== The diff for this file was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/5ed5600489dc68fa3c8d833cdce… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/5ed5600489dc68fa3c8d833cdce… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-7.x] [PS][FOB] Plusieurs mappings anciens types FAD / Nouveaux matériaux sont erronés…
by Tony CHEMIT Oct. 16, 2018

Oct. 16, 2018
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 4df5e82b by Tony CHEMIT at 2018-10-16T10:52:17Z [PS][FOB] Plusieurs mappings anciens types FAD / Nouveaux matériaux sont erronés - Closes #1136 (la der des ders...) - - - - - 18 changed files: - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/dcp/FloatingObjectPartsTreeNode.java - client/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUIModel.java - client/src/main/resources/i18n/client_en_GB.properties - client/src/main/resources/i18n/client_es_ES.properties - client/src/main/resources/i18n/client_fr_FR.properties - dto/src/main/java/fr/ird/observe/dto/referential/seine/ObjectMaterialDto.java - dto/src/main/models/Observe.model - persistence/src/main/java/fr/ird/observe/binder/referential/seine/ObjectMaterialEntityDtoBinder.java - persistence/src/main/models/Observe.model - persistence/src/main/resources/db/migration/6.1/12_update_object_material-common.sql - − persistence/src/test/java/fr/ird/observe/persistence/migration/GenerateReferentialObjectMaterial.java - test/src/main/resources/db/7.0/dataForTestLongline.sql.gz - test/src/main/resources/db/7.0/dataForTestSeine.sql.gz - test/src/main/resources/db/7.0/empty_h2.sql.gz - test/src/main/resources/db/7.0/empty_pg.sql.gz - test/src/main/resources/db/7.0/referentiel.sql.gz Changes: ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/seine/dcp/FloatingObjectPartsTreeNode.java ===================================== @@ -356,7 +356,7 @@ public class FloatingObjectPartsTreeNode extends AbstractMutableTreeTableNode im // enabled if parent is enabled and dto is enabled this.enabled = parent.enabled && dto.isEnabled(); // editable if dto is selectable (we also make sure that the object material type is here too) - this.editable = dto.isSelectable() && dto.getObjectMaterialType() != null; + this.editable = dto.getObjectMaterialType() != null; this.useValidation = enabled && editable && dto.withValidation(); if (!useValidation) { valueValidOnArriving = true; ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUI.jaxx ===================================== @@ -130,14 +130,6 @@ </cell> </row> - <!-- selectable --> - <row> - <cell anchor='east' weightx="1" fill="both" columns="2"> - <JCheckBox id='selectable' styleClass="i18n" - onItemStateChanged='getBean().setSelectable(selectable.isSelected())'/> - </cell> - </row> - <!-- childrenMultiSelectable / childSelectionMandatory --> <row> <cell anchor='east' weightx="1" fill="both" columns="2"> ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUI.jcss ===================================== @@ -50,10 +50,6 @@ _propertyName:{ObjectMaterialDto.PROPERTY_VALIDATION}; } -#selectable { - selected:{bean.isSelectable()}; -} - #childrenMultiSelectable { selected:{bean.isChildrenMultiSelectable()}; } ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUIModel.java ===================================== @@ -44,7 +44,6 @@ public class ObjectMaterialUIModel extends ContentReferenceUIModel<ObjectMateria ObjectMaterialDto.PROPERTY_STANDARD_CODE, ObjectMaterialDto.PROPERTY_OBJECT_MATERIAL_TYPE, ObjectMaterialDto.PROPERTY_VALIDATION, - ObjectMaterialDto.PROPERTY_SELECTABLE, ObjectMaterialDto.PROPERTY_CHILD_SELECTION_MANDATORY, ObjectMaterialDto.PROPERTY_CHILDREN_MULTI_SELECTABLE }, @@ -54,7 +53,6 @@ public class ObjectMaterialUIModel extends ContentReferenceUIModel<ObjectMateria ObjectMaterialUI.BINDING_LEGACY_CODE_TEXT, ObjectMaterialUI.BINDING_STANDARD_CODE_TEXT, ObjectMaterialUI.BINDING_VALIDATION_TEXT, - ObjectMaterialUI.BINDING_SELECTABLE_SELECTED, ObjectMaterialUI.BINDING_CHILD_SELECTION_MANDATORY_SELECTED, ObjectMaterialUI.BINDING_CHILDREN_MULTI_SELECTABLE_SELECTED }); ===================================== client/src/main/resources/i18n/client_en_GB.properties ===================================== @@ -774,7 +774,6 @@ observe.common.ObjectMaterialDto.childSelectionMandatory=child selection mandato observe.common.ObjectMaterialDto.childrenMultiSelectable=children multi selectable observe.common.ObjectMaterialDto.legacyCodeStandardCode=Legacy code / Standard code observe.common.ObjectMaterialDto.parentCode=Parent -observe.common.ObjectMaterialDto.selectable=Selectable observe.common.ObjectMaterialDto.validationInformation=Validation formula must contains variable x observe.common.ObjectObservedSpeciesDto.action.create=Insert this object observed species observe.common.ObjectObservedSpeciesDto.action.create.tip=Insert this object observed species ===================================== client/src/main/resources/i18n/client_es_ES.properties ===================================== @@ -774,7 +774,6 @@ observe.common.ObjectMaterialDto.childSelectionMandatory=Sélection d'un fils ob observe.common.ObjectMaterialDto.childrenMultiSelectable=Sélection multiple des fils \#TODO observe.common.ObjectMaterialDto.legacyCodeStandardCode=Ancien code / Code standard \#TODO observe.common.ObjectMaterialDto.parentCode=Parent \#TODO -observe.common.ObjectMaterialDto.selectable=Sélectionnable \#TODO observe.common.ObjectMaterialDto.validationInformation=La formule de validation doit contenir la variable x \#TODO observe.common.ObjectObservedSpeciesDto.action.create=Insertar observe.common.ObjectObservedSpeciesDto.action.create.tip=Insertar la especie de fauna observada ===================================== client/src/main/resources/i18n/client_fr_FR.properties ===================================== @@ -774,7 +774,6 @@ observe.common.ObjectMaterialDto.childSelectionMandatory=Sélection d'un fils ob observe.common.ObjectMaterialDto.childrenMultiSelectable=Sélection multiple des fils observe.common.ObjectMaterialDto.legacyCodeStandardCode=Ancien code / Code standard observe.common.ObjectMaterialDto.parentCode=Parent -observe.common.ObjectMaterialDto.selectable=Sélectionnable observe.common.ObjectMaterialDto.validationInformation=La formule de validation doit contenir la variable x observe.common.ObjectObservedSpeciesDto.action.create=Insérer observe.common.ObjectObservedSpeciesDto.action.create.tip=Insérer l'espèce faune observée ===================================== dto/src/main/java/fr/ird/observe/dto/referential/seine/ObjectMaterialDto.java ===================================== @@ -55,4 +55,5 @@ public class ObjectMaterialDto extends GeneratedObjectMaterialDto { ObjectMaterialReference parent = getParent(); return parent != null && parent.getParentId() != null; } + } ===================================== dto/src/main/models/Observe.model ===================================== @@ -551,7 +551,6 @@ referential.seine.NonTargetCatchReleasingTime > referential.I18nReferential referential.seine.ObjectMaterial > referential.I18nReferential | references=code,label,parentId,objectMaterialTypeId,validation,biodegradable,nonEntangling legacyCode + {*:1} String standardCode + {*:1} String -selectable + {*:1} boolean biodegradable + {*:1} boolean nonEntangling + {*:1} boolean childrenMultiSelectable + {*:1} boolean ===================================== persistence/src/main/java/fr/ird/observe/binder/referential/seine/ObjectMaterialEntityDtoBinder.java ===================================== @@ -47,7 +47,6 @@ public class ObjectMaterialEntityDtoBinder extends ReferentialEntityDtoBinderSup entity.setStandardCode(dto.getStandardCode()); entity.setParent(toEntity(dto.getParent())); entity.setObjectMaterialType(toEntity(dto.getObjectMaterialType())); - entity.setSelectable(dto.isSelectable()); entity.setValidation(dto.getValidation()); entity.setChildrenMultiSelectable(dto.isChildrenMultiSelectable()); entity.setChildSelectionMandatory(dto.isChildSelectionMandatory()); @@ -64,7 +63,6 @@ public class ObjectMaterialEntityDtoBinder extends ReferentialEntityDtoBinderSup dto.setParent(toReferentialReference(referentialLocale, entity.getParent())); dto.setObjectMaterialType(toReferentialReference(referentialLocale, entity.getObjectMaterialType())); dto.setValidation(entity.getValidation()); - dto.setSelectable(entity.isSelectable()); dto.setChildrenMultiSelectable(entity.isChildrenMultiSelectable()); dto.setChildSelectionMandatory(entity.isChildSelectionMandatory()); ===================================== persistence/src/main/models/Observe.model ===================================== @@ -594,7 +594,6 @@ referentiel.seine.NonTargetCatchReleasingTime > referentiel.I18nReferentialEntit referentiel.seine.ObjectMaterial > referentiel.I18nReferentialEntity | entity legacyCode + {*:1} String | hibernateAttributeType=text standardCode + {*:1} String -selectable + {*:1} boolean | notNull biodegradable + {*:1} boolean | notNull nonEntangling + {*:1} boolean | notNull childrenMultiSelectable + {*:1} boolean | notNull ===================================== persistence/src/main/resources/db/migration/6.1/12_update_object_material-common.sql ===================================== @@ -41,3 +41,4 @@ INSERT INTO observe_seine.objectMaterial (topiaid, topiaversion, topiacreatedate UPDATE observe_seine.objectmaterial SET legacyCode ='22*, 23*', topiaVersion = topiaVersion + 1 WHERE topiaid = 'fr.ird.observe.entities.referentiel.seine.ObjectMaterial#0#0.3'; UPDATE observe_seine.objectmaterial SET legacyCode = NULL, topiaVersion = topiaVersion + 1 WHERE topiaid='fr.ird.observe.entities.referentiel.seine.ObjectMaterial#0#0.2'; INSERT INTO observe_seine.objectMaterial (topiaid, topiaversion, topiacreatedate, lastupdatedate, needComment, status, legacyCode, standardCode, code, parent, label1, label2, label3, selectable, childrenMultiSelectable, childSelectionMandatory, objectMaterialType, validation, biodegradable, nonEntangling) values ( 'fr.ird.observe.entities.referentiel.seine.ObjectMaterial#0#0.100', 0, CURRENT_DATE, CURRENT_TIMESTAMP, true, 0, '16', null, '6-6' , 'fr.ird.observe.entities.referentiel.seine.ObjectMaterial#0#0.77' , ' Raft or buoy drifting', 'Radeau ou bouée en dérive','Parilla o buoy a la deriva', true, false, false, 'fr.ird.observe.entities.referentiel.seine.ObjectMaterialType#0#0', NULL, false, false); +ALTER TABLE observe_seine.objectmaterial DROP COLUMN selectable; \ No newline at end of file ===================================== persistence/src/test/java/fr/ird/observe/persistence/migration/GenerateReferentialObjectMaterial.java deleted ===================================== @@ -1,185 +0,0 @@ -package fr.ird.observe.persistence.migration; - -/*- - * #%L - * ObServe :: Persistence - * %% - * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ - -import com.google.common.collect.ImmutableMap; -import fr.ird.observe.dto.referential.ReferenceStatus; -import fr.ird.observe.entities.referentiel.seine.ObjectMaterial; -import fr.ird.observe.entities.referentiel.seine.ObjectMaterialImpl; -import org.apache.commons.lang3.mutable.MutableInt; -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; -import org.junit.Test; -import org.nuiton.csv.Common; -import org.nuiton.csv.Import; -import org.nuiton.csv.ext.AbstractImportModel; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.Collection; - -/** - * Created by tchemit on 31/07/17. - * - * @author Tony Chemit - dev(a)tchemit.fr - */ -public class GenerateReferentialObjectMaterial { - - // Lines to fxi and readd to file - - - /** Logger. */ - private static final Logger log = LogManager.getLogger(GenerateReferentialObjectMaterial.class); - - private static final String INSERT = "INSERT INTO observe_seine.objectMaterial (topiaid, topiaversion, topiacreatedate, lastupdatedate, needComment, status, legacyCode, standardCode, code, parent, label1, label2, label3, selectable, childrenMultiSelectable, childSelectionMandatory, objectMaterialType, validation, biodegradable, nonEntangling) values (%-65s, 0, CURRENT_DATE, CURRENT_TIMESTAMP, false, %s, %-15s, %-10s, %-15s, %-65s, %-50s, %-50s, %-50s, %-5s, %-5s, %-5s, %-66s, %-30s, %-5s, %-5s);"; - - @Test - public void generate() throws IOException { - - - Path dir = new File("").getAbsoluteFile().toPath() - .resolve("src") - .resolve("main") - .resolve("resources") - .resolve("db") - .resolve("migration") - .resolve("6.6.1"); - - Path sourcePath = dir.resolve("referential-ObjectMaterial.csv"); - Path targetPath = dir.resolve("09_fill_object_material-common.sql"); - - Collection<ObjectMaterial> data = loadData(sourcePath); - - try (BufferedWriter writer = Files.newBufferedWriter(targetPath)) { - - for (ObjectMaterial datum : data) { - - String row = String.format(INSERT - , getValue(datum.getTopiaId()) - , datum.getStatus().ordinal() - , getValue(datum.getLegacyCode()) - , getValue(datum.getStandardCode()) - , getValue(datum.getCode()) - , getValue(datum.getParent() == null ? "" : datum.getParent().getTopiaId()) - , getValue(datum.getLabel1()) - , getValue(datum.getLabel2()) - , getValue(datum.getLabel3()) - , datum.isSelectable() - , datum.isChildrenMultiSelectable() - , datum.isChildSelectionMandatory() - , getValue(datum.getLabel5() == null ? "" : datum.getLabel5()) - , getValue(datum.getValidation()) - , datum.isBiodegradable() - , datum.isNonEntangling() - ); - writer.append(row); - writer.newLine(); - - } - } - - } - - private String getValue(String value) { - return value.isEmpty() ? "NULL" : ("'" + value + "'"); - } - - private Collection<ObjectMaterial> loadData(Path sourcePath) throws IOException { - - ImmutableMap.Builder<String, ObjectMaterial> result = ImmutableMap.builder(); - MutableInt idIndex = new MutableInt(0); - try (BufferedReader reader = Files.newBufferedReader(sourcePath)) { - Import.newImport(new ImportModel(), reader).forEach(objectMaterial -> { - - objectMaterial.setTopiaId("fr.ird.observe.entities.referentiel.seine.ObjectMaterial#0#0." + idIndex.incrementAndGet()); - - log.info(String.format("Loading %s (%s)", objectMaterial.getCode(), objectMaterial.getTopiaId())); - String dataType = objectMaterial.getLabel5(); - objectMaterial.setLabel5(null); - if (dataType != null) { - switch (dataType.trim().toLowerCase()) { - case "boolean": - objectMaterial.setLabel5("fr.ird.observe.entities.referentiel.seine.ObjectMaterialType#0#0"); - break; - case "integer": - objectMaterial.setLabel5("fr.ird.observe.entities.referentiel.seine.ObjectMaterialType#0#2"); - break; - case "string": - objectMaterial.setLabel5("fr.ird.observe.entities.referentiel.seine.ObjectMaterialType#0#3"); - break; - case "float1": - objectMaterial.setLabel5("fr.ird.observe.entities.referentiel.seine.ObjectMaterialType#0#1"); - break; - - } - } - String status = objectMaterial.getLabel6(); - objectMaterial.setLabel6(null); - Boolean statusB = status == null ? null : Boolean.valueOf(status); - objectMaterial.setStatus(statusB != null && statusB ? ReferenceStatus.enabled : ReferenceStatus.disabled); - result.put(objectMaterial.getCode(), objectMaterial); - }); - } - ImmutableMap<String, ObjectMaterial> map = result.build(); - for (ObjectMaterial objectMaterial : map.values()) { - String parentCode = objectMaterial.getLabel4(); - objectMaterial.setLabel4(null); - if (parentCode != null) { - ObjectMaterial parent = map.get(parentCode); - objectMaterial.setParent(parent); - } - } - return map.values(); - } - - private static class ImportModel extends AbstractImportModel<ObjectMaterial> { - - ImportModel() { - super(','); - newMandatoryColumn(ObjectMaterial.PROPERTY_CODE); - newMandatoryColumn(ObjectMaterial.PROPERTY_LEGACY_CODE); - newMandatoryColumn(ObjectMaterial.PROPERTY_STANDARD_CODE); - newMandatoryColumn(ObjectMaterial.PROPERTY_BIODEGRADABLE, Common.PRIMITIVE_BOOLEAN); - newMandatoryColumn(ObjectMaterial.PROPERTY_NON_ENTANGLING, Common.PRIMITIVE_BOOLEAN); - newMandatoryColumn(ObjectMaterial.PROPERTY_SELECTABLE, Common.PRIMITIVE_BOOLEAN); - newMandatoryColumn(ObjectMaterial.PROPERTY_CHILD_SELECTION_MANDATORY, Common.PRIMITIVE_BOOLEAN); - newMandatoryColumn(ObjectMaterial.PROPERTY_CHILDREN_MULTI_SELECTABLE, Common.PRIMITIVE_BOOLEAN); - newMandatoryColumn(ObjectMaterial.PROPERTY_LABEL1); - newMandatoryColumn(ObjectMaterial.PROPERTY_LABEL2); - newMandatoryColumn(ObjectMaterial.PROPERTY_LABEL3); - newMandatoryColumn(ObjectMaterial.PROPERTY_VALIDATION); - newMandatoryColumn("parent", ObjectMaterial.PROPERTY_LABEL4); - newMandatoryColumn("dataType", ObjectMaterial.PROPERTY_LABEL5); - newMandatoryColumn("status", ObjectMaterial.PROPERTY_LABEL6); - } - - @Override - public ObjectMaterial newEmptyInstance() { - return new ObjectMaterialImpl(); - } - } -} ===================================== test/src/main/resources/db/7.0/dataForTestLongline.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/7.0/dataForTestSeine.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/7.0/empty_h2.sql.gz ===================================== @@ -89,7 +89,7 @@ create table OBSERVE_SEINE.nonTargetCatchReleaseStatus (topiaId varchar(255) not create table OBSERVE_SEINE.nonTargetCatchReleasingTime (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.nonTargetLength (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, length numeric, isLengthComputed boolean, picturesReferences varchar(255), weight numeric, isWeightComputed boolean, count integer, acquisitionMode integer, tagNumber varchar(255), species varchar(255), sex varchar(255), speciesFate varchar(255), sizeMeasureType varchar(255), nonTargetSample varchar(255), nonTargetSample_idx integer, primary key (topiaId)); create table OBSERVE_SEINE.nonTargetSample (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, comment varchar(2147483647), set varchar(255), primary key (topiaId)); -create table OBSERVE_SEINE.objectMaterial (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), legacyCode varchar(2147483647), standardCode varchar(255), selectable boolean not null, biodegradable boolean not null, nonEntangling boolean not null, childrenMultiSelectable boolean not null, childSelectionMandatory boolean not null, parent varchar(255), objectMaterialType varchar(255), validation varchar(255), primary key (topiaId)); +create table OBSERVE_SEINE.objectMaterial (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), legacyCode varchar(2147483647), standardCode varchar(255), biodegradable boolean not null, nonEntangling boolean not null, childrenMultiSelectable boolean not null, childSelectionMandatory boolean not null, parent varchar(255), objectMaterialType varchar(255), validation varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectMaterialType (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectObservedSpecies (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, count integer, statut integer, species varchar(255), speciesStatus varchar(255), floatingObject varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectOperation (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), whenArriving boolean not null, whenLeaving boolean not null, primary key (topiaId)); ===================================== test/src/main/resources/db/7.0/empty_pg.sql.gz ===================================== @@ -89,7 +89,7 @@ create table OBSERVE_SEINE.nonTargetCatchReleaseStatus (topiaId varchar(255) not create table OBSERVE_SEINE.nonTargetCatchReleasingTime (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.nonTargetLength (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, length numeric, isLengthComputed boolean, picturesReferences varchar(255), weight numeric, isWeightComputed boolean, count int4, acquisitionMode int4, tagNumber varchar(255), species varchar(255), sex varchar(255), speciesFate varchar(255), sizeMeasureType varchar(255), nonTargetSample varchar(255), nonTargetSample_idx int4, primary key (topiaId)); create table OBSERVE_SEINE.nonTargetSample (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, comment text, set varchar(255), primary key (topiaId)); -create table OBSERVE_SEINE.objectMaterial (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), legacyCode text, standardCode varchar(255), selectable boolean not null, biodegradable boolean not null, nonEntangling boolean not null, childrenMultiSelectable boolean not null, childSelectionMandatory boolean not null, parent varchar(255), objectMaterialType varchar(255), validation varchar(255), primary key (topiaId)); +create table OBSERVE_SEINE.objectMaterial (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), legacyCode text, standardCode varchar(255), biodegradable boolean not null, nonEntangling boolean not null, childrenMultiSelectable boolean not null, childSelectionMandatory boolean not null, parent varchar(255), objectMaterialType varchar(255), validation varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectMaterialType (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectObservedSpecies (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, count int4, statut int4, species varchar(255), speciesStatus varchar(255), floatingObject varchar(255), primary key (topiaId)); create table OBSERVE_SEINE.objectOperation (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), whenArriving boolean not null, whenLeaving boolean not null, primary key (topiaId)); ===================================== test/src/main/resources/db/7.0/referentiel.sql.gz ===================================== The diff for this file was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/4df5e82bfa310e7674269599137… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/4df5e82bfa310e7674269599137… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-7.x] 10 commits: [PS][FOB] Plusieurs mappings anciens types FAD / Nouveaux matériaux sont erronés - Closes #1136
by Tony CHEMIT Oct. 16, 2018

Oct. 16, 2018
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: edc03c65 by Tony CHEMIT at 2018-10-16T07:29:38Z [PS][FOB] Plusieurs mappings anciens types FAD / Nouveaux matériaux sont erronés - Closes #1136 - - - - - 21ff79ac by Tony CHEMIT at 2018-10-16T07:29:44Z Revoir le rapport utilisation des dcp - Closes #1082 - - - - - 8c6838f4 by Tony CHEMIT at 2018-10-16T07:29:45Z Realign database model version to 7.0 - - - - - 1847b90a by Tony CHEMIT at 2018-10-16T07:29:49Z update pom - - - - - 5e9bb625 by Tony CHEMIT at 2018-10-16T07:29:51Z Some data (in table forms) order is not deterministic - Closes #1112 - See #1144 - - - - - 83178f8e by Tony CHEMIT at 2018-10-16T07:29:51Z [LL][PS] Améliorer le widget position - Closes #1133 - See #1144 - - - - - 85c8d8ca by Tony CHEMIT at 2018-10-16T07:29:52Z [LL][PS] Dans le widget liste déroulante d&#39;espèces, après le code FAO et le non scientifique, ajouter le nom commun (vernaculaire) dans la langue courante - Closes #1131 - See #1144 - - - - - 94c099d8 by Tony CHEMIT at 2018-10-16T07:29:53Z fix coordinates validation message (and remove a lots of them \o/) (See #1144) - - - - - 0b07e2da by Tony CHEMIT at 2018-10-16T07:29:53Z Lacune de migration sur liste des systèmes observés - Closes #1151 - - - - - 850d4cc4 by Tony CHEMIT at 2018-10-16T07:40:48Z update test databases - - - - - 30 changed files: - client/src/main/java/fr/ird/observe/client/ui/content/Common.jcss - dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_6_1.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_6_2.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_5.java → persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_6_3.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_1.java → persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_6_4.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_2.java → persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_6_5.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_3.java → persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_6_6.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_0.java - − persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_4.java - persistence/src/main/models/Observe.model - persistence/src/main/resources/db/migration/7.2/01_update_objectMaterial-common.sql → persistence/src/main/resources/db/migration/6.1/10_update_objectMaterial-common.sql - persistence/src/main/resources/db/migration/7.4/01_update_object_operation-common.sql → persistence/src/main/resources/db/migration/6.1/11_update_object_operation-common.sql - persistence/src/main/resources/db/migration/7.4/02_update_object_material-common.sql → persistence/src/main/resources/db/migration/6.1/12_update_object_material-common.sql - persistence/src/main/resources/db/migration/7.0/01_fill_non_target_sample_size_measure_type-common.sql → persistence/src/main/resources/db/migration/6.3/01_fill_non_target_sample_size_measure_type-common.sql - persistence/src/main/resources/db/migration/7.0/02_add_data_quality-common.sql → persistence/src/main/resources/db/migration/6.3/02_add_data_quality-common.sql - persistence/src/main/resources/db/migration/7.0/03_add_order_on_seine_catches-common.sql → persistence/src/main/resources/db/migration/6.3/03_add_order_on_seine_catches-common.sql - persistence/src/main/resources/db/migration/7.0/04_add_order_on_seine_samples-common.sql → persistence/src/main/resources/db/migration/6.3/04_add_order_on_seine_samples-common.sql - persistence/src/main/resources/db/migration/7.1/01_add_non_target_catch_release_status-H2.sql → persistence/src/main/resources/db/migration/6.4/01_add_non_target_catch_release_status-H2.sql - persistence/src/main/resources/db/migration/7.1/01_add_non_target_catch_release_status-PG.sql → persistence/src/main/resources/db/migration/6.4/01_add_non_target_catch_release_status-PG.sql - persistence/src/main/resources/db/migration/7.2/02_add_non_target_catch_release_conformity-H2.sql → persistence/src/main/resources/db/migration/6.5/02_add_non_target_catch_release_conformity-H2.sql - persistence/src/main/resources/db/migration/7.2/02_add_non_target_catch_release_conformity-PG.sql → persistence/src/main/resources/db/migration/6.5/02_add_non_target_catch_release_conformity-PG.sql - persistence/src/main/resources/db/migration/7.2/03_add_non_target_catch_releasing_time-H2.sql → persistence/src/main/resources/db/migration/6.5/03_add_non_target_catch_releasing_time-H2.sql - persistence/src/main/resources/db/migration/7.2/03_add_non_target_catch_releasing_time-PG.sql → persistence/src/main/resources/db/migration/6.5/03_add_non_target_catch_releasing_time-PG.sql - persistence/src/main/resources/db/migration/7.2/04_update_non_target_catch_release_status-common.sql → persistence/src/main/resources/db/migration/6.5/04_update_non_target_catch_release_status-common.sql - persistence/src/main/resources/db/migration/7.2/05_remove_species_group_release_mode_value-common.sql → persistence/src/main/resources/db/migration/6.5/05_remove_species_group_release_mode_value-common.sql - persistence/src/main/resources/db/migration/7.2/06_fix_species_group_release_mode_for_cetaceans-common.sql → persistence/src/main/resources/db/migration/6.5/06_fix_species_group_release_mode_for_cetaceans-common.sql - persistence/src/main/resources/db/migration/7.2/07_update_observed_system-common.sql → persistence/src/main/resources/db/migration/6.5/07_update_observed_system-common.sql - persistence/src/main/resources/db/migration/7.3/01_remove_one_size_measure_type-common.sql → persistence/src/main/resources/db/migration/6.6/01_remove_one_size_measure_type-common.sql - persistence/src/main/resources/db/migration/7.3/02_add_length_length_parameter_fields-common.sql → persistence/src/main/resources/db/migration/6.6/02_add_length_length_parameter_fields-common.sql The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/e4bebda41c6965cac0ee8d2a4a… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/e4bebda41c6965cac0ee8d2a4a… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 13 commits: [PS][FOB] Plusieurs mappings anciens types FAD / Nouveaux matériaux sont erronés - Closes #1136
by Tony CHEMIT Oct. 16, 2018

Oct. 16, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: ca86c8c1 by Tony CHEMIT at 2018-10-16T07:16:29Z [PS][FOB] Plusieurs mappings anciens types FAD / Nouveaux matériaux sont erronés - Closes #1136 - - - - - 0f18b109 by Tony CHEMIT at 2018-10-16T07:17:00Z Revoir le rapport utilisation des dcp - Closes #1082 - - - - - 97eb754c by Tony CHEMIT at 2018-10-16T07:17:01Z Realign database model version to 7.0 - - - - - 12d38e37 by Tony CHEMIT at 2018-10-16T07:17:08Z Realign database model version to 7.0 - - - - - 89bfc365 by Tony CHEMIT at 2018-10-16T07:17:10Z [LL] Débarquements : petits ajustements - Closes #1121 (validation poids et pas du nombre) - - - - - e0275c53 by Tony CHEMIT at 2018-10-16T07:17:11Z [LL] Débarquements : petits ajustements 2 - Closes #1137 - - - - - f0c48157 by Tony CHEMIT at 2018-10-16T07:17:13Z [LL] Marée : redondance des listes Type de marée - Closes #1135 - - - - - e55025e1 by Tony CHEMIT at 2018-10-16T07:17:14Z [LL] Opération de pêche : recopie de propriétés - Closes #1125 - - - - - 487255a7 by Tony CHEMIT at 2018-10-16T07:17:14Z Finish referential forms refactor - - - - - eecf77a9 by Tony CHEMIT at 2018-10-16T07:17:14Z Calcul de l&#39;activité d&#39;observation sur l&#39;écran de l&#39;activité logbook - See #1150 - Amélioration de l&#39;api sur les activités LL et ajout de l&#39;api pour faire le calcul de l&#39;appairement - - - - - 52094e2f by Tony CHEMIT at 2018-10-16T07:17:15Z Calcul de l&#39;activité d&#39;observation sur l&#39;écran de l&#39;activité logbook - See #1150 - Début d&#39;ajout dans l&#39;écran d&#39;une activité Logbook + quelques correctoins sur cet écran. - - - - - a22eefaa by Tony CHEMIT at 2018-10-16T07:17:15Z Lacune de migration sur liste des systèmes observés - Closes #1151 - - - - - f9706323 by Tony CHEMIT at 2018-10-16T07:38:01Z update test databases - - - - - 30 changed files: - client-configuration/src/main/config/Client.ini - client-configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java - client-configuration/src/main/resources/i18n/client-configuration_en_GB.properties - client-configuration/src/main/resources/i18n/client-configuration_es_ES.properties - client-configuration/src/main/resources/i18n/client-configuration_fr_FR.properties - client/src/main/java/fr/ird/observe/client/ObserveSwingApplicationContext.java - client/src/main/java/fr/ird/observe/client/db/ObserveSwingDataSource.java - client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java - client/src/main/java/fr/ird/observe/client/ui/ObserveMainUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ShowTechnicalInformationsAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/data/edit/SaveEditDataUIActionSupport.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/BackToReferentialListUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/DeleteReferentialUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/SaveReferentialUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/ShowReferentialUniqueKeyUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/ShowReferentialUsageUIAction.java - + client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/SelectTransshipmentLandingLogbookUIAction.java - + client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/save/CopyValuesAndSaveSetLonglineLogbookUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/save/SaveSetLonglineLogbookUIAction.java - client/src/main/java/fr/ird/observe/client/ui/admin/validate/ValidateUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ContentUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ContentUIModel.java - client/src/main/java/fr/ird/observe/client/ui/content/api/data/edit/ContentEditUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/api/data/edit/ContentEditUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/api/data/open/ContentOpenableUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/api/data/open/ContentOpenableUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentI18nReferenceUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentI18nReferenceUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentReferenceUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentReferenceUIHandler.java The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/f56c6500e1e3b1682fbbcacb31… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/f56c6500e1e3b1682fbbcacb31… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] Lacune de migration sur liste des systèmes observés - Closes #1151
by Tony CHEMIT Oct. 15, 2018

Oct. 15, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: f56c6500 by Tony CHEMIT at 2018-10-15T17:04:15Z Lacune de migration sur liste des systèmes observés - Closes #1151 - - - - - 4 changed files: - persistence/src/main/resources/db/migration/6.5/07_update_observed_system-common.sql - test/src/main/resources/db/7.4/dataForTestLongline.sql.gz - test/src/main/resources/db/7.4/dataForTestSeine.sql.gz - test/src/main/resources/db/7.4/referentiel.sql.gz Changes: ===================================== persistence/src/main/resources/db/migration/6.5/07_update_observed_system-common.sql ===================================== @@ -20,6 +20,9 @@ -- #L% --- +UPDATE observe_seine.observedsystem SET schoolType = 1 WHERE topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#0#1.0'; +UPDATE observe_seine.observedsystem SET schoolType = 1 WHERE topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#0#1.1'; +UPDATE observe_seine.observedsystem SET schoolType = 1 WHERE topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#0#1.2'; UPDATE observe_seine.observedsystem SET status = 0 WHERE code = '5'; UPDATE observe_seine.observedsystem SET status = 0 WHERE code = '6'; UPDATE observe_seine.observedsystem SET status = 0 WHERE code = '7'; ===================================== test/src/main/resources/db/7.4/dataForTestLongline.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/7.4/dataForTestSeine.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/7.4/referentiel.sql.gz ===================================== The diff for this file was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/f56c6500e1e3b1682fbbcacb31d… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/f56c6500e1e3b1682fbbcacb31d… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 5 commits: [LL] Marée : redondance des listes Type de marée - Closes #1135
by Tony CHEMIT Oct. 15, 2018

Oct. 15, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 7fb7803e by Tony CHEMIT at 2018-10-15T15:29:34Z [LL] Marée : redondance des listes Type de marée - Closes #1135 - - - - - 94628598 by Tony CHEMIT at 2018-10-15T15:29:38Z [LL] Opération de pêche : recopie de propriétés - Closes #1125 - - - - - 2ce540af by Tony CHEMIT at 2018-10-15T15:32:59Z Finish referential forms refactor - - - - - b14c33a8 by Tony CHEMIT at 2018-10-15T15:33:01Z Calcul de l&#39;activité d&#39;observation sur l&#39;écran de l&#39;activité logbook - See #1150 - Amélioration de l&#39;api sur les activités LL et ajout de l&#39;api pour faire le calcul de l&#39;appairement - - - - - 92827497 by Tony CHEMIT at 2018-10-15T15:33:01Z Calcul de l&#39;activité d&#39;observation sur l&#39;écran de l&#39;activité logbook - See #1150 - Début d&#39;ajout dans l&#39;écran d&#39;une activité Logbook + quelques correctoins sur cet écran. - - - - - 30 changed files: - client-configuration/src/main/config/Client.ini - client-configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java - client-configuration/src/main/resources/i18n/client-configuration_en_GB.properties - client-configuration/src/main/resources/i18n/client-configuration_es_ES.properties - client-configuration/src/main/resources/i18n/client-configuration_fr_FR.properties - client/src/main/java/fr/ird/observe/client/ObserveSwingApplicationContext.java - client/src/main/java/fr/ird/observe/client/db/ObserveSwingDataSource.java - client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java - client/src/main/java/fr/ird/observe/client/ui/ObserveMainUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ShowTechnicalInformationsAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/data/edit/SaveEditDataUIActionSupport.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/BackToReferentialListUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/DeleteReferentialUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/SaveReferentialUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/ShowReferentialUniqueKeyUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/ShowReferentialUsageUIAction.java - + client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/save/CopyValuesAndSaveSetLonglineLogbookUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/save/SaveSetLonglineLogbookUIAction.java - client/src/main/java/fr/ird/observe/client/ui/admin/validate/ValidateUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ContentUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ContentUIModel.java - client/src/main/java/fr/ird/observe/client/ui/content/api/data/edit/ContentEditUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/api/data/edit/ContentEditUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/api/data/open/ContentOpenableUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/api/data/open/ContentOpenableUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentI18nReferenceUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentI18nReferenceUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentReferenceUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentReferenceUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentReferenceUIInitializer.java The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/a6be5a2ca445ab48782593959e… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/a6be5a2ca445ab48782593959e… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-7.x] Lacune de migration sur liste des systèmes observés - Closes #1151
by Tony CHEMIT Oct. 15, 2018

Oct. 15, 2018
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: e4bebda4 by Tony CHEMIT at 2018-10-15T16:07:16Z Lacune de migration sur liste des systèmes observés - Closes #1151 - - - - - 1 changed file: - persistence/src/main/resources/db/migration/6.5/07_update_observed_system-common.sql Changes: ===================================== persistence/src/main/resources/db/migration/6.5/07_update_observed_system-common.sql ===================================== @@ -20,6 +20,9 @@ -- #L% --- +UPDATE observe_seine.observedsystem SET schoolType = 1 WHERE topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#0#1.0'; +UPDATE observe_seine.observedsystem SET schoolType = 1 WHERE topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#0#1.1'; +UPDATE observe_seine.observedsystem SET schoolType = 1 WHERE topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#0#1.2'; UPDATE observe_seine.observedsystem SET status = 0 WHERE code = '5'; UPDATE observe_seine.observedsystem SET status = 0 WHERE code = '6'; UPDATE observe_seine.observedsystem SET status = 0 WHERE code = '7'; View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/e4bebda41c6965cac0ee8d2a4ad… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/e4bebda41c6965cac0ee8d2a4ad… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 2 commits: Calcul de l'activité d'observation sur l'écran de l'activité logbook - See #1150…
by Tony CHEMIT Oct. 15, 2018

Oct. 15, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 49a5d602 by Tony CHEMIT at 2018-10-15T13:37:37Z Calcul de l&#39;activité d&#39;observation sur l&#39;écran de l&#39;activité logbook - See #1150 - Amélioration de l&#39;api sur les activités LL et ajout de l&#39;api pour faire le calcul de l&#39;appairement - - - - - a6be5a2c by Tony CHEMIT at 2018-10-15T13:40:28Z Calcul de l&#39;activité d&#39;observation sur l&#39;écran de l&#39;activité logbook - See #1150 - Début d&#39;ajout dans l&#39;écran d&#39;une activité Logbook + quelques correctoins sur cet écran. - - - - - 30 changed files: - client-configuration/src/main/config/Client.ini - client-configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java - client-configuration/src/main/resources/i18n/client-configuration_en_GB.properties - client-configuration/src/main/resources/i18n/client-configuration_es_ES.properties - client-configuration/src/main/resources/i18n/client-configuration_fr_FR.properties - client/src/main/java/fr/ird/observe/client/ObserveSwingApplicationContext.java - client/src/main/java/fr/ird/observe/client/db/ObserveSwingDataSource.java - client/src/main/java/fr/ird/observe/client/ui/ObserveMainUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/admin/validate/ValidateUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ContentUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ContentUIModel.java - client/src/main/java/fr/ird/observe/client/ui/content/api/data/open/ContentOpenableUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/api/data/open/ContentOpenableUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentReferenceUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/api/spi/ContentUIReferenceCache.java - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIModel.java - client/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/longline/logbook/ActivityLonglineLogbookListNavigationTreeNode.java - client/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/longline/obs/ActivityLonglineObsListNavigationTreeNode.java - client/src/main/resources/i18n/client_en_GB.properties - client/src/main/resources/i18n/client_es_ES.properties - client/src/main/resources/i18n/client_fr_FR.properties - + dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineAware.java - dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineLogbookDto.java - + dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineLogbookReference.java - dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineObsDto.java - + dto/src/main/java/fr/ird/observe/dto/data/longline/ActivityLonglineObsReference.java - + dto/src/main/java/fr/ird/observe/dto/data/pairing/ActivityLonglinePairingResult.java The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/a80db01fb1aed5e63151c66acd… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/a80db01fb1aed5e63151c66acd… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] Finish referential forms refactor
by Tony CHEMIT Oct. 15, 2018

Oct. 15, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: a80db01f by Tony CHEMIT at 2018-10-15T03:56:32Z Finish referential forms refactor - - - - - 30 changed files: - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ShowTechnicalInformationsAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/BackToReferentialListUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/DeleteReferentialUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/SaveReferentialUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/ShowReferentialUniqueKeyUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/ref/ShowReferentialUsageUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/save/CopyValuesAndSaveSetLonglineLogbookUIAction.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ContentUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentI18nReferenceUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentI18nReferenceUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentReferenceUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentReferenceUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentReferenceUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ContentReferenceUIModel.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ref/ReferenceHomeUIHandler.java - − client/src/main/java/fr/ird/observe/client/ui/content/ref/CommonI18nReferential.jcss - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/CompagniesUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/CountryUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/DataQualityUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/FpaZoneUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/GearCaracteristicTypeUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/GearCaracteristicUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/GearUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/HarbourUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/LengthMeasureMethodUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/OceanUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/OrganismUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/ProgramUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/SexUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/common/SizeMeasureTypeUI.jaxx The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/a80db01fb1aed5e63151c66acdb… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/a80db01fb1aed5e63151c66acdb… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] [LL] Opération de pêche : recopie de propriétés - Closes #1125
by Tony CHEMIT Oct. 14, 2018

Oct. 14, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: f1d57b9c by Tony CHEMIT at 2018-10-14T23:31:38Z [LL] Opération de pêche : recopie de propriétés - Closes #1125 - - - - - 18 changed files: - client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/api/data/edit/SaveEditDataUIActionSupport.java - + client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/save/CopyValuesAndSaveSetLonglineLogbookUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/save/SaveSetLonglineLogbookUIAction.java - client/src/main/java/fr/ird/observe/client/ui/content/api/data/edit/ContentEditUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/api/data/edit/ContentEditUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUIModel.java - client/src/main/resources/i18n/client_en_GB.properties - client/src/main/resources/i18n/client_es_ES.properties - client/src/main/resources/i18n/client_fr_FR.properties - dto/src/main/java/fr/ird/observe/dto/data/longline/SetLonglineLogbookGlobalCompositionDto.java - dto/src/main/models/Observe-06-data-longline-logbook.model - persistence/src/main/java/fr/ird/observe/binder/data/longline/SetLonglineLogbookStubEntityDtoBinder.java - server/src/main/filtered-resources/mapping - services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/SetLonglineLogbookServiceLocal.java - services/src/main/java/fr/ird/observe/services/service/data/longline/SetLonglineLogbookService.java Changes: ===================================== client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java ===================================== @@ -74,6 +74,7 @@ public abstract class ObserveKeyStrokes { public static final KeyStroke KEY_STROKE_CONFIGURE_SYNCHRO_FROM_RIGHT = KeyStroke.getKeyStroke("ctrl pressed B"); public static final KeyStroke KEY_STROKE_CONFIGURE_SYNCHRO_FROM_BOTH = KeyStroke.getKeyStroke("ctrl pressed C"); + public static final KeyStroke KEY_STROKE_COPY_VALUES_AND_SAVE = KeyStroke.getKeyStroke("ctrl pressed T"); public static final KeyStroke KEY_STROKE_SELECT_TRANSSHIPMENT = KeyStroke.getKeyStroke("ctrl pressed T"); public static final KeyStroke KEY_STROKE_SAVE_TABLE_ENTRY = KeyStroke.getKeyStroke("ctrl pressed S"); public static final KeyStroke KEY_STROKE_PRESSED_ENTER = KeyStroke.getKeyStroke("pressed ENTER"); ===================================== client/src/main/java/fr/ird/observe/client/ui/actions/content/api/data/edit/SaveEditDataUIActionSupport.java ===================================== @@ -57,8 +57,12 @@ public abstract class SaveEditDataUIActionSupport<D extends DataDto, R extends D private static final long serialVersionUID = 1L; - protected SaveEditDataUIActionSupport(ObserveMainUI mainUI, String name, KeyStroke keyStroke) { - super(mainUI, name, n("observe.action.save"), n("observe.action.save.tip"), "save", keyStroke); + protected SaveEditDataUIActionSupport(ObserveMainUI mainUI, String actionKey, String text, String tip, KeyStroke keyStroke) { + super(mainUI, actionKey, text, tip, "save", keyStroke); + } + + protected SaveEditDataUIActionSupport(ObserveMainUI mainUI, String actionKey, KeyStroke keyStroke) { + super(mainUI, actionKey, n("observe.action.save"), n("observe.action.save.tip"), "save", keyStroke); } protected abstract boolean doSave(U ui, D bean, ObserveEditNode<?> parentEditNode, boolean notPersisted); ===================================== client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/save/CopyValuesAndSaveSetLonglineLogbookUIAction.java ===================================== @@ -0,0 +1,38 @@ +package fr.ird.observe.client.ui.actions.content.data.longline.save; + +import fr.ird.observe.client.ui.ObserveKeyStrokes; +import fr.ird.observe.client.ui.ObserveMainUI; +import fr.ird.observe.client.ui.content.data.longline.logbook.SetLonglineLogbookUI; +import fr.ird.observe.client.ui.content.data.longline.logbook.SetLonglineLogbookUIModel; +import fr.ird.observe.dto.data.longline.SetLonglineLogbookDto; +import fr.ird.observe.dto.result.SaveResultDto; +import fr.ird.observe.navigation.model.edit.ObserveEditNode; + +import java.util.Objects; + +import static org.nuiton.i18n.I18n.n; + +/** + * Created by tchemit on 14/10/2018. + * + * @author Tony Chemit - dev(a)tchemit.fr + */ +public class CopyValuesAndSaveSetLonglineLogbookUIAction extends SaveSetLonglineLogbookUIAction { + + public static final String ACTION_NAME = CopyValuesAndSaveSetLonglineLogbookUIAction.class.getName(); + + public CopyValuesAndSaveSetLonglineLogbookUIAction(ObserveMainUI mainUI) { + super(mainUI, ACTION_NAME, n("observe.common.SetLonglineLogbookDto.action.copyValuesAndSave"), n("observe.common.SetLonglineLogbookDto.action.copyValuesAndSave"), ObserveKeyStrokes.KEY_STROKE_COPY_VALUES_AND_SAVE); + } + + @Override + protected boolean doSave(SetLonglineLogbookUI ui, SetLonglineLogbookDto bean, ObserveEditNode<?> parentEditNode, boolean notPersisted) { + String parentId = parentEditNode.getId(); + SetLonglineLogbookUIModel model = ui.getModel(); + String setIdToCopy = Objects.requireNonNull(model.getSetIdToCopy()); + SaveResultDto saveResult = getServicesProvider().getSetLonglineLogbookService().saveAndCopyProperties(parentId, setIdToCopy, bean); + saveResult.toDto(bean); + return true; + } + +} ===================================== client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/save/SaveSetLonglineLogbookUIAction.java ===================================== @@ -31,6 +31,8 @@ import fr.ird.observe.dto.data.longline.SetLonglineLogbookReference; import fr.ird.observe.dto.result.SaveResultDto; import fr.ird.observe.navigation.model.edit.ObserveEditNode; +import javax.swing.KeyStroke; + /** * Created by tchemit on 28/09/2018. * @@ -40,6 +42,10 @@ public class SaveSetLonglineLogbookUIAction extends SaveEditDataUIActionSupport< public static final String ACTION_NAME = SaveSetLonglineLogbookUIAction.class.getName(); + public SaveSetLonglineLogbookUIAction(ObserveMainUI mainUI, String actionKey, String text, String tip, KeyStroke keyStroke) { + super(mainUI, actionKey, text, tip, keyStroke); + } + public SaveSetLonglineLogbookUIAction(ObserveMainUI mainUI) { super(mainUI, ACTION_NAME, ObserveKeyStrokes.KEY_STROKE_SAVE_DATA); } ===================================== client/src/main/java/fr/ird/observe/client/ui/content/api/data/edit/ContentEditUI.jaxx ===================================== @@ -62,5 +62,11 @@ <JButton id='delete'/> </cell> </row> + <row insets='0'> + <cell fill='both' columns="3"> + <Table id='extraActions' fill="both" weightx="1" insets='2'/> + </cell> + </row> + </Table> </fr.ird.observe.client.ui.content.api.ContentUI> ===================================== client/src/main/java/fr/ird/observe/client/ui/content/api/data/edit/ContentEditUI.jcss ===================================== @@ -30,7 +30,9 @@ #actions { visible:{model.isCanWrite()}; } - +#extraActions { + visible:false; +} #reset { _observeAction:{ResetEditUIAction.ACTION_NAME}; _globalAction:{ResetDataGlobalUIAction.ACTION_NAME}; ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUI.jaxx ===================================== @@ -34,6 +34,7 @@ fr.ird.observe.dto.referential.longline.LightsticksColorReference fr.ird.observe.client.ui.actions.content.data.longline.delete.DeleteSetLonglineLogbookUIAction + fr.ird.observe.client.ui.actions.content.data.longline.save.CopyValuesAndSaveSetLonglineLogbookUIAction fr.ird.observe.client.ui.actions.content.data.longline.save.SaveSetLonglineLogbookUIAction fr.ird.observe.client.ui.content.api.ContentUIModel @@ -427,5 +428,11 @@ <JButton id='reset'/> <JButton id='save'/> <JButton id='delete'/> - + <Table id='extraActions' fill="both" weightx="1" insets='2'> + <row> + <cell fill="both"> + <JButton id='copyValuesAndSave'/> + </cell> + </row> + </Table> </fr.ird.observe.client.ui.content.api.data.edit.ContentEditUI> ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUI.jcss ===================================== @@ -28,6 +28,15 @@ _observeAction:{DeleteSetLonglineLogbookUIAction.ACTION_NAME}; } +#extraActions { + visible:{!model.isReadingMode()}; +} + +#copyValuesAndSave { + enabled:{model.getCopySetCandidate() != null && model.isValid()}; + _observeAction:{CopyValuesAndSaveSetLonglineLogbookUIAction.ACTION_NAME}; +} + /* ***************************************************************************** */ /* SETTING TAB **************************************************************** */ /* ***************************************************************************** */ ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUIModel.java ===================================== @@ -25,6 +25,13 @@ package fr.ird.observe.client.ui.content.data.longline.logbook; import fr.ird.observe.client.ui.content.api.data.edit.ContentEditUIModel; import fr.ird.observe.dto.data.longline.SetLonglineLogbookDto; import fr.ird.observe.dto.data.longline.SetLonglineLogbookReference; +import fr.ird.observe.dto.data.longline.SetLonglineLogbookStubDto; +import fr.ird.observe.dto.form.Form; + +import java.util.Comparator; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; /** * Created on 9/28/14. @@ -36,7 +43,48 @@ public class SetLonglineLogbookUIModel extends ContentEditUIModel<SetLonglineLog private static final long serialVersionUID = 1L; + private List<SetLonglineLogbookStubDto> copySetCandidates; + private SetLonglineLogbookStubDto copySetCandidate; + public SetLonglineLogbookUIModel() { super(SetLonglineLogbookDto.class); } + + @Override + public void openForm(Form<SetLonglineLogbookDto> form) { + super.openForm(form); + + copySetCandidates = form.getObject().getOtherSets().stream() + .sorted(Comparator.comparing(SetLonglineLogbookStubDto::getSettingStartTimeStamp)) + .collect(Collectors.toList()); + addPropertyChangeListener(SetLonglineLogbookDto.PROPERTY_SETTING_START_TIME_STAMP, e -> updateCopySetCandidate((Date) e.getNewValue())); + updateCopySetCandidate(getBean().getSettingStartTimeStamp()); + } + + private void updateCopySetCandidate(Date newValue) { + if (newValue == null) { + setCopySetCandidate(null); + } else { + List<SetLonglineLogbookStubDto> collect = copySetCandidates.stream().filter(e -> e.getSettingStartTimeStamp().before(newValue)).collect(Collectors.toList()); + if (collect.isEmpty()) { + setCopySetCandidate(null); + } else { + setCopySetCandidate(collect.get(collect.size() - 1)); + } + } + } + + public SetLonglineLogbookStubDto getCopySetCandidate() { + return copySetCandidate; + } + + public void setCopySetCandidate(SetLonglineLogbookStubDto copySetCandidate) { + SetLonglineLogbookStubDto oldValue = getCopySetCandidate(); + this.copySetCandidate = copySetCandidate; + firePropertyChange("copySetCandidate", oldValue, copySetCandidate); + } + + public String getSetIdToCopy() { + return copySetCandidate == null ? null : copySetCandidate.getId(); + } } ===================================== client/src/main/resources/i18n/client_en_GB.properties ===================================== @@ -1091,6 +1091,7 @@ observe.common.SetDto.action.goToOpen.short=Open set observe.common.SetDto.action.goToOpen.tip=Open set observe.common.SetLogbookDto.action.goToOpen.short=Logbook - Open set observe.common.SetLogbookDto.action.goToOpen.tip=Go to open set (Logbook) +observe.common.SetLonglineLogbookDto.action.copyValuesAndSave=Copy values and save observe.common.SetLonglineLogbookDto.action.reset.homeId.tip=Reset home id observe.common.SetLonglineLogbookDto.basketLineLength=Bakset line length (m) observe.common.SetLonglineLogbookDto.haulingTab=Hauling ===================================== client/src/main/resources/i18n/client_es_ES.properties ===================================== @@ -1091,6 +1091,7 @@ observe.common.SetDto.action.goToOpen.short=Lance abierto observe.common.SetDto.action.goToOpen.tip=Acceder al lance abierto observe.common.SetLogbookDto.action.goToOpen.short=Logbook - Open set \#TODO observe.common.SetLogbookDto.action.goToOpen.tip=Go to open set (Logbook) \#TODO +observe.common.SetLonglineLogbookDto.action.copyValuesAndSave=Copy values and save \#TODO observe.common.SetLonglineLogbookDto.action.reset.homeId.tip=Reiniciar el id de negocio observe.common.SetLonglineLogbookDto.basketLineLength=Bakset line length (m) \#TODO observe.common.SetLonglineLogbookDto.haulingTab=Arrastre ===================================== client/src/main/resources/i18n/client_fr_FR.properties ===================================== @@ -1091,6 +1091,7 @@ observe.common.SetDto.action.goToOpen.short=Calée ouverte observe.common.SetDto.action.goToOpen.tip=Accéder à la calée ouverte observe.common.SetLogbookDto.action.goToOpen.short=Livre de bord - Calée ouverte observe.common.SetLogbookDto.action.goToOpen.tip=Accéder à la calée ouverte (Livre de bord) +observe.common.SetLonglineLogbookDto.action.copyValuesAndSave=Recopier les propriétés et enregister observe.common.SetLonglineLogbookDto.action.reset.homeId.tip=Réinitialiser l'id métier observe.common.SetLonglineLogbookDto.basketLineLength=Longueur de la ligne par panier (m) observe.common.SetLonglineLogbookDto.haulingTab=Virage ===================================== dto/src/main/java/fr/ird/observe/dto/data/longline/SetLonglineLogbookGlobalCompositionDto.java ===================================== @@ -102,4 +102,11 @@ public class SetLonglineLogbookGlobalCompositionDto extends GeneratedSetLongline firePropertyChange(PROPERTY_BAITS_COMPOSITION_PROPORTION_SUM, 0, sum); } + public void removeIds() { + setId(null); + getBaitsComposition().forEach(e -> e.setId(null)); + getBranchlinesComposition().forEach(e -> e.setId(null)); + getFloatlinesComposition().forEach(e -> e.setId(null)); + getHooksComposition().forEach(e -> e.setId(null)); + } } ===================================== dto/src/main/models/Observe-06-data-longline-logbook.model ===================================== @@ -96,6 +96,7 @@ catchLongline {*} data.longline.CatchLonglineLogbook | ordered data.longline.SetLonglineLogbookStub > data.Data | mainDto=skip homeId + {*:1} String number + {*:1} Integer +settingStartTimeStamp + {*:1} Date activityLongline {*:1} fr.ird.observe.dto.data.longline.ActivityLonglineLogbookReference | unique ===================================== persistence/src/main/java/fr/ird/observe/binder/data/longline/SetLonglineLogbookStubEntityDtoBinder.java ===================================== @@ -50,6 +50,7 @@ public class SetLonglineLogbookStubEntityDtoBinder extends DataEntityDtoBinderSu dto.setHomeId(entity.getHomeId()); dto.setNumber(entity.getNumber()); + dto.setSettingStartTimeStamp(entity.getSettingStartTimeStamp()); dto.setActivityLongline(toDataReference(referentialLocale, null)); } ===================================== server/src/main/filtered-resources/mapping ===================================== @@ -131,6 +131,7 @@ GET /api/v1/data/longline/SetLonglineLogbookService/loadForm GET /api/v1/data/longline/SetLonglineLogbookService/loadReferenceToRead v1.data.longline.SetLonglineLogbookServiceRestApi.loadReferenceToRead GET /api/v1/data/longline/SetLonglineLogbookService/preCreate v1.data.longline.SetLonglineLogbookServiceRestApi.preCreate POST /api/v1/data/longline/SetLonglineLogbookService/save v1.data.longline.SetLonglineLogbookServiceRestApi.save +POST /api/v1/data/longline/SetLonglineLogbookService/saveAndCopyProperties v1.data.longline.SetLonglineLogbookServiceRestApi.saveAndCopyProperties GET /api/v1/data/longline/SetLonglineObsCatchService/loadForm v1.data.longline.SetLonglineObsCatchServiceRestApi.loadForm POST /api/v1/data/longline/SetLonglineObsCatchService/save v1.data.longline.SetLonglineObsCatchServiceRestApi.save GET /api/v1/data/longline/SetLonglineObsDetailCompositionService/canDeleteBasket v1.data.longline.SetLonglineObsDetailCompositionServiceRestApi.canDeleteBasket ===================================== services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/SetLonglineLogbookServiceLocal.java ===================================== @@ -10,12 +10,12 @@ package fr.ird.observe.services.local.service.data.longline; * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. @@ -28,6 +28,7 @@ import fr.ird.observe.dto.DataNotFoundException; import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookDto; import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookReference; import fr.ird.observe.dto.data.longline.SetLonglineLogbookDto; +import fr.ird.observe.dto.data.longline.SetLonglineLogbookGlobalCompositionDto; import fr.ird.observe.dto.data.longline.SetLonglineLogbookReference; import fr.ird.observe.dto.data.longline.SetLonglineLogbookStubDto; import fr.ird.observe.dto.form.Form; @@ -36,6 +37,7 @@ import fr.ird.observe.entities.longline.ActivityLonglineLogbook; import fr.ird.observe.entities.longline.SetLonglineLogbook; import fr.ird.observe.entities.longline.TripLongline; import fr.ird.observe.services.local.service.ObserveServiceLocal; +import fr.ird.observe.services.service.data.longline.SetLonglineLogbookGlobalCompositionService; import fr.ird.observe.services.service.data.longline.SetLonglineLogbookService; import org.apache.commons.lang3.time.DateUtils; @@ -107,6 +109,32 @@ public class SetLonglineLogbookServiceLocal extends ObserveServiceLocal implemen return result; } + @Override + public SaveResultDto saveAndCopyProperties(String activityLonglineId, String setToCopyId, SetLonglineLogbookDto dto) { + ActivityLonglineLogbook activityLongline = ACTIVITY_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), activityLonglineId); + SetLonglineLogbook entityToCopy = SET_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), setToCopyId); + SetLonglineLogbook entity = SET_LONGLINE_LOGBOOK_SPI.loadOrCreateEntityFromDataDto(getTopiaPersistenceContext(), dto); + checkLastUpdateDate(entity, dto); + + SetLonglineLogbookGlobalCompositionService globalCompositionService = serviceContext.newService(SetLonglineLogbookGlobalCompositionService.class); + SetLonglineLogbookGlobalCompositionDto globalCompositionToCopy = globalCompositionService.loadForm(setToCopyId).getObject(); + + globalCompositionToCopy.removeIds(); + SET_LONGLINE_LOGBOOK_GLOBAL_COMPOSITION_SPI.copyDataDtoToEntity(globalCompositionToCopy, entity, getReferentialLocale()); + SET_LONGLINE_LOGBOOK_SPI.copyDataDtoToEntity(dto, entity, getReferentialLocale()); + + entity.setTotalLineLength(entityToCopy.getTotalLineLength()); + entity.setBasketLineLength(entityToCopy.getBasketLineLength()); + entity.setLengthBetweenBranchlines(entityToCopy.getLengthBetweenBranchlines()); + entity.setLineType(entityToCopy.getLineType()); + + SaveResultDto result = saveEntity(entity); + if (dto.isNotPersisted()) { + activityLongline.setSetLongline(entity); + } + return result; + } + @Override public void delete(String activityLonglineId, String setLonglineId) { ActivityLonglineLogbook activityLongline = ACTIVITY_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), activityLonglineId); @@ -128,6 +156,7 @@ public class SetLonglineLogbookServiceLocal extends ObserveServiceLocal implemen otherSetDto.setId(otherSetLongline.getTopiaId()); otherSetDto.setHomeId(otherSetLongline.getHomeId()); otherSetDto.setNumber(otherSetLongline.getNumber()); + otherSetDto.setSettingStartTimeStamp(otherSetLongline.getSettingStartTimeStamp()); ActivityLonglineLogbookReference reference = binder.toReference(getReferentialLocale(), activityLongline); otherSetDto.setActivityLongline(reference); result.add(otherSetDto); ===================================== services/src/main/java/fr/ird/observe/services/service/data/longline/SetLonglineLogbookService.java ===================================== @@ -64,6 +64,11 @@ public interface SetLonglineLogbookService extends ObserveService { @Post SaveResultDto save(String activityLonglineId, SetLonglineLogbookDto dto); + @WriteDataPermission + @Write + @Post + SaveResultDto saveAndCopyProperties(String activityLonglineId, String setToCopyId, SetLonglineLogbookDto dto); + @Write @WriteDataPermission @Delete View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/f1d57b9c63c0913884165a7aeb0… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/f1d57b9c63c0913884165a7aeb0… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] [LL] Marée : redondance des listes Type de marée - Closes #1135
by Tony CHEMIT Oct. 14, 2018

Oct. 14, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 8acf530a by Tony CHEMIT at 2018-10-14T21:12:45Z [LL] Marée : redondance des listes Type de marée - Closes #1135 - - - - - 30 changed files: - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/CatchLonglineObsUIHandler.java - − client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/LogbookTripTypeUI.jaxx - − client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationTripTypeUIHandler.java - − client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationTripTypeUIModel.java - client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationTripTypeUI.jaxx → client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationsMethodUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/LogbookTripTypeUIHandler.java → client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationsMethodUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/LogbookTripTypeUIModel.java → client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationsMethodUIModel.java - dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java - dto/src/main/java/fr/ird/observe/spi/DtoModelClasses.java - dto/src/main/models/Observe-03-referential-longline.model - dto/src/main/models/Observe-07-data-longline.model - dto/src/main/resources/i18n/dto_en_GB.properties - dto/src/main/resources/i18n/dto_es_ES.properties - dto/src/main/resources/i18n/dto_fr_FR.properties - persistence/src/main/java/fr/ird/observe/binder/data/longline/TripLonglineEntityDtoBinder.java - − persistence/src/main/java/fr/ird/observe/binder/referential/longline/LogbookTripTypeEntityDtoBinder.java - persistence/src/main/java/fr/ird/observe/binder/referential/longline/ObservationTripTypeEntityDtoBinder.java → persistence/src/main/java/fr/ird/observe/binder/referential/longline/ObservationsMethodEntityDtoBinder.java - persistence/src/main/java/fr/ird/observe/persistence/Entities.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_1.java - persistence/src/main/models/Observe-03-referential-longline.model - persistence/src/main/models/Observe-07-data-longline.model - persistence/src/main/resources/db/migration/7.1/05_rename_tripType-common.sql - − persistence/src/main/resources/db/migration/7.1/15_add_logbook_trip_type-common.sql - persistence/src/main/resources/db/migration/7.2/08_add_trip_type-common.sql - persistence/src/main/resources/db/migration/7.2/09_update_longline_trip-H2.sql - persistence/src/main/resources/db/migration/7.2/09_update_longline_trip-PG.sql - services-client/src/test/java/fr/ird/observe/services/client/service/actions/validate/ValidateServiceClientTest.java - services-local/src/test/java/fr/ird/observe/spi/DbModelHelperTest.java The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/8acf530a6919a1ac19850f45a1f… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/8acf530a6919a1ac19850f45a1f… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] [LL] Marée : redondance des listes Type de marée - Closes #1135
by Tony CHEMIT Oct. 14, 2018

Oct. 14, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 9634f856 by Tony CHEMIT at 2018-10-14T21:05:16Z [LL] Marée : redondance des listes Type de marée - Closes #1135 - - - - - 30 changed files: - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/CatchLonglineObsUIHandler.java - − client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/LogbookTripTypeUI.jaxx - − client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationTripTypeUIHandler.java - − client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationTripTypeUIModel.java - client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationTripTypeUI.jaxx → client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationsMethodUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/LogbookTripTypeUIHandler.java → client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationsMethodUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/LogbookTripTypeUIModel.java → client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationsMethodUIModel.java - dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java - dto/src/main/java/fr/ird/observe/spi/DtoModelClasses.java - dto/src/main/models/Observe-03-referential-longline.model - dto/src/main/models/Observe-07-data-longline.model - dto/src/main/resources/i18n/dto_en_GB.properties - dto/src/main/resources/i18n/dto_es_ES.properties - dto/src/main/resources/i18n/dto_fr_FR.properties - persistence/src/main/java/fr/ird/observe/binder/data/longline/TripLonglineEntityDtoBinder.java - − persistence/src/main/java/fr/ird/observe/binder/referential/longline/LogbookTripTypeEntityDtoBinder.java - persistence/src/main/java/fr/ird/observe/binder/referential/longline/ObservationTripTypeEntityDtoBinder.java → persistence/src/main/java/fr/ird/observe/binder/referential/longline/ObservationsMethodEntityDtoBinder.java - persistence/src/main/java/fr/ird/observe/persistence/Entities.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_1.java - persistence/src/main/models/Observe-03-referential-longline.model - persistence/src/main/models/Observe-07-data-longline.model - persistence/src/main/resources/db/migration/7.1/05_rename_tripType-common.sql - − persistence/src/main/resources/db/migration/7.1/15_add_logbook_trip_type-common.sql - persistence/src/main/resources/db/migration/7.2/08_add_trip_type-common.sql - persistence/src/main/resources/db/migration/7.2/09_update_longline_trip-H2.sql - persistence/src/main/resources/db/migration/7.2/09_update_longline_trip-PG.sql - services-client/src/test/java/fr/ird/observe/services/client/service/actions/validate/ValidateServiceClientTest.java - services-local/src/test/java/fr/ird/observe/spi/DbModelHelperTest.java The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/9634f85677a52c57841f4bdfe12… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/9634f85677a52c57841f4bdfe12… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] [LL] Marée : redondance des listes Type de marée - Closes #1135
by Tony CHEMIT Oct. 14, 2018

Oct. 14, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 7cb2f770 by Tony CHEMIT at 2018-10-14T20:50:08Z [LL] Marée : redondance des listes Type de marée - Closes #1135 - - - - - 30 changed files: - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/CatchLonglineObsUIHandler.java - − client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/LogbookTripTypeUI.jaxx - − client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationTripTypeUIHandler.java - − client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationTripTypeUIModel.java - client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationTripTypeUI.jaxx → client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationsMethodUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/LogbookTripTypeUIHandler.java → client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationsMethodUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/LogbookTripTypeUIModel.java → client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationsMethodUIModel.java - dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java - dto/src/main/java/fr/ird/observe/spi/DtoModelClasses.java - dto/src/main/models/Observe-03-referential-longline.model - dto/src/main/models/Observe-07-data-longline.model - dto/src/main/resources/i18n/dto_en_GB.properties - dto/src/main/resources/i18n/dto_es_ES.properties - dto/src/main/resources/i18n/dto_fr_FR.properties - persistence/src/main/java/fr/ird/observe/binder/data/longline/TripLonglineEntityDtoBinder.java - − persistence/src/main/java/fr/ird/observe/binder/referential/longline/LogbookTripTypeEntityDtoBinder.java - persistence/src/main/java/fr/ird/observe/binder/referential/longline/ObservationTripTypeEntityDtoBinder.java → persistence/src/main/java/fr/ird/observe/binder/referential/longline/ObservationsMethodEntityDtoBinder.java - persistence/src/main/java/fr/ird/observe/persistence/Entities.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_1.java - persistence/src/main/models/Observe-03-referential-longline.model - persistence/src/main/models/Observe-07-data-longline.model - persistence/src/main/resources/db/migration/7.1/05_rename_tripType-common.sql - − persistence/src/main/resources/db/migration/7.1/15_add_logbook_trip_type-common.sql - persistence/src/main/resources/db/migration/7.2/08_add_trip_type-common.sql - persistence/src/main/resources/db/migration/7.2/09_update_longline_trip-H2.sql - persistence/src/main/resources/db/migration/7.2/09_update_longline_trip-PG.sql - services-client/src/test/java/fr/ird/observe/services/client/service/actions/validate/ValidateServiceClientTest.java - services-local/src/test/java/fr/ird/observe/spi/DbModelHelperTest.java The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/7cb2f770807935484f35c2faa03… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/7cb2f770807935484f35c2faa03… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] [LL] Marée : redondance des listes Type de marée - Closes #1135
by Tony CHEMIT Oct. 14, 2018

Oct. 14, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 879cc1a8 by Tony CHEMIT at 2018-10-14T20:29:01Z [LL] Marée : redondance des listes Type de marée - Closes #1135 - - - - - 30 changed files: - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/CatchLonglineObsUIHandler.java - − client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/LogbookTripTypeUI.jaxx - − client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationTripTypeUIHandler.java - − client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationTripTypeUIModel.java - client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationTripTypeUI.jaxx → client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationsMethodUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/LogbookTripTypeUIHandler.java → client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationsMethodUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/LogbookTripTypeUIModel.java → client/src/main/java/fr/ird/observe/client/ui/content/ref/longline/ObservationsMethodUIModel.java - dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java - dto/src/main/java/fr/ird/observe/spi/DtoModelClasses.java - dto/src/main/models/Observe-03-referential-longline.model - dto/src/main/models/Observe-07-data-longline.model - dto/src/main/resources/i18n/dto_en_GB.properties - dto/src/main/resources/i18n/dto_es_ES.properties - dto/src/main/resources/i18n/dto_fr_FR.properties - persistence/src/main/java/fr/ird/observe/binder/data/longline/TripLonglineEntityDtoBinder.java - − persistence/src/main/java/fr/ird/observe/binder/referential/longline/LogbookTripTypeEntityDtoBinder.java - persistence/src/main/java/fr/ird/observe/binder/referential/longline/ObservationTripTypeEntityDtoBinder.java → persistence/src/main/java/fr/ird/observe/binder/referential/longline/ObservationsMethodEntityDtoBinder.java - persistence/src/main/java/fr/ird/observe/persistence/Entities.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_1.java - persistence/src/main/models/Observe-03-referential-longline.model - persistence/src/main/models/Observe-07-data-longline.model - persistence/src/main/resources/db/migration/7.1/05_rename_tripType-common.sql - − persistence/src/main/resources/db/migration/7.1/15_add_logbook_trip_type-common.sql - persistence/src/main/resources/db/migration/7.2/08_add_trip_type-common.sql - persistence/src/main/resources/db/migration/7.2/09_update_longline_trip-H2.sql - persistence/src/main/resources/db/migration/7.2/09_update_longline_trip-PG.sql - services-client/src/test/java/fr/ird/observe/services/client/service/actions/validate/ValidateServiceClientTest.java - services-local/src/test/java/fr/ird/observe/spi/DbModelHelperTest.java The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/879cc1a8d3e8981d751392bcaa3… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/879cc1a8d3e8981d751392bcaa3… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] [LL] Débarquements : petits ajustements 2 - Closes #1137
by Tony CHEMIT Oct. 14, 2018

Oct. 14, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: ebe44cac by Tony CHEMIT at 2018-10-14T18:52:58Z [LL] Débarquements : petits ajustements 2 - Closes #1137 - - - - - 14 changed files: - client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java - + client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/SelectTransshipmentLandingLogbookUIAction.java - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/TripLonglineLandingLogbookUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/TripLonglineLandingLogbookUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/TripLonglineLandingLogbookUIModel.java - client/src/main/resources/i18n/client_en_GB.properties - client/src/main/resources/i18n/client_es_ES.properties - client/src/main/resources/i18n/client_fr_FR.properties - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_4.java - − persistence/src/main/resources/db/migration/7.4/02_update_referential_common_harbour-common.sql - test/src/main/resources/db/7.4/dataForTestLongline.sql.gz - test/src/main/resources/db/7.4/dataForTestSeine.sql.gz - test/src/main/resources/db/7.4/referentiel.sql.gz - test/src/main/resources/fixtures/count-referential-common.properties Changes: ===================================== client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java ===================================== @@ -74,6 +74,7 @@ public abstract class ObserveKeyStrokes { public static final KeyStroke KEY_STROKE_CONFIGURE_SYNCHRO_FROM_RIGHT = KeyStroke.getKeyStroke("ctrl pressed B"); public static final KeyStroke KEY_STROKE_CONFIGURE_SYNCHRO_FROM_BOTH = KeyStroke.getKeyStroke("ctrl pressed C"); + public static final KeyStroke KEY_STROKE_SELECT_TRANSSHIPMENT = KeyStroke.getKeyStroke("ctrl pressed T"); public static final KeyStroke KEY_STROKE_SAVE_TABLE_ENTRY = KeyStroke.getKeyStroke("ctrl pressed S"); public static final KeyStroke KEY_STROKE_PRESSED_ENTER = KeyStroke.getKeyStroke("pressed ENTER"); public static final KeyStroke KEY_STROKE_RESET = KeyStroke.getKeyStroke("ctrl pressed R"); ===================================== client/src/main/java/fr/ird/observe/client/ui/actions/content/data/longline/SelectTransshipmentLandingLogbookUIAction.java ===================================== @@ -0,0 +1,54 @@ +package fr.ird.observe.client.ui.actions.content.data.longline; + +/*- + * #%L + * ObServe :: Client + * %% + * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import fr.ird.observe.client.ui.ObserveKeyStrokes; +import fr.ird.observe.client.ui.ObserveMainUI; +import fr.ird.observe.client.ui.actions.content.api.AbstractContentUIAction; +import fr.ird.observe.client.ui.content.api.ContentUI; +import fr.ird.observe.client.ui.content.data.longline.logbook.TripLonglineLandingLogbookUI; +import fr.ird.observe.client.ui.content.data.longline.logbook.TripLonglineLandingLogbookUIModel; + +import static org.nuiton.i18n.I18n.n; + +/** + * Created by tchemit on 14/10/2018. + * + * @author Tony Chemit - dev(a)tchemit.fr + */ +public class SelectTransshipmentLandingLogbookUIAction extends AbstractContentUIAction { + + public static final String ACTION_NAME = SelectTransshipmentLandingLogbookUIAction.class.getName(); + + public SelectTransshipmentLandingLogbookUIAction(ObserveMainUI mainUI) { + super(mainUI, ACTION_NAME, n("observe.common.TripLonglineLandingLogbookDto.action.selectTransshipment"), n("observe.common.TripLonglineLandingLogbookDto.action.selectTransshipment"), "data-calcule", ObserveKeyStrokes.KEY_STROKE_SELECT_TRANSSHIPMENT); + } + + @Override + protected void actionPerformed(ContentUI contentUI) { + + TripLonglineLandingLogbookUI ui = (TripLonglineLandingLogbookUI) contentUI; + TripLonglineLandingLogbookUIModel model = ui.getModel(); + model.selectTransshipment(); + } +} ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/TripLonglineLandingLogbookUI.jaxx ===================================== @@ -39,6 +39,7 @@ fr.ird.observe.client.ui.actions.content.data.longline.delete.DeleteTripLonglineLandingLogbookUIAction fr.ird.observe.client.ui.actions.content.data.longline.move.MoveSingleTripLonglineLandingLogbookUIAction fr.ird.observe.client.ui.actions.content.data.longline.save.SaveTripLonglineLandingLogbookUIAction + fr.ird.observe.client.ui.actions.content.data.longline.SelectTransshipmentLandingLogbookUIAction fr.ird.observe.client.ui.util.JComment fr.ird.observe.client.ObserveSwingApplicationContext @@ -121,7 +122,10 @@ <JLabel id='harbourLabel'/> </cell> <cell weightx='1' anchor='east'> - <BeanFilterableComboBox id='harbour' constructorParams='this' genericType='HarbourReference'/> + <JPanel layout="{new BorderLayout()}"> + <BeanFilterableComboBox id='harbour' constructorParams='this' genericType='HarbourReference' constraints='BorderLayout.CENTER'/> + <JButton id='selectTransshipment' constraints='BorderLayout.EAST'/> + </JPanel> </cell> </row> ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/TripLonglineLandingLogbookUI.jcss ===================================== @@ -99,3 +99,7 @@ #save { _observeAction:{SaveTripLonglineLandingLogbookUIAction.ACTION_NAME}; } + +#selectTransshipment { + _observeAction:{SelectTransshipmentLandingLogbookUIAction.ACTION_NAME}; +} ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/TripLonglineLandingLogbookUIModel.java ===================================== @@ -22,9 +22,12 @@ package fr.ird.observe.client.ui.content.data.longline.logbook; * #L% */ +import fr.ird.observe.client.ui.content.api.ContentUI; import fr.ird.observe.client.ui.content.api.data.open.ContentOpenableUIModel; import fr.ird.observe.dto.data.longline.LandingLogbookDto; import fr.ird.observe.dto.data.longline.LandingLogbookReference; +import fr.ird.observe.dto.referential.HarbourReference; +import fr.ird.observe.dto.referential.VesselReference; import org.nuiton.i18n.I18n; /** @@ -37,8 +40,27 @@ public class TripLonglineLandingLogbookUIModel extends ContentOpenableUIModel<La private static final long serialVersionUID = 1L; + //FIXME-PROTECTED-ID + private static final String LONGLINE_LANDING_LOGBOOK_TRANSSHIPMENT_VESSEL_ID = "fr.ird.observe.entities.referentiel.Vessel#1308214144311#0.8813727202637713"; + //FIXME-PROTECTED-ID + private static final String LONGLINE_LANDING_LOGBOOK_TRANSSHIPMENT_HARBOUR_ID = "fr.ird.observe.entities.referentiel.Harbour#11#0.38"; + + private HarbourReference transshipmentHarbour; + private VesselReference transshipmentVessel; + public TripLonglineLandingLogbookUIModel() { super(LandingLogbookDto.class, I18n.n("observe.common.TripLonglineLandingLogbookDto.message.not.open")); } + @Override + public void init(ContentUI ui) { + super.init(ui); + transshipmentHarbour = ui.getDataSource().getReferentialReferenceSet(HarbourReference.class).tryGetReferenceById(LONGLINE_LANDING_LOGBOOK_TRANSSHIPMENT_HARBOUR_ID).orElseThrow(IllegalStateException::new); + transshipmentVessel = ui.getDataSource().getReferentialReferenceSet(VesselReference.class).tryGetReferenceById(LONGLINE_LANDING_LOGBOOK_TRANSSHIPMENT_VESSEL_ID).orElseThrow(IllegalStateException::new); + } + + public void selectTransshipment() { + getBean().setHarbour(transshipmentHarbour); + getBean().setVessel(transshipmentVessel); + } } ===================================== client/src/main/resources/i18n/client_en_GB.properties ===================================== @@ -1339,6 +1339,7 @@ observe.common.TripLonglineLandingLogbookDto.action.moves.tip=Move selected land observe.common.TripLonglineLandingLogbookDto.action.reopen.tip=Reopen landing observe.common.TripLonglineLandingLogbookDto.action.reopenSelected=Reopen landing observe.common.TripLonglineLandingLogbookDto.action.reopenSelected.tip=Reopen landing +observe.common.TripLonglineLandingLogbookDto.action.selectTransshipment=Transshipment at sea observe.common.TripLonglineLandingLogbookDto.comment=Comment observe.common.TripLonglineLandingLogbookDto.list=List of landings observe.common.TripLonglineLandingLogbookDto.list.message.none=< No landing for current trip > ===================================== client/src/main/resources/i18n/client_es_ES.properties ===================================== @@ -1339,6 +1339,7 @@ observe.common.TripLonglineLandingLogbookDto.action.moves.tip=Move selected land observe.common.TripLonglineLandingLogbookDto.action.reopen.tip=Reopen landing observe.common.TripLonglineLandingLogbookDto.action.reopenSelected=Reopen landing observe.common.TripLonglineLandingLogbookDto.action.reopenSelected.tip=Reopen landing +observe.common.TripLonglineLandingLogbookDto.action.selectTransshipment=Transbordo en el mar observe.common.TripLonglineLandingLogbookDto.comment=Comment observe.common.TripLonglineLandingLogbookDto.list=List of landings observe.common.TripLonglineLandingLogbookDto.list.message.none=< No landing for current trip > ===================================== client/src/main/resources/i18n/client_fr_FR.properties ===================================== @@ -1339,6 +1339,7 @@ observe.common.TripLonglineLandingLogbookDto.action.moves.tip=Déplacer les déb observe.common.TripLonglineLandingLogbookDto.action.reopen.tip=Rouvrir le débarquement observe.common.TripLonglineLandingLogbookDto.action.reopenSelected=Rouvrir le débarquement observe.common.TripLonglineLandingLogbookDto.action.reopenSelected.tip=Rouvrir le débarquement sélectionné +observe.common.TripLonglineLandingLogbookDto.action.selectTransshipment=Transbordement en mer observe.common.TripLonglineLandingLogbookDto.comment=Commentaire de le débarquement observe.common.TripLonglineLandingLogbookDto.list=Liste des débarquements observe.common.TripLonglineLandingLogbookDto.list.message.none=< Aucun débarquement pour la marée courante > ===================================== persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_4.java ===================================== @@ -42,7 +42,6 @@ public class DataSourceMigrationForVersion_7_4 extends MigrationVersionResource @Override public void generateSqlScript(MigrationVersionResourceExecutor executor) { executor.addScript("01", "update_referential_longline_conservation"); - executor.addScript("02", "update_referential_common_harbour"); executor.addScript("03", "update_referential_longline_line_type"); executor.addScript("04", "update_longline_set_logbook_field"); executor.addScript("05", "update_longline_activity_logbook_field"); ===================================== persistence/src/main/resources/db/migration/7.4/02_update_referential_common_harbour-common.sql deleted ===================================== @@ -1,23 +0,0 @@ ---- --- #%L --- ObServe :: Persistence --- %% --- Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io --- %% --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as --- published by the Free Software Foundation, either version 3 of the --- License, or (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public --- License along with this program. If not, see --- <http://www.gnu.org/licenses/gpl-3.0.html>. --- #L% ---- -INSERT INTO observe_common.Harbour(topiaid, topiaversion, topiacreatedate, lastupdatedate, status, needComment, code, name) values ('fr.ird.observe.entities.referentiel.Harbour#11#0.100' , 0, CURRENT_DATE, CURRENT_TIMESTAMP, 1, false, '998', 'At sea transshipment'); -UPDATE observe_common.LASTUPDATEDATE SET lastupdatedate = CURRENT_TIMESTAMP WHERE topiaId = 'fr.ird.observe.entities.LastUpdateDate#1236861982132#0.06'; ===================================== test/src/main/resources/db/7.4/dataForTestLongline.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/7.4/dataForTestSeine.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/7.4/referentiel.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/fixtures/count-referential-common.properties ===================================== @@ -27,7 +27,7 @@ observe_common.gear=26 observe_common.gear_gearcaracteristic=29 observe_common.gearcaracteristic=22 observe_common.gearcaracteristictype=6 -observe_common.harbour=75 +observe_common.harbour=74 observe_common.lastupdatedate=125 observe_common.lengthlengthparameter=0 observe_common.lengthmeasuremethod=4 View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/ebe44cac1a88981ba2c3d05a869… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/ebe44cac1a88981ba2c3d05a869… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 11 commits: update changelog
by Tony CHEMIT Oct. 14, 2018

Oct. 14, 2018
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: a640b3f6 by Tony CHEMIT at 2018-10-14T13:49:34Z update changelog - - - - - 10ac78bf by Tony CHEMIT at 2018-10-14T14:59:39Z [PS] Calée / Captures accessoires : le numéro de cuve n&#39;est plus éditable après le premier enregistrement - Closes #1143 - - - - - 514ffc6b by Tony CHEMIT at 2018-10-14T15:00:09Z Problème d&#39;affichage dans l&#39;UI référentiel relations taille-poids - Closes #1142 - - - - - f0eba373 by Tony CHEMIT at 2018-10-14T15:03:27Z Création de profils de connexions : cosmétique - Closes #1140 - - - - - 6851f554 by Tony CHEMIT at 2018-10-14T15:03:56Z Création de profils de connexions : cosmétique - Closes #1642 - - - - - 22362a2c by Tony CHEMIT at 2018-10-14T15:17:54Z Amélioration du composant de cartographie - Closes #901 - - - - - df297092 by Tony CHEMIT at 2018-10-14T16:23:56Z [PS][FOB] Plusieurs mappings anciens types FAD / Nouveaux matériaux sont erronés - Closes #1136 - - - - - 840b8d10 by Tony CHEMIT at 2018-10-14T16:24:02Z Revoir le rapport utilisation des dcp - Closes #1082 - - - - - 29cc0ae2 by Tony CHEMIT at 2018-10-14T16:24:03Z Realign database model version to 7.0 - - - - - b71a5868 by Tony CHEMIT at 2018-10-14T16:24:10Z Realign database model version to 7.0 - - - - - 592402c9 by Tony CHEMIT at 2018-10-14T17:44:10Z [LL] Débarquements : petits ajustements - Closes #1121 (validation poids et pas du nombre) - - - - - 30 changed files: - .mvn/gitlab-cache/milestones/532657-issues.json - .mvn/gitlab-cache/milestones/532657.json - + .mvn/gitlab-cache/milestones/655988-artifacts.json - .mvn/gitlab-cache/milestones/655988-issues.json - .mvn/gitlab-cache/milestones/655988.json - + .mvn/gitlab-cache/milestones/674086-issues.json - + .mvn/gitlab-cache/milestones/674086.json - CHANGELOG.md - client/pom.xml - client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java - + client/src/main/java/fr/ird/observe/client/ui/actions/storage/presets/CancelRemoteUIAction.java - + client/src/main/java/fr/ird/observe/client/ui/actions/storage/presets/CancelServerUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/storage/presets/CreatePresetUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/storage/presets/SaveRemoteUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/storage/presets/SaveServerUIAction.java - client/src/main/java/fr/ird/observe/client/ui/content/api/ContentUIManager.java - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetCatchUI.jcss - client/src/main/java/fr/ird/observe/client/ui/storage/presets/RemotePresetsUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/storage/presets/RemotePresetsUI.jcss - client/src/main/java/fr/ird/observe/client/ui/storage/presets/RemotePresetsUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/storage/presets/RemotePresetsUIModel.java - client/src/main/java/fr/ird/observe/client/ui/util/UIHelper.java - client/src/main/java/fr/ird/observe/client/ui/util/tripMap/ObserveMapPane.java - client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapUI.jcss - client/src/main/resources/i18n/client_en_GB.properties - client/src/main/resources/i18n/client_es_ES.properties - client/src/main/resources/i18n/client_fr_FR.properties - persistence/src/main/java/fr/ird/observe/binder/referential/common/LengthWeightParameterEntityDtoBinder.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_6_1.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_6_2.java The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/eed3e13c7c22f83b8bb3c26e03… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/eed3e13c7c22f83b8bb3c26e03… You're receiving this email because of your account on gitlab.com.
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.