Observe-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
September 2018
- 1 participants
- 147 discussions
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
1e34d8ca by Tony CHEMIT at 2018-09-15T11:58:06Z
update changelog
- - - - -
5 changed files:
- .mvn/gitlab-cache/milestones/532584-issues.json
- .mvn/gitlab-cache/milestones/532584.json
- + .mvn/gitlab-cache/milestones/644883-issues.json
- + .mvn/gitlab-cache/milestones/644883.json
- CHANGELOG.md
Changes:
=====================================
.mvn/gitlab-cache/milestones/532584-issues.json
=====================================
@@ -17,10 +17,10 @@
"projectId": 2722779,
"groupId": 0,
"title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
+ "description": "Première partie du troisième lot du contrat IRD-2018-01-V8.\r\ncontient les nouveaux écrans, mais aucune des fonctionnalités avancées.",
+ "dueDate": "Sep 15, 2018 2:00:00 AM",
"startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
+ "state": "closed"
},
"assignee": {
"_id": 166231,
@@ -50,153 +50,6 @@
"updatedAt": "May 24, 2018 10:48:15 AM",
"createdAt": "Feb 17, 2017 1:49:27 PM"
},
- {
- "id": 12729061,
- "iid": 1031,
- "projectId": 2722779,
- "title": "Création de nouvelles icônes de navigation",
- "description": "",
- "labels": [
- "IRD-2018-01-V8",
- "Tâche"
- ],
- "milestone": {
- "id": 532584,
- "iid": 114,
- "projectId": 2722779,
- "groupId": 0,
- "title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
- "startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
- },
- "assignee": {
- "_id": 1111318,
- "_username": "pcauquil",
- "_name": "Pascal Cauquil",
- "_state": "active",
- "_darkScheme": false,
- "_isAdmin": false,
- "_canCreateGroup": false,
- "_canCreateProject": false,
- "_canCreateTeam": false,
- "_avatarUrl": "https://secure.gravatar.com/avatar/b4ae117bd93e10d96298fa4d885208ea?s\u003d…"
- },
- "author": {
- "_id": 166231,
- "_username": "tchemit",
- "_name": "Tony CHEMIT",
- "_state": "active",
- "_darkScheme": false,
- "_isAdmin": false,
- "_canCreateGroup": false,
- "_canCreateProject": false,
- "_canCreateTeam": false,
- "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
- },
- "state": "opened",
- "updatedAt": "Aug 24, 2018 9:42:31 AM",
- "createdAt": "Jul 13, 2018 2:18:33 PM"
- },
- {
- "id": 9963535,
- "iid": 918,
- "projectId": 2722779,
- "title": "Déplacement de groupes de données",
- "description": "Comme cela a été évoqué précédemment dans ce document, il faut permettre, par clic droit, de\ndéplacer les groupes « données d’observation », « logbooks », « échantillons » d’une marée à l’autre.\n\nExactement comme l’on peut, actuellement, déplacer une marée de programme par le menu contextuel. \n\nCeci entraînera nécessairement la perte des appariements entre activités d’observation et\nlogbooks s’il y en avait. Par contre on fera suivre si possible les champs de la table Activité relatifs à\nces groupes (données des onglets Caractéristiques d’observation et Caractéristiques logbooks).\n\nLes déplacements possibles seront :\n * Déplacer le logbook d’une marée vers une autre\n * Déplacer les débarquements d’une marée vers une autre\n * Déplacer les échantillons :\n * de la racine de la marée vers une opération de pêche (de la même marée ou d’une autre)\n * d’une opération de pêche vers la racine de la marée (ou d’une autre marée)\n * d’une opération de pêche vers une autre opération de pêche (de la même marée ou d’un autre)",
- "labels": [
- "Evolution",
- "IRD-2018-01-V8"
- ],
- "milestone": {
- "id": 532584,
- "iid": 114,
- "projectId": 2722779,
- "groupId": 0,
- "title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
- "startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
- },
- "assignee": {
- "_id": 166231,
- "_username": "tchemit",
- "_name": "Tony CHEMIT",
- "_state": "active",
- "_darkScheme": false,
- "_isAdmin": false,
- "_canCreateGroup": false,
- "_canCreateProject": false,
- "_canCreateTeam": false,
- "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
- },
- "author": {
- "_id": 166231,
- "_username": "tchemit",
- "_name": "Tony CHEMIT",
- "_state": "active",
- "_darkScheme": false,
- "_isAdmin": false,
- "_canCreateGroup": false,
- "_canCreateProject": false,
- "_canCreateTeam": false,
- "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
- },
- "state": "opened",
- "updatedAt": "May 24, 2018 10:44:47 AM",
- "createdAt": "Mar 27, 2018 3:49:17 PM"
- },
- {
- "id": 9962673,
- "iid": 914,
- "projectId": 2722779,
- "title": "Gestion des transbordements",
- "description": "Les transbordements seront gérés comme des débarquements, en indiquant comme destination du\ndébarquement l’identité d’un bateau. Le formulaire destiné aux débarquements devra donc\ncomporter une liste déroulante alimentée par la table observe_common.vessel.\n\nUn marqueur débarquement/transbordement serait peut-être pertinent sur le formulaire débarquement",
- "labels": [
- "Evolution",
- "IRD-2018-01-V8"
- ],
- "milestone": {
- "id": 532584,
- "iid": 114,
- "projectId": 2722779,
- "groupId": 0,
- "title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
- "startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
- },
- "assignee": {
- "_id": 166231,
- "_username": "tchemit",
- "_name": "Tony CHEMIT",
- "_state": "active",
- "_darkScheme": false,
- "_isAdmin": false,
- "_canCreateGroup": false,
- "_canCreateProject": false,
- "_canCreateTeam": false,
- "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
- },
- "author": {
- "_id": 166231,
- "_username": "tchemit",
- "_name": "Tony CHEMIT",
- "_state": "active",
- "_darkScheme": false,
- "_isAdmin": false,
- "_canCreateGroup": false,
- "_canCreateProject": false,
- "_canCreateTeam": false,
- "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
- },
- "state": "opened",
- "updatedAt": "May 24, 2018 10:44:53 AM",
- "createdAt": "Mar 27, 2018 2:54:56 PM"
- },
{
"id": 9962652,
"iid": 913,
@@ -213,10 +66,10 @@
"projectId": 2722779,
"groupId": 0,
"title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
+ "description": "Première partie du troisième lot du contrat IRD-2018-01-V8.\r\ncontient les nouveaux écrans, mais aucune des fonctionnalités avancées.",
+ "dueDate": "Sep 15, 2018 2:00:00 AM",
"startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
+ "state": "closed"
},
"assignee": {
"_id": 166231,
@@ -242,8 +95,8 @@
"_canCreateTeam": false,
"_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
},
- "state": "opened",
- "updatedAt": "May 30, 2018 10:39:11 AM",
+ "state": "closed",
+ "updatedAt": "Sep 15, 2018 1:54:07 PM",
"createdAt": "Mar 27, 2018 2:53:27 PM"
},
{
@@ -262,10 +115,10 @@
"projectId": 2722779,
"groupId": 0,
"title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
+ "description": "Première partie du troisième lot du contrat IRD-2018-01-V8.\r\ncontient les nouveaux écrans, mais aucune des fonctionnalités avancées.",
+ "dueDate": "Sep 15, 2018 2:00:00 AM",
"startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
+ "state": "closed"
},
"assignee": {
"_id": 166231,
@@ -291,8 +144,8 @@
"_canCreateTeam": false,
"_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
},
- "state": "opened",
- "updatedAt": "May 30, 2018 10:39:11 AM",
+ "state": "closed",
+ "updatedAt": "Sep 15, 2018 1:54:06 PM",
"createdAt": "Mar 27, 2018 2:31:46 PM"
},
{
@@ -311,10 +164,10 @@
"projectId": 2722779,
"groupId": 0,
"title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
+ "description": "Première partie du troisième lot du contrat IRD-2018-01-V8.\r\ncontient les nouveaux écrans, mais aucune des fonctionnalités avancées.",
+ "dueDate": "Sep 15, 2018 2:00:00 AM",
"startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
+ "state": "closed"
},
"assignee": {
"_id": 166231,
@@ -340,8 +193,8 @@
"_canCreateTeam": false,
"_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
},
- "state": "opened",
- "updatedAt": "May 25, 2018 11:13:19 PM",
+ "state": "closed",
+ "updatedAt": "Sep 15, 2018 1:54:06 PM",
"createdAt": "Mar 27, 2018 1:59:29 PM"
},
{
@@ -360,10 +213,10 @@
"projectId": 2722779,
"groupId": 0,
"title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
+ "description": "Première partie du troisième lot du contrat IRD-2018-01-V8.\r\ncontient les nouveaux écrans, mais aucune des fonctionnalités avancées.",
+ "dueDate": "Sep 15, 2018 2:00:00 AM",
"startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
+ "state": "closed"
},
"assignee": {
"_id": 166231,
@@ -389,8 +242,8 @@
"_canCreateTeam": false,
"_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
},
- "state": "opened",
- "updatedAt": "May 24, 2018 10:45:15 AM",
+ "state": "closed",
+ "updatedAt": "Sep 15, 2018 1:54:06 PM",
"createdAt": "Mar 27, 2018 1:51:08 PM"
},
{
@@ -409,10 +262,10 @@
"projectId": 2722779,
"groupId": 0,
"title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
+ "description": "Première partie du troisième lot du contrat IRD-2018-01-V8.\r\ncontient les nouveaux écrans, mais aucune des fonctionnalités avancées.",
+ "dueDate": "Sep 15, 2018 2:00:00 AM",
"startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
+ "state": "closed"
},
"assignee": {
"_id": 166231,
@@ -438,59 +291,10 @@
"_canCreateTeam": false,
"_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
},
- "state": "opened",
- "updatedAt": "May 25, 2018 11:13:19 PM",
+ "state": "closed",
+ "updatedAt": "Sep 15, 2018 1:54:06 PM",
"createdAt": "Mar 27, 2018 1:30:30 PM"
},
- {
- "id": 9961323,
- "iid": 908,
- "projectId": 2722779,
- "title": "Nouvelle action « Apparier les activités logbook/observations »",
- "description": "La liste déroulante des activités d’observation sur l\u0027écran d\u0027une activité Logbook potentiellement rattachables pourra être saisie\nmanuellement ou via un algorithme d’appariement.\n\nCet algorithme sera accessible par un menu Actions/apparier les activités logbook/observations :\n * Soit un intervalle de temps d’approximation ta, paramétrable depuis la configuration. Valeur par défaut 30min.\n * Soit une distance spatiale d’approximation (en miles ou km) da, paramétrable depuis la configuration. Valeur par défaut 50km.\n * L’assistant permet d’abord de décider d’écraser ou de laisser en l’état les appariements déjà existants (case à cocher)\n * Pour chaque activité logbook de la marée, rechercher l’activité de même type la plus proche dans les données d’observation :\n * Le temps (date/heure d’observation) est le critère prioritaire : l’activité d’observation la plus proche temporellement gagne\n * Vérifier que l’activité élue satisfait aux seuils maximums ta et da\n * L’assistant présente le résultat de la mise en correspondance avant application et permet à\nl’utilisateur de modifier une à une les associations s’il le souhaite. Typiquement un tableau à\ndeux colonnes présente à gauche la liste des activités logbook, et à droite, en regard de chaque\nactivité, une liste déroulante contenant toutes les activités d’observation de même type, avec\nla plus probable sélectionnée par défaut\n * Une fois les propositions passées en revue et éventuellement modifiées, l’utilisateur peut choisir d’appliquer ou d’annuler",
- "labels": [
- "Evolution",
- "IRD-2018-01-V8"
- ],
- "milestone": {
- "id": 532584,
- "iid": 114,
- "projectId": 2722779,
- "groupId": 0,
- "title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
- "startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
- },
- "assignee": {
- "_id": 166231,
- "_username": "tchemit",
- "_name": "Tony CHEMIT",
- "_state": "active",
- "_darkScheme": false,
- "_isAdmin": false,
- "_canCreateGroup": false,
- "_canCreateProject": false,
- "_canCreateTeam": false,
- "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
- },
- "author": {
- "_id": 166231,
- "_username": "tchemit",
- "_name": "Tony CHEMIT",
- "_state": "active",
- "_darkScheme": false,
- "_isAdmin": false,
- "_canCreateGroup": false,
- "_canCreateProject": false,
- "_canCreateTeam": false,
- "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
- },
- "state": "opened",
- "updatedAt": "May 24, 2018 10:45:24 AM",
- "createdAt": "Mar 27, 2018 1:27:27 PM"
- },
{
"id": 9961218,
"iid": 907,
@@ -507,10 +311,10 @@
"projectId": 2722779,
"groupId": 0,
"title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
+ "description": "Première partie du troisième lot du contrat IRD-2018-01-V8.\r\ncontient les nouveaux écrans, mais aucune des fonctionnalités avancées.",
+ "dueDate": "Sep 15, 2018 2:00:00 AM",
"startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
+ "state": "closed"
},
"assignee": {
"_id": 166231,
@@ -536,8 +340,8 @@
"_canCreateTeam": false,
"_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
},
- "state": "opened",
- "updatedAt": "May 25, 2018 11:13:19 PM",
+ "state": "closed",
+ "updatedAt": "Sep 15, 2018 1:54:06 PM",
"createdAt": "Mar 27, 2018 1:22:05 PM"
},
{
@@ -556,10 +360,10 @@
"projectId": 2722779,
"groupId": 0,
"title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
+ "description": "Première partie du troisième lot du contrat IRD-2018-01-V8.\r\ncontient les nouveaux écrans, mais aucune des fonctionnalités avancées.",
+ "dueDate": "Sep 15, 2018 2:00:00 AM",
"startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
+ "state": "closed"
},
"assignee": {
"_id": 166231,
@@ -585,106 +389,8 @@
"_canCreateTeam": false,
"_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
},
- "state": "opened",
- "updatedAt": "May 24, 2018 10:45:34 AM",
+ "state": "closed",
+ "updatedAt": "Sep 15, 2018 1:54:06 PM",
"createdAt": "Mar 27, 2018 1:11:48 PM"
- },
- {
- "id": 9960494,
- "iid": 902,
- "projectId": 2722779,
- "title": "Visualisation des données du livre de bord sur la carte",
- "description": "En LL, La carte trace actuellement les coups de pêche de la marée d’observation. \n\nOn y ajoutera 2 cases à cocher permettant de choisir quelles données afficher :\n * Données d’observation\n * Données du logbook\n\nLa superposition des 2 traces sera donc possible.\n\nChaque case sera grisée si l’information n’est pas disponible.\n\nLa carte LL actuelle montre les aires de pêche, pas la trace du bateau.",
- "labels": [
- "Evolution",
- "IRD-2018-01-V8"
- ],
- "milestone": {
- "id": 532584,
- "iid": 114,
- "projectId": 2722779,
- "groupId": 0,
- "title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
- "startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
- },
- "assignee": {
- "_id": 166231,
- "_username": "tchemit",
- "_name": "Tony CHEMIT",
- "_state": "active",
- "_darkScheme": false,
- "_isAdmin": false,
- "_canCreateGroup": false,
- "_canCreateProject": false,
- "_canCreateTeam": false,
- "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
- },
- "author": {
- "_id": 166231,
- "_username": "tchemit",
- "_name": "Tony CHEMIT",
- "_state": "active",
- "_darkScheme": false,
- "_isAdmin": false,
- "_canCreateGroup": false,
- "_canCreateProject": false,
- "_canCreateTeam": false,
- "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
- },
- "state": "opened",
- "updatedAt": "May 24, 2018 10:45:39 AM",
- "createdAt": "Mar 27, 2018 12:31:34 PM"
- },
- {
- "id": 9960458,
- "iid": 901,
- "projectId": 2722779,
- "title": "Amélioration du composant de cartographie",
- "description": "Sur la carte on ajoute également deux boutons Zoom+/Zoom- pour faciliter le zoom lorsque l’on n’a pas\nde molette. \nLe Zoom- est limité de sorte à ce que le planisphère occupe pleinement hauteur ou largeur.",
- "labels": [
- "Evolution",
- "IRD-2018-01-V8"
- ],
- "milestone": {
- "id": 532584,
- "iid": 114,
- "projectId": 2722779,
- "groupId": 0,
- "title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
- "startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
- },
- "assignee": {
- "_id": 166231,
- "_username": "tchemit",
- "_name": "Tony CHEMIT",
- "_state": "active",
- "_darkScheme": false,
- "_isAdmin": false,
- "_canCreateGroup": false,
- "_canCreateProject": false,
- "_canCreateTeam": false,
- "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
- },
- "author": {
- "_id": 166231,
- "_username": "tchemit",
- "_name": "Tony CHEMIT",
- "_state": "active",
- "_darkScheme": false,
- "_isAdmin": false,
- "_canCreateGroup": false,
- "_canCreateProject": false,
- "_canCreateTeam": false,
- "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
- },
- "state": "opened",
- "updatedAt": "May 24, 2018 10:46:44 AM",
- "createdAt": "Mar 27, 2018 12:29:15 PM"
}
]
\ No newline at end of file
=====================================
.mvn/gitlab-cache/milestones/532584.json
=====================================
@@ -4,8 +4,8 @@
"projectId": 2722779,
"groupId": 0,
"title": "8.0-alpha-3",
- "description": "Troisième lot du contrat IRD-2018-01-V8",
- "dueDate": "May 31, 2018 2:00:00 AM",
+ "description": "Première partie du troisième lot du contrat IRD-2018-01-V8.\r\ncontient les nouveaux écrans, mais aucune des fonctionnalités avancées.",
+ "dueDate": "Sep 15, 2018 2:00:00 AM",
"startDate": "May 24, 2018 2:00:00 AM",
- "state": "active"
+ "state": "closed"
}
\ No newline at end of file
=====================================
.mvn/gitlab-cache/milestones/644883-issues.json
=====================================
@@ -0,0 +1 @@
+[]
\ No newline at end of file
=====================================
.mvn/gitlab-cache/milestones/644883.json
=====================================
@@ -0,0 +1,8 @@
+{
+ "id": 644883,
+ "iid": 122,
+ "projectId": 2722779,
+ "groupId": 0,
+ "title": "7.0-RC-19",
+ "state": "active"
+}
\ No newline at end of file
=====================================
CHANGELOG.md
=====================================
@@ -1,7 +1,26 @@
# ObServe changelog
* Author [Tony Chemit](mailto:dev@tchemit.fr)
- * Last generated at 2018-09-12 17:51.
+ * Last generated at 2018-09-15 13:57.
+
+## Version [8.0-alpha-3](https://gitlab.com/ultreiaio/ird-observe/milestones/114)
+Première partie du troisième lot du contrat IRD-2018-01-V8. contient les nouveaux écrans, mais aucune des fonctionnalités avancées.
+
+**Closed at 2018-09-15.**
+
+### Download
+* [Application (observe-8.0-alpha-3.zip)](https://ultreia.io/release/observe-8.0-alpha-3.zip)
+* [Serveur (observe-8.0-alpha-3.war)](https://ultreia.io/release/observe-8.0-alpha-3.war)
+
+### Issues
+ * [[Evolution 578]](https://gitlab.com/ultreiaio/ird-observe/issues/578) **[LL] Implanter le formulaire logbook** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
+ * [[Evolution 905]](https://gitlab.com/ultreiaio/ird-observe/issues/905) **Adaptation de l'arbre de navigation** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
+ * [[Evolution 907]](https://gitlab.com/ultreiaio/ird-observe/issues/907) **Ajout de la donnée observe_longline.ActivityLogbook** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
+ * [[Evolution 909]](https://gitlab.com/ultreiaio/ird-observe/issues/909) **Ajout de la donnée observe_longline.SetLogbook** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
+ * [[Evolution 910]](https://gitlab.com/ultreiaio/ird-observe/issues/910) **Définition de la composition globale de la ligne pour les logbooks** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
+ * [[Evolution 911]](https://gitlab.com/ultreiaio/ird-observe/issues/911) **Ajout de la donnée observe_longline.CatchLogbook** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
+ * [[Evolution 912]](https://gitlab.com/ultreiaio/ird-observe/issues/912) **Ajout de la donnée observe_longline.Landing** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
+ * [[Evolution 913]](https://gitlab.com/ultreiaio/ird-observe/issues/913) **Ajout de la donnée observe_longline.SampleLogbook** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
## Version [8.0-alpha-2](https://gitlab.com/ultreiaio/ird-observe/milestones/113)
Second lot du contrat IRD-2018-01-V8
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/1e34d8ca20d68bfac1107611118…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/1e34d8ca20d68bfac1107611118…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 5 commits: Ajout de la donnée observe_longline.SampleLogbook (See #913)
by Tony CHEMIT 15 Sep '18
by Tony CHEMIT 15 Sep '18
15 Sep '18
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
a196bf89 by Tony CHEMIT at 2018-09-15T08:08:24Z
Ajout de la donnée observe_longline.SampleLogbook (See #913)
- - - - -
a41f0d6c by Tony CHEMIT at 2018-09-15T08:08:27Z
use last stable of topia extension
- - - - -
04ec47f5 by Tony CHEMIT at 2018-09-15T08:46:33Z
Ajout de la donnée observe_longline.Landing (See #912)
- - - - -
77503425 by Tony CHEMIT at 2018-09-15T08:46:36Z
correction d'appel dans les handler openable
- - - - -
739e7445 by Tony CHEMIT at 2018-09-15T11:49:46Z
correction de l'api de navigation
- - - - -
30 changed files:
- client-configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java
- client-configuration/src/main/resources/log4j2.xml
- client-configuration/src/main/resources/observe-log4j2.xml
- client/src/main/java/fr/ird/observe/client/ObserveSwingApplicationContext.java
- client/src/main/java/fr/ird/observe/client/db/ObserveDataSourcesManager.java
- client/src/main/java/fr/ird/observe/client/db/ObserveSwingDataSource.java
- client/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jcss
- client/src/main/java/fr/ird/observe/client/ui/ObserveMainUIInitializer.java
- client/src/main/java/fr/ird/observe/client/ui/actions/UIActionSupport.java
- client/src/main/java/fr/ird/observe/client/ui/actions/content/CloseAndCreateUIAction.java
- + client/src/main/java/fr/ird/observe/client/ui/actions/content/MoveTripLonglineLandingLogbooksUIAction.java
- + client/src/main/java/fr/ird/observe/client/ui/actions/content/MoveTripLonglineSampleLogbooksUIAction.java
- client/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectLonglineLogbookActivityAction.java
- client/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectLonglineLogbookSetAction.java → client/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectLonglineLogbookLandingAction.java
- client/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectSeineSetAction.java → client/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectLonglineLogbookSampleAction.java
- − client/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectLonglineObsSetAction.java
- client/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectSeineActivityAction.java
- client/src/main/java/fr/ird/observe/client/ui/content/ContentUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/content/ContentUIInitializer.java
- client/src/main/java/fr/ird/observe/client/ui/content/ObserveFocusManager.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUI.jcss
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUIHandler.java
- dto/src/main/java/fr/ird/observe/dto/navigation/select/node/ObserveLonglineLogbookActivitySampleSelectNode.java → client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUIModel.java
- 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/BaitsCompositionLogbookUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/BranchlinesCompositionLogbookUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUIHandler.java
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/a6cb4f970da2eb7ac0a6349a7e…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/a6cb4f970da2eb7ac0a6349a7e…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] Ajout de la donnée observe_longline.SampleLogbook - Au niveau de l'activité (See #913)
by Tony CHEMIT 14 Sep '18
by Tony CHEMIT 14 Sep '18
14 Sep '18
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
a6cb4f97 by Tony CHEMIT at 2018-09-14T08:09:22Z
Ajout de la donnée observe_longline.SampleLogbook - Au niveau de l'activité (See #913)
- - - - -
24 changed files:
- client/src/main/java/fr/ird/observe/client/ui/content/ObserveFocusManager.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUI.jcss
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUIHandler.java
- + client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUIModel.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/longline/logbook/ActivityLonglineSampleLogbookNavigationTreeNode.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/binder/data/longline/SampleLogbookEntityDtoBinder.java
- persistence/src/main/java/fr/ird/observe/entities/longline/ActivityLonglineLogbookTopiaDao.java
- persistence/src/main/models/Observe-06-data-longline-logbook.model
- server/src/main/filtered-resources/mapping
- services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/ActivityLonglineLogbookSampleServiceLocal.java
- services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/ActivityLonglineLogbookServiceLocal.java
- services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/SetLonglineLogbookCatchServiceLocal.java
- services/src/main/java/fr/ird/observe/services/service/data/longline/ActivityLonglineLogbookSampleService.java
- services/src/main/java/fr/ird/observe/services/service/data/longline/SetLonglineLogbookCatchService.java
- test/src/main/resources/db/8.2/dataForTestLongline.sql.gz
- test/src/main/resources/db/8.2/dataForTestSeine.sql.gz
- test/src/main/resources/db/8.2/empty_h2.sql.gz
- test/src/main/resources/db/8.2/empty_pg.sql.gz
- test/src/main/resources/db/8.2/referentiel.sql.gz
Changes:
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/ObserveFocusManager.java
=====================================
@@ -27,6 +27,7 @@ import fr.ird.observe.client.ui.content.data.longline.GearUseFeaturesLonglineUI;
import fr.ird.observe.client.ui.content.data.longline.TripLonglineListUI;
import fr.ird.observe.client.ui.content.data.longline.TripLonglineUI;
import fr.ird.observe.client.ui.content.data.longline.logbook.ActivityLonglineLogbookListUI;
+import fr.ird.observe.client.ui.content.data.longline.logbook.ActivityLonglineLogbookSampleUI;
import fr.ird.observe.client.ui.content.data.longline.logbook.ActivityLonglineLogbookUI;
import fr.ird.observe.client.ui.content.data.longline.logbook.BaitsCompositionLogbookUI;
import fr.ird.observe.client.ui.content.data.longline.logbook.BranchlinesCompositionLogbookUI;
@@ -387,6 +388,32 @@ public class ObserveFocusManager {
});
+ builder.put(ActivityLonglineLogbookSampleUI.class, new ObserveLayoutFocusTraversalPolicy<ActivityLonglineLogbookSampleUI>() {
+
+ @Override
+ protected Component getFirstComponentForEdit(Container aContainer) {
+ ActivityLonglineLogbookSampleUI ui = getUi();
+ if (ui.getTableModel().isEmpty()) {
+ return ui.getNewEntry();
+ }
+ return ui.getSpecies();
+ }
+
+ @Override
+ protected Component getLastComponentForEdit(Container aContainer) {
+ ActivityLonglineLogbookSampleUI ui = getUi();
+ if (ui.getSave().isEnabled()) {
+ return ui.getSave();
+ }
+ if (ui.getReset().isEnabled()) {
+ return ui.getReset();
+ }
+ return null;
+ }
+
+ });
+
+
builder.put(LonglineDetailCompositionObsUI.class, new ObserveLayoutFocusTraversalPolicy<LonglineDetailCompositionObsUI>() {
@Override
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUI.jaxx
=====================================
@@ -8,116 +8,194 @@
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%
-->
-<fr.ird.observe.client.ui.content.ContentUI
- i18nFormat="observe.common.SampleLogbookDto.%s"
- superGenericType='SampleLogbookDto, ActivityLonglineLogbookSampleUI'
- contentTitle='{n("observe.common.SampleLogbookDto.title")}'>
+
+<fr.ird.observe.client.ui.content.table.ContentTableUI
+ i18nFormat="observe.common.SamplePartLogbookDto.%s"
+ superGenericType='SampleLogbookDto, SamplePartLogbookDto, ActivityLonglineLogbookSampleUI'
+ contentTitle='{n("observe.common.SampleLogbookDto.title")}'
+ saveNewEntryText='{n("observe.common.SampleLogbookDto.action.create")}'
+ saveNewEntryTip='{n("observe.common.SampleLogbookDto.action.create.tip")}'>
<style source="../../../Common.jcss"/>
+ <style source="../../CommonTable.jcss"/>
<import>
- fr.ird.observe.dto.data.longline.SampleLogbookDto
+ fr.ird.observe.dto.referential.SexReference
+ fr.ird.observe.dto.referential.SizeMeasureTypeReference
+ fr.ird.observe.dto.referential.LengthMeasureMethodReference
+ fr.ird.observe.dto.referential.WeightMeasureTypeReference
+ fr.ird.observe.dto.referential.WeightMeasureMethodReference
+ fr.ird.observe.dto.referential.SpeciesReference
fr.ird.observe.dto.data.longline.SamplePartLogbookDto
- fr.ird.observe.dto.referential.DataQualityReference
-
+ fr.ird.observe.dto.data.longline.SampleLogbookDto
+ fr.ird.observe.client.constants.AcquisitionMode
+ fr.ird.observe.client.ui.content.table.*
+ fr.ird.observe.client.ui.util.JComment
fr.ird.observe.client.ui.actions.content.ResetEditUIAction
fr.ird.observe.client.ui.actions.content.SaveEditUIAction
fr.ird.observe.client.ui.actions.main.global.ResetDataGlobalUIAction
fr.ird.observe.client.ui.actions.main.global.SaveDataGlobalUIAction
- fr.ird.observe.client.ObserveSwingApplicationContext
- org.nuiton.jaxx.widgets.gis.absolute.CoordinatesEditor
- org.nuiton.jaxx.widgets.datetime.DateTimeEditor
+ org.nuiton.jaxx.widgets.number.NumberEditor
+ org.nuiton.jaxx.widgets.select.BeanFilterableComboBox
- java.util.Collection
+ java.awt.Dimension
static fr.ird.observe.client.ui.util.UIHelper.getStringValue
static org.nuiton.i18n.I18n.n
</import>
<!-- model -->
- <SampleLogbookUIModel id='model'/>
+ <ActivityLonglineLogbookSampleUIModel id='model' constructorParams='this'/>
<!-- edit bean -->
<SampleLogbookDto id='bean'/>
+ <!-- table edit bean -->
+ <SamplePartLogbookDto id='tableEditBean'/>
+
+ <!-- table model -->
+ <ContentTableModel id='tableModel'/>
+
<!-- le validateur de l'écran -->
- <BeanValidator id='validator' context='update'
- beanClass='fr.ird.observe.dto.data.longline.SampleLogbookDto'
- errorTableModel='{getErrorTableModel()}'>
- <field name='timeStamp' component='timeStamp'/>
- <field name='longitude' component='coordinates'/>
- <field name='latitude' component='coordinates'/>
- <field name='quadrant' component='coordinates'/>
- <field name='samplePartLogbook' component='samplePartLogbookPanel'/>
+ <BeanValidator id='validator' beanClass='fr.ird.observe.dto.data.longline.SampleLogbookDto'
+ errorTableModel='{getErrorTableModel()}' context='update'>
</BeanValidator>
- <JPanel id="body" layout='{new BorderLayout()}'>
- <Table insets="0" fill="both" constraints='BorderLayout.CENTER'>
- <row>
- <cell weightx="1" weighty="1">
-
- <JTabbedPane id='mainTabbedPane'>
-
- <tab id='caracteristicsTab' computeI18n="">
-
- <JPanel layout='{new BorderLayout()}'>
- <Table fill='both' constraints='BorderLayout.NORTH' insets="0">
-
- <!-- timeStamp -->
- <row>
- <cell weightx="1">
- <DateTimeEditor id='timeStamp' constructorParams='this'/>
- </cell>
- </row>
-
- <!-- latitude - longitude - quadrant -->
- <row>
- <cell anchor="east">
- <CoordinatesEditor id='coordinates' constructorParams='this'/>
- </cell>
- </row>
- </Table>
- </JPanel>
- </tab>
-
- <tab id='samplePartLogbookTab' computeI18n="">
- <JPanel id="samplePartLogbookPanel" layout='{new BorderLayout()}'>
- <SamplePartLogbookUI id="samplePartLogbookUI" constructorParams="ObserveSwingApplicationContext.get().getMainUI()"/>
- </JPanel>
- </tab>
- </JTabbedPane>
- </cell>
- </row>
- </Table>
- </JPanel>
-
- <SamplePartLogbookUIModel id="samplePartLogbookModel" initializer="samplePartLogbookUI.getModel()"/>
-
- <!-- actions -->
- <Table id="actions" fill='both' weightx='1' insets='0'>
+ <!-- le validateur d'une entrée de tableau -->
+ <BeanValidator id='validatorTable' autoField='true' beanClass='fr.ird.observe.dto.data.longline.SamplePartLogbookDto'
+ errorTableModel='{getErrorTableModel()}' context='update' parentValidator='{validator}'/>
+
+ <ButtonGroup id='acquisitionModeGroup'
+ onStateChanged='getHandler().updateAcquisitionMode((AcquisitionMode) acquisitionModeGroup.getSelectedValue())'/>
+
+ <JLabel id='hideFormInformation' styleClass="skipI18n"/>
+
+ <Table id='editorPanel' fill='both' insets='1'>
+
+ <!-- mode de saisie -->
<row>
- <cell columns="2">
- <JButton id='move'/>
+ <cell columns="3">
+ <JPanel id="modeAndCodePanel" layout='{new BorderLayout()}'>
+ <JPanel id='acquisitionModePanel' constraints="BorderLayout.CENTER" layout="{new GridLayout(0, 1)}">
+ <JRadioButton id='acquisitionModeEffectif'/>
+ <JRadioButton id='acquisitionModeIndividu'/>
+ </JPanel>
+ <Table id='sizeMeasureTypePanel' fill='both' insets='1' constraints="BorderLayout.EAST">
+ <row>
+ <cell>
+ <JLabel id='speciesLabel' styleClass="i18n"/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <BeanFilterableComboBox id='species' genericType='SpeciesReference' constructorParams='this'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel id='sizeMeasureTypeLabel' styleClass="i18n"/>
+ </cell>
+ <cell>
+ <JPanel layout='{new BorderLayout()}'>
+ <BeanFilterableComboBox id='sizeMeasureType' genericType='SizeMeasureTypeReference'
+ constructorParams='this' constraints="BorderLayout.CENTER"/>
+ <JButton id="defaultSizeMeasureType" constraints="BorderLayout.EAST"
+ onActionPerformed="getHandler().resetDefaultSizeMeasureType()"/>
+ </JPanel>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
</cell>
</row>
+
+ <!-- count -->
+ <row>
+ <cell>
+ <JLabel id='countLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <NumberEditor id='count' constructorParams='this' styleClass="int6"/>
+ </cell>
+ </row>
+
+ <!-- length -->
<row>
- <cell weightx="0.5">
- <JButton id='reset'/>
+ <cell>
+ <JLabel id='lengthLabel'/>
</cell>
- <cell weightx="0.5">
- <JButton id='save'/>
+ <cell weightx='1' anchor='east'>
+ <NumberEditor id='length' constructorParams='this' styleClass="float1"/>
</cell>
</row>
+
+ <!-- sizeMeasureMethod -->
+ <row>
+ <cell>
+ <JLabel id='lengthMeasureMethodLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <BeanFilterableComboBox id='lengthMeasureMethod' constructorParams='this' genericType='LengthMeasureMethodReference'/>
+ </cell>
+ </row>
+
+ <!-- weightMeasureType -->
+ <row>
+ <cell>
+ <JLabel id='weightMeasureTypeLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <BeanFilterableComboBox id='weightMeasureType' constructorParams='this' genericType='WeightMeasureTypeReference'/>
+ </cell>
+ </row>
+ <!-- weightMeasureMethod -->
+ <row>
+ <cell>
+ <JLabel id='weightMeasureMethodLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <BeanFilterableComboBox id='weightMeasureMethod' constructorParams='this' genericType='WeightMeasureMethodReference'/>
+ </cell>
+ </row>
+
+ <!-- weight -->
+ <row>
+ <cell>
+ <JLabel id='weightLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <NumberEditor id='weight' constructorParams='this' styleClass="float2"/>
+ </cell>
+ </row>
+
+ <!-- sex -->
+ <row>
+ <cell>
+ <JLabel id='sexLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <BeanFilterableComboBox id='sex' genericType='SexReference' constructorParams='this'/>
+ </cell>
+ </row>
+
</Table>
-</fr.ird.observe.client.ui.content.ContentUI>
+ <!--FIXME Voir comment juste ajouter des actions à la table parent-->
+ <Table id="actions" fill='both' weightx='1' insets='0'>
+ <row>
+ <cell columns="2">
+ <JButton id='move'/>
+ </cell>
+ </row>
+ </Table>
+</fr.ird.observe.client.ui.content.table.ContentTableUI>
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUI.jcss
=====================================
@@ -20,56 +20,84 @@
* #L%
*/
-#model {
- editable:true;
- modified:{validator.isChanged() || samplePartLogbookModel.isModified()};
- valid:{validator.isValid() && samplePartLogbookModel.isValid()};
- enabled:{!model.isReadingMode()};
+#species {
+ selectedItem:{tableEditBean.getSpecies()};
}
-/* ***************************************************************************** */
-/* CARACTERISTICS TAB ********************************************************* */
-/* ***************************************************************************** */
+#lengthMeasureMethod {
+ selectedItem:{tableEditBean.getLengthMeasureMethod()};
+}
+
+#weightMeasureType {
+ selectedItem:{tableEditBean.getWeightMeasureType()};
+}
+
+#weightMeasureMethod {
+ selectedItem:{tableEditBean.getWeightMeasureMethod()};
+}
+
+#sex {
+ selectedItem:{tableEditBean.getSex()};
+}
-#caracteristicsTab {
- icon:{handler.getErrorIconIfFalse(model.isCaracteristicsTabValid())};
+#count {
+ property:{SamplePartLogbookDto.PROPERTY_COUNT};
+ numberValue:{tableEditBean.getCount()};
}
-#timeStamp {
- date:{bean.getTimeStamp()};
- propertyDate: {SampleLogbookDto.PROPERTY_TIME_STAMP};
- propertyDayDate: {SampleLogbookDto.PROPERTY_DATE};
- propertyTimeDate: {SampleLogbookDto.PROPERTY_TIME};
+#length {
+ numberValue:{tableEditBean.getLength()};
}
-#coordinates {
- propertyLatitude:{SampleLogbookDto.PROPERTY_LATITUDE};
- propertyLongitude:{SampleLogbookDto.PROPERTY_LONGITUDE};
- propertyQuadrant:{SampleLogbookDto.PROPERTY_QUADRANT};
- latitude:{bean.getLatitude()};
- longitude:{bean.getLongitude()};
- quadrant:{bean.getQuadrant()};
+#weight {
+ numberValue:{tableEditBean.getWeight()};
}
-/* ***************************************************************************** */
-/* SAMPLE PART TAB ************************************************************ */
-/* ***************************************************************************** */
+#acquisitionModeGroup {
+ selectedValue:{AcquisitionMode.valueOf(tableEditBean.getAcquisitionMode())};
+}
+
+#acquisitionModePanel {
+ border:{new TitledBorder(t("observe.common.acquisitionMode"))};
+}
+
+#acquisitionModeEffectif {
+ buttonGroup:"acquisitionModeGroup";
+ value:{AcquisitionMode.byEffectif};
+ text:{AcquisitionMode.byEffectif.toString()};
+ selected:{tableEditBean.getAcquisitionMode() == 0};
+ enabled:{!tableModel.isEditable() || tableModel.isCreate()};
+}
+
+#acquisitionModeIndividu {
+ buttonGroup:"acquisitionModeGroup";
+ value:{AcquisitionMode.byIndividu};
+ text:{AcquisitionMode.byIndividu.toString()};
+ selected:{tableEditBean.getAcquisitionMode() == 1};
+ enabled:{!tableModel.isEditable() || tableModel.isCreate()};
+}
-#samplePartLogbookTab {
- icon:{handler.getErrorIconIfFalse(model.isSamplePartLogbookTabValid())};
+#sizeMeasureTypePanel {
+ border:{new TitledBorder(t("observe.common.speciesAndSizeMeasure"))};
}
-#save {
- _globalAction:{SaveDataGlobalUIAction.ACTION_NAME};
+#sizeMeasureType {
+ property:sizeMeasureType;
+ _tablePropertyName:{"sizeMeasureType"};
+ selectedItem:{tableEditBean.getSizeMeasureType()};
+ enabled:{tableEditBean.getSpecies() != null};
}
-#reset {
- _globalAction:{ResetDataGlobalUIAction.ACTION_NAME};
+#defaultSizeMeasureType {
+ actionIcon:combobox-reset2;
+ toolTipText:"observe.common.Sample.action.resetDefaultSizeMeasureType.tip";
+ enabled:{model.getDefaultSizeMeasureType() != null};
}
#move {
text:"observe.common.SampleLogbookDto.move";
actionIcon:"move-activities";
mnemonic:A;
- enabled:{model.isUpdatingMode() && model.isValid() && !model.isModified()};
+ visible:{model.isUpdatingMode()};
+ enabled:{model.isValid() && !model.isModified()};
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUIHandler.java
=====================================
@@ -10,23 +10,25 @@ package fr.ird.observe.client.ui.content.data.longline.logbook;
* 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.Lists;
import fr.ird.observe.client.ObserveSwingApplicationContext;
-import fr.ird.observe.client.db.ObserveSwingDataSource;
+import fr.ird.observe.client.constants.AcquisitionMode;
import fr.ird.observe.client.ui.content.ContentMode;
-import fr.ird.observe.client.ui.content.ContentUIHandler;
-import fr.ird.observe.client.validation.ClientValidationContext;
+import fr.ird.observe.client.ui.content.table.ContentTableModel;
+import fr.ird.observe.client.ui.content.table.ContentTableUIHandler;
+import fr.ird.observe.client.ui.util.UIHelper;
import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookDto;
import fr.ird.observe.dto.data.longline.SampleLogbookDto;
import fr.ird.observe.dto.data.longline.SampleLogbookHelper;
@@ -34,22 +36,30 @@ import fr.ird.observe.dto.data.longline.SamplePartLogbookDto;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.form.FormDefinition;
import fr.ird.observe.dto.navigation.edit.node.ObserveLonglineLogbookActivityEditNode;
-import fr.ird.observe.dto.navigation.select.node.ObserveLonglineLogbookActivitySampleSelectNode;
+import fr.ird.observe.dto.navigation.select.node.ObserveLonglineLogbookActivitySelectNode;
+import fr.ird.observe.dto.reference.ReferentialDtoReferenceSet;
+import fr.ird.observe.dto.referential.SexReference;
+import fr.ird.observe.dto.referential.SizeMeasureTypeReference;
+import fr.ird.observe.dto.referential.SpeciesReference;
+import fr.ird.observe.dto.referential.WeightMeasureTypeReference;
import fr.ird.observe.dto.result.SaveResultDto;
import fr.ird.observe.spi.DtoModelHelper;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.jaxx.runtime.spi.UIHandler;
-import org.nuiton.jaxx.validator.swing.SwingValidatorMessage;
-import org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel;
import org.nuiton.validator.NuitonValidatorScope;
-import javax.swing.event.TableModelListener;
-import java.util.Date;
-import java.util.HashSet;
+import javax.swing.JComponent;
+import javax.swing.JTable;
+import javax.swing.table.DefaultTableCellRenderer;
+import java.awt.GridBagConstraints;
+import java.awt.Insets;
+import java.beans.PropertyChangeListener;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Optional;
-import java.util.Set;
+import static org.nuiton.i18n.I18n.n;
import static org.nuiton.i18n.I18n.t;
/**
@@ -58,214 +68,239 @@ import static org.nuiton.i18n.I18n.t;
* @author Tony Chemit - dev(a)tchemit.fr
* @since 3.8
*/
-public class ActivityLonglineLogbookSampleUIHandler extends ContentUIHandler<SampleLogbookDto, ActivityLonglineLogbookSampleUI> implements UIHandler<ActivityLonglineLogbookSampleUI> {
+public class ActivityLonglineLogbookSampleUIHandler extends ContentTableUIHandler<SampleLogbookDto, SamplePartLogbookDto, ActivityLonglineLogbookSampleUI> implements UIHandler<ActivityLonglineLogbookSampleUI> {
- private static final Logger log = LogManager.getLogger(ActivityLonglineLogbookSampleUIHandler.class);
- protected final TableModelListener computeTabValidStateListener;
+ private static final Logger log = LogManager.getLogger(SamplePartLogbookUIHandler.class);
+ private final PropertyChangeListener speciesChanged;
ActivityLonglineLogbookSampleUIHandler() {
- super(ObserveLonglineLogbookActivitySampleSelectNode.class, ObserveLonglineLogbookActivityEditNode.class);
- computeTabValidStateListener = e -> {
- SwingValidatorMessageTableModel source = (SwingValidatorMessageTableModel) e.getSource();
- computeTabValidState(source);
- };
- }
-
- @Override
- protected void installFocusTraversalPolicy() {
- // rien a installer
- }
+ super(ObserveLonglineLogbookActivitySelectNode.class, ObserveLonglineLogbookActivityEditNode.class);
+ addReferentialFilter(SamplePartLogbookDto.PROPERTY_SPECIES, incomingReferences -> {
+ String setId = ObserveSwingApplicationContext.get().getNavigationEdit().getLongline().getSetLogbook().getId();
+ if (setId == null) {
+ return new LinkedList<>();
+ }
+ ReferentialDtoReferenceSet<SpeciesReference> sampleSpecies = getSetLonglineLogbookCatchService().getSampleSpecies(setId);
+ return new LinkedList<>(sampleSpecies.toSet());
+ });
- @Override
- protected boolean computeCanWrite(ObserveSwingDataSource dataSource) {
- return dataSource.canWriteData();
+ speciesChanged = evt -> onSpeciesChanged((SpeciesReference) evt.getNewValue());
}
@Override
protected ContentMode getContentMode() {
- String selectedId = getSelectedId();
- if (selectedId == null) {
- return ContentMode.CREATE;
- }
- if (selectedId.equals(getEditNode().getId())) {
- return ContentMode.UPDATE;
+ ContentMode contentMode = super.getContentMode();
+ if (ContentMode.READ == contentMode) {
+ addMessage(getUi(),
+ NuitonValidatorScope.INFO,
+ getTypeI18nKey(ActivityLonglineLogbookDto.class),
+ t("observe.common.ActivityLonglineObsDto.message.not.open"));
}
- addMessage(getUi(),
- NuitonValidatorScope.INFO,
- getTypeI18nKey(ActivityLonglineLogbookDto.class),
- t("observe.common.ActivityLonglineLogbookDto.message.not.open"));
- return ContentMode.READ;
+ return contentMode;
}
+ @SuppressWarnings("unchecked")
@Override
- public void afterInit(ActivityLonglineLogbookSampleUI ui) {
- super.afterInit(ui);
- {
- // init floatlinesComposition tab
- SamplePartLogbookUI compositionUI = ui.getSamplePartLogbookUI();
- ui.getSamplePartLogbookPanel().remove(compositionUI);
- ui.getSamplePartLogbookPanel().add(compositionUI.getBody());
- }
- getModel().addPropertyChangeListener(SampleLogbookUIModel.PROPERTY_MODE, evt -> {
- showIndividualTabs(evt.getNewValue() != ContentMode.CREATE);
- });
- }
+ protected void onSelectedRowChanged(int editingRow,
+ SamplePartLogbookDto bean,
+ boolean create) {
+ ContentTableModel<SampleLogbookDto, SamplePartLogbookDto> model = getTableModel();
- @Override
- public void openUI() {
-
- getUi().getCoordinates().resetModel();
-
- super.openUI();
-
- String activityId = getSelectedParentId();
- String setId = getSelectedId();
-
- if (log.isInfoEnabled()) {
- log.info("tripId = " + activityId);
- log.info("setId = " + setId);
+ if (!model.isEditable()) {
+ return;
}
- ContentMode mode = computeContentMode();
- // update mode
- Form<SampleLogbookDto> form;
- if (setId == null) {
- // create mode
- form = getTripLonglineSampleLogbookService().preCreate(activityId);
- } else {
- // update mode
- form = getTripLonglineSampleLogbookService().loadForm(setId);
- }
-
- loadReferentialReferenceSetsInModel(form);
+ SamplePartLogbookDto tableEditBean = getTableEditBean();
+ tableEditBean.removePropertyChangeListener(SamplePartLogbookDto.PROPERTY_SPECIES, speciesChanged);
- getModel().setForm(form);
- SampleLogbookHelper.copySampleLogbookDto(form.getObject(), getBean());
+ SpeciesReference species = bean.getSpecies();
+ ActivityLonglineLogbookSampleUI ui = getUi();
+ if (log.isDebugEnabled()) {
+ log.debug("selected species " + species);
+ }
+ List<SpeciesReference> availableSpecies;
+ JComponent requestFocus;
+ Optional<SizeMeasureTypeReference> sizeMeasureType = getSpeciesDefaultSizeMeasureType(species);
+ getUi().getModel().setDefaultSizeMeasureType(sizeMeasureType.orElse(null));
- SampleLogbookDto bean = getBean();
- bean.setTimeStamp(new Date());
+ if (create) {
- // utilisation du mode requis
- setContentMode(mode);
+ if (model.isCreate()) {
+ // on passe le mode de saisie en count
+ ui.getAcquisitionModeGroup().setSelectedValue(null);
+ ui.getAcquisitionModeGroup().setSelectedValue(AcquisitionMode.byEffectif);
+ }
- // 1. Mise à jour latitude/longitude:
- getUi().getCoordinates().setLatitudeAndLongitude(bean.getLatitude(), bean.getLongitude());
- // 2. Mise à jour du quadrant :
- // Si le bean de données contient un quadrant, on met simplement à jour le composant de coordonnées pour sélectionner le quadrant voulu
- // sinon, on réinitialise les quadrants du composant afin qu'aucun d'eux ne soit sélectionné (par exemple dans le cas de la création de la première activité d'une route)
- if (bean.getQuadrant() == null) {
- getUi().getCoordinates().resetQuadrant();
+ availableSpecies = getModel().getReferentialReferences(SamplePartLogbookDto.PROPERTY_SPECIES);
+ requestFocus = ui.getSpecies();
} else {
- getUi().getCoordinates().setQuadrant(bean.getQuadrant());
- }
-
- {
- // open floatlinesComposition tab
- SamplePartLogbookUIModel floatlinesCompositionModel = getUi().getSamplePartLogbookModel();
- floatlinesCompositionModel.setReferentialReferenceSets(getModel().getReferentialReferenceSets());
- Optional<FormDefinition<SamplePartLogbookDto>> optionalFormDefinition = DtoModelHelper.getOptionalFormDefinition(SamplePartLogbookDto.class);
- optionalFormDefinition.ifPresent(getUi().getSamplePartLogbookUI().getHandler()::loadReferentialReferenceSetsInModel);
+ requestFocus = ui.getCount();
- floatlinesCompositionModel.setForm(form);
- SampleLogbookHelper.copySampleLogbookDto(form.getObject(), floatlinesCompositionModel.getBean());
+ // on passe le mode de saisie
+ int acquisitionMode = bean.getAcquisitionMode();
+ AcquisitionMode enumValue = AcquisitionMode.valueOf(acquisitionMode);
+ ui.getAcquisitionModeGroup().setSelectedValue(null);
+ ui.getAcquisitionModeGroup().setSelectedValue(enumValue);
- SamplePartLogbookUI compositionUI = getUi().getSamplePartLogbookUI();
- compositionUI.open();
- compositionUI.getValidator().setBean(null);
+ availableSpecies = Lists.newArrayList(species);
+ sizeMeasureType = Optional.ofNullable(bean.getSizeMeasureType());
}
- if (mode != ContentMode.READ) {
- getUi().startEdit(null);
- }
- // To be sure always remove listener (could prevent some leaks)
- getUi().getErrorTableModel().removeTableModelListener(computeTabValidStateListener);
- // listen messages to see if required to add
- getUi().getErrorTableModel().addTableModelListener(computeTabValidStateListener);
+ ui.getSizeMeasureType().setSelectedItem(null);
+ sizeMeasureType.ifPresent(sizeMeasureTypeDtoReferentialReference -> ui.getSizeMeasureType().setSelectedItem(sizeMeasureTypeDtoReferentialReference));
+
+ ui.getSpecies().setData(availableSpecies);
+ UIHelper.askFocus(requestFocus);
- SwingValidatorMessageTableModel errorTableModel = getUi().getErrorTableModel();
- computeTabValidState(errorTableModel);
+ tableEditBean.addPropertyChangeListener(SamplePartLogbookDto.PROPERTY_SPECIES, speciesChanged);
}
@Override
- protected void prepareValidationContext() {
- super.prepareValidationContext();
- ClientValidationContext validationContext = ObserveSwingApplicationContext.get().getValidationContext();
- validationContext.setCoordinatesEditor("coordinate", getUi().getCoordinates());
+ public void afterInit(ActivityLonglineLogbookSampleUI ui) {
+ super.afterInit(ui);
+ getUi().getActions().add(getUi().getReset(), new GridBagConstraints(0, 1, 1, 1, 0.5, 0.0, 10, 1, new Insets(0, 0, 0, 0), 0, 0));
+ getUi().getActions().add(getUi().getSave(), new GridBagConstraints(1, 1, 1, 1, 0.5, 0.0, 10, 1, new Insets(0, 0, 0, 0), 0, 0));
}
-
@Override
- public void startEditUI(String... binding) {
- SampleLogbookUIModel model = getModel();
- boolean create = model.getMode() == ContentMode.CREATE;
- String contextName = getValidatorContextName(model.getMode());
- getUi().getValidator().setContext(contextName);
- if (create) {
- addInfoMessage(t("observe.common.SampleLogbook.message.creating"));
- } else {
- addInfoMessage(t("observe.common.SampleLogbook.message.updating"));
- }
- super.startEditUI(SampleLogbookDto.PROPERTY_TIME_STAMP,
- SampleLogbookDto.PROPERTY_LATITUDE,
- SampleLogbookDto.PROPERTY_LONGITUDE,
- SampleLogbookDto.PROPERTY_QUADRANT);
- model.setModified(false);
+ protected void initTableUI(DefaultTableCellRenderer renderer) {
+ JTable table = getUi().getTable();
+
+ UIHelper.setI18nTableHeaderRenderer(table,
+ n("observe.common.SamplePartLogbookDto.table.species"),
+ n("observe.common.SamplePartLogbookDto.table.species.tip"),
+ n("observe.common.SamplePartLogbookDto.table.count"),
+ n("observe.common.SamplePartLogbookDto.table.count.tip"),
+ n("observe.common.SamplePartLogbookDto.table.sizeMeasureType"),
+ n("observe.common.SamplePartLogbookDto.table.sizeMeasureType.tip"),
+ n("observe.common.SamplePartLogbookDto.table.length"),
+ n("observe.common.SamplePartLogbookDto.table.length.tip"),
+ n("observe.common.SamplePartLogbookDto.table.weightMeasureType"),
+ n("observe.common.SamplePartLogbookDto.table.weightMeasureType.tip"),
+ n("observe.common.SamplePartLogbookDto.table.weight"),
+ n("observe.common.SamplePartLogbookDto.table.weight.tip"),
+ n("observe.common.SamplePartLogbookDto.table.sex"),
+ n("observe.common.SamplePartLogbookDto.table.sex.tip"));
+
+ UIHelper.setTableColumnRenderer(table, 0, UIHelper.newReferentialReferenceDecorateTableCellRenderer(renderer, SpeciesReference.class));
+ UIHelper.setTableColumnRenderer(table, 1, UIHelper.newEmptyNumberTableCellRenderer(renderer));
+ UIHelper.setTableColumnRenderer(table, 2, UIHelper.newReferentialReferenceDecorateTableCellRenderer(renderer, SizeMeasureTypeReference.class));
+ UIHelper.setTableColumnRenderer(table, 3, UIHelper.newEmptyNumberTableCellRenderer(renderer));
+ UIHelper.setTableColumnRenderer(table, 4, UIHelper.newReferentialReferenceDecorateTableCellRenderer(renderer, WeightMeasureTypeReference.class));
+ UIHelper.setTableColumnRenderer(table, 5, UIHelper.newEmptyNumberTableCellRenderer(renderer));
+ UIHelper.setTableColumnRenderer(table, 6, UIHelper.newReferentialReferenceDecorateTableCellRenderer(renderer, SexReference.class));
}
@Override
- protected boolean doSave(SampleLogbookDto bean) {
- bean.setSamplePartLogbook(getUi().getSamplePartLogbookModel().getBean().getSamplePartLogbook());
- SaveResultDto saveResult = getActivityLonglineLogbookSampleService().save(getSelectedId(), bean);
+ protected void doPersist(SampleLogbookDto bean) {
+ SaveResultDto saveResult = getActivityLonglineLogbookSampleService().save(bean);
saveResult.toDto(bean);
- return true;
}
@Override
- protected void afterSave(boolean refresh) {
- if (getModel().isCreatingMode()) {
- getModel().setMode(ContentMode.UPDATE);
- restartEditUI();
- } else {
- super.afterSave(refresh);
- getUi().getSamplePartLogbookUI().getHandler().afterSave(refresh);
+ protected void loadEditBean(String beanId) {
+ Form<SampleLogbookDto> form = getActivityLonglineLogbookSampleService().loadForm(beanId);
+ loadReferentialReferenceSetsInModel(form);
+
+ Optional<FormDefinition<SamplePartLogbookDto>> optionalFormDefinition = DtoModelHelper.getOptionalFormDefinition(SamplePartLogbookDto.class);
+ optionalFormDefinition.ifPresent(this::loadReferentialReferenceSetsInModel);
+ getModel().setForm(form);
+
+ SampleLogbookHelper.copySampleLogbookDto(form.getObject(), getBean());
+
+ }
+
+ private Optional<SizeMeasureTypeReference> getSpeciesDefaultSizeMeasureType(SpeciesReference species) {
+ Optional<SizeMeasureTypeReference> result = Optional.empty();
+ if (species != null) {
+
+ String sizeMeasureId = species.getSizeMeasureTypeId();
+ result = getUi().getSizeMeasureType().getData().stream()
+ .filter(s -> s.getId().equals(sizeMeasureId)).findFirst();
}
+ return result;
}
- protected void computeTabValidState(SwingValidatorMessageTableModel errorTableModel) {
+ /**
+ * Le mode de saisie a été mis à jour.
+ *
+ * @param newMode le nouveau de mode de saisie à utiliser
+ * @since 3.0
+ */
+ void updateAcquisitionMode(AcquisitionMode newMode) {
- Set<String> errorProperties = new HashSet<>();
- int rowCount = errorTableModel.getRowCount();
- for (int i = 0; i < rowCount; i++) {
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Change acquisition mode to %s", newMode));
+ }
+ if (newMode == null) {
- SwingValidatorMessage row = errorTableModel.getRow(i);
- if (NuitonValidatorScope.ERROR.equals(row.getScope())) {
- errorProperties.add(row.getField());
- }
+ // mode null (cela peut arriver avec les bindings)
+ return;
}
- boolean caracteristicsTabValid = !errorProperties.removeAll(SampleLogbookUIModel.CARACTERISTICS_TAB_PROPERTIES);
- boolean samplePartLogbookTabValid = !errorProperties.removeAll(SampleLogbookUIModel.SAMPLE_PART_TAB_PROPERTIES);
+ ActivityLonglineLogbookSampleUI ui = getUi();
- SampleLogbookUIModel model = getModel();
- model.setCaracteristicsTabValid(caracteristicsTabValid);
- model.setSamplePartLogbookTabValid(samplePartLogbookTabValid);
+ boolean createMode = ui.getTableModel().isCreate();
+ SamplePartLogbookDto editBean = ui.getTableEditBean();
+ switch (newMode) {
+
+ case byEffectif:
+
+ // le weight n'est pas modifiable
+ ui.getWeight().setEnabled(false);
+ ui.getWeightMeasureType().setEnabled(false);
+
+ // l'count est modifiable
+ ui.getCount().setEnabled(true);
+
+ if (createMode) {
+
+ // on supprime le weight (si il a été saisie)
+ editBean.setWeight(null);
+ editBean.setWeightMeasureType(null);
+ // on supprime aussi l'count (pour forcer la saisie)
+ editBean.setCount(null);
+ }
+ break;
+
+ case byIndividu:
+
+ // le weight est pas modifiable
+ ui.getWeight().setEnabled(true);
+ ui.getWeightMeasureType().setEnabled(true);
+
+ // l'count n'est pas modifiable et est toujours de 1
+ ui.getCount().setEnabled(false);
+
+ if (createMode) {
+
+ // on positionne l'count à 1 (seule valeur possible)
+ editBean.setCount(1);
+ }
+ break;
+ }
+
+ if (createMode) {
+
+ // on propage le mode de saisie dans le bean
+ editBean.setAcquisitionMode(newMode.ordinal());
+ }
}
- @Override
- public SampleLogbookUIModel getModel() {
- return (SampleLogbookUIModel) super.getModel();
+ private void onSpeciesChanged(SpeciesReference species) {
+ Optional<SizeMeasureTypeReference> sizeMeasureType = getSpeciesDefaultSizeMeasureType(species);
+ getUi().getModel().setDefaultSizeMeasureType(sizeMeasureType.orElse(null));
+ resetDefaultSizeMeasureType();
}
- private void showIndividualTabs(boolean newValue) {
- getUi().getSamplePartLogbookTab().setEnabled(newValue);
- if (!newValue && getUi().getMainTabbedPane().getSelectedIndex() > 2) {
- // go back to first tab
- getUi().getMainTabbedPane().setSelectedIndex(0);
- }
+ public void resetDefaultSizeMeasureType() {
+ getUi().getSizeMeasureType().setSelectedItem(null);
+ getUi().getSizeMeasureType().setSelectedItem(getUi().getModel().getDefaultSizeMeasureType());
}
+
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUIModel.java
=====================================
@@ -0,0 +1,118 @@
+package fr.ird.observe.client.ui.content.data.longline.logbook;
+
+/*-
+ * #%L
+ * ObServe :: Client
+ * %%
+ * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ird.observe.client.ui.content.table.ContentTableMeta;
+import fr.ird.observe.client.ui.content.table.ContentTableModel;
+import fr.ird.observe.client.ui.content.table.ContentTableUIModel;
+import fr.ird.observe.client.ui.content.table.ObserveContentTableUI;
+import fr.ird.observe.dto.data.longline.SampleLogbookDto;
+import fr.ird.observe.dto.data.longline.SamplePartLogbookDto;
+import fr.ird.observe.dto.data.longline.SamplePartLogbookHelper;
+import fr.ird.observe.dto.referential.SizeMeasureTypeReference;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * Created by tchemit on 13/09/2018.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ */
+public class ActivityLonglineLogbookSampleUIModel extends ContentTableUIModel<SampleLogbookDto, SamplePartLogbookDto> {
+
+ public static final String PROPERTY_DEFAULT_SIZE_MEASURE_TYPE = "defaultSizeMeasureType";
+ private static final long serialVersionUID = 1L;
+ private SizeMeasureTypeReference defaultSizeMeasureType;
+
+ public ActivityLonglineLogbookSampleUIModel(ActivityLonglineLogbookSampleUI ui) {
+
+ super(SampleLogbookDto.class,
+ SamplePartLogbookDto.class,
+ new String[]{
+ SampleLogbookDto.PROPERTY_SAMPLE_PART_LOGBOOK,
+ SampleLogbookDto.PROPERTY_DATE,
+ SampleLogbookDto.PROPERTY_LATITUDE,
+ SampleLogbookDto.PROPERTY_LONGITUDE,
+ SampleLogbookDto.PROPERTY_QUADRANT},
+ new String[]{SamplePartLogbookDto.PROPERTY_SPECIES,
+ SamplePartLogbookDto.PROPERTY_ACQUISITION_MODE,
+ SamplePartLogbookDto.PROPERTY_SIZE_MEASURE_TYPE,
+ SamplePartLogbookDto.PROPERTY_LENGTH_MEASURE_METHOD,
+ SamplePartLogbookDto.PROPERTY_WEIGHT_MEASURE_TYPE,
+ SamplePartLogbookDto.PROPERTY_SEX,
+ SamplePartLogbookDto.PROPERTY_COUNT,
+ SamplePartLogbookDto.PROPERTY_LENGTH,
+ SamplePartLogbookDto.PROPERTY_WEIGHT});
+
+ List<ContentTableMeta<SamplePartLogbookDto>> metas = Arrays.asList(
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_SPECIES, false),
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_COUNT, false),
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_SIZE_MEASURE_TYPE, false),
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_LENGTH, false),
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_WEIGHT_MEASURE_TYPE, false),
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_WEIGHT, false),
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_SEX, false));
+
+ initModel(ui, metas);
+ }
+
+ @Override
+ protected ContentTableModel<SampleLogbookDto, SamplePartLogbookDto> createTableModel(
+ ObserveContentTableUI<SampleLogbookDto, SamplePartLogbookDto, ?> ui,
+ List<ContentTableMeta<SamplePartLogbookDto>> contentTableMetas) {
+
+ return new ContentTableModel<SampleLogbookDto, SamplePartLogbookDto>(ui, contentTableMetas) {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected Collection<SamplePartLogbookDto> getChilds(SampleLogbookDto bean) {
+ return bean.getSamplePartLogbook();
+ }
+
+ @Override
+ protected void load(SamplePartLogbookDto source, SamplePartLogbookDto target) {
+ SamplePartLogbookHelper.copySamplePartLogbookDto(source, target);
+ }
+
+ @Override
+ protected void setChilds(SampleLogbookDto parent, List<SamplePartLogbookDto> childs) {
+ parent.setSamplePartLogbook(new LinkedList<>(childs));
+ }
+ };
+ }
+
+
+ public SizeMeasureTypeReference getDefaultSizeMeasureType() {
+ return defaultSizeMeasureType;
+ }
+
+ public void setDefaultSizeMeasureType(SizeMeasureTypeReference defaultSizeMeasureType) {
+ SizeMeasureTypeReference oldValue = getDefaultSizeMeasureType();
+ this.defaultSizeMeasureType = defaultSizeMeasureType;
+ firePropertyChange(PROPERTY_DEFAULT_SIZE_MEASURE_TYPE, oldValue, defaultSizeMeasureType);
+ }
+
+}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIHandler.java
=====================================
@@ -215,6 +215,9 @@ class ActivityLonglineLogbookUIHandler extends ContentOpenableUIHandler<Activity
if (notPersisted) {
// ouverture de l'activité après création
getEditNode().setId(bean.getId());
+ // on doit recharger le bean car on y a ajoute son sample
+ ActivityLonglineLogbookDto newBean = getActivityLonglineLogbookService().loadDto(bean.getId());
+ getModel().setBean(newBean);
}
addSet = notPersisted && ActivityLonglineLogbookHelper.FISHING_OPERATION_ID.equals(bean.getVesselActivityLongline().getId());
=====================================
client/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/longline/logbook/ActivityLonglineSampleLogbookNavigationTreeNode.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.client.ui.tree.navigation.nodes.longline.logbook;
* 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>.
@@ -23,10 +23,12 @@ package fr.ird.observe.client.ui.tree.navigation.nodes.longline.logbook;
*/
import fr.ird.observe.client.ui.content.data.longline.logbook.ActivityLonglineLogbookSampleUI;
-import fr.ird.observe.client.ui.tree.navigation.nodes.ReferenceNavigationTreeNodeSupport;
+import fr.ird.observe.client.ui.tree.navigation.nodes.ClassNavigationTreeNode;
+import fr.ird.observe.dto.IdHelper;
import fr.ird.observe.dto.data.longline.SampleLogbookDto;
import fr.ird.observe.dto.data.longline.SampleLogbookReference;
-import fr.ird.observe.dto.navigation.select.node.ObserveLonglineLogbookActivitySampleSelectNode;
+
+import static org.nuiton.i18n.I18n.t;
/**
* Created on 14/11/16.
@@ -34,16 +36,10 @@ import fr.ird.observe.dto.navigation.select.node.ObserveLonglineLogbookActivityS
* @author Tony Chemit - dev(a)tchemit.fr
* @since 6.0
*/
-public class ActivityLonglineSampleLogbookNavigationTreeNode extends ReferenceNavigationTreeNodeSupport<SampleLogbookDto, SampleLogbookReference> {
+public class ActivityLonglineSampleLogbookNavigationTreeNode extends ClassNavigationTreeNode<SampleLogbookDto> {
- public ActivityLonglineSampleLogbookNavigationTreeNode(SampleLogbookReference data) {
- super(data, ObserveLonglineLogbookActivitySampleSelectNode.class, null, false);
- }
-
- @Override
- public void reload() {
- SampleLogbookReference data = getServicesProvider().getActivityLonglineLogbookSampleService().loadReferenceToRead(getId());
- setData(data);
+ ActivityLonglineSampleLogbookNavigationTreeNode(SampleLogbookReference data) {
+ super(SampleLogbookDto.class, t("observe.ui.tree.longline.sample"));
}
@Override
@@ -54,4 +50,9 @@ public class ActivityLonglineSampleLogbookNavigationTreeNode extends ReferenceNa
public boolean isLeaf() {
return true;
}
+
+ @Override
+ public String getIconPath() {
+ return "navigation." + IdHelper.getDtoSimplifiedName(getData());
+ }
}
=====================================
client/src/main/resources/i18n/client_en_GB.properties
=====================================
@@ -1746,6 +1746,7 @@ observe.ui.tree.longline.obs.activity.list=Observations
observe.ui.tree.longline.obs.activity.unsaved=New activity
observe.ui.tree.longline.obs.set.unsaved=New fishing operation
observe.ui.tree.longline.obs.tdr=Tdrs
+observe.ui.tree.longline.sample=Samples
observe.ui.tree.longline.sensorUsed=Sensors used
observe.ui.tree.longline.setDetailComposition=Detailed compositions
observe.ui.tree.longline.setGlobalComposition=Global compositions
=====================================
client/src/main/resources/i18n/client_es_ES.properties
=====================================
@@ -1746,6 +1746,7 @@ observe.ui.tree.longline.obs.activity.list=Observations \#TODO
observe.ui.tree.longline.obs.activity.unsaved=Nueva actividad
observe.ui.tree.longline.obs.set.unsaved=Nuevo lance
observe.ui.tree.longline.obs.tdr=Registradores de profundidad
+observe.ui.tree.longline.sample=Muestreos
observe.ui.tree.longline.sensorUsed=Sensores utilizados
observe.ui.tree.longline.setDetailComposition=Composiciones detalladas
observe.ui.tree.longline.setGlobalComposition=Composiciones globales
=====================================
client/src/main/resources/i18n/client_fr_FR.properties
=====================================
@@ -1746,6 +1746,7 @@ observe.ui.tree.longline.obs.activity.list=Observations
observe.ui.tree.longline.obs.activity.unsaved=Nouvelle activité
observe.ui.tree.longline.obs.set.unsaved=Nouvelle opération de pêche
observe.ui.tree.longline.obs.tdr=Enregistreurs de profondeur
+observe.ui.tree.longline.sample=Échantillons
observe.ui.tree.longline.sensorUsed=Capteurs utilisés
observe.ui.tree.longline.setDetailComposition=Compositions détaillées
observe.ui.tree.longline.setGlobalComposition=Compositions globales
=====================================
persistence/src/main/java/fr/ird/observe/binder/data/longline/SampleLogbookEntityDtoBinder.java
=====================================
@@ -23,6 +23,7 @@ package fr.ird.observe.binder.data.longline;
*/
import fr.ird.observe.binder.data.DataEntityDtoBinderSupport;
+import fr.ird.observe.dto.CoordinateHelper;
import fr.ird.observe.dto.data.longline.SampleLogbookDto;
import fr.ird.observe.dto.referential.ReferentialLocale;
import fr.ird.observe.entities.longline.SampleLogbook;
@@ -54,6 +55,7 @@ public class SampleLogbookEntityDtoBinder extends DataEntityDtoBinderSupport<Sam
dto.setLatitude(entity.getLatitude());
dto.setLongitude(entity.getLongitude());
dto.setTimeStamp(entity.getTimeStamp());
+ dto.setQuadrant(CoordinateHelper.getQuadrant(dto.getLongitude(), dto.getLatitude()));
dto.setSamplePartLogbook(toListData(referentialLocale, entity.getSamplePartLogbook()));
}
=====================================
persistence/src/main/java/fr/ird/observe/entities/longline/ActivityLonglineLogbookTopiaDao.java
=====================================
@@ -62,6 +62,7 @@ public class ActivityLonglineLogbookTopiaDao extends AbstractActivityLonglineLog
" a.topiaId," +
" a.timestamp," +
" a.set," +
+ " a.sample," +
" va.topiaId," +
" va." + I18nReferenceEntities.getPropertyName(referenceLocale) +
" FROM observe_longline.activityLogbook a, observe_longline.vesselActivity va" +
@@ -80,6 +81,7 @@ public class ActivityLonglineLogbookTopiaDao extends AbstractActivityLonglineLog
" a.topiaId," +
" a.timestamp," +
" a.set," +
+ " a.sample," +
" va.topiaId," +
" va." + I18nReferenceEntities.getPropertyName(referenceLocale) +
" FROM observe_longline.activityLogbook a, observe_longline.vesselActivity va" +
@@ -108,16 +110,20 @@ public class ActivityLonglineLogbookTopiaDao extends AbstractActivityLonglineLog
String setId = set.getString(3);
if (setId != null) {
-
SetLonglineLogbookImpl setLongline = new SetLonglineLogbookImpl();
setLongline.setTopiaId(setId);
activity.setSetLongline(setLongline);
-
+ }
+ String sampleId = set.getString(4);
+ if (sampleId != null) {
+ SampleLogbook sample = new SampleLogbookImpl();
+ sample.setTopiaId(sampleId);
+ activity.setSample(sample);
}
VesselActivityLongline vesselActivity = new VesselActivityLonglineImpl();
- String vesselActivityId = set.getString(4);
+ String vesselActivityId = set.getString(5);
vesselActivity.setTopiaId(vesselActivityId);
- String label = set.getString(5);
+ String label = set.getString(6);
I18nReferenceEntities.setLabel(referenceLocale, vesselActivity, label);
activity.setVesselActivityLongline(vesselActivity);
return activity;
=====================================
persistence/src/main/models/Observe-06-data-longline-logbook.model
=====================================
@@ -195,5 +195,4 @@ longline.SampleLogbook > ObserveDataEntity | entity
timeStamp + {*:1} Date
latitude + {*:1} Float | sqlType=numeric
longitude + {*:1} Float | sqlType=numeric
-quadrant + {*:1} Integer
samplePartLogbook + {*} longline.SamplePartLogbook | ordered reverseDbName=sample
=====================================
server/src/main/filtered-resources/mapping
=====================================
@@ -95,12 +95,7 @@ POST /api/v1/data/longline/ActivityLongLineObsEncounterService/save
GET /api/v1/data/longline/ActivityLongLineObsSensorUsedService/getDataFile v1.data.longline.ActivityLongLineObsSensorUsedServiceRestApi.getDataFile
GET /api/v1/data/longline/ActivityLongLineObsSensorUsedService/loadForm v1.data.longline.ActivityLongLineObsSensorUsedServiceRestApi.loadForm
POST /api/v1/data/longline/ActivityLongLineObsSensorUsedService/save v1.data.longline.ActivityLongLineObsSensorUsedServiceRestApi.save
-DELETE /api/v1/data/longline/ActivityLonglineLogbookSampleService/delete v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.delete
-GET /api/v1/data/longline/ActivityLonglineLogbookSampleService/exists v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.exists
-GET /api/v1/data/longline/ActivityLonglineLogbookSampleService/loadDto v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.loadDto
GET /api/v1/data/longline/ActivityLonglineLogbookSampleService/loadForm v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.loadForm
-GET /api/v1/data/longline/ActivityLonglineLogbookSampleService/loadReferenceToRead v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.loadReferenceToRead
-GET /api/v1/data/longline/ActivityLonglineLogbookSampleService/preCreate v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.preCreate
POST /api/v1/data/longline/ActivityLonglineLogbookSampleService/save v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.save
DELETE /api/v1/data/longline/ActivityLonglineLogbookService/delete v1.data.longline.ActivityLonglineLogbookServiceRestApi.delete
GET /api/v1/data/longline/ActivityLonglineLogbookService/exists v1.data.longline.ActivityLonglineLogbookServiceRestApi.exists
@@ -137,6 +132,7 @@ POST /api/v1/data/longline/LandingLogbookService/moveLandingLogbookToTripLongl
POST /api/v1/data/longline/LandingLogbookService/moveLandingLogbooksToTripLongline v1.data.longline.LandingLogbookServiceRestApi.moveLandingLogbooksToTripLongline
GET /api/v1/data/longline/LandingLogbookService/preCreate v1.data.longline.LandingLogbookServiceRestApi.preCreate
POST /api/v1/data/longline/LandingLogbookService/save v1.data.longline.LandingLogbookServiceRestApi.save
+GET /api/v1/data/longline/SetLonglineLogbookCatchService/getSampleSpecies v1.data.longline.SetLonglineLogbookCatchServiceRestApi.getSampleSpecies
GET /api/v1/data/longline/SetLonglineLogbookCatchService/loadForm v1.data.longline.SetLonglineLogbookCatchServiceRestApi.loadForm
POST /api/v1/data/longline/SetLonglineLogbookCatchService/save v1.data.longline.SetLonglineLogbookCatchServiceRestApi.save
GET /api/v1/data/longline/SetLonglineLogbookGlobalCompositionService/loadForm v1.data.longline.SetLonglineLogbookGlobalCompositionServiceRestApi.loadForm
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/ActivityLonglineLogbookSampleServiceLocal.java
=====================================
@@ -10,21 +10,19 @@ 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>.
* #L%
*/
-import fr.ird.observe.dto.DataNotFoundException;
import fr.ird.observe.dto.data.longline.SampleLogbookDto;
-import fr.ird.observe.dto.data.longline.SampleLogbookReference;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.result.SaveResultDto;
import fr.ird.observe.entities.longline.ActivityLonglineLogbook;
@@ -38,65 +36,23 @@ import fr.ird.observe.services.service.data.longline.ActivityLonglineLogbookSamp
public class ActivityLonglineLogbookSampleServiceLocal extends ObserveServiceLocal implements ActivityLonglineLogbookSampleService {
@Override
- public SampleLogbookReference loadReferenceToRead(String sampleLogbookId) {
- return SAMPLE_LOGBOOK_SPI.loadEntityToDataReferenceDto(getTopiaPersistenceContext(), sampleLogbookId, getReferentialLocale());
- }
-
- @Override
- public SampleLogbookDto loadDto(String sampleLogbookId) {
- return SAMPLE_LOGBOOK_SPI.loadEntityToDataDto(getTopiaPersistenceContext(), sampleLogbookId, getReferentialLocale());
- }
-
- @Override
- public boolean exists(String sampleLogbookId) {
- return SAMPLE_LOGBOOK_SPI.existsEntity(getTopiaPersistenceContext(), sampleLogbookId);
- }
-
- @Override
- public Form<SampleLogbookDto> loadForm(String sampleLogbookId) {
- SampleLogbook sampleLogbook = SAMPLE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), sampleLogbookId);
- return SAMPLE_LOGBOOK_SPI.dataEntityToForm(sampleLogbook, getReferentialLocale());
- }
-
- @Override
- public Form<SampleLogbookDto> preCreate(String activityLonglineId) {
+ public Form<SampleLogbookDto> loadForm(String activityLonglineId) {
ActivityLonglineLogbook activity = ACTIVITY_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), activityLonglineId);
- SampleLogbook preCreated = SAMPLE_LOGBOOK_SPI.newEntity();
-// SampleLogbook lastSampleLogbook = Iterables.getLast(tripLongline.getSample(), null);
-// Date timestamp;
-// if (lastSampleLogbook == null) {
-// // première activité, on utilise la date de début de marée (voir http://forge.codelutin.com/issues/6777)
-// Calendar calendar = Calendar.getInstance();
-// calendar.setTime(tripLongline.getStartDate());
-// timestamp = calendar.getTime();
-// } else {
-// // on reprend la date et l'heure de la dernière activité
-// timestamp = lastSampleLogbook.getStartDate();
-// }
-// preCreated.setStartDate(timestamp);
- return SAMPLE_LOGBOOK_SPI.dataEntityToForm(preCreated, getReferentialLocale());
+ SampleLogbook sampleLogbook = activity.getSample();
+ return SAMPLE_LOGBOOK_SPI.dataEntityToForm(sampleLogbook, getReferentialLocale());
}
@Override
- public SaveResultDto save(String activityLonglineId, SampleLogbookDto dto) {
- ActivityLonglineLogbook activity = ACTIVITY_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), activityLonglineId);
+ public SaveResultDto save(SampleLogbookDto dto) {
+// ActivityLonglineLogbook activity = ACTIVITY_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), activityLonglineId);
SampleLogbook entity = SAMPLE_LOGBOOK_SPI.loadOrCreateEntityFromDataDto(getTopiaPersistenceContext(), dto);
checkLastUpdateDate(entity, dto);
SAMPLE_LOGBOOK_SPI.copyDataDtoToEntity(dto, entity, getReferentialLocale());
SaveResultDto result = saveEntity(entity);
- if (dto.isNotPersisted()) {
- activity.setSample(entity);
- }
+// if (dto.isNotPersisted()) {
+// activity.setSample(entity);
+// }
return result;
}
- @Override
- public void delete(String activityLonglineId, String sampleLogbookId) {
- ActivityLonglineLogbook activity = ACTIVITY_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), activityLonglineId);
- if (activity.getSample() == null || sampleLogbookId.equals(activity.getSample().getTopiaId())) {
- throw new DataNotFoundException(SampleLogbookDto.class, sampleLogbookId);
- }
- activity.setSample(null);
- }
-
}
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/ActivityLonglineLogbookServiceLocal.java
=====================================
@@ -36,8 +36,11 @@ import fr.ird.observe.dto.result.TripChildSaveResultHelper;
import fr.ird.observe.entities.longline.ActivityLonglineLogbook;
import fr.ird.observe.entities.longline.ActivityLonglineLogbookTopiaDao;
import fr.ird.observe.entities.longline.ActivityLonglineLogbooks;
+import fr.ird.observe.entities.longline.SampleLogbook;
import fr.ird.observe.entities.longline.TripLongline;
+import fr.ird.observe.services.local.ObserveServiceContextLocal;
import fr.ird.observe.services.local.service.ObserveServiceLocal;
+import fr.ird.observe.services.service.data.longline.ActivityLonglineLogbookSampleService;
import fr.ird.observe.services.service.data.longline.ActivityLonglineLogbookService;
import java.util.ArrayList;
@@ -50,6 +53,14 @@ import java.util.List;
*/
public class ActivityLonglineLogbookServiceLocal extends ObserveServiceLocal implements ActivityLonglineLogbookService {
+ private ActivityLonglineLogbookSampleService sampleService;
+
+ @Override
+ public void setServiceContext(ObserveServiceContextLocal serviceContext) {
+ super.setServiceContext(serviceContext);
+ sampleService = serviceContext.newService(ActivityLonglineLogbookSampleService.class);
+ }
+
@Override
public DataDtoReferenceSet<ActivityLonglineLogbookReference> getActivityLonglineByTripLongline(String tripLonglineId) {
ActivityLonglineLogbookTopiaDao dao = ACTIVITY_LONGLINE_LOGBOOK_SPI.getDao(getTopiaPersistenceContext());
@@ -110,10 +121,22 @@ public class ActivityLonglineLogbookServiceLocal extends ObserveServiceLocal imp
ActivityLonglineLogbook entity = ACTIVITY_LONGLINE_LOGBOOK_SPI.loadOrCreateEntityFromDataDto(getTopiaPersistenceContext(), dto);
checkLastUpdateDate(entity, dto);
ACTIVITY_LONGLINE_LOGBOOK_SPI.copyDataDtoToEntity(dto, entity, getReferentialLocale());
+ boolean notPersisted = dto.isNotPersisted();
+ if (notPersisted) {
+ // create a unique sample
+ SampleLogbook preCreated = SAMPLE_LOGBOOK_SPI.newEntity();
+ preCreated.setLatitude(entity.getLatitude());
+ preCreated.setLongitude(entity.getLongitude());
+ preCreated.setTimeStamp(entity.getTimeStamp());
+ saveEntity(preCreated);
+ entity.setSample(preCreated);
+ }
SaveResultDto saveResultDto = saveEntity(entity);
+
TripChildSaveResultDto result = TripChildSaveResultHelper.of(saveResultDto);
- if (dto.isNotPersisted()) {
+ if (notPersisted) {
tripLongline.addActivityLonglineLogbook(entity);
+
}
boolean wasEndDateUpdated = TRIP_LONGLINE_SPI.getDao(getTopiaPersistenceContext()).updateEndDate(tripLongline);
result.setTripEndDateUpdated(wasEndDateUpdated);
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/SetLonglineLogbookCatchServiceLocal.java
=====================================
@@ -24,11 +24,16 @@ package fr.ird.observe.services.local.service.data.longline;
import fr.ird.observe.dto.data.longline.SetLonglineLogbookCatchDto;
import fr.ird.observe.dto.form.Form;
+import fr.ird.observe.dto.reference.ReferentialDtoReferenceSet;
+import fr.ird.observe.dto.referential.SpeciesReference;
import fr.ird.observe.dto.result.SaveResultDto;
+import fr.ird.observe.entities.longline.CatchLonglineLogbook;
import fr.ird.observe.entities.longline.SetLonglineLogbook;
import fr.ird.observe.services.local.service.ObserveServiceLocal;
import fr.ird.observe.services.service.data.longline.SetLonglineLogbookCatchService;
+import java.util.stream.Collectors;
+
/**
* @author Tony Chemit - dev(a)tchemit.fr
*/
@@ -48,4 +53,14 @@ public class SetLonglineLogbookCatchServiceLocal extends ObserveServiceLocal imp
return saveEntity(entity);
}
+ @Override
+ public ReferentialDtoReferenceSet<SpeciesReference> getSampleSpecies(String setLonglineId) {
+ SetLonglineLogbook set = SET_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), setLonglineId);
+ return SPECIES_SPI.toReferentialReferenceSet(set.getCatchLongline().stream()
+ .map(CatchLonglineLogbook::getSpeciesCatch)
+ .distinct()
+ .collect(Collectors.toList()),
+ getReferentialLocale(), null);
+ }
+
}
=====================================
services/src/main/java/fr/ird/observe/services/service/data/longline/ActivityLonglineLogbookSampleService.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.services.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>.
@@ -23,14 +23,12 @@ package fr.ird.observe.services.service.data.longline;
*/
import fr.ird.observe.dto.data.longline.SampleLogbookDto;
-import fr.ird.observe.dto.data.longline.SampleLogbookReference;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.result.SaveResultDto;
import fr.ird.observe.services.service.ObserveService;
import fr.ird.observe.services.spi.ReadDataPermission;
import fr.ird.observe.services.spi.Write;
import fr.ird.observe.services.spi.WriteDataPermission;
-import io.ultreia.java4all.http.spi.Delete;
import io.ultreia.java4all.http.spi.Get;
import io.ultreia.java4all.http.spi.Post;
@@ -41,32 +39,11 @@ public interface ActivityLonglineLogbookSampleService extends ObserveService {
@Get
@ReadDataPermission
- Form<SampleLogbookDto> loadForm(String sampleLogbookId);
-
- @Get
- @ReadDataPermission
- SampleLogbookDto loadDto(String sampleLogbookId);
-
- @Get
- @ReadDataPermission
- SampleLogbookReference loadReferenceToRead(String sampleLogbookId);
-
- @Get
- @ReadDataPermission
- boolean exists(String sampleLogbookId);
-
- @Get
- @WriteDataPermission
- Form<SampleLogbookDto> preCreate(String activityLonglineId);
+ Form<SampleLogbookDto> loadForm(String activityLonglineId);
@WriteDataPermission
@Write
@Post
- SaveResultDto save(String activityLonglineId, SampleLogbookDto dto);
-
- @Write
- @WriteDataPermission
- @Delete
- void delete(String activityLonglineId, String sampleLogbookId);
+ SaveResultDto save(SampleLogbookDto dto);
}
=====================================
services/src/main/java/fr/ird/observe/services/service/data/longline/SetLonglineLogbookCatchService.java
=====================================
@@ -24,6 +24,8 @@ package fr.ird.observe.services.service.data.longline;
import fr.ird.observe.dto.data.longline.SetLonglineLogbookCatchDto;
import fr.ird.observe.dto.form.Form;
+import fr.ird.observe.dto.reference.ReferentialDtoReferenceSet;
+import fr.ird.observe.dto.referential.SpeciesReference;
import fr.ird.observe.dto.result.SaveResultDto;
import fr.ird.observe.services.service.ObserveService;
import fr.ird.observe.services.spi.ReadDataPermission;
@@ -46,4 +48,8 @@ public interface SetLonglineLogbookCatchService extends ObserveService {
@Post
SaveResultDto save(SetLonglineLogbookCatchDto dto);
+ @Get
+ @ReadDataPermission
+ ReferentialDtoReferenceSet<SpeciesReference> getSampleSpecies(String setLonglineId);
+
}
=====================================
test/src/main/resources/db/8.2/dataForTestLongline.sql.gz
=====================================
The diff for this file was not included because it is too large.
=====================================
test/src/main/resources/db/8.2/dataForTestSeine.sql.gz
=====================================
The diff for this file was not included because it is too large.
=====================================
test/src/main/resources/db/8.2/empty_h2.sql.gz
=====================================
@@ -78,7 +78,7 @@ create table OBSERVE_LONGLINE.mitigationtype_setlogbook (set varchar(255), mitig
create table OBSERVE_LONGLINE.mitigationtype_setobs (set varchar(255), mitigationType varchar(255) not null);
create table OBSERVE_LONGLINE.observationTripType (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_LONGLINE.onBoardProcessing (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_LONGLINE.sampleLogbook (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, timeStamp timestamp, latitude numeric, longitude numeric, quadrant integer, trip varchar(255), primary key (topiaId));
+create table OBSERVE_LONGLINE.sampleLogbook (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, timeStamp timestamp, latitude numeric, longitude numeric, trip varchar(255), primary key (topiaId));
create table OBSERVE_LONGLINE.samplePartLogbook (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, length numeric, weight numeric, count integer, acquisitionMode integer, tagNumber varchar(255), species varchar(255), sex varchar(255), sizeMeasureType varchar(255), lengthMeasureMethod varchar(255), weightMeasureType varchar(255), weightMeasureMethod varchar(255), sample varchar(255), sample_idx integer, primary key (topiaId));
create table OBSERVE_LONGLINE.sectionObs (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, settingIdentifier integer not null, haulingIdentifier integer, set varchar(255), primary key (topiaId));
create table OBSERVE_LONGLINE.sensorBrand (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, brandName varchar(255), primary key (topiaId));
=====================================
test/src/main/resources/db/8.2/empty_pg.sql.gz
=====================================
@@ -78,7 +78,7 @@ create table OBSERVE_LONGLINE.mitigationtype_setlogbook (set varchar(255), mitig
create table OBSERVE_LONGLINE.mitigationtype_setobs (set varchar(255), mitigationType varchar(255) not null);
create table OBSERVE_LONGLINE.observationTripType (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_LONGLINE.onBoardProcessing (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_LONGLINE.sampleLogbook (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, timeStamp timestamp, latitude numeric, longitude numeric, quadrant int4, trip varchar(255), primary key (topiaId));
+create table OBSERVE_LONGLINE.sampleLogbook (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, timeStamp timestamp, latitude numeric, longitude numeric, trip varchar(255), primary key (topiaId));
create table OBSERVE_LONGLINE.samplePartLogbook (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, length numeric, weight numeric, count int4, acquisitionMode int4, tagNumber varchar(255), species varchar(255), sex varchar(255), sizeMeasureType varchar(255), lengthMeasureMethod varchar(255), weightMeasureType varchar(255), weightMeasureMethod varchar(255), sample varchar(255), sample_idx int4, primary key (topiaId));
create table OBSERVE_LONGLINE.sectionObs (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, settingIdentifier int4 not null, haulingIdentifier int4, set varchar(255), primary key (topiaId));
create table OBSERVE_LONGLINE.sensorBrand (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, brandName varchar(255), primary key (topiaId));
=====================================
test/src/main/resources/db/8.2/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/a6cb4f970da2eb7ac0a6349a7e6…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/a6cb4f970da2eb7ac0a6349a7e6…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] Ajout de la donnée observe_longline.SampleLogbook - Au niveau de l'activité (See #913)
by Tony CHEMIT 13 Sep '18
by Tony CHEMIT 13 Sep '18
13 Sep '18
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
74e2ce9f by Tony CHEMIT at 2018-09-13T20:46:34Z
Ajout de la donnée observe_longline.SampleLogbook - Au niveau de l'activité (See #913)
- - - - -
24 changed files:
- client/src/main/java/fr/ird/observe/client/ui/content/ObserveFocusManager.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUI.jcss
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUIHandler.java
- + client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUIModel.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/longline/logbook/ActivityLonglineSampleLogbookNavigationTreeNode.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/binder/data/longline/SampleLogbookEntityDtoBinder.java
- persistence/src/main/java/fr/ird/observe/entities/longline/ActivityLonglineLogbookTopiaDao.java
- persistence/src/main/models/Observe-06-data-longline-logbook.model
- server/src/main/filtered-resources/mapping
- services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/ActivityLonglineLogbookSampleServiceLocal.java
- services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/ActivityLonglineLogbookServiceLocal.java
- services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/SetLonglineLogbookCatchServiceLocal.java
- services/src/main/java/fr/ird/observe/services/service/data/longline/ActivityLonglineLogbookSampleService.java
- services/src/main/java/fr/ird/observe/services/service/data/longline/SetLonglineLogbookCatchService.java
- test/src/main/resources/db/8.2/dataForTestLongline.sql.gz
- test/src/main/resources/db/8.2/dataForTestSeine.sql.gz
- test/src/main/resources/db/8.2/empty_h2.sql.gz
- test/src/main/resources/db/8.2/empty_pg.sql.gz
- test/src/main/resources/db/8.2/referentiel.sql.gz
Changes:
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/ObserveFocusManager.java
=====================================
@@ -27,6 +27,7 @@ import fr.ird.observe.client.ui.content.data.longline.GearUseFeaturesLonglineUI;
import fr.ird.observe.client.ui.content.data.longline.TripLonglineListUI;
import fr.ird.observe.client.ui.content.data.longline.TripLonglineUI;
import fr.ird.observe.client.ui.content.data.longline.logbook.ActivityLonglineLogbookListUI;
+import fr.ird.observe.client.ui.content.data.longline.logbook.ActivityLonglineLogbookSampleUI;
import fr.ird.observe.client.ui.content.data.longline.logbook.ActivityLonglineLogbookUI;
import fr.ird.observe.client.ui.content.data.longline.logbook.BaitsCompositionLogbookUI;
import fr.ird.observe.client.ui.content.data.longline.logbook.BranchlinesCompositionLogbookUI;
@@ -387,6 +388,32 @@ public class ObserveFocusManager {
});
+ builder.put(ActivityLonglineLogbookSampleUI.class, new ObserveLayoutFocusTraversalPolicy<ActivityLonglineLogbookSampleUI>() {
+
+ @Override
+ protected Component getFirstComponentForEdit(Container aContainer) {
+ ActivityLonglineLogbookSampleUI ui = getUi();
+ if (ui.getTableModel().isEmpty()) {
+ return ui.getNewEntry();
+ }
+ return ui.getSpecies();
+ }
+
+ @Override
+ protected Component getLastComponentForEdit(Container aContainer) {
+ ActivityLonglineLogbookSampleUI ui = getUi();
+ if (ui.getSave().isEnabled()) {
+ return ui.getSave();
+ }
+ if (ui.getReset().isEnabled()) {
+ return ui.getReset();
+ }
+ return null;
+ }
+
+ });
+
+
builder.put(LonglineDetailCompositionObsUI.class, new ObserveLayoutFocusTraversalPolicy<LonglineDetailCompositionObsUI>() {
@Override
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUI.jaxx
=====================================
@@ -8,116 +8,194 @@
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%
-->
-<fr.ird.observe.client.ui.content.ContentUI
- i18nFormat="observe.common.SampleLogbookDto.%s"
- superGenericType='SampleLogbookDto, ActivityLonglineLogbookSampleUI'
- contentTitle='{n("observe.common.SampleLogbookDto.title")}'>
+
+<fr.ird.observe.client.ui.content.table.ContentTableUI
+ i18nFormat="observe.common.SamplePartLogbookDto.%s"
+ superGenericType='SampleLogbookDto, SamplePartLogbookDto, ActivityLonglineLogbookSampleUI'
+ contentTitle='{n("observe.common.SampleLogbookDto.title")}'
+ saveNewEntryText='{n("observe.common.SampleLogbookDto.action.create")}'
+ saveNewEntryTip='{n("observe.common.SampleLogbookDto.action.create.tip")}'>
<style source="../../../Common.jcss"/>
+ <style source="../../CommonTable.jcss"/>
<import>
- fr.ird.observe.dto.data.longline.SampleLogbookDto
+ fr.ird.observe.dto.referential.SexReference
+ fr.ird.observe.dto.referential.SizeMeasureTypeReference
+ fr.ird.observe.dto.referential.LengthMeasureMethodReference
+ fr.ird.observe.dto.referential.WeightMeasureTypeReference
+ fr.ird.observe.dto.referential.WeightMeasureMethodReference
+ fr.ird.observe.dto.referential.SpeciesReference
fr.ird.observe.dto.data.longline.SamplePartLogbookDto
- fr.ird.observe.dto.referential.DataQualityReference
-
+ fr.ird.observe.dto.data.longline.SampleLogbookDto
+ fr.ird.observe.client.constants.AcquisitionMode
+ fr.ird.observe.client.ui.content.table.*
+ fr.ird.observe.client.ui.util.JComment
fr.ird.observe.client.ui.actions.content.ResetEditUIAction
fr.ird.observe.client.ui.actions.content.SaveEditUIAction
fr.ird.observe.client.ui.actions.main.global.ResetDataGlobalUIAction
fr.ird.observe.client.ui.actions.main.global.SaveDataGlobalUIAction
- fr.ird.observe.client.ObserveSwingApplicationContext
- org.nuiton.jaxx.widgets.gis.absolute.CoordinatesEditor
- org.nuiton.jaxx.widgets.datetime.DateTimeEditor
+ org.nuiton.jaxx.widgets.number.NumberEditor
+ org.nuiton.jaxx.widgets.select.BeanFilterableComboBox
- java.util.Collection
+ java.awt.Dimension
static fr.ird.observe.client.ui.util.UIHelper.getStringValue
static org.nuiton.i18n.I18n.n
</import>
<!-- model -->
- <SampleLogbookUIModel id='model'/>
+ <ActivityLonglineLogbookSampleUIModel id='model' constructorParams='this'/>
<!-- edit bean -->
<SampleLogbookDto id='bean'/>
+ <!-- table edit bean -->
+ <SamplePartLogbookDto id='tableEditBean'/>
+
+ <!-- table model -->
+ <ContentTableModel id='tableModel'/>
+
<!-- le validateur de l'écran -->
- <BeanValidator id='validator' context='update'
- beanClass='fr.ird.observe.dto.data.longline.SampleLogbookDto'
- errorTableModel='{getErrorTableModel()}'>
- <field name='timeStamp' component='timeStamp'/>
- <field name='longitude' component='coordinates'/>
- <field name='latitude' component='coordinates'/>
- <field name='quadrant' component='coordinates'/>
- <field name='samplePartLogbook' component='samplePartLogbookPanel'/>
+ <BeanValidator id='validator' beanClass='fr.ird.observe.dto.data.longline.SampleLogbookDto'
+ errorTableModel='{getErrorTableModel()}' context='update'>
</BeanValidator>
- <JPanel id="body" layout='{new BorderLayout()}'>
- <Table insets="0" fill="both" constraints='BorderLayout.CENTER'>
- <row>
- <cell weightx="1" weighty="1">
-
- <JTabbedPane id='mainTabbedPane'>
-
- <tab id='caracteristicsTab' computeI18n="">
-
- <JPanel layout='{new BorderLayout()}'>
- <Table fill='both' constraints='BorderLayout.NORTH' insets="0">
-
- <!-- timeStamp -->
- <row>
- <cell weightx="1">
- <DateTimeEditor id='timeStamp' constructorParams='this'/>
- </cell>
- </row>
-
- <!-- latitude - longitude - quadrant -->
- <row>
- <cell anchor="east">
- <CoordinatesEditor id='coordinates' constructorParams='this'/>
- </cell>
- </row>
- </Table>
- </JPanel>
- </tab>
-
- <tab id='samplePartLogbookTab' computeI18n="">
- <JPanel id="samplePartLogbookPanel" layout='{new BorderLayout()}'>
- <SamplePartLogbookUI id="samplePartLogbookUI" constructorParams="ObserveSwingApplicationContext.get().getMainUI()"/>
- </JPanel>
- </tab>
- </JTabbedPane>
- </cell>
- </row>
- </Table>
- </JPanel>
-
- <SamplePartLogbookUIModel id="samplePartLogbookModel" initializer="samplePartLogbookUI.getModel()"/>
-
- <!-- actions -->
- <Table id="actions" fill='both' weightx='1' insets='0'>
+ <!-- le validateur d'une entrée de tableau -->
+ <BeanValidator id='validatorTable' autoField='true' beanClass='fr.ird.observe.dto.data.longline.SamplePartLogbookDto'
+ errorTableModel='{getErrorTableModel()}' context='update' parentValidator='{validator}'/>
+
+ <ButtonGroup id='acquisitionModeGroup'
+ onStateChanged='getHandler().updateAcquisitionMode((AcquisitionMode) acquisitionModeGroup.getSelectedValue())'/>
+
+ <JLabel id='hideFormInformation' styleClass="skipI18n"/>
+
+ <Table id='editorPanel' fill='both' insets='1'>
+
+ <!-- mode de saisie -->
<row>
- <cell columns="2">
- <JButton id='move'/>
+ <cell columns="3">
+ <JPanel id='acquisitionModePanel'>
+ <JRadioButton id='acquisitionModeEffectif'/>
+ <JRadioButton id='acquisitionModeIndividu'/>
+ </JPanel>
+ </cell>
+ </row>
+
+ <!-- species -->
+ <row>
+ <cell>
+ <JLabel id='speciesLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <BeanFilterableComboBox id='species' constructorParams='this' genericType='SpeciesReference'/>
+ </cell>
+ </row>
+
+ <!-- count -->
+ <row>
+ <cell>
+ <JLabel id='countLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <NumberEditor id='count' constructorParams='this' styleClass="int6"/>
+ </cell>
+ </row>
+
+ <!-- sizeMeasureType -->
+ <row>
+ <cell>
+ <JLabel id='sizeMeasureTypeLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <JPanel id='sizeMeasureTypePanel' layout='{new BorderLayout()}'>
+ <BeanFilterableComboBox id='sizeMeasureType' genericType='SizeMeasureTypeReference'
+ constructorParams='this' constraints="BorderLayout.CENTER"/>
+ <JButton id="defaultSizeMeasureType" constraints="BorderLayout.EAST"
+ onActionPerformed="getHandler().resetDefaultSizeMeasureType()"/>
+ </JPanel>
</cell>
</row>
+
+ <!-- length -->
<row>
- <cell weightx="0.5">
- <JButton id='reset'/>
+ <cell>
+ <JLabel id='lengthLabel'/>
</cell>
- <cell weightx="0.5">
- <JButton id='save'/>
+ <cell weightx='1' anchor='east'>
+ <NumberEditor id='length' constructorParams='this' styleClass="float1"/>
</cell>
</row>
+
+ <!-- sizeMeasureMethod -->
+ <row>
+ <cell>
+ <JLabel id='lengthMeasureMethodLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <BeanFilterableComboBox id='lengthMeasureMethod' constructorParams='this' genericType='LengthMeasureMethodReference'/>
+ </cell>
+ </row>
+
+ <!-- weightMeasureType -->
+ <row>
+ <cell>
+ <JLabel id='weightMeasureTypeLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <BeanFilterableComboBox id='weightMeasureType' constructorParams='this' genericType='WeightMeasureTypeReference'/>
+ </cell>
+ </row>
+ <!-- weightMeasureMethod -->
+ <row>
+ <cell>
+ <JLabel id='weightMeasureMethodLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <BeanFilterableComboBox id='weightMeasureMethod' constructorParams='this' genericType='WeightMeasureMethodReference'/>
+ </cell>
+ </row>
+
+ <!-- weight -->
+ <row>
+ <cell>
+ <JLabel id='weightLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <NumberEditor id='weight' constructorParams='this' styleClass="float2"/>
+ </cell>
+ </row>
+
+ <!-- sex -->
+ <row>
+ <cell>
+ <JLabel id='sexLabel'/>
+ </cell>
+ <cell weightx='1' anchor='east'>
+ <BeanFilterableComboBox id='sex' genericType='SexReference' constructorParams='this'/>
+ </cell>
+ </row>
+
</Table>
-</fr.ird.observe.client.ui.content.ContentUI>
+ <!--FIXME Voir comment juste ajouter des actions à la table parent-->
+ <Table id="actions" fill='both' weightx='1' insets='0'>
+ <row>
+ <cell columns="2">
+ <JButton id='move'/>
+ </cell>
+ </row>
+ </Table>
+</fr.ird.observe.client.ui.content.table.ContentTableUI>
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUI.jcss
=====================================
@@ -20,56 +20,77 @@
* #L%
*/
-#model {
- editable:true;
- modified:{validator.isChanged() || samplePartLogbookModel.isModified()};
- valid:{validator.isValid() && samplePartLogbookModel.isValid()};
- enabled:{!model.isReadingMode()};
+#species {
+ selectedItem:{tableEditBean.getSpecies()};
}
-/* ***************************************************************************** */
-/* CARACTERISTICS TAB ********************************************************* */
-/* ***************************************************************************** */
+#sizeMeasureType {
+ selectedItem:{tableEditBean.getSizeMeasureType()};
+}
+
+#lengthMeasureMethod {
+ selectedItem:{tableEditBean.getLengthMeasureMethod()};
+}
+
+#weightMeasureType {
+ selectedItem:{tableEditBean.getWeightMeasureType()};
+}
+
+#weightMeasureMethod {
+ selectedItem:{tableEditBean.getWeightMeasureMethod()};
+}
+
+#sex {
+ selectedItem:{tableEditBean.getSex()};
+}
-#caracteristicsTab {
- icon:{handler.getErrorIconIfFalse(model.isCaracteristicsTabValid())};
+#count {
+ property:{SamplePartLogbookDto.PROPERTY_COUNT};
+ numberValue:{tableEditBean.getCount()};
}
-#timeStamp {
- date:{bean.getTimeStamp()};
- propertyDate: {SampleLogbookDto.PROPERTY_TIME_STAMP};
- propertyDayDate: {SampleLogbookDto.PROPERTY_DATE};
- propertyTimeDate: {SampleLogbookDto.PROPERTY_TIME};
+#length {
+ numberValue:{tableEditBean.getLength()};
}
-#coordinates {
- propertyLatitude:{SampleLogbookDto.PROPERTY_LATITUDE};
- propertyLongitude:{SampleLogbookDto.PROPERTY_LONGITUDE};
- propertyQuadrant:{SampleLogbookDto.PROPERTY_QUADRANT};
- latitude:{bean.getLatitude()};
- longitude:{bean.getLongitude()};
- quadrant:{bean.getQuadrant()};
+#weight {
+ numberValue:{tableEditBean.getWeight()};
}
-/* ***************************************************************************** */
-/* SAMPLE PART TAB ************************************************************ */
-/* ***************************************************************************** */
+#acquisitionModeGroup {
+ selectedValue:{AcquisitionMode.valueOf(tableEditBean.getAcquisitionMode())};
+}
+
+#acquisitionModePanel {
+ border:{new TitledBorder(t("observe.common.acquisitionMode"))};
+ layout:{new GridLayout(1,0)};
+}
-#samplePartLogbookTab {
- icon:{handler.getErrorIconIfFalse(model.isSamplePartLogbookTabValid())};
+#acquisitionModeEffectif {
+ buttonGroup:"acquisitionModeGroup";
+ value:{AcquisitionMode.byEffectif};
+ text:{AcquisitionMode.byEffectif.toString()};
+ selected:{tableEditBean.getAcquisitionMode() == 0};
+ enabled:{!tableModel.isEditable() || tableModel.isCreate()};
}
-#save {
- _globalAction:{SaveDataGlobalUIAction.ACTION_NAME};
+#acquisitionModeIndividu {
+ buttonGroup:"acquisitionModeGroup";
+ value:{AcquisitionMode.byIndividu};
+ text:{AcquisitionMode.byIndividu.toString()};
+ selected:{tableEditBean.getAcquisitionMode() == 1};
+ enabled:{!tableModel.isEditable() || tableModel.isCreate()};
}
-#reset {
- _globalAction:{ResetDataGlobalUIAction.ACTION_NAME};
+#defaultSizeMeasureType {
+ actionIcon:combobox-reset2;
+ toolTipText:"observe.common.Sample.action.resetDefaultSizeMeasureType.tip";
}
#move {
text:"observe.common.SampleLogbookDto.move";
actionIcon:"move-activities";
mnemonic:A;
- enabled:{model.isUpdatingMode() && model.isValid() && !model.isModified()};
+ visible:{model.isUpdatingMode()};
+ enabled:{model.isValid() && !model.isModified()};
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUIHandler.java
=====================================
@@ -10,23 +10,25 @@ package fr.ird.observe.client.ui.content.data.longline.logbook;
* 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.Lists;
import fr.ird.observe.client.ObserveSwingApplicationContext;
-import fr.ird.observe.client.db.ObserveSwingDataSource;
+import fr.ird.observe.client.constants.AcquisitionMode;
import fr.ird.observe.client.ui.content.ContentMode;
-import fr.ird.observe.client.ui.content.ContentUIHandler;
-import fr.ird.observe.client.validation.ClientValidationContext;
+import fr.ird.observe.client.ui.content.table.ContentTableModel;
+import fr.ird.observe.client.ui.content.table.ContentTableUIHandler;
+import fr.ird.observe.client.ui.util.UIHelper;
import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookDto;
import fr.ird.observe.dto.data.longline.SampleLogbookDto;
import fr.ird.observe.dto.data.longline.SampleLogbookHelper;
@@ -34,22 +36,30 @@ import fr.ird.observe.dto.data.longline.SamplePartLogbookDto;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.form.FormDefinition;
import fr.ird.observe.dto.navigation.edit.node.ObserveLonglineLogbookActivityEditNode;
-import fr.ird.observe.dto.navigation.select.node.ObserveLonglineLogbookActivitySampleSelectNode;
+import fr.ird.observe.dto.navigation.select.node.ObserveLonglineLogbookActivitySelectNode;
+import fr.ird.observe.dto.reference.ReferentialDtoReferenceSet;
+import fr.ird.observe.dto.referential.SexReference;
+import fr.ird.observe.dto.referential.SizeMeasureTypeReference;
+import fr.ird.observe.dto.referential.SpeciesReference;
+import fr.ird.observe.dto.referential.WeightMeasureTypeReference;
import fr.ird.observe.dto.result.SaveResultDto;
import fr.ird.observe.spi.DtoModelHelper;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.jaxx.runtime.spi.UIHandler;
-import org.nuiton.jaxx.validator.swing.SwingValidatorMessage;
-import org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel;
import org.nuiton.validator.NuitonValidatorScope;
-import javax.swing.event.TableModelListener;
-import java.util.Date;
-import java.util.HashSet;
+import javax.swing.JComponent;
+import javax.swing.JTable;
+import javax.swing.table.DefaultTableCellRenderer;
+import java.awt.GridBagConstraints;
+import java.awt.Insets;
+import java.beans.PropertyChangeListener;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Optional;
-import java.util.Set;
+import static org.nuiton.i18n.I18n.n;
import static org.nuiton.i18n.I18n.t;
/**
@@ -58,214 +68,243 @@ import static org.nuiton.i18n.I18n.t;
* @author Tony Chemit - dev(a)tchemit.fr
* @since 3.8
*/
-public class ActivityLonglineLogbookSampleUIHandler extends ContentUIHandler<SampleLogbookDto, ActivityLonglineLogbookSampleUI> implements UIHandler<ActivityLonglineLogbookSampleUI> {
+public class ActivityLonglineLogbookSampleUIHandler extends ContentTableUIHandler<SampleLogbookDto, SamplePartLogbookDto, ActivityLonglineLogbookSampleUI> implements UIHandler<ActivityLonglineLogbookSampleUI> {
- private static final Logger log = LogManager.getLogger(ActivityLonglineLogbookSampleUIHandler.class);
- protected final TableModelListener computeTabValidStateListener;
+ private static final Logger log = LogManager.getLogger(SamplePartLogbookUIHandler.class);
+ private final PropertyChangeListener speciesChanged;
ActivityLonglineLogbookSampleUIHandler() {
- super(ObserveLonglineLogbookActivitySampleSelectNode.class, ObserveLonglineLogbookActivityEditNode.class);
- computeTabValidStateListener = e -> {
- SwingValidatorMessageTableModel source = (SwingValidatorMessageTableModel) e.getSource();
- computeTabValidState(source);
- };
- }
-
- @Override
- protected void installFocusTraversalPolicy() {
- // rien a installer
- }
+ super(ObserveLonglineLogbookActivitySelectNode.class, ObserveLonglineLogbookActivityEditNode.class);
+ addReferentialFilter(SamplePartLogbookDto.PROPERTY_SPECIES, incomingReferences -> {
+ String setId = ObserveSwingApplicationContext.get().getNavigationEdit().getLongline().getSetLogbook().getId();
+ if (setId == null) {
+ return new LinkedList<>();
+ }
+ ReferentialDtoReferenceSet<SpeciesReference> sampleSpecies = getSetLonglineLogbookCatchService().getSampleSpecies(setId);
+ return new LinkedList<>(sampleSpecies.toSet());
+ });
- @Override
- protected boolean computeCanWrite(ObserveSwingDataSource dataSource) {
- return dataSource.canWriteData();
+ speciesChanged = evt -> onSpeciesChanged((SpeciesReference) evt.getNewValue());
}
@Override
protected ContentMode getContentMode() {
- String selectedId = getSelectedId();
- if (selectedId == null) {
- return ContentMode.CREATE;
- }
- if (selectedId.equals(getEditNode().getId())) {
- return ContentMode.UPDATE;
- }
- addMessage(getUi(),
- NuitonValidatorScope.INFO,
- getTypeI18nKey(ActivityLonglineLogbookDto.class),
- t("observe.common.ActivityLonglineLogbookDto.message.not.open"));
- return ContentMode.READ;
- }
-
- @Override
- public void afterInit(ActivityLonglineLogbookSampleUI ui) {
- super.afterInit(ui);
- {
- // init floatlinesComposition tab
- SamplePartLogbookUI compositionUI = ui.getSamplePartLogbookUI();
- ui.getSamplePartLogbookPanel().remove(compositionUI);
- ui.getSamplePartLogbookPanel().add(compositionUI.getBody());
+ ContentMode contentMode = super.getContentMode();
+ if (ContentMode.READ == contentMode) {
+ addMessage(getUi(),
+ NuitonValidatorScope.INFO,
+ getTypeI18nKey(ActivityLonglineLogbookDto.class),
+ t("observe.common.ActivityLonglineObsDto.message.not.open"));
}
- getModel().addPropertyChangeListener(SampleLogbookUIModel.PROPERTY_MODE, evt -> {
- showIndividualTabs(evt.getNewValue() != ContentMode.CREATE);
- });
+ return contentMode;
}
+ @SuppressWarnings("unchecked")
@Override
- public void openUI() {
-
- getUi().getCoordinates().resetModel();
+ protected void onSelectedRowChanged(int editingRow,
+ SamplePartLogbookDto bean,
+ boolean create) {
+ ContentTableModel<SampleLogbookDto, SamplePartLogbookDto> model = getTableModel();
- super.openUI();
+ if (!model.isEditable()) {
+ return;
+ }
- String activityId = getSelectedParentId();
- String setId = getSelectedId();
+ SamplePartLogbookDto tableEditBean = getTableEditBean();
+ tableEditBean.removePropertyChangeListener(SamplePartLogbookDto.PROPERTY_SPECIES, speciesChanged);
- if (log.isInfoEnabled()) {
- log.info("tripId = " + activityId);
- log.info("setId = " + setId);
+ SpeciesReference species = bean.getSpecies();
+ ActivityLonglineLogbookSampleUI ui = getUi();
+ if (log.isDebugEnabled()) {
+ log.debug("selected species " + species);
}
- ContentMode mode = computeContentMode();
+ List<SpeciesReference> availableSpecies;
+ JComponent requestFocus;
+ Optional<SizeMeasureTypeReference> sizeMeasureType;
- // update mode
- Form<SampleLogbookDto> form;
- if (setId == null) {
- // create mode
- form = getTripLonglineSampleLogbookService().preCreate(activityId);
- } else {
- // update mode
- form = getTripLonglineSampleLogbookService().loadForm(setId);
- }
+ if (create) {
- loadReferentialReferenceSetsInModel(form);
+ if (model.isCreate()) {
- getModel().setForm(form);
- SampleLogbookHelper.copySampleLogbookDto(form.getObject(), getBean());
-
- SampleLogbookDto bean = getBean();
- bean.setTimeStamp(new Date());
+ // on passe le mode de saisie en count
+ ui.getAcquisitionModeGroup().setSelectedValue(null);
+ ui.getAcquisitionModeGroup().setSelectedValue(AcquisitionMode.byEffectif);
+ }
- // utilisation du mode requis
- setContentMode(mode);
+ availableSpecies = getModel().getReferentialReferences(SamplePartLogbookDto.PROPERTY_SPECIES);
+ // on utilise le code par defaut de l'espèce
+ sizeMeasureType = getSpeciesDefaultSizeMeasureType(species);
+ getUi().getModel().setDefaultSizeMeasureType(sizeMeasureType.orElse(null));
- // 1. Mise à jour latitude/longitude:
- getUi().getCoordinates().setLatitudeAndLongitude(bean.getLatitude(), bean.getLongitude());
- // 2. Mise à jour du quadrant :
- // Si le bean de données contient un quadrant, on met simplement à jour le composant de coordonnées pour sélectionner le quadrant voulu
- // sinon, on réinitialise les quadrants du composant afin qu'aucun d'eux ne soit sélectionné (par exemple dans le cas de la création de la première activité d'une route)
- if (bean.getQuadrant() == null) {
- getUi().getCoordinates().resetQuadrant();
+ requestFocus = ui.getSpecies();
} else {
- getUi().getCoordinates().setQuadrant(bean.getQuadrant());
- }
- {
- // open floatlinesComposition tab
- SamplePartLogbookUIModel floatlinesCompositionModel = getUi().getSamplePartLogbookModel();
- floatlinesCompositionModel.setReferentialReferenceSets(getModel().getReferentialReferenceSets());
+ requestFocus = ui.getCount();
- Optional<FormDefinition<SamplePartLogbookDto>> optionalFormDefinition = DtoModelHelper.getOptionalFormDefinition(SamplePartLogbookDto.class);
- optionalFormDefinition.ifPresent(getUi().getSamplePartLogbookUI().getHandler()::loadReferentialReferenceSetsInModel);
+ // on passe le mode de saisie
+ int acquisitionMode = bean.getAcquisitionMode();
+ AcquisitionMode enumValue = AcquisitionMode.valueOf(acquisitionMode);
+ ui.getAcquisitionModeGroup().setSelectedValue(null);
+ ui.getAcquisitionModeGroup().setSelectedValue(enumValue);
- floatlinesCompositionModel.setForm(form);
- SampleLogbookHelper.copySampleLogbookDto(form.getObject(), floatlinesCompositionModel.getBean());
+ availableSpecies = Lists.newArrayList(species);
- SamplePartLogbookUI compositionUI = getUi().getSamplePartLogbookUI();
- compositionUI.open();
- compositionUI.getValidator().setBean(null);
+ sizeMeasureType = Optional.ofNullable(bean.getSizeMeasureType());
}
- if (mode != ContentMode.READ) {
- getUi().startEdit(null);
- }
- // To be sure always remove listener (could prevent some leaks)
- getUi().getErrorTableModel().removeTableModelListener(computeTabValidStateListener);
- // listen messages to see if required to add
- getUi().getErrorTableModel().addTableModelListener(computeTabValidStateListener);
+ ui.getSizeMeasureType().setSelectedItem(null);
+ sizeMeasureType.ifPresent(sizeMeasureTypeDtoReferentialReference -> ui.getSizeMeasureType().setSelectedItem(sizeMeasureTypeDtoReferentialReference));
+
+ ui.getSpecies().setData(availableSpecies);
+ UIHelper.askFocus(requestFocus);
- SwingValidatorMessageTableModel errorTableModel = getUi().getErrorTableModel();
- computeTabValidState(errorTableModel);
+ tableEditBean.addPropertyChangeListener(SamplePartLogbookDto.PROPERTY_SPECIES, speciesChanged);
}
@Override
- protected void prepareValidationContext() {
- super.prepareValidationContext();
- ClientValidationContext validationContext = ObserveSwingApplicationContext.get().getValidationContext();
- validationContext.setCoordinatesEditor("coordinate", getUi().getCoordinates());
+ public void afterInit(ActivityLonglineLogbookSampleUI ui) {
+ super.afterInit(ui);
+ getUi().getActions().add(getUi().getReset(), new GridBagConstraints(0, 1, 1, 1, 0.5, 0.0, 10, 1, new Insets(0, 0, 0, 0), 0, 0));
+ getUi().getActions().add(getUi().getSave(), new GridBagConstraints(1, 1, 1, 1, 0.5, 0.0, 10, 1, new Insets(0, 0, 0, 0), 0, 0));
}
-
@Override
- public void startEditUI(String... binding) {
- SampleLogbookUIModel model = getModel();
- boolean create = model.getMode() == ContentMode.CREATE;
- String contextName = getValidatorContextName(model.getMode());
- getUi().getValidator().setContext(contextName);
- if (create) {
- addInfoMessage(t("observe.common.SampleLogbook.message.creating"));
- } else {
- addInfoMessage(t("observe.common.SampleLogbook.message.updating"));
- }
- super.startEditUI(SampleLogbookDto.PROPERTY_TIME_STAMP,
- SampleLogbookDto.PROPERTY_LATITUDE,
- SampleLogbookDto.PROPERTY_LONGITUDE,
- SampleLogbookDto.PROPERTY_QUADRANT);
- model.setModified(false);
+ protected void initTableUI(DefaultTableCellRenderer renderer) {
+ JTable table = getUi().getTable();
+
+ UIHelper.setI18nTableHeaderRenderer(table,
+ n("observe.common.SamplePartLogbookDto.table.species"),
+ n("observe.common.SamplePartLogbookDto.table.species.tip"),
+ n("observe.common.SamplePartLogbookDto.table.count"),
+ n("observe.common.SamplePartLogbookDto.table.count.tip"),
+ n("observe.common.SamplePartLogbookDto.table.sizeMeasureType"),
+ n("observe.common.SamplePartLogbookDto.table.sizeMeasureType.tip"),
+ n("observe.common.SamplePartLogbookDto.table.length"),
+ n("observe.common.SamplePartLogbookDto.table.length.tip"),
+ n("observe.common.SamplePartLogbookDto.table.weightMeasureType"),
+ n("observe.common.SamplePartLogbookDto.table.weightMeasureType.tip"),
+ n("observe.common.SamplePartLogbookDto.table.weight"),
+ n("observe.common.SamplePartLogbookDto.table.weight.tip"),
+ n("observe.common.SamplePartLogbookDto.table.sex"),
+ n("observe.common.SamplePartLogbookDto.table.sex.tip"));
+
+ UIHelper.setTableColumnRenderer(table, 0, UIHelper.newReferentialReferenceDecorateTableCellRenderer(renderer, SpeciesReference.class));
+ UIHelper.setTableColumnRenderer(table, 1, UIHelper.newEmptyNumberTableCellRenderer(renderer));
+ UIHelper.setTableColumnRenderer(table, 2, UIHelper.newReferentialReferenceDecorateTableCellRenderer(renderer, SizeMeasureTypeReference.class));
+ UIHelper.setTableColumnRenderer(table, 3, UIHelper.newEmptyNumberTableCellRenderer(renderer));
+ UIHelper.setTableColumnRenderer(table, 4, UIHelper.newReferentialReferenceDecorateTableCellRenderer(renderer, WeightMeasureTypeReference.class));
+ UIHelper.setTableColumnRenderer(table, 5, UIHelper.newEmptyNumberTableCellRenderer(renderer));
+ UIHelper.setTableColumnRenderer(table, 6, UIHelper.newReferentialReferenceDecorateTableCellRenderer(renderer, SexReference.class));
}
@Override
- protected boolean doSave(SampleLogbookDto bean) {
- bean.setSamplePartLogbook(getUi().getSamplePartLogbookModel().getBean().getSamplePartLogbook());
- SaveResultDto saveResult = getActivityLonglineLogbookSampleService().save(getSelectedId(), bean);
+ protected void doPersist(SampleLogbookDto bean) {
+ SaveResultDto saveResult = getActivityLonglineLogbookSampleService().save(bean);
saveResult.toDto(bean);
- return true;
}
@Override
- protected void afterSave(boolean refresh) {
- if (getModel().isCreatingMode()) {
- getModel().setMode(ContentMode.UPDATE);
- restartEditUI();
- } else {
- super.afterSave(refresh);
- getUi().getSamplePartLogbookUI().getHandler().afterSave(refresh);
+ protected void loadEditBean(String beanId) {
+ Form<SampleLogbookDto> form = getActivityLonglineLogbookSampleService().loadForm(beanId);
+ loadReferentialReferenceSetsInModel(form);
+
+ Optional<FormDefinition<SamplePartLogbookDto>> optionalFormDefinition = DtoModelHelper.getOptionalFormDefinition(SamplePartLogbookDto.class);
+ optionalFormDefinition.ifPresent(this::loadReferentialReferenceSetsInModel);
+ getModel().setForm(form);
+
+ SampleLogbookHelper.copySampleLogbookDto(form.getObject(), getBean());
+
+ }
+
+ private Optional<SizeMeasureTypeReference> getSpeciesDefaultSizeMeasureType(SpeciesReference species) {
+ Optional<SizeMeasureTypeReference> result = Optional.empty();
+ if (species != null) {
+
+ String sizeMeasureId = species.getSizeMeasureTypeId();
+ result = getUi().getSizeMeasureType().getData().stream()
+ .filter(s -> s.getId().equals(sizeMeasureId)).findFirst();
}
+ return result;
}
- protected void computeTabValidState(SwingValidatorMessageTableModel errorTableModel) {
+ /**
+ * Le mode de saisie a été mis à jour.
+ *
+ * @param newMode le nouveau de mode de saisie à utiliser
+ * @since 3.0
+ */
+ void updateAcquisitionMode(AcquisitionMode newMode) {
- Set<String> errorProperties = new HashSet<>();
- int rowCount = errorTableModel.getRowCount();
- for (int i = 0; i < rowCount; i++) {
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Change acquisition mode to %s", newMode));
+ }
+ if (newMode == null) {
- SwingValidatorMessage row = errorTableModel.getRow(i);
- if (NuitonValidatorScope.ERROR.equals(row.getScope())) {
- errorProperties.add(row.getField());
- }
+ // mode null (cela peut arriver avec les bindings)
+ return;
}
- boolean caracteristicsTabValid = !errorProperties.removeAll(SampleLogbookUIModel.CARACTERISTICS_TAB_PROPERTIES);
- boolean samplePartLogbookTabValid = !errorProperties.removeAll(SampleLogbookUIModel.SAMPLE_PART_TAB_PROPERTIES);
+ ActivityLonglineLogbookSampleUI ui = getUi();
+
+ boolean createMode = ui.getTableModel().isCreate();
- SampleLogbookUIModel model = getModel();
- model.setCaracteristicsTabValid(caracteristicsTabValid);
- model.setSamplePartLogbookTabValid(samplePartLogbookTabValid);
+ SamplePartLogbookDto editBean = ui.getTableEditBean();
+ switch (newMode) {
+ case byEffectif:
+
+ // le weight n'est pas modifiable
+ ui.getWeight().setEnabled(false);
+ ui.getWeightMeasureType().setEnabled(false);
+
+ // l'count est modifiable
+ ui.getCount().setEnabled(true);
+
+ if (createMode) {
+
+ // on supprime le weight (si il a été saisie)
+ editBean.setWeight(null);
+ editBean.setWeightMeasureType(null);
+ // on supprime aussi l'count (pour forcer la saisie)
+ editBean.setCount(null);
+ }
+ break;
+
+ case byIndividu:
+
+ // le weight est pas modifiable
+ ui.getWeight().setEnabled(true);
+ ui.getWeightMeasureType().setEnabled(true);
+
+ // l'count n'est pas modifiable et est toujours de 1
+ ui.getCount().setEnabled(false);
+
+ if (createMode) {
+
+ // on positionne l'count à 1 (seule valeur possible)
+ editBean.setCount(1);
+ }
+ break;
+ }
+
+ if (createMode) {
+
+ // on propage le mode de saisie dans le bean
+ editBean.setAcquisitionMode(newMode.ordinal());
+ }
}
- @Override
- public SampleLogbookUIModel getModel() {
- return (SampleLogbookUIModel) super.getModel();
+ public void resetDefaultSizeMeasureType() {
+ getUi().getSizeMeasureType().setSelectedItem(null);
+ getUi().getSizeMeasureType().setSelectedItem(getUi().getModel().getDefaultSizeMeasureType());
}
- private void showIndividualTabs(boolean newValue) {
- getUi().getSamplePartLogbookTab().setEnabled(newValue);
- if (!newValue && getUi().getMainTabbedPane().getSelectedIndex() > 2) {
- // go back to first tab
- getUi().getMainTabbedPane().setSelectedIndex(0);
- }
+
+ private void onSpeciesChanged(SpeciesReference species) {
+ Optional<SizeMeasureTypeReference> sizeMeasureType = getSpeciesDefaultSizeMeasureType(species);
+ getUi().getModel().setDefaultSizeMeasureType(sizeMeasureType.orElse(null));
}
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookSampleUIModel.java
=====================================
@@ -0,0 +1,118 @@
+package fr.ird.observe.client.ui.content.data.longline.logbook;
+
+/*-
+ * #%L
+ * ObServe :: Client
+ * %%
+ * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ird.observe.client.ui.content.table.ContentTableMeta;
+import fr.ird.observe.client.ui.content.table.ContentTableModel;
+import fr.ird.observe.client.ui.content.table.ContentTableUIModel;
+import fr.ird.observe.client.ui.content.table.ObserveContentTableUI;
+import fr.ird.observe.dto.data.longline.SampleLogbookDto;
+import fr.ird.observe.dto.data.longline.SamplePartLogbookDto;
+import fr.ird.observe.dto.data.longline.SamplePartLogbookHelper;
+import fr.ird.observe.dto.referential.SizeMeasureTypeReference;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * Created by tchemit on 13/09/2018.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ */
+public class ActivityLonglineLogbookSampleUIModel extends ContentTableUIModel<SampleLogbookDto, SamplePartLogbookDto> {
+
+ public static final String PROPERTY_DEFAULT_SIZE_MEASURE_TYPE = "defaultSizeMeasureType";
+ private static final long serialVersionUID = 1L;
+ private SizeMeasureTypeReference defaultSizeMeasureType;
+
+ public ActivityLonglineLogbookSampleUIModel(ActivityLonglineLogbookSampleUI ui) {
+
+ super(SampleLogbookDto.class,
+ SamplePartLogbookDto.class,
+ new String[]{
+ SampleLogbookDto.PROPERTY_SAMPLE_PART_LOGBOOK,
+ SampleLogbookDto.PROPERTY_DATE,
+ SampleLogbookDto.PROPERTY_LATITUDE,
+ SampleLogbookDto.PROPERTY_LONGITUDE,
+ SampleLogbookDto.PROPERTY_QUADRANT},
+ new String[]{SamplePartLogbookDto.PROPERTY_SPECIES,
+ SamplePartLogbookDto.PROPERTY_ACQUISITION_MODE,
+ SamplePartLogbookDto.PROPERTY_SIZE_MEASURE_TYPE,
+ SamplePartLogbookDto.PROPERTY_LENGTH_MEASURE_METHOD,
+ SamplePartLogbookDto.PROPERTY_WEIGHT_MEASURE_TYPE,
+ SamplePartLogbookDto.PROPERTY_SEX,
+ SamplePartLogbookDto.PROPERTY_COUNT,
+ SamplePartLogbookDto.PROPERTY_LENGTH,
+ SamplePartLogbookDto.PROPERTY_WEIGHT});
+
+ List<ContentTableMeta<SamplePartLogbookDto>> metas = Arrays.asList(
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_SPECIES, false),
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_COUNT, false),
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_SIZE_MEASURE_TYPE, false),
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_LENGTH, false),
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_WEIGHT_MEASURE_TYPE, false),
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_WEIGHT, false),
+ ContentTableModel.newTableMeta(SamplePartLogbookDto.class, SamplePartLogbookDto.PROPERTY_SEX, false));
+
+ initModel(ui, metas);
+ }
+
+ @Override
+ protected ContentTableModel<SampleLogbookDto, SamplePartLogbookDto> createTableModel(
+ ObserveContentTableUI<SampleLogbookDto, SamplePartLogbookDto, ?> ui,
+ List<ContentTableMeta<SamplePartLogbookDto>> contentTableMetas) {
+
+ return new ContentTableModel<SampleLogbookDto, SamplePartLogbookDto>(ui, contentTableMetas) {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected Collection<SamplePartLogbookDto> getChilds(SampleLogbookDto bean) {
+ return bean.getSamplePartLogbook();
+ }
+
+ @Override
+ protected void load(SamplePartLogbookDto source, SamplePartLogbookDto target) {
+ SamplePartLogbookHelper.copySamplePartLogbookDto(source, target);
+ }
+
+ @Override
+ protected void setChilds(SampleLogbookDto parent, List<SamplePartLogbookDto> childs) {
+ parent.setSamplePartLogbook(new LinkedList<>(childs));
+ }
+ };
+ }
+
+
+ public SizeMeasureTypeReference getDefaultSizeMeasureType() {
+ return defaultSizeMeasureType;
+ }
+
+ public void setDefaultSizeMeasureType(SizeMeasureTypeReference defaultSizeMeasureType) {
+ SizeMeasureTypeReference oldValue = getDefaultSizeMeasureType();
+ this.defaultSizeMeasureType = defaultSizeMeasureType;
+ firePropertyChange(PROPERTY_DEFAULT_SIZE_MEASURE_TYPE, oldValue, defaultSizeMeasureType);
+ }
+
+}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIHandler.java
=====================================
@@ -215,6 +215,9 @@ class ActivityLonglineLogbookUIHandler extends ContentOpenableUIHandler<Activity
if (notPersisted) {
// ouverture de l'activité après création
getEditNode().setId(bean.getId());
+ // on doit recharger le bean car on y a ajoute son sample
+ ActivityLonglineLogbookDto newBean = getActivityLonglineLogbookService().loadDto(bean.getId());
+ getModel().setBean(newBean);
}
addSet = notPersisted && ActivityLonglineLogbookHelper.FISHING_OPERATION_ID.equals(bean.getVesselActivityLongline().getId());
=====================================
client/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/longline/logbook/ActivityLonglineSampleLogbookNavigationTreeNode.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.client.ui.tree.navigation.nodes.longline.logbook;
* 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>.
@@ -23,10 +23,12 @@ package fr.ird.observe.client.ui.tree.navigation.nodes.longline.logbook;
*/
import fr.ird.observe.client.ui.content.data.longline.logbook.ActivityLonglineLogbookSampleUI;
-import fr.ird.observe.client.ui.tree.navigation.nodes.ReferenceNavigationTreeNodeSupport;
+import fr.ird.observe.client.ui.tree.navigation.nodes.ClassNavigationTreeNode;
+import fr.ird.observe.dto.IdHelper;
import fr.ird.observe.dto.data.longline.SampleLogbookDto;
import fr.ird.observe.dto.data.longline.SampleLogbookReference;
-import fr.ird.observe.dto.navigation.select.node.ObserveLonglineLogbookActivitySampleSelectNode;
+
+import static org.nuiton.i18n.I18n.t;
/**
* Created on 14/11/16.
@@ -34,16 +36,10 @@ import fr.ird.observe.dto.navigation.select.node.ObserveLonglineLogbookActivityS
* @author Tony Chemit - dev(a)tchemit.fr
* @since 6.0
*/
-public class ActivityLonglineSampleLogbookNavigationTreeNode extends ReferenceNavigationTreeNodeSupport<SampleLogbookDto, SampleLogbookReference> {
+public class ActivityLonglineSampleLogbookNavigationTreeNode extends ClassNavigationTreeNode<SampleLogbookDto> {
- public ActivityLonglineSampleLogbookNavigationTreeNode(SampleLogbookReference data) {
- super(data, ObserveLonglineLogbookActivitySampleSelectNode.class, null, false);
- }
-
- @Override
- public void reload() {
- SampleLogbookReference data = getServicesProvider().getActivityLonglineLogbookSampleService().loadReferenceToRead(getId());
- setData(data);
+ ActivityLonglineSampleLogbookNavigationTreeNode(SampleLogbookReference data) {
+ super(SampleLogbookDto.class, t("observe.ui.tree.longline.sample"));
}
@Override
@@ -54,4 +50,9 @@ public class ActivityLonglineSampleLogbookNavigationTreeNode extends ReferenceNa
public boolean isLeaf() {
return true;
}
+
+ @Override
+ public String getIconPath() {
+ return "navigation." + IdHelper.getDtoSimplifiedName(getData());
+ }
}
=====================================
client/src/main/resources/i18n/client_en_GB.properties
=====================================
@@ -1746,6 +1746,7 @@ observe.ui.tree.longline.obs.activity.list=Observations
observe.ui.tree.longline.obs.activity.unsaved=New activity
observe.ui.tree.longline.obs.set.unsaved=New fishing operation
observe.ui.tree.longline.obs.tdr=Tdrs
+observe.ui.tree.longline.sample=Samples
observe.ui.tree.longline.sensorUsed=Sensors used
observe.ui.tree.longline.setDetailComposition=Detailed compositions
observe.ui.tree.longline.setGlobalComposition=Global compositions
=====================================
client/src/main/resources/i18n/client_es_ES.properties
=====================================
@@ -1746,6 +1746,7 @@ observe.ui.tree.longline.obs.activity.list=Observations \#TODO
observe.ui.tree.longline.obs.activity.unsaved=Nueva actividad
observe.ui.tree.longline.obs.set.unsaved=Nuevo lance
observe.ui.tree.longline.obs.tdr=Registradores de profundidad
+observe.ui.tree.longline.sample=Muestreos
observe.ui.tree.longline.sensorUsed=Sensores utilizados
observe.ui.tree.longline.setDetailComposition=Composiciones detalladas
observe.ui.tree.longline.setGlobalComposition=Composiciones globales
=====================================
client/src/main/resources/i18n/client_fr_FR.properties
=====================================
@@ -1746,6 +1746,7 @@ observe.ui.tree.longline.obs.activity.list=Observations
observe.ui.tree.longline.obs.activity.unsaved=Nouvelle activité
observe.ui.tree.longline.obs.set.unsaved=Nouvelle opération de pêche
observe.ui.tree.longline.obs.tdr=Enregistreurs de profondeur
+observe.ui.tree.longline.sample=Échantillons
observe.ui.tree.longline.sensorUsed=Capteurs utilisés
observe.ui.tree.longline.setDetailComposition=Compositions détaillées
observe.ui.tree.longline.setGlobalComposition=Compositions globales
=====================================
persistence/src/main/java/fr/ird/observe/binder/data/longline/SampleLogbookEntityDtoBinder.java
=====================================
@@ -23,6 +23,7 @@ package fr.ird.observe.binder.data.longline;
*/
import fr.ird.observe.binder.data.DataEntityDtoBinderSupport;
+import fr.ird.observe.dto.CoordinateHelper;
import fr.ird.observe.dto.data.longline.SampleLogbookDto;
import fr.ird.observe.dto.referential.ReferentialLocale;
import fr.ird.observe.entities.longline.SampleLogbook;
@@ -54,6 +55,7 @@ public class SampleLogbookEntityDtoBinder extends DataEntityDtoBinderSupport<Sam
dto.setLatitude(entity.getLatitude());
dto.setLongitude(entity.getLongitude());
dto.setTimeStamp(entity.getTimeStamp());
+ dto.setQuadrant(CoordinateHelper.getQuadrant(dto.getLongitude(), dto.getLatitude()));
dto.setSamplePartLogbook(toListData(referentialLocale, entity.getSamplePartLogbook()));
}
=====================================
persistence/src/main/java/fr/ird/observe/entities/longline/ActivityLonglineLogbookTopiaDao.java
=====================================
@@ -62,6 +62,7 @@ public class ActivityLonglineLogbookTopiaDao extends AbstractActivityLonglineLog
" a.topiaId," +
" a.timestamp," +
" a.set," +
+ " a.sample," +
" va.topiaId," +
" va." + I18nReferenceEntities.getPropertyName(referenceLocale) +
" FROM observe_longline.activityLogbook a, observe_longline.vesselActivity va" +
@@ -80,6 +81,7 @@ public class ActivityLonglineLogbookTopiaDao extends AbstractActivityLonglineLog
" a.topiaId," +
" a.timestamp," +
" a.set," +
+ " a.sample," +
" va.topiaId," +
" va." + I18nReferenceEntities.getPropertyName(referenceLocale) +
" FROM observe_longline.activityLogbook a, observe_longline.vesselActivity va" +
@@ -108,16 +110,20 @@ public class ActivityLonglineLogbookTopiaDao extends AbstractActivityLonglineLog
String setId = set.getString(3);
if (setId != null) {
-
SetLonglineLogbookImpl setLongline = new SetLonglineLogbookImpl();
setLongline.setTopiaId(setId);
activity.setSetLongline(setLongline);
-
+ }
+ String sampleId = set.getString(4);
+ if (sampleId != null) {
+ SampleLogbook sample = new SampleLogbookImpl();
+ sample.setTopiaId(sampleId);
+ activity.setSample(sample);
}
VesselActivityLongline vesselActivity = new VesselActivityLonglineImpl();
- String vesselActivityId = set.getString(4);
+ String vesselActivityId = set.getString(5);
vesselActivity.setTopiaId(vesselActivityId);
- String label = set.getString(5);
+ String label = set.getString(6);
I18nReferenceEntities.setLabel(referenceLocale, vesselActivity, label);
activity.setVesselActivityLongline(vesselActivity);
return activity;
=====================================
persistence/src/main/models/Observe-06-data-longline-logbook.model
=====================================
@@ -195,5 +195,4 @@ longline.SampleLogbook > ObserveDataEntity | entity
timeStamp + {*:1} Date
latitude + {*:1} Float | sqlType=numeric
longitude + {*:1} Float | sqlType=numeric
-quadrant + {*:1} Integer
samplePartLogbook + {*} longline.SamplePartLogbook | ordered reverseDbName=sample
=====================================
server/src/main/filtered-resources/mapping
=====================================
@@ -95,12 +95,7 @@ POST /api/v1/data/longline/ActivityLongLineObsEncounterService/save
GET /api/v1/data/longline/ActivityLongLineObsSensorUsedService/getDataFile v1.data.longline.ActivityLongLineObsSensorUsedServiceRestApi.getDataFile
GET /api/v1/data/longline/ActivityLongLineObsSensorUsedService/loadForm v1.data.longline.ActivityLongLineObsSensorUsedServiceRestApi.loadForm
POST /api/v1/data/longline/ActivityLongLineObsSensorUsedService/save v1.data.longline.ActivityLongLineObsSensorUsedServiceRestApi.save
-DELETE /api/v1/data/longline/ActivityLonglineLogbookSampleService/delete v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.delete
-GET /api/v1/data/longline/ActivityLonglineLogbookSampleService/exists v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.exists
-GET /api/v1/data/longline/ActivityLonglineLogbookSampleService/loadDto v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.loadDto
GET /api/v1/data/longline/ActivityLonglineLogbookSampleService/loadForm v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.loadForm
-GET /api/v1/data/longline/ActivityLonglineLogbookSampleService/loadReferenceToRead v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.loadReferenceToRead
-GET /api/v1/data/longline/ActivityLonglineLogbookSampleService/preCreate v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.preCreate
POST /api/v1/data/longline/ActivityLonglineLogbookSampleService/save v1.data.longline.ActivityLonglineLogbookSampleServiceRestApi.save
DELETE /api/v1/data/longline/ActivityLonglineLogbookService/delete v1.data.longline.ActivityLonglineLogbookServiceRestApi.delete
GET /api/v1/data/longline/ActivityLonglineLogbookService/exists v1.data.longline.ActivityLonglineLogbookServiceRestApi.exists
@@ -137,6 +132,7 @@ POST /api/v1/data/longline/LandingLogbookService/moveLandingLogbookToTripLongl
POST /api/v1/data/longline/LandingLogbookService/moveLandingLogbooksToTripLongline v1.data.longline.LandingLogbookServiceRestApi.moveLandingLogbooksToTripLongline
GET /api/v1/data/longline/LandingLogbookService/preCreate v1.data.longline.LandingLogbookServiceRestApi.preCreate
POST /api/v1/data/longline/LandingLogbookService/save v1.data.longline.LandingLogbookServiceRestApi.save
+GET /api/v1/data/longline/SetLonglineLogbookCatchService/getSampleSpecies v1.data.longline.SetLonglineLogbookCatchServiceRestApi.getSampleSpecies
GET /api/v1/data/longline/SetLonglineLogbookCatchService/loadForm v1.data.longline.SetLonglineLogbookCatchServiceRestApi.loadForm
POST /api/v1/data/longline/SetLonglineLogbookCatchService/save v1.data.longline.SetLonglineLogbookCatchServiceRestApi.save
GET /api/v1/data/longline/SetLonglineLogbookGlobalCompositionService/loadForm v1.data.longline.SetLonglineLogbookGlobalCompositionServiceRestApi.loadForm
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/ActivityLonglineLogbookSampleServiceLocal.java
=====================================
@@ -10,21 +10,19 @@ 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>.
* #L%
*/
-import fr.ird.observe.dto.DataNotFoundException;
import fr.ird.observe.dto.data.longline.SampleLogbookDto;
-import fr.ird.observe.dto.data.longline.SampleLogbookReference;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.result.SaveResultDto;
import fr.ird.observe.entities.longline.ActivityLonglineLogbook;
@@ -38,65 +36,23 @@ import fr.ird.observe.services.service.data.longline.ActivityLonglineLogbookSamp
public class ActivityLonglineLogbookSampleServiceLocal extends ObserveServiceLocal implements ActivityLonglineLogbookSampleService {
@Override
- public SampleLogbookReference loadReferenceToRead(String sampleLogbookId) {
- return SAMPLE_LOGBOOK_SPI.loadEntityToDataReferenceDto(getTopiaPersistenceContext(), sampleLogbookId, getReferentialLocale());
- }
-
- @Override
- public SampleLogbookDto loadDto(String sampleLogbookId) {
- return SAMPLE_LOGBOOK_SPI.loadEntityToDataDto(getTopiaPersistenceContext(), sampleLogbookId, getReferentialLocale());
- }
-
- @Override
- public boolean exists(String sampleLogbookId) {
- return SAMPLE_LOGBOOK_SPI.existsEntity(getTopiaPersistenceContext(), sampleLogbookId);
- }
-
- @Override
- public Form<SampleLogbookDto> loadForm(String sampleLogbookId) {
- SampleLogbook sampleLogbook = SAMPLE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), sampleLogbookId);
- return SAMPLE_LOGBOOK_SPI.dataEntityToForm(sampleLogbook, getReferentialLocale());
- }
-
- @Override
- public Form<SampleLogbookDto> preCreate(String activityLonglineId) {
+ public Form<SampleLogbookDto> loadForm(String activityLonglineId) {
ActivityLonglineLogbook activity = ACTIVITY_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), activityLonglineId);
- SampleLogbook preCreated = SAMPLE_LOGBOOK_SPI.newEntity();
-// SampleLogbook lastSampleLogbook = Iterables.getLast(tripLongline.getSample(), null);
-// Date timestamp;
-// if (lastSampleLogbook == null) {
-// // première activité, on utilise la date de début de marée (voir http://forge.codelutin.com/issues/6777)
-// Calendar calendar = Calendar.getInstance();
-// calendar.setTime(tripLongline.getStartDate());
-// timestamp = calendar.getTime();
-// } else {
-// // on reprend la date et l'heure de la dernière activité
-// timestamp = lastSampleLogbook.getStartDate();
-// }
-// preCreated.setStartDate(timestamp);
- return SAMPLE_LOGBOOK_SPI.dataEntityToForm(preCreated, getReferentialLocale());
+ SampleLogbook sampleLogbook = activity.getSample();
+ return SAMPLE_LOGBOOK_SPI.dataEntityToForm(sampleLogbook, getReferentialLocale());
}
@Override
- public SaveResultDto save(String activityLonglineId, SampleLogbookDto dto) {
- ActivityLonglineLogbook activity = ACTIVITY_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), activityLonglineId);
+ public SaveResultDto save(SampleLogbookDto dto) {
+// ActivityLonglineLogbook activity = ACTIVITY_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), activityLonglineId);
SampleLogbook entity = SAMPLE_LOGBOOK_SPI.loadOrCreateEntityFromDataDto(getTopiaPersistenceContext(), dto);
checkLastUpdateDate(entity, dto);
SAMPLE_LOGBOOK_SPI.copyDataDtoToEntity(dto, entity, getReferentialLocale());
SaveResultDto result = saveEntity(entity);
- if (dto.isNotPersisted()) {
- activity.setSample(entity);
- }
+// if (dto.isNotPersisted()) {
+// activity.setSample(entity);
+// }
return result;
}
- @Override
- public void delete(String activityLonglineId, String sampleLogbookId) {
- ActivityLonglineLogbook activity = ACTIVITY_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), activityLonglineId);
- if (activity.getSample() == null || sampleLogbookId.equals(activity.getSample().getTopiaId())) {
- throw new DataNotFoundException(SampleLogbookDto.class, sampleLogbookId);
- }
- activity.setSample(null);
- }
-
}
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/ActivityLonglineLogbookServiceLocal.java
=====================================
@@ -36,8 +36,11 @@ import fr.ird.observe.dto.result.TripChildSaveResultHelper;
import fr.ird.observe.entities.longline.ActivityLonglineLogbook;
import fr.ird.observe.entities.longline.ActivityLonglineLogbookTopiaDao;
import fr.ird.observe.entities.longline.ActivityLonglineLogbooks;
+import fr.ird.observe.entities.longline.SampleLogbook;
import fr.ird.observe.entities.longline.TripLongline;
+import fr.ird.observe.services.local.ObserveServiceContextLocal;
import fr.ird.observe.services.local.service.ObserveServiceLocal;
+import fr.ird.observe.services.service.data.longline.ActivityLonglineLogbookSampleService;
import fr.ird.observe.services.service.data.longline.ActivityLonglineLogbookService;
import java.util.ArrayList;
@@ -50,6 +53,14 @@ import java.util.List;
*/
public class ActivityLonglineLogbookServiceLocal extends ObserveServiceLocal implements ActivityLonglineLogbookService {
+ private ActivityLonglineLogbookSampleService sampleService;
+
+ @Override
+ public void setServiceContext(ObserveServiceContextLocal serviceContext) {
+ super.setServiceContext(serviceContext);
+ sampleService = serviceContext.newService(ActivityLonglineLogbookSampleService.class);
+ }
+
@Override
public DataDtoReferenceSet<ActivityLonglineLogbookReference> getActivityLonglineByTripLongline(String tripLonglineId) {
ActivityLonglineLogbookTopiaDao dao = ACTIVITY_LONGLINE_LOGBOOK_SPI.getDao(getTopiaPersistenceContext());
@@ -110,10 +121,22 @@ public class ActivityLonglineLogbookServiceLocal extends ObserveServiceLocal imp
ActivityLonglineLogbook entity = ACTIVITY_LONGLINE_LOGBOOK_SPI.loadOrCreateEntityFromDataDto(getTopiaPersistenceContext(), dto);
checkLastUpdateDate(entity, dto);
ACTIVITY_LONGLINE_LOGBOOK_SPI.copyDataDtoToEntity(dto, entity, getReferentialLocale());
+ boolean notPersisted = dto.isNotPersisted();
+ if (notPersisted) {
+ // create a unique sample
+ SampleLogbook preCreated = SAMPLE_LOGBOOK_SPI.newEntity();
+ preCreated.setLatitude(entity.getLatitude());
+ preCreated.setLongitude(entity.getLongitude());
+ preCreated.setTimeStamp(entity.getTimeStamp());
+ saveEntity(preCreated);
+ entity.setSample(preCreated);
+ }
SaveResultDto saveResultDto = saveEntity(entity);
+
TripChildSaveResultDto result = TripChildSaveResultHelper.of(saveResultDto);
- if (dto.isNotPersisted()) {
+ if (notPersisted) {
tripLongline.addActivityLonglineLogbook(entity);
+
}
boolean wasEndDateUpdated = TRIP_LONGLINE_SPI.getDao(getTopiaPersistenceContext()).updateEndDate(tripLongline);
result.setTripEndDateUpdated(wasEndDateUpdated);
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/SetLonglineLogbookCatchServiceLocal.java
=====================================
@@ -24,11 +24,16 @@ package fr.ird.observe.services.local.service.data.longline;
import fr.ird.observe.dto.data.longline.SetLonglineLogbookCatchDto;
import fr.ird.observe.dto.form.Form;
+import fr.ird.observe.dto.reference.ReferentialDtoReferenceSet;
+import fr.ird.observe.dto.referential.SpeciesReference;
import fr.ird.observe.dto.result.SaveResultDto;
+import fr.ird.observe.entities.longline.CatchLonglineLogbook;
import fr.ird.observe.entities.longline.SetLonglineLogbook;
import fr.ird.observe.services.local.service.ObserveServiceLocal;
import fr.ird.observe.services.service.data.longline.SetLonglineLogbookCatchService;
+import java.util.stream.Collectors;
+
/**
* @author Tony Chemit - dev(a)tchemit.fr
*/
@@ -48,4 +53,14 @@ public class SetLonglineLogbookCatchServiceLocal extends ObserveServiceLocal imp
return saveEntity(entity);
}
+ @Override
+ public ReferentialDtoReferenceSet<SpeciesReference> getSampleSpecies(String setLonglineId) {
+ SetLonglineLogbook set = SET_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), setLonglineId);
+ return SPECIES_SPI.toReferentialReferenceSet(set.getCatchLongline().stream()
+ .map(CatchLonglineLogbook::getSpeciesCatch)
+ .distinct()
+ .collect(Collectors.toList()),
+ getReferentialLocale(), null);
+ }
+
}
=====================================
services/src/main/java/fr/ird/observe/services/service/data/longline/ActivityLonglineLogbookSampleService.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.services.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>.
@@ -23,14 +23,12 @@ package fr.ird.observe.services.service.data.longline;
*/
import fr.ird.observe.dto.data.longline.SampleLogbookDto;
-import fr.ird.observe.dto.data.longline.SampleLogbookReference;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.result.SaveResultDto;
import fr.ird.observe.services.service.ObserveService;
import fr.ird.observe.services.spi.ReadDataPermission;
import fr.ird.observe.services.spi.Write;
import fr.ird.observe.services.spi.WriteDataPermission;
-import io.ultreia.java4all.http.spi.Delete;
import io.ultreia.java4all.http.spi.Get;
import io.ultreia.java4all.http.spi.Post;
@@ -41,32 +39,11 @@ public interface ActivityLonglineLogbookSampleService extends ObserveService {
@Get
@ReadDataPermission
- Form<SampleLogbookDto> loadForm(String sampleLogbookId);
-
- @Get
- @ReadDataPermission
- SampleLogbookDto loadDto(String sampleLogbookId);
-
- @Get
- @ReadDataPermission
- SampleLogbookReference loadReferenceToRead(String sampleLogbookId);
-
- @Get
- @ReadDataPermission
- boolean exists(String sampleLogbookId);
-
- @Get
- @WriteDataPermission
- Form<SampleLogbookDto> preCreate(String activityLonglineId);
+ Form<SampleLogbookDto> loadForm(String activityLonglineId);
@WriteDataPermission
@Write
@Post
- SaveResultDto save(String activityLonglineId, SampleLogbookDto dto);
-
- @Write
- @WriteDataPermission
- @Delete
- void delete(String activityLonglineId, String sampleLogbookId);
+ SaveResultDto save(SampleLogbookDto dto);
}
=====================================
services/src/main/java/fr/ird/observe/services/service/data/longline/SetLonglineLogbookCatchService.java
=====================================
@@ -24,6 +24,8 @@ package fr.ird.observe.services.service.data.longline;
import fr.ird.observe.dto.data.longline.SetLonglineLogbookCatchDto;
import fr.ird.observe.dto.form.Form;
+import fr.ird.observe.dto.reference.ReferentialDtoReferenceSet;
+import fr.ird.observe.dto.referential.SpeciesReference;
import fr.ird.observe.dto.result.SaveResultDto;
import fr.ird.observe.services.service.ObserveService;
import fr.ird.observe.services.spi.ReadDataPermission;
@@ -46,4 +48,8 @@ public interface SetLonglineLogbookCatchService extends ObserveService {
@Post
SaveResultDto save(SetLonglineLogbookCatchDto dto);
+ @Get
+ @ReadDataPermission
+ ReferentialDtoReferenceSet<SpeciesReference> getSampleSpecies(String setLonglineId);
+
}
=====================================
test/src/main/resources/db/8.2/dataForTestLongline.sql.gz
=====================================
The diff for this file was not included because it is too large.
=====================================
test/src/main/resources/db/8.2/dataForTestSeine.sql.gz
=====================================
The diff for this file was not included because it is too large.
=====================================
test/src/main/resources/db/8.2/empty_h2.sql.gz
=====================================
@@ -78,7 +78,7 @@ create table OBSERVE_LONGLINE.mitigationtype_setlogbook (set varchar(255), mitig
create table OBSERVE_LONGLINE.mitigationtype_setobs (set varchar(255), mitigationType varchar(255) not null);
create table OBSERVE_LONGLINE.observationTripType (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_LONGLINE.onBoardProcessing (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_LONGLINE.sampleLogbook (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, timeStamp timestamp, latitude numeric, longitude numeric, quadrant integer, trip varchar(255), primary key (topiaId));
+create table OBSERVE_LONGLINE.sampleLogbook (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, timeStamp timestamp, latitude numeric, longitude numeric, trip varchar(255), primary key (topiaId));
create table OBSERVE_LONGLINE.samplePartLogbook (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, length numeric, weight numeric, count integer, acquisitionMode integer, tagNumber varchar(255), species varchar(255), sex varchar(255), sizeMeasureType varchar(255), lengthMeasureMethod varchar(255), weightMeasureType varchar(255), weightMeasureMethod varchar(255), sample varchar(255), sample_idx integer, primary key (topiaId));
create table OBSERVE_LONGLINE.sectionObs (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, settingIdentifier integer not null, haulingIdentifier integer, set varchar(255), primary key (topiaId));
create table OBSERVE_LONGLINE.sensorBrand (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, brandName varchar(255), primary key (topiaId));
=====================================
test/src/main/resources/db/8.2/empty_pg.sql.gz
=====================================
@@ -78,7 +78,7 @@ create table OBSERVE_LONGLINE.mitigationtype_setlogbook (set varchar(255), mitig
create table OBSERVE_LONGLINE.mitigationtype_setobs (set varchar(255), mitigationType varchar(255) not null);
create table OBSERVE_LONGLINE.observationTripType (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_LONGLINE.onBoardProcessing (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_LONGLINE.sampleLogbook (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, timeStamp timestamp, latitude numeric, longitude numeric, quadrant int4, trip varchar(255), primary key (topiaId));
+create table OBSERVE_LONGLINE.sampleLogbook (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, timeStamp timestamp, latitude numeric, longitude numeric, trip varchar(255), primary key (topiaId));
create table OBSERVE_LONGLINE.samplePartLogbook (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, length numeric, weight numeric, count int4, acquisitionMode int4, tagNumber varchar(255), species varchar(255), sex varchar(255), sizeMeasureType varchar(255), lengthMeasureMethod varchar(255), weightMeasureType varchar(255), weightMeasureMethod varchar(255), sample varchar(255), sample_idx int4, primary key (topiaId));
create table OBSERVE_LONGLINE.sectionObs (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, settingIdentifier int4 not null, haulingIdentifier int4, set varchar(255), primary key (topiaId));
create table OBSERVE_LONGLINE.sensorBrand (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, brandName varchar(255), primary key (topiaId));
=====================================
test/src/main/resources/db/8.2/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/74e2ce9fc3da3749e2e91f0bbf1…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/74e2ce9fc3da3749e2e91f0bbf1…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 4 commits: il faut supprimer ler nœud sélectionné avant d'en crée un nouveau
by Tony CHEMIT 13 Sep '18
by Tony CHEMIT 13 Sep '18
13 Sep '18
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
07e5ddaa by Tony CHEMIT at 2018-09-13T14:19:45Z
il faut supprimer ler nœud sélectionné avant d'en crée un nouveau
- - - - -
e7dc3070 by Tony CHEMIT at 2018-09-13T14:20:17Z
correction de la création de la calée suite à la création de l'activité
- - - - -
bf0e3c24 by Tony CHEMIT at 2018-09-13T14:20:46Z
correction de la mise à jour des nœuds de sélection
- - - - -
569d11c6 by Tony CHEMIT at 2018-09-13T14:21:51Z
correction de la sélection d'un nœud (on doit pouvoir le faire sans faire de check sur l'état du formulaire lorsqu'on programme des changements de nœud dans les actions).
- - - - -
5 changed files:
- client/src/main/java/fr/ird/observe/client/ui/ObserveMainUIInitializer.java
- client/src/main/java/fr/ird/observe/client/ui/content/ContentUIHandler.java
- 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/obs/ActivityLonglineObsUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/tree/navigation/NavigationTree.java
Changes:
=====================================
client/src/main/java/fr/ird/observe/client/ui/ObserveMainUIInitializer.java
=====================================
@@ -46,8 +46,8 @@ import fr.ird.observe.dto.navigation.edit.ObserveLonglineEditModel;
import fr.ird.observe.dto.navigation.edit.ObserveSeineEditModel;
import fr.ird.observe.dto.navigation.select.ObserveSelectModel;
import fr.ird.observe.dto.referential.ReferentialLocale;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.i18n.I18n;
import org.nuiton.jaxx.runtime.context.JAXXInitialContext;
import org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel;
@@ -231,14 +231,15 @@ public class ObserveMainUIInitializer {
List<ReferenceNavigationTreeNodeSupport<?, ?>> ids = new ArrayList<>();
for (Object o : nodes) {
NavigationTreeNodeSupport n = (NavigationTreeNodeSupport) o;
- if (n instanceof ReferenceNavigationTreeNodeSupport && n.getSelectNode().isDisabled()) {
- n.getSelectNode().setId(n.getId());
+ if (n instanceof ReferenceNavigationTreeNodeSupport) {
+ log.info("Keep node with id: " + n.getId());
ids.add((ReferenceNavigationTreeNodeSupport<?, ?>) n);
}
}
ObserveSelectModel navigationSelect = ObserveSwingApplicationContext.get().getNavigationSelect();
navigationSelect.clear();
for (ReferenceNavigationTreeNodeSupport<?, ?> node : ids) {
+ log.info("Apply to select model: " + node);
node.getSelectNode().setId(node.getId());
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/ContentUIHandler.java
=====================================
@@ -429,6 +429,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U
NavigationTreeNodeSupport parentNode = treeHelper.getSelectedNode().getParent();
log.debug("PARENT NODE = " + parentNode);
+ getSelectedNode().setId(null);
treeHelper.addUnsavedNode(parentNode, getBeanType());
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/ActivityLonglineLogbookUIHandler.java
=====================================
@@ -35,8 +35,8 @@ import fr.ird.observe.dto.navigation.edit.node.ObserveLonglineLogbookActivityEdi
import fr.ird.observe.dto.navigation.select.node.ObserveLonglineLogbookActivitySelectNode;
import fr.ird.observe.dto.reference.DataDtoReference;
import fr.ird.observe.dto.result.TripChildSaveResultDto;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.jaxx.runtime.spi.UIHandler;
import org.nuiton.validator.NuitonValidatorScope;
@@ -55,6 +55,7 @@ import static org.nuiton.i18n.I18n.t;
class ActivityLonglineLogbookUIHandler extends ContentOpenableUIHandler<ActivityLonglineLogbookDto, ActivityLonglineLogbookUI> implements UIHandler<ActivityLonglineLogbookUI> {
private static final Logger log = LogManager.getLogger(ActivityLonglineLogbookUIHandler.class);
+ private boolean addSet;
ActivityLonglineLogbookUIHandler() {
super(ObserveLonglineLogbookActivitySelectNode.class, ObserveLonglineLogbookActivityEditNode.class, n("observe.common.ActivityLonglineLogbookDto.message.not.open"));
@@ -214,12 +215,10 @@ class ActivityLonglineLogbookUIHandler extends ContentOpenableUIHandler<Activity
if (notPersisted) {
// ouverture de l'activité après création
getEditNode().setId(bean.getId());
- if (ActivityLonglineLogbookHelper.FISHING_OPERATION_ID.equals(bean.getVesselActivityLongline().getId())) {
- // création de l'opération de pêche
- SwingUtilities.invokeLater(() -> getUi().getAddSet().doClick());
- }
}
+ addSet = notPersisted && ActivityLonglineLogbookHelper.FISHING_OPERATION_ID.equals(bean.getVesselActivityLongline().getId());
+
return true;
}
@@ -253,6 +252,17 @@ class ActivityLonglineLogbookUIHandler extends ContentOpenableUIHandler<Activity
protected void afterSave(boolean refresh) {
super.afterSave(refresh);
repaintTripNode();
+ if (addSet) {
+ try {
+ // création de l'opération de pêche
+ // FIXME On doit effectuer l'action sur l'ui rechargée car pour executer une action on regarde si son éditeur
+ // FIXME est showing et dans ce cas précis ce n'est pas vrai (getUI() retourne l'ui avant resélection du noeud...
+ ActivityLonglineLogbookUI content = ObserveSwingApplicationContext.get().getContentUIManager().getContent();
+ SwingUtilities.invokeLater(() -> content.getAddSet().doClick());
+ } finally {
+ addSet = false;
+ }
+ }
}
@Override
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/ActivityLonglineObsUIHandler.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.client.ui.content.data.longline.obs;
* 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>.
@@ -35,8 +35,8 @@ import fr.ird.observe.dto.navigation.edit.node.ObserveLonglineObsActivityEditNod
import fr.ird.observe.dto.navigation.select.node.ObserveLonglineObsActivitySelectNode;
import fr.ird.observe.dto.reference.DataDtoReference;
import fr.ird.observe.dto.result.TripChildSaveResultDto;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.jaxx.runtime.spi.UIHandler;
import org.nuiton.validator.NuitonValidatorScope;
@@ -55,6 +55,7 @@ import static org.nuiton.i18n.I18n.t;
class ActivityLonglineObsUIHandler extends ContentOpenableUIHandler<ActivityLonglineObsDto, ActivityLonglineObsUI> implements UIHandler<ActivityLonglineObsUI> {
private static final Logger log = LogManager.getLogger(ActivityLonglineObsUIHandler.class);
+ private boolean addSet;
ActivityLonglineObsUIHandler() {
super(ObserveLonglineObsActivitySelectNode.class, ObserveLonglineObsActivityEditNode.class, n("observe.common.ActivityLonglineObsDto.message.not.open"));
@@ -213,12 +214,10 @@ class ActivityLonglineObsUIHandler extends ContentOpenableUIHandler<ActivityLong
if (notPersisted) {
// ouverture de l'activité après création
- getEditNode().setId(null);
- if (ActivityLonglineObsHelper.FISHING_OPERATION_ID.equals(bean.getVesselActivityLongline().getId())) {
- // création de l'opération de pêche
- SwingUtilities.invokeLater(() -> getUi().getAddSet().doClick());
- }
+ getEditNode().setId(bean.getId());
}
+ addSet = notPersisted && ActivityLonglineObsHelper.FISHING_OPERATION_ID.equals(bean.getVesselActivityLongline().getId());
+
return true;
}
@@ -251,6 +250,17 @@ class ActivityLonglineObsUIHandler extends ContentOpenableUIHandler<ActivityLong
protected void afterSave(boolean refresh) {
super.afterSave(refresh);
repaintTripNode();
+ if (addSet) {
+ try {
+ // création de l'opération de pêche
+ // FIXME On doit effectuer l'action sur l'ui rechargée car pour executer une action on regarde si son éditeur
+ // FIXME est showing et dans ce cas précis ce n'est pas vrai (getUI() retourne l'ui avant resélection du noeud...
+ ActivityLonglineObsUI content = ObserveSwingApplicationContext.get().getContentUIManager().getContent();
+ SwingUtilities.invokeLater(() -> content.getAddSet().doClick());
+ } finally {
+ addSet = false;
+ }
+ }
}
@Override
=====================================
client/src/main/java/fr/ird/observe/client/ui/tree/navigation/NavigationTree.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.client.ui.tree.navigation;
* 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>.
@@ -74,8 +74,8 @@ import fr.ird.observe.dto.referential.ProgramReference;
import fr.ird.observe.dto.referential.ReferentialLocale;
import fr.ird.observe.spi.DtoModelHelper;
import org.apache.commons.collections4.CollectionUtils;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.jdesktop.swingx.JXTree;
import javax.swing.SwingUtilities;
@@ -104,15 +104,19 @@ public class NavigationTree extends JXTree {
private static final Logger log = LogManager.getLogger(NavigationTree.class);
private final ImmutableList<SelectNodeStrategy> selectNodeStrategies;
+ private boolean skipContentCheck;
public NavigationTree() {
super(new NavigationTreeModel());
setSelectionModel(new DefaultTreeSelectionModel() {
@Override
public void setSelectionPath(TreePath path) {
- boolean canChange = !Objects.equals(path, getSelectionPath()) && ObserveSwingApplicationContext.get().getContentUIManager().closeSelectedContentUI();
+ boolean skipContentCheck = NavigationTree.this.skipContentCheck;
+ NavigationTree.this.skipContentCheck = false;
+ boolean canChange = !Objects.equals(path, getSelectionPath()) && (skipContentCheck || ObserveSwingApplicationContext.get().getContentUIManager().closeSelectedContentUI());
if (!canChange) {
// cancel the change of node
+ log.warn(String.format("Do not change selection path: %s against: %s", path, getSelectionPath()));
return;
}
super.setSelectionPath(path);
@@ -207,7 +211,7 @@ public class NavigationTree extends JXTree {
log.info("try to select node [" + node + "]");
}
TreePath path = new TreePath(getTreeModel().getPathToRoot(node));
-
+ skipContentCheck = true;
setSelectionPath(path);
SwingUtilities.invokeLater(() -> scrollPathToVisible(path));
}
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/e7d28acc041e6ca4a8dc9ce8b9…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/e7d28acc041e6ca4a8dc9ce8b9…
You're receiving this email because of your account on gitlab.com.
1
0
13 Sep '18
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
552697be by Tony CHEMIT at 2018-09-13T09:58:21Z
migrate to log4j2
- - - - -
05e5a07d by Tony CHEMIT at 2018-09-13T09:58:39Z
do not close and generate changelog while release, this should be done before.
- - - - -
85f75e03 by Tony CHEMIT at 2018-09-13T11:09:25Z
Report v7 (revue des raccourcis claviers)
- - - - -
5632a47c by Tony CHEMIT at 2018-09-13T11:10:42Z
Ajout de la donnée observe_longline.SetLogbook - See #909
- - - - -
e7d28acc by Tony CHEMIT at 2018-09-13T11:11:22Z
Ajout de la donnée observe_longline.CatchLogbook - See #911

- - - - -
20 changed files:
- client-configuration/src/main/config/Client.ini
- client/src/main/java/fr/ird/observe/client/ObserveResourceManager.java
- client/src/main/java/fr/ird/observe/client/ObserveRunner.java
- client/src/main/java/fr/ird/observe/client/ui/actions/content/GoToTabUIActionSupport.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUI.jcss
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/LonglineGlobalCompositionLogbookUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/LonglineGlobalCompositionLogbookUIHandler.java
- 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/SetLonglineLogbookUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUIModel.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/LonglineGlobalCompositionObsUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/LonglineGlobalCompositionObsUIHandler.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/binder/data/longline/SetLonglineLogbookEntityDtoBinder.java
- persistence/src/main/java/fr/ird/observe/binder/data/longline/SetLonglineLogbookEntityReferenceBinder.java
Changes:
=====================================
client-configuration/src/main/config/Client.ini
=====================================
@@ -142,7 +142,7 @@ final = true
description = observe.config.logConfigurationFile.description
key = logConfigurationFile
type = file
-defaultValue = ${resources.directory}/observe-log4j.properties
+defaultValue = ${resources.directory}/observe-log4j2.xml
transient = true
[option swingSessionFile]
=====================================
client/src/main/java/fr/ird/observe/client/ObserveResourceManager.java
=====================================
@@ -24,8 +24,8 @@ package fr.ird.observe.client;
import fr.ird.observe.client.configuration.ClientConfig;
import fr.ird.observe.client.configuration.ClientConfigOption;
import org.apache.commons.io.IOUtils;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.util.SortedProperties;
import org.nuiton.util.ZipUtil;
@@ -60,7 +60,7 @@ public class ObserveResourceManager {
private static final String OBSERVE_APPLICATION_PROPERTIES = "/observe-application.properties";
private static final String OBSERVE_REPORTS_PROPERTIES = "/observe-reports.properties";
private static final String OBSERVE_MAP_ARCHIVE = "/map.zip";
- private static final String OBSERVE_LOG_CONFIGURATION_FILE_PROPERTIES = "/observe-log4j.properties";
+ private static final String OBSERVE_LOG_CONFIGURATION_FILE_PROPERTIES = "/observe-log4j2.xml";
/** Logger */
private static final Logger log = LogManager.getLogger(ObserveResourceManager.class);
=====================================
client/src/main/java/fr/ird/observe/client/ObserveRunner.java
=====================================
@@ -59,6 +59,7 @@ import java.util.Arrays;
import java.util.Date;
import java.util.Locale;
import java.util.Properties;
+import java.util.logging.Level;
import static fr.ird.observe.client.configuration.ClientConfigOption.BACKUP_DIRECTORY;
import static fr.ird.observe.client.configuration.ClientConfigOption.DATA_DIRECTORY;
@@ -79,6 +80,12 @@ import static org.nuiton.i18n.I18n.t;
*/
public abstract class ObserveRunner extends ApplicationRunner {
+ static {
+ System.setProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager");
+ java.util.logging.LogManager.getLogManager().reset();
+ java.util.logging.LogManager.getLogManager().getLogger("").setLevel(Level.SEVERE);
+ }
+
/** Logger */
private static Logger log = LogManager.getLogger(ObserveRunner.class);
=====================================
client/src/main/java/fr/ird/observe/client/ui/actions/content/GoToTabUIActionSupport.java
=====================================
@@ -58,4 +58,9 @@ public abstract class GoToTabUIActionSupport extends AbstractContentUIAction {
}
mainTabbedPane.setSelectedIndex(tabIndex);
}
+
+ @Override
+ protected ContentUI<?, ?> getContentUI(ContentUI<?, ?> contentUI) {
+ return contentUI;
+ }
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUI.jaxx
=====================================
@@ -200,6 +200,9 @@
<cell weightx='1' anchor='east'>
<BeanFilterableComboBox id='onBoardProcessing' constructorParams='this' genericType='OnBoardProcessingReference'/>
</cell>
+ <cell>
+ <JLabel id='photoReferencesLabel'/>
+ </cell>
<cell anchor='east' weightx="1" fill="both">
<JPanel layout='{new BorderLayout()}'>
<JToolBar id='photoReferencesToolbar' constraints='BorderLayout.WEST'>
@@ -238,7 +241,7 @@
<JLabel id='countDepredatedLabel'/>
</cell>
<cell weightx='1' anchor='east'>
- <NumberEditor id='countDepredated' constructorParams='this' styleClass="float3"/>
+ <NumberEditor id='countDepredated' constructorParams='this' styleClass="int6"/>
</cell>
</row>
<!-- depredatedProportion -->
@@ -247,7 +250,7 @@
<JLabel id='depredatedProportionLabel'/>
</cell>
<cell weightx='1' anchor='east'>
- <NumberEditor id='depredatedProportion' constructorParams='this' styleClass="float3"/>
+ <NumberEditor id='depredatedProportion' constructorParams='this' styleClass="int6"/>
</cell>
</row>
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUI.jcss
=====================================
@@ -163,6 +163,11 @@
numberValue:{tableEditBean.getBeatDiameter()};
}
+#countDepredated {
+ property:{CatchLonglineLogbookDto.PROPERTY_COUNT_DEPREDATED};
+ numberValue:{tableEditBean.getCountDepredated()};
+}
+
#depredated {
horizontalTextPosition:{JCheckBox.LEFT};
_tablePropertyName:{CatchLonglineLogbookDto.PROPERTY_DEPREDATED};
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUIHandler.java
=====================================
@@ -37,6 +37,7 @@ import fr.ird.observe.client.ui.util.table.AutotSelectRowAndShowPopupActionSuppo
import fr.ird.observe.dto.data.longline.ActivityLonglineLogbookDto;
import fr.ird.observe.dto.data.longline.CatchLonglineLogbookDto;
import fr.ird.observe.dto.data.longline.SetLonglineLogbookCatchDto;
+import fr.ird.observe.dto.data.longline.SetLonglineLogbookCatchHelper;
import fr.ird.observe.dto.data.longline.TripLonglineReference;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.navigation.edit.node.ObserveLonglineLogbookSetEditNode;
@@ -48,8 +49,8 @@ import fr.ird.observe.dto.referential.longline.CatchFateLonglineReference;
import fr.ird.observe.dto.referential.longline.HealthnessReference;
import fr.ird.observe.dto.result.SaveResultDto;
import org.apache.commons.lang3.BooleanUtils;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.jaxx.runtime.spi.UIHandler;
import org.nuiton.jaxx.validator.swing.SwingValidatorMessage;
import org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel;
@@ -381,6 +382,8 @@ public class CatchLonglineLogbookUIHandler extends ContentTableUIHandler<SetLong
loadReferentialReferenceSetsInModel(form);
model.setForm(form);
+
+ SetLonglineLogbookCatchHelper.copySetLonglineLogbookCatchDto(form.getObject(), getBean());
}
@Override
@@ -441,14 +444,20 @@ public class CatchLonglineLogbookUIHandler extends ContentTableUIHandler<SetLong
// depredated
ui.getBeatDiameter().setEnabled(true);
ui.getPredator().setEnabled(true);
+ ui.getCountDepredated().setEnabled(true);
+ ui.getDepredatedProportion().setEnabled(true);
} else {
// not depredated
ui.getBeatDiameter().setEnabled(false);
ui.getPredator().setEnabled(false);
+ ui.getCountDepredated().setEnabled(false);
+ ui.getDepredatedProportion().setEnabled(false);
tableEditBean.setBeatDiameter(null);
tableEditBean.setPredator(null);
+ tableEditBean.setDepredatedProportion(null);
+ tableEditBean.setCountDepredated(null);
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/LonglineGlobalCompositionLogbookUI.jaxx
=====================================
@@ -66,6 +66,8 @@
errorTableModel='{getErrorTableModel()}' context='update-globalComposition'>
</BeanValidator>
+ <Boolean id="delegateContentUI" initializer="true"/>
+
<!-- formulaire -->
<JPanel id="body" layout='{new BorderLayout()}'>
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/LonglineGlobalCompositionLogbookUIHandler.java
=====================================
@@ -38,11 +38,12 @@ import fr.ird.observe.dto.navigation.edit.node.ObserveLonglineLogbookSetEditNode
import fr.ird.observe.dto.navigation.select.node.ObserveLonglineLogbookSetSelectNode;
import fr.ird.observe.dto.result.SaveResultDto;
import fr.ird.observe.spi.DtoModelHelper;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.jaxx.runtime.spi.UIHandler;
import org.nuiton.validator.NuitonValidatorScope;
+import javax.swing.SwingUtilities;
import java.util.Optional;
import static org.nuiton.i18n.I18n.t;
@@ -90,6 +91,7 @@ public class LonglineGlobalCompositionLogbookUIHandler extends ContentUIHandler<
FloatlinesCompositionLogbookUI compositionUI = ui.getFloatlinesCompositionUI();
ui.getFloatlinesCompositionPanel().remove(compositionUI);
ui.getFloatlinesCompositionPanel().add(compositionUI.getBody());
+ ui.getFloatlinesCompositionPanel().putClientProperty("contentUI", compositionUI);
}
{
@@ -97,6 +99,7 @@ public class LonglineGlobalCompositionLogbookUIHandler extends ContentUIHandler<
BranchlinesCompositionLogbookUI compositionUI = ui.getBranchlinesCompositionUI();
ui.getBranchlinesCompositionPanel().remove(compositionUI);
ui.getBranchlinesCompositionPanel().add(compositionUI.getBody());
+ ui.getBranchlinesCompositionPanel().putClientProperty("contentUI", compositionUI);
}
{
@@ -104,6 +107,7 @@ public class LonglineGlobalCompositionLogbookUIHandler extends ContentUIHandler<
HooksCompositionLogbookUI compositionUI = ui.getHooksCompositionUI();
ui.getHooksCompositionPanel().remove(compositionUI);
ui.getHooksCompositionPanel().add(compositionUI.getBody());
+ ui.getHooksCompositionPanel().putClientProperty("contentUI", compositionUI);
}
{
@@ -111,6 +115,7 @@ public class LonglineGlobalCompositionLogbookUIHandler extends ContentUIHandler<
BaitsCompositionLogbookUI compositionUI = ui.getBaitsCompositionUI();
ui.getBaitsCompositionPanel().remove(compositionUI);
ui.getBaitsCompositionPanel().add(compositionUI.getBody());
+ ui.getBaitsCompositionPanel().putClientProperty("contentUI", compositionUI);
}
}
@@ -204,7 +209,7 @@ public class LonglineGlobalCompositionLogbookUIHandler extends ContentUIHandler<
compositionUI.open();
}
-
+ SwingUtilities.invokeLater(() -> ui.getMainTabbedPane().setSelectedIndex(0));
}
@Override
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUI.jaxx
=====================================
@@ -196,7 +196,7 @@
<JLabel id='totalLineLengthLabel'/>
</cell>
<cell fill='both' weightx="1" columns="3">
- <NumberEditor id='totalLineLength' constructorParams='this' styleClass="long10"/>
+ <NumberEditor id='totalLineLength' constructorParams='this' styleClass="int6"/>
</cell>
</row>
<!-- basket line length -->
@@ -205,7 +205,7 @@
<JLabel id='basketLineLengthLabel'/>
</cell>
<cell fill='both' weightx="1" columns="3">
- <NumberEditor id='basketLineLength' constructorParams='this' styleClass="long10"/>
+ <NumberEditor id='basketLineLength' constructorParams='this' styleClass="int6"/>
</cell>
</row>
<!-- lengthBetweenBranchlines -->
@@ -214,7 +214,7 @@
<JLabel id='lengthBetweenBranchlinesLabel'/>
</cell>
<cell fill='both' weightx="1" columns="3">
- <NumberEditor id='lengthBetweenBranchlines' constructorParams='this' styleClass="long10"/>
+ <NumberEditor id='lengthBetweenBranchlines' constructorParams='this' styleClass="int6"/>
</cell>
</row>
@@ -326,7 +326,7 @@
</Table>
</tab>
- <tab id='lightstickssTab' computeI18n="">
+ <tab id='lightsticksTab' computeI18n="">
<JPanel layout='{new BorderLayout()}'>
<Table fill='both' constraints='BorderLayout.NORTH'>
<!-- lightsticksUsed -->
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUI.jcss
=====================================
@@ -50,6 +50,11 @@
numberValue:{bean.getNumber()};
}
+#settingShape {
+ property:{SetLonglineLogbookDto.PROPERTY_SETTING_SHAPE};
+ selectedItem:{bean.getSettingShape()};
+}
+
#settingStartTimeStamp {
date:{bean.getSettingStartTimeStamp()};
propertyDate: {SetLonglineLogbookDto.PROPERTY_SETTING_START_TIME_STAMP};
@@ -91,6 +96,26 @@
numberValue:{bean.getSettingVesselSpeed()};
}
+#timeBetweenHooks {
+ property:{SetLonglineLogbookDto.PROPERTY_TIME_BETWEEN_HOOKS};
+ numberValue:{bean.getTimeBetweenHooks()};
+}
+
+#totalLineLength {
+ property:{SetLonglineLogbookDto.PROPERTY_TOTAL_LINE_LENGTH};
+ numberValue:{bean.getTotalLineLength()};
+}
+
+#basketLineLength {
+ property:{SetLonglineLogbookDto.PROPERTY_BASKET_LINE_LENGTH};
+ numberValue:{bean.getBasketLineLength()};
+}
+
+#lengthBetweenBranchlines {
+ property:{SetLonglineLogbookDto.PROPERTY_LENGTH_BETWEEN_BRANCHLINES};
+ numberValue:{bean.getLengthBetweenBranchlines()};
+}
+
#shooterUsed {
horizontalTextPosition:{JCheckBox.LEFT};
_propertyName:{SetLonglineLogbookDto.PROPERTY_SHOOTER_USED};
@@ -103,9 +128,39 @@
numberValue:{bean.getShooterSpeed()};
}
-#settingShape {
- property:{SetLonglineLogbookDto.PROPERTY_SETTING_SHAPE};
- selectedItem:{bean.getSettingShape()};
+#maxDepthTargeted {
+ property:{SetLonglineLogbookDto.PROPERTY_MAX_DEPTH_TARGETED};
+ numberValue:{bean.getMaxDepthTargeted()};
+}
+
+#totalSectionsCount {
+ property:{SetLonglineLogbookDto.PROPERTY_TOTAL_SECTIONS_COUNT};
+ numberValue:{bean.getTotalSectionsCount()};
+}
+
+#basketsPerSectionCount {
+ property:{SetLonglineLogbookDto.PROPERTY_BASKETS_PER_SECTION_COUNT};
+ numberValue:{bean.getBasketsPerSectionCount()};
+}
+
+#totalBasketsCount {
+ property:{SetLonglineLogbookDto.PROPERTY_TOTAL_BASKETS_COUNT};
+ numberValue:{bean.getTotalBasketsCount()};
+}
+
+#branchlinesPerBasketCount {
+ property:{SetLonglineLogbookDto.PROPERTY_BRANCHLINES_PER_BASKET_COUNT};
+ numberValue:{bean.getBranchlinesPerBasketCount()};
+}
+
+#totalHooksCount {
+ property:{SetLonglineLogbookDto.PROPERTY_TOTAL_HOOKS_COUNT};
+ numberValue:{bean.getTotalHooksCount()};
+}
+
+#lineType {
+ property:{SetLonglineLogbookDto.PROPERTY_LINE_TYPE};
+ selectedItem:{bean.getLineType()};
}
#weightedSwivel {
@@ -132,37 +187,24 @@
numberValue:{bean.getSnapWeight()};
}
-#lineType {
- property:{SetLonglineLogbookDto.PROPERTY_LINE_TYPE};
- selectedItem:{bean.getLineType()};
-}
-
-#maxDepthTargeted {
- property:{SetLonglineLogbookDto.PROPERTY_MAX_DEPTH_TARGETED};
- numberValue:{bean.getMaxDepthTargeted()};
-}
-
#monitored {
horizontalTextPosition:{JCheckBox.LEFT};
_propertyName:{SetLonglineLogbookDto.PROPERTY_MONITORED};
selected:{BooleanUtils.isTrue(bean.getMonitored())};
}
-#lightsticksType {
- property:{SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_TYPE};
- selectedItem:{bean.getLightsticksType()};
- enabled:{bean.getLightsticksPerBasketCount() !=null && bean.getLightsticksPerBasketCount() > 0};
-}
+/* ***************************************************************************** */
+/* LIGHTSTICKS TAB ************************************************************ */
+/* ***************************************************************************** */
-#lightsticksColor {
- property:{SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_COLOR};
- selectedItem:{bean.getLightsticksColor()};
- enabled:{bean.getLightsticksPerBasketCount() !=null && bean.getLightsticksPerBasketCount() > 0};
+#lightsticksTab {
+ icon:{handler.getErrorIconIfFalse(model.isLightsticksTabValid())};
}
-#timeBetweenHooks {
- property:{SetLonglineLogbookDto.PROPERTY_TIME_BETWEEN_HOOKS};
- numberValue:{bean.getTimeBetweenHooks()};
+#lightsticksUsed {
+ horizontalTextPosition:{JCheckBox.LEFT};
+ _propertyName:{SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_USED};
+ selected:{BooleanUtils.isTrue(bean.getLightsticksUsed())};
}
#lightsticksPerBasketCount {
@@ -170,29 +212,14 @@
numberValue:{bean.getLightsticksPerBasketCount()};
}
-#basketsPerSectionCount {
- property:{SetLonglineLogbookDto.PROPERTY_BASKETS_PER_SECTION_COUNT};
- numberValue:{bean.getBasketsPerSectionCount()};
-}
-
-#totalBasketsCount {
- property:{SetLonglineLogbookDto.PROPERTY_TOTAL_BASKETS_COUNT};
- numberValue:{bean.getTotalBasketsCount()};
-}
-
-#branchlinesPerBasketCount {
- property:{SetLonglineLogbookDto.PROPERTY_BRANCHLINES_PER_BASKET_COUNT};
- numberValue:{bean.getBranchlinesPerBasketCount()};
-}
-
-#totalSectionsCount {
- property:{SetLonglineLogbookDto.PROPERTY_TOTAL_SECTIONS_COUNT};
- numberValue:{bean.getTotalSectionsCount()};
+#lightsticksType {
+ property:{SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_TYPE};
+ selectedItem:{bean.getLightsticksType()};
}
-#totalHooksCount {
- property:{SetLonglineLogbookDto.PROPERTY_TOTAL_HOOKS_COUNT};
- numberValue:{bean.getTotalHooksCount()};
+#lightsticksColor {
+ property:{SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_COLOR};
+ selectedItem:{bean.getLightsticksColor()};
}
/* ***************************************************************************** */
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUIHandler.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.client.ui.content.data.longline.logbook;
* 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>.
@@ -39,8 +39,9 @@ import fr.ird.observe.dto.navigation.edit.node.ObserveLonglineLogbookSetEditNode
import fr.ird.observe.dto.navigation.select.node.ObserveLonglineLogbookSetSelectNode;
import fr.ird.observe.dto.result.SaveResultDto;
import fr.ird.observe.spi.DtoModelHelper;
-import org.apache.logging.log4j.Logger;
+import org.apache.commons.lang3.BooleanUtils;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.jaxx.runtime.spi.UIHandler;
import org.nuiton.jaxx.validator.swing.SwingValidatorMessage;
import org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel;
@@ -69,6 +70,7 @@ public class SetLonglineLogbookUIHandler extends ContentUIHandler<SetLonglineLog
protected final TableModelListener computeTabValidStateListener;
private final PropertyChangeListener onToogleTimeEditorSliderChangedListener;
private final PropertyChangeListener onCoordinateFormatChangedListener;
+ private final PropertyChangeListener lightsticksUsedChanged;
private boolean toggleTimeEditorSliderIsChanging;
private boolean coordinateFormatChangedIsChanging;
@@ -86,6 +88,8 @@ public class SetLonglineLogbookUIHandler extends ContentUIHandler<SetLonglineLog
CoordinateFormat newValue = (CoordinateFormat) evt.getNewValue();
onCoordinateFormatChanged(newValue);
};
+
+ lightsticksUsedChanged = evt -> onLightsticksUsedChanged((Boolean) evt.getNewValue());
}
@Override
@@ -244,6 +248,8 @@ public class SetLonglineLogbookUIHandler extends ContentUIHandler<SetLonglineLog
@Override
public void startEditUI(String... binding) {
+ getBean().removePropertyChangeListener(SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_USED, lightsticksUsedChanged);
+
ContentUIModel<SetLonglineLogbookDto> model = getModel();
boolean create = model.getMode() == ContentMode.CREATE;
String contextName = getValidatorContextName(model.getMode());
@@ -303,6 +309,8 @@ public class SetLonglineLogbookUIHandler extends ContentUIHandler<SetLonglineLog
SetLonglineLogbookUI.BINDING_HAULING_BREAKS_NUMBER_VALUE);
+ getBean().addPropertyChangeListener(SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_USED, lightsticksUsedChanged);
+ onLightsticksUsedChanged(getBean().getLightsticksUsed());
model.setModified(create);
}
@@ -379,7 +387,6 @@ public class SetLonglineLogbookUIHandler extends ContentUIHandler<SetLonglineLog
}
-
protected void computeTabValidState(SwingValidatorMessageTableModel errorTableModel) {
Set<String> errorProperties = new HashSet<>();
@@ -395,11 +402,13 @@ public class SetLonglineLogbookUIHandler extends ContentUIHandler<SetLonglineLog
boolean settingTabValid = !errorProperties.removeAll(SetLonglineLogbookUIModel.SETTING_TAB_PROPERTIES);
boolean settingCaracteristicsTabValid = !errorProperties.removeAll(SetLonglineLogbookUIModel.SETTING_CARACTERISTICS_TAB_PROPERTIES);
boolean haulingTabValid = !errorProperties.removeAll(SetLonglineLogbookUIModel.HAULING_TAB_PROPERTIES);
+ boolean lightsticksTabValid = !errorProperties.removeAll(SetLonglineLogbookUIModel.LIGHTSTICKS_TAB_PROPERTIES);
SetLonglineLogbookUIModel model = (SetLonglineLogbookUIModel) getModel();
model.setSettingTabValid(settingTabValid);
model.setSettingCaracteristicsTabValid(settingCaracteristicsTabValid);
model.setHaulingTabValid(haulingTabValid);
+ model.setLightsticksTabValid(lightsticksTabValid);
}
private void onToogleTimeEditorSliderChanged(boolean newValue) {
@@ -435,4 +444,31 @@ public class SetLonglineLogbookUIHandler extends ContentUIHandler<SetLonglineLog
}
}
+ private void onLightsticksUsedChanged(Boolean newValue) {
+
+ SetLonglineLogbookUI ui = getUi();
+
+ SetLonglineLogbookDto tableEditBean = getBean();
+ if (BooleanUtils.isTrue(newValue)) {
+
+ // depredated
+ ui.getLightsticksPerBasketCount().setEnabled(true);
+ ui.getLightsticksType().setEnabled(true);
+ ui.getLightsticksColor().setEnabled(true);
+
+ } else {
+
+ // not depredated
+ ui.getLightsticksPerBasketCount().setEnabled(false);
+ ui.getLightsticksType().setEnabled(false);
+ ui.getLightsticksColor().setEnabled(false);
+
+ tableEditBean.setLightsticksPerBasketCount(null);
+ tableEditBean.setLightsticksType(null);
+ tableEditBean.setLightsticksColor(null);
+
+ }
+
+ }
+
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUIModel.java
=====================================
@@ -42,10 +42,13 @@ public class SetLonglineLogbookUIModel extends ContentUIModel<SetLonglineLogbook
public static final String PROPERTY_HAULING_TAB_VALID = "haulingTabValid";
+ public static final String PROPERTY_LIGHTSTICKS_TAB_VALID = "lightsticksTabValid";
+
public static final Set<String> SETTING_TAB_PROPERTIES =
ImmutableSet.<String>builder().add(
SetLonglineLogbookDto.PROPERTY_HOME_ID,
SetLonglineLogbookDto.PROPERTY_NUMBER,
+ SetLonglineLogbookDto.PROPERTY_SETTING_SHAPE,
SetLonglineLogbookDto.PROPERTY_SETTING_START_TIME_STAMP,
SetLonglineLogbookDto.PROPERTY_SETTING_START_LATITUDE,
SetLonglineLogbookDto.PROPERTY_SETTING_START_LONGITUDE,
@@ -58,28 +61,35 @@ public class SetLonglineLogbookUIModel extends ContentUIModel<SetLonglineLogbook
public static final Set<String> SETTING_CARACTERISTICS_TAB_PROPERTIES =
ImmutableSet.<String>builder().add(
- SetLonglineLogbookDto.PROPERTY_SETTING_SHAPE,
- SetLonglineLogbookDto.PROPERTY_LINE_TYPE,
- SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_TYPE,
- SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_COLOR,
+
SetLonglineLogbookDto.PROPERTY_SETTING_VESSEL_SPEED,
- SetLonglineLogbookDto.PROPERTY_MAX_DEPTH_TARGETED,
+ SetLonglineLogbookDto.PROPERTY_TIME_BETWEEN_HOOKS,
+ SetLonglineLogbookDto.PROPERTY_TOTAL_LINE_LENGTH,
+ SetLonglineLogbookDto.PROPERTY_BASKET_LINE_LENGTH,
+ SetLonglineLogbookDto.PROPERTY_LENGTH_BETWEEN_BRANCHLINES,
SetLonglineLogbookDto.PROPERTY_SHOOTER_USED,
SetLonglineLogbookDto.PROPERTY_SHOOTER_SPEED,
+ SetLonglineLogbookDto.PROPERTY_MAX_DEPTH_TARGETED,
+ SetLonglineLogbookDto.PROPERTY_TOTAL_SECTIONS_COUNT,
+ SetLonglineLogbookDto.PROPERTY_BASKETS_PER_SECTION_COUNT,
+ SetLonglineLogbookDto.PROPERTY_TOTAL_BASKETS_COUNT,
+ SetLonglineLogbookDto.PROPERTY_BRANCHLINES_PER_BASKET_COUNT,
+ SetLonglineLogbookDto.PROPERTY_TOTAL_HOOKS_COUNT,
+ SetLonglineLogbookDto.PROPERTY_LINE_TYPE,
SetLonglineLogbookDto.PROPERTY_WEIGHTED_SWIVEL,
SetLonglineLogbookDto.PROPERTY_SWIVEL_WEIGHT,
SetLonglineLogbookDto.PROPERTY_WEIGHTED_SNAP,
SetLonglineLogbookDto.PROPERTY_SNAP_WEIGHT,
- SetLonglineLogbookDto.PROPERTY_MONITORED,
- SetLonglineLogbookDto.PROPERTY_TIME_BETWEEN_HOOKS,
- SetLonglineLogbookDto.PROPERTY_BASKETS_PER_SECTION_COUNT,
- SetLonglineLogbookDto.PROPERTY_BRANCHLINES_PER_BASKET_COUNT,
- SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_PER_BASKET_COUNT,
- SetLonglineLogbookDto.PROPERTY_TOTAL_SECTIONS_COUNT,
- SetLonglineLogbookDto.PROPERTY_TOTAL_BASKETS_COUNT,
- SetLonglineLogbookDto.PROPERTY_TOTAL_HOOKS_COUNT
+ SetLonglineLogbookDto.PROPERTY_MONITORED
).build();
+ public static final Set<String> LIGHTSTICKS_TAB_PROPERTIES =
+ ImmutableSet.<String>builder().add(
+ SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_USED,
+ SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_PER_BASKET_COUNT,
+ SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_TYPE,
+ SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_COLOR
+ ).build();
public static final Set<String> HAULING_TAB_PROPERTIES =
ImmutableSet.<String>builder().add(
SetLonglineLogbookDto.PROPERTY_HAULING_DIRECTION_SAME_AS_SETTING,
@@ -99,6 +109,7 @@ public class SetLonglineLogbookUIModel extends ContentUIModel<SetLonglineLogbook
protected boolean settingCaracteristicsTabValid;
protected boolean haulingTabValid;
+ protected boolean lightsticksTabValid;
public SetLonglineLogbookUIModel() {
super(SetLonglineLogbookDto.class);
@@ -131,4 +142,12 @@ public class SetLonglineLogbookUIModel extends ContentUIModel<SetLonglineLogbook
firePropertyChange(PROPERTY_SETTING_TAB_VALID, null, settingTabValid);
}
+ public boolean isLightsticksTabValid() {
+ return lightsticksTabValid;
+ }
+
+ public void setLightsticksTabValid(boolean lightsticksTabValid) {
+ this.lightsticksTabValid = lightsticksTabValid;
+ firePropertyChange(PROPERTY_LIGHTSTICKS_TAB_VALID, null, lightsticksTabValid);
+ }
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/LonglineGlobalCompositionObsUI.jaxx
=====================================
@@ -66,6 +66,8 @@
errorTableModel='{getErrorTableModel()}' context='update-globalComposition'>
</BeanValidator>
+ <Boolean id="delegateContentUI" initializer="true"/>
+
<!-- formulaire -->
<JPanel id="body" layout='{new BorderLayout()}'>
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/LonglineGlobalCompositionObsUIHandler.java
=====================================
@@ -38,8 +38,8 @@ import fr.ird.observe.dto.navigation.edit.node.ObserveLonglineObsSetEditNode;
import fr.ird.observe.dto.navigation.select.node.ObserveLonglineObsSetSelectNode;
import fr.ird.observe.dto.result.SaveResultDto;
import fr.ird.observe.spi.DtoModelHelper;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.jaxx.runtime.spi.UIHandler;
import org.nuiton.validator.NuitonValidatorScope;
@@ -88,6 +88,7 @@ public class LonglineGlobalCompositionObsUIHandler extends ContentUIHandler<SetL
FloatlinesCompositionObsUI compositionUI = ui.getFloatlinesCompositionUI();
ui.getFloatlinesCompositionPanel().remove(compositionUI);
ui.getFloatlinesCompositionPanel().add(compositionUI.getBody());
+ ui.getFloatlinesCompositionPanel().putClientProperty("contentUI", compositionUI);
}
{
@@ -95,6 +96,7 @@ public class LonglineGlobalCompositionObsUIHandler extends ContentUIHandler<SetL
BranchlinesCompositionObsUI compositionUI = ui.getBranchlinesCompositionUI();
ui.getBranchlinesCompositionPanel().remove(compositionUI);
ui.getBranchlinesCompositionPanel().add(compositionUI.getBody());
+ ui.getBranchlinesCompositionPanel().putClientProperty("contentUI", compositionUI);
}
{
@@ -102,6 +104,7 @@ public class LonglineGlobalCompositionObsUIHandler extends ContentUIHandler<SetL
HooksCompositionObsUI compositionUI = ui.getHooksCompositionUI();
ui.getHooksCompositionPanel().remove(compositionUI);
ui.getHooksCompositionPanel().add(compositionUI.getBody());
+ ui.getHooksCompositionPanel().putClientProperty("contentUI", compositionUI);
}
{
@@ -109,6 +112,7 @@ public class LonglineGlobalCompositionObsUIHandler extends ContentUIHandler<SetL
BaitsCompositionObsUI compositionUI = ui.getBaitsCompositionUI();
ui.getBaitsCompositionPanel().remove(compositionUI);
ui.getBaitsCompositionPanel().add(compositionUI.getBody());
+ ui.getBaitsCompositionPanel().putClientProperty("contentUI", compositionUI);
}
}
=====================================
client/src/main/resources/i18n/client_en_GB.properties
=====================================
@@ -1100,8 +1100,8 @@ observe.common.SetLonglineLogbookDto.action.reset.homeId.tip=Reset home id
observe.common.SetLonglineLogbookDto.basketLineLength=Bakset line length (m)
observe.common.SetLonglineLogbookDto.haulingTab=Hauling
observe.common.SetLonglineLogbookDto.lengthBetweenBranchlines=Length between branchlines (m)
+observe.common.SetLonglineLogbookDto.lightsticksTab=Lightsticks
observe.common.SetLonglineLogbookDto.lightsticksUsed=Lightsticks used
-observe.common.SetLonglineLogbookDto.lightstickssTab=Lightsticks
observe.common.SetLonglineLogbookDto.message.creating=Creating fishing operation
observe.common.SetLonglineLogbookDto.message.updating=Updating fishing operation
observe.common.SetLonglineLogbookDto.monitored=Monitored
=====================================
client/src/main/resources/i18n/client_es_ES.properties
=====================================
@@ -1100,8 +1100,8 @@ observe.common.SetLonglineLogbookDto.action.reset.homeId.tip=Reiniciar el id de
observe.common.SetLonglineLogbookDto.basketLineLength=Bakset line length (m) \#TODO
observe.common.SetLonglineLogbookDto.haulingTab=Arrastre
observe.common.SetLonglineLogbookDto.lengthBetweenBranchlines=Length between branchlines (m) \#TODO
+observe.common.SetLonglineLogbookDto.lightsticksTab=Lightsticks \#TODO
observe.common.SetLonglineLogbookDto.lightsticksUsed=Lightsticks used \#TODO
-observe.common.SetLonglineLogbookDto.lightstickssTab=Lightsticks \#TODO
observe.common.SetLonglineLogbookDto.message.creating=Lance en proceso de creación.
observe.common.SetLonglineLogbookDto.message.updating=La operación de pesca está en proceso de modificación.
observe.common.SetLonglineLogbookDto.monitored=Instrumentada
=====================================
client/src/main/resources/i18n/client_fr_FR.properties
=====================================
@@ -1100,14 +1100,14 @@ observe.common.SetLonglineLogbookDto.action.reset.homeId.tip=Réinitialiser l'id
observe.common.SetLonglineLogbookDto.basketLineLength=Longueur de la ligne par panier (m)
observe.common.SetLonglineLogbookDto.haulingTab=Virage
observe.common.SetLonglineLogbookDto.lengthBetweenBranchlines=Distance entre avançons (m)
-observe.common.SetLonglineLogbookDto.lightsticksUsed=Lightsticks used
-observe.common.SetLonglineLogbookDto.lightstickssTab=Lightsticks
+observe.common.SetLonglineLogbookDto.lightsticksTab=Cyalumnes
+observe.common.SetLonglineLogbookDto.lightsticksUsed=Utilisation des cyalumnes
observe.common.SetLonglineLogbookDto.message.creating=L'opération de pêche est en cours de création.
observe.common.SetLonglineLogbookDto.message.updating=L'opération de pêche est en cours de modification.
observe.common.SetLonglineLogbookDto.monitored=Instrumentée
observe.common.SetLonglineLogbookDto.settingCaracteristicsTab=Caractéristiques
observe.common.SetLonglineLogbookDto.settingTab=Filage
-observe.common.SetLonglineLogbookDto.shooterUsed=Shooter used
+observe.common.SetLonglineLogbookDto.shooterUsed=Utilisation du shooter
observe.common.SetLonglineLogbookDto.targetCatchCompositionEstimatedByObserver=Composition estimée par l'observateur ?
observe.common.SetLonglineLogbookDto.targetDiscardCatchCompositionEstimatedByObserver=Composition estimée par l'observateur ?
observe.common.SetLonglineLogbookDto.totalLineLength=Longueur totale de la ligne (m)
=====================================
persistence/src/main/java/fr/ird/observe/binder/data/longline/SetLonglineLogbookEntityDtoBinder.java
=====================================
@@ -45,27 +45,39 @@ public class SetLonglineLogbookEntityDtoBinder extends DataEntityDtoBinderSuppor
entity.setComment(dto.getComment());
entity.setHomeId(dto.getHomeId());
entity.setNumber(dto.getNumber());
- entity.setBasketsPerSectionCount(dto.getBasketsPerSectionCount());
- entity.setBranchlinesPerBasketCount(dto.getBranchlinesPerBasketCount());
- entity.setTotalSectionsCount(dto.getTotalSectionsCount());
- entity.setTotalBasketsCount(dto.getTotalBasketsCount());
- entity.setTotalHooksCount(dto.getTotalHooksCount());
- entity.setWeightedSnap(dto.getWeightedSnap());
- entity.setSnapWeight(dto.getSnapWeight());
- entity.setWeightedSwivel(dto.getWeightedSwivel());
- entity.setSwivelWeight(dto.getSwivelWeight());
- entity.setLightsticksPerBasketCount(dto.getLightsticksPerBasketCount());
- entity.setTimeBetweenHooks(dto.getTimeBetweenHooks());
- entity.setShooterUsed(dto.getShooterUsed());
- entity.setShooterSpeed(dto.getShooterSpeed());
- entity.setMaxDepthTargeted(dto.getMaxDepthTargeted());
+ entity.setSettingShape(toEntity(dto.getSettingShape()));
entity.setSettingStartTimeStamp(dto.getSettingStartTimeStamp());
entity.setSettingStartLatitude(dto.getSettingStartLatitude());
entity.setSettingStartLongitude(dto.getSettingStartLongitude());
entity.setSettingEndTimeStamp(dto.getSettingEndTimeStamp());
entity.setSettingEndLatitude(dto.getSettingEndLatitude());
entity.setSettingEndLongitude(dto.getSettingEndLongitude());
+
entity.setSettingVesselSpeed(dto.getSettingVesselSpeed());
+ entity.setTimeBetweenHooks(dto.getTimeBetweenHooks());
+ entity.setTotalLineLength(dto.getTotalLineLength());
+ entity.setBasketLineLength(dto.getBasketLineLength());
+ entity.setLengthBetweenBranchlines(dto.getLengthBetweenBranchlines());
+ entity.setShooterUsed(dto.getShooterUsed());
+ entity.setShooterSpeed(dto.getShooterSpeed());
+ entity.setMaxDepthTargeted(dto.getMaxDepthTargeted());
+ entity.setTotalSectionsCount(dto.getTotalSectionsCount());
+ entity.setBasketsPerSectionCount(dto.getBasketsPerSectionCount());
+ entity.setTotalBasketsCount(dto.getTotalBasketsCount());
+ entity.setBranchlinesPerBasketCount(dto.getBranchlinesPerBasketCount());
+ entity.setTotalHooksCount(dto.getTotalHooksCount());
+ entity.setLineType(toEntity(dto.getLineType()));
+ entity.setWeightedSwivel(dto.getWeightedSwivel());
+ entity.setSwivelWeight(dto.getSwivelWeight());
+ entity.setWeightedSnap(dto.getWeightedSnap());
+ entity.setSnapWeight(dto.getSnapWeight());
+ entity.setMonitored(dto.getMonitored());
+
+ entity.setLightsticksUsed(dto.getLightsticksUsed());
+ entity.setLightsticksPerBasketCount(dto.getLightsticksPerBasketCount());
+ entity.setLightsticksType(toEntity(dto.getLightsticksType()));
+ entity.setLightsticksColor(toEntity(dto.getLightsticksColor()));
+
entity.setHaulingDirectionSameAsSetting(dto.getHaulingDirectionSameAsSetting());
entity.setHaulingStartTimeStamp(dto.getHaulingStartTimeStamp());
entity.setHaulingStartLatitude(dto.getHaulingStartLatitude());
@@ -74,13 +86,6 @@ public class SetLonglineLogbookEntityDtoBinder extends DataEntityDtoBinderSuppor
entity.setHaulingEndLatitude(dto.getHaulingEndLatitude());
entity.setHaulingEndLongitude(dto.getHaulingEndLongitude());
entity.setHaulingBreaks(dto.getHaulingBreaks());
- entity.setMonitored(dto.getMonitored());
- entity.setLastUpdateDate(dto.getLastUpdateDate());
- entity.setSettingShape(toEntity(dto.getSettingShape()));
- entity.setLineType(toEntity(dto.getLineType()));
- entity.setLightsticksType(toEntity(dto.getLightsticksType()));
- entity.setLightsticksColor(toEntity(dto.getLightsticksColor()));
-
}
@Override
@@ -90,20 +95,7 @@ public class SetLonglineLogbookEntityDtoBinder extends DataEntityDtoBinderSuppor
dto.setComment(entity.getComment());
dto.setHomeId(entity.getHomeId());
dto.setNumber(entity.getNumber());
- dto.setBasketsPerSectionCount(entity.getBasketsPerSectionCount());
- dto.setBranchlinesPerBasketCount(entity.getBranchlinesPerBasketCount());
- dto.setTotalSectionsCount(entity.getTotalSectionsCount());
- dto.setTotalBasketsCount(entity.getTotalBasketsCount());
- dto.setTotalHooksCount(entity.getTotalHooksCount());
- dto.setWeightedSnap(entity.getWeightedSnap());
- dto.setSnapWeight(entity.getSnapWeight());
- dto.setWeightedSwivel(entity.getWeightedSwivel());
- dto.setSwivelWeight(entity.getSwivelWeight());
- dto.setLightsticksPerBasketCount(entity.getLightsticksPerBasketCount());
- dto.setTimeBetweenHooks(entity.getTimeBetweenHooks());
- dto.setShooterUsed(entity.getShooterUsed());
- dto.setShooterSpeed(entity.getShooterSpeed());
- dto.setMaxDepthTargeted(entity.getMaxDepthTargeted());
+ dto.setSettingShape(toReferentialReference(referentialLocale, entity.getSettingShape()));
dto.setSettingStartTimeStamp(entity.getSettingStartTimeStamp());
dto.setSettingStartLatitude(entity.getSettingStartLatitude());
dto.setSettingStartLongitude(entity.getSettingStartLongitude());
@@ -112,7 +104,32 @@ public class SetLonglineLogbookEntityDtoBinder extends DataEntityDtoBinderSuppor
dto.setSettingEndLatitude(entity.getSettingEndLatitude());
dto.setSettingEndLongitude(entity.getSettingEndLongitude());
dto.setSettingEndQuadrant(entity.getSettingEndQuadrant());
+
dto.setSettingVesselSpeed(entity.getSettingVesselSpeed());
+ dto.setTimeBetweenHooks(entity.getTimeBetweenHooks());
+ dto.setTotalLineLength(entity.getTotalLineLength());
+ dto.setBasketLineLength(entity.getBasketLineLength());
+ dto.setLengthBetweenBranchlines(entity.getLengthBetweenBranchlines());
+ dto.setShooterUsed(entity.getShooterUsed());
+ dto.setShooterSpeed(entity.getShooterSpeed());
+ dto.setMaxDepthTargeted(entity.getMaxDepthTargeted());
+ dto.setTotalSectionsCount(entity.getTotalSectionsCount());
+ dto.setBasketsPerSectionCount(entity.getBasketsPerSectionCount());
+ dto.setTotalBasketsCount(entity.getTotalBasketsCount());
+ dto.setBranchlinesPerBasketCount(entity.getBranchlinesPerBasketCount());
+ dto.setTotalHooksCount(entity.getTotalHooksCount());
+ dto.setLineType(toReferentialReference(referentialLocale, entity.getLineType()));
+ dto.setWeightedSwivel(entity.getWeightedSwivel());
+ dto.setSwivelWeight(entity.getSwivelWeight());
+ dto.setWeightedSnap(entity.getWeightedSnap());
+ dto.setSnapWeight(entity.getSnapWeight());
+ dto.setMonitored(entity.getMonitored());
+
+ dto.setLightsticksUsed(entity.getLightsticksUsed());
+ dto.setLightsticksPerBasketCount(entity.getLightsticksPerBasketCount());
+ dto.setLightsticksType(toReferentialReference(referentialLocale, entity.getLightsticksType()));
+ dto.setLightsticksColor(toReferentialReference(referentialLocale, entity.getLightsticksColor()));
+
dto.setHaulingDirectionSameAsSetting(entity.getHaulingDirectionSameAsSetting());
dto.setHaulingStartTimeStamp(entity.getHaulingStartTimeStamp());
dto.setHaulingStartLatitude(entity.getHaulingStartLatitude());
@@ -123,13 +140,6 @@ public class SetLonglineLogbookEntityDtoBinder extends DataEntityDtoBinderSuppor
dto.setHaulingEndLongitude(entity.getHaulingEndLongitude());
dto.setHaulingEndQuadrant(entity.getHaulingEndQuadrant());
dto.setHaulingBreaks(entity.getHaulingBreaks());
- dto.setMonitored(entity.getMonitored());
-
- dto.setSettingShape(toReferentialReference(referentialLocale, entity.getSettingShape()));
- dto.setLineType(toReferentialReference(referentialLocale, entity.getLineType()));
- dto.setLightsticksType(toReferentialReference(referentialLocale, entity.getLightsticksType()));
- dto.setLightsticksColor(toReferentialReference(referentialLocale, entity.getLightsticksColor()));
-
}
}
=====================================
persistence/src/main/java/fr/ird/observe/binder/data/longline/SetLonglineLogbookEntityReferenceBinder.java
=====================================
@@ -41,9 +41,7 @@ public class SetLonglineLogbookEntityReferenceBinder extends DataEntityReference
@Override
public SetLonglineLogbookReference toReference(ReferentialLocale referentialLocale, SetLonglineLogbook entity) {
-
return new SetLonglineLogbookReference(entity, entity.getHomeId());
-
}
}
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/73da0c0b9c8d8b005ff8622e28…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/73da0c0b9c8d8b005ff8622e28…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] do not close and generate changelog while release, this should be done before.
by Tony CHEMIT 12 Sep '18
by Tony CHEMIT 12 Sep '18
12 Sep '18
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
73da0c0b by Tony CHEMIT at 2018-09-12T21:28:14Z
do not close and generate changelog while release, this should be done before.
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -41,7 +41,6 @@ image: registry.gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/docker:lat
name: release
script:
- if [ -n "${MAKE_RELEASE}" ]; then ultreiaio-release-gitlab-init; fi
- - if [ -n "${MAKE_RELEASE}" ]; then ultreiaio-milestone-close; fi
- if [ -n "${MAKE_RELEASE}" ]; then ultreiaio-release-start; fi
- if [ -n "${MAKE_RELEASE}" ]; then ultreiaio-release-finish; fi
- if [ -n "${MAKE_RELEASE}" ]; then ultreiaio-stage-close-and-release; fi
@@ -52,11 +51,9 @@ image: registry.gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/docker:lat
name: release
script:
- if [ -n "${MAKE_STAGE}" ]; then ultreiaio-release-gitlab-init; fi
- - if [ -n "${MAKE_STAGE}" ]; then ultreiaio-milestone-close; fi
- if [ -n "${MAKE_STAGE}" ]; then ultreiaio-release-start; fi
- if [ -n "${MAKE_STAGE}" ]; then ultreiaio-release-finish; fi
- if [ -n "${MAKE_STAGE}" ]; then ultreiaio-stage-drop; fi
- - if [ -n "${MAKE_STAGE}" ]; then ultreiaio-changelog-update-staging; fi
- if [ -n "${MAKE_STAGE}" ]; then ultreiaio-milestone-create; fi
.deploy-demo: &deploy-demo
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/73da0c0b9c8d8b005ff8622e280…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/73da0c0b9c8d8b005ff8622e280…
You're receiving this email because of your account on gitlab.com.
1
0
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
c194f43e by Tony CHEMIT at 2018-09-12T21:15:43Z
use last pom
- - - - -
1 changed file:
- pom.xml
Changes:
=====================================
pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>io.ultreia.maven</groupId>
<artifactId>pom</artifactId>
- <version>2018.50</version>
+ <version>2018.51</version>
</parent>
<groupId>fr.ird.observe</groupId>
@@ -152,14 +152,14 @@
<maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
<buildDate>${maven.build.timestamp}</buildDate>
- <observeToolkitVersion>4.1-SNAPSHOT</observeToolkitVersion>
+ <observeToolkitVersion>4.1</observeToolkitVersion>
<!--<lib.version.java4all.topia>1.1.1</lib.version.java4all.topia>-->
<!--<lib.version.java4all.eugene>3.0-alpha-22</lib.version.java4all.eugene>-->
<!--<lib.version.java4all.jaxx>3.0-alpha-31</lib.version.java4all.jaxx>-->
<!--<lib.version.nuiton.topia>3.4.2-SNAPSHOT</lib.version.nuiton.topia>-->
<lib.version.nuiton.validation>3.1</lib.version.nuiton.validation>
<lib.version.java4all.topia>1.1.2-SNAPSHOT</lib.version.java4all.topia>
- <xworkVersion>2.3.34</xworkVersion>
+ <xworkVersion>2.3.35</xworkVersion>
<!--<lib.version.hibernate>5.2.10.Final</lib.version.hibernate>-->
<!--can't use 1.4.197 (date has changed + blob also-->
<lib.version.h2>1.4.196</lib.version.h2>
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/c194f43e8a37b04c733f130e6bb…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/c194f43e8a37b04c733f130e6bb…
You're receiving this email because of your account on gitlab.com.
1
0
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
21029817 by Tony CHEMIT at 2018-09-12T20:59:13Z
use last pom
- - - - -
1 changed file:
- pom.xml
Changes:
=====================================
pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>io.ultreia.maven</groupId>
<artifactId>pom</artifactId>
- <version>2018.50</version>
+ <version>2018.51</version>
</parent>
<groupId>fr.ird.observe</groupId>
@@ -156,7 +156,7 @@
<!--<lib.version.java4all.jaxx>3.0-alpha-33-SNAPSHOT</lib.version.java4all.jaxx>-->
<lib.version.nuiton.validation>3.1</lib.version.nuiton.validation>
<!--<lib.version.java4all.config>1.0.3</lib.version.java4all.config>-->
- <xworkVersion>2.3.34</xworkVersion>
+ <xworkVersion>2.3.35</xworkVersion>
<!--<lib.version.hibernate>5.2.10.Final</lib.version.hibernate>-->
<!--can't use 1.4.197 (date has changed + blob also-->
<lib.version.h2>1.4.196</lib.version.h2>
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/21029817bd659f3f29b5b920f83…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/21029817bd659f3f29b5b920f83…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 14 commits: Be able to use server configuration to perform database management - Closes #1034)
by Tony CHEMIT 12 Sep '18
by Tony CHEMIT 12 Sep '18
12 Sep '18
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
ee2efab0 by Tony CHEMIT at 2018-09-12T18:56:15Z
Be able to use server configuration to perform database management - Closes #1034)
- - - - -
550dc91b by Tony CHEMIT at 2018-09-12T19:48:40Z
Use a new improved combo box - Closes #1035
- - - - -
e78656f0 by Tony CHEMIT at 2018-09-12T19:49:07Z
[LL][SERVER] Sur section Capture, le racourcis Nouveau (F4) ne fonctionne pas - Closes #1029 - Closes #1025
- - - - -
f4e42c88 by Tony CHEMIT at 2018-09-12T19:54:14Z
[PS] Un classement de liste déroulante est inversé - Closes #1039
- - - - -
9636b9b7 by Tony CHEMIT at 2018-09-12T19:56:57Z
Affichage du nom de base dans les écrans de synchro avancée - Closes #1041
- - - - -
d9f4ec4c by Tony CHEMIT at 2018-09-12T19:57:38Z
Synchro avancée de marées : sélection de marées impossible à droite ? - Closes #1043
- - - - -
7c5e7e3b by Tony CHEMIT at 2018-09-12T20:23:55Z
[PS] Un libellé à corriger - Closes #1040
- - - - -
118554da by Tony CHEMIT at 2018-09-12T20:23:57Z
Types de mesures par défaut manquants pour 94 espèces dans le référentiel - Closes #1013
- - - - -
e998382c by Tony CHEMIT at 2018-09-12T20:23:57Z
correction suite à la suppression d'un objet openable
- - - - -
53558778 by Tony CHEMIT at 2018-09-12T20:23:57Z
La synchro référentiel simple ne fonctionne pas, l'ordre des requetes à executer n'est pas bon - Closes #1047
- - - - -
96204713 by Tony CHEMIT at 2018-09-12T20:23:57Z
La synchronisation des référentiels pourrait ne pas fonctionner sur la suppression de certains référentiels - Closes #1048
- - - - -
61b64452 by Tony CHEMIT at 2018-09-12T20:23:58Z
[PS][LL][DIRECT][SERVEUR] La suppression de marées ne fonctionne pas bien - Closes #1046
- - - - -
ed78b4f1 by Tony CHEMIT at 2018-09-12T20:23:58Z
[PS][LL][DIRECT][SERVEUR] La suppression de marées ne fonctionne pas bien - Closes #1046
- - - - -
8898f70b by Tony CHEMIT at 2018-09-12T20:23:58Z
La synchro de marée LL et PS entre bases centrales en mode serveur ne fonctionne pas - Closes #1042
- - - - -
30 changed files:
- client/src/main/java/fr/ird/observe/client/ui/ObserveCommon.jcss
- client/src/main/java/fr/ird/observe/client/ui/content/Common.jcss
- client/src/main/java/fr/ird/observe/client/ui/content/ContentUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/content/ContentUIInitializer.java
- client/src/main/java/fr/ird/observe/client/ui/content/ObserveFocusManager.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/CommonTable.jcss
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/GearUseFeaturesLonglineUI.jaxx
- 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/logbook/ActivityLonglineLogbookUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/BaitsCompositionLogbookUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/BranchlinesCompositionLogbookUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/FloatlinesCompositionLogbookUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/HooksCompositionLogbookUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/LandingLogbookUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/LandingPartLogbookUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SamplePartLogbookUI.jaxx
- 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/obs/ActivityLonglineObsUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/BaitsCompositionObsUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/BranchlineObsUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/BranchlinesCompositionObsUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/CatchLonglineObsUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/CatchLonglineObsUI.jcss
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/EncounterObsUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/FloatlinesCompositionObsUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/HooksCompositionObsUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/LonglinePositionHelper.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/SensorUsedObsUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/obs/SetLonglineObsUI.jaxx
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/166f73c9bd0e9c27d4db5c30d4…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/166f73c9bd0e9c27d4db5c30d4…
You're receiving this email because of your account on gitlab.com.
1
0