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 2024
- 1 participants
- 128 discussions
Tony CHEMIT pushed new tag v9.3.7 at ultreiaio / ird-observe
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/tree/v9.3.7
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][master-9.3.x] 217 commits: [jgitflow-maven-plugin]updating poms for 9.3.7-SNAPSHOT development[skip ci]
by Tony CHEMIT (@tchemit) 19 Sep '24
by Tony CHEMIT (@tchemit) 19 Sep '24
19 Sep '24
Tony CHEMIT pushed to branch master-9.3.x at ultreiaio / ird-observe
Commits:
4cac9cae by Tony Chemit at 2024-07-05T12:52:31+02:00
[jgitflow-maven-plugin]updating poms for 9.3.7-SNAPSHOT development[skip ci]
- - - - -
ada2b853 by Tony Chemit at 2024-07-05T13:09:00+02:00
[jgitflow-maven-plugin]updating develop poms to master versions to avoid merge conflicts[skip ci]
- - - - -
e5689322 by Tony Chemit at 2024-07-05T13:09:01+02:00
[jgitflow-maven-plugin]merging 'master' into 'develop'
- - - - -
d0e69531 by Tony Chemit at 2024-07-05T13:09:02+02:00
[jgitflow-maven-plugin]Updating develop poms back to pre merge state[skip ci]
- - - - -
09fab1d5 by Tony Chemit at 2024-07-11T12:39:44+02:00
Faille sur l'UI de remplacement de code de référentiel - Closes #2917
- - - - -
c7def86d by Tony Chemit at 2024-07-11T13:45:54+02:00
fix CI
- - - - -
4104a3af by Tony Chemit at 2024-08-17T17:29:05+02:00
update pom
- - - - -
dc83d313 by Tony Chemit at 2024-08-17T17:29:05+02:00
Amélioration des poids +10/-10 et total des échantillons lors de l'import AVDTH - Closes #2918
- - - - -
92dab31d by Tony Chemit at 2024-08-17T17:41:59+02:00
Mettre à null le commentaire Trip.logbookComment si celui ci n'est constitué que d'espaces - Closes #2923
- - - - -
a5743094 by Tony Chemit at 2024-08-17T18:01:03+02:00
Reduce log level
- - - - -
63426148 by Tony Chemit at 2024-08-17T18:01:34+02:00
increase timeout for method SynchronizeService.produceSqlResult
- - - - -
f37ee280 by Tony Chemit at 2024-08-18T10:30:59+02:00
update pom
- - - - -
78296103 by Tony Chemit at 2024-08-18T11:05:43+02:00
Replace tomcat plugin to deploy on demo the release war
- - - - -
f4eb68ac by Tony Chemit at 2024-08-20T11:33:29+02:00
Add andThen nice method to chain consumers (with possible null on first one)
- - - - -
4cf662c1 by Tony Chemit at 2024-08-20T12:23:06+02:00
Review SPI code to improve save mechanism (only override the onSave method, and no more the saveEntity one)
- - - - -
7769ecd4 by Tony Chemit at 2024-08-20T12:26:38+02:00
update spi to use new save API
- - - - -
1f371c0a by Tony Chemit at 2024-08-20T12:55:55+02:00
Improve tests log level
- - - - -
a890eba2 by Tony Chemit at 2024-08-20T13:26:51+02:00
Update pom
- - - - -
180eb3f8 by Tony Chemit at 2024-08-20T13:35:02+02:00
Introduce WithEndDateEntityAware
- - - - -
33ecab53 by Tony Chemit at 2024-08-20T13:40:56+02:00
use WithEndDateEntityAware in TripEntityAware and update Trip spi
- - - - -
cfce789d by Tony Chemit at 2024-08-20T13:40:56+02:00
use WithEndDateEntityAware on entities
- - - - -
411a997d by Tony Chemit at 2024-08-20T13:40:56+02:00
update spi to use new save API and TripEntityAware onSaveUpdateTripIfEndDateChanged method
- - - - -
5d5b1fa3 by Tony Chemit at 2024-08-20T14:00:25+02:00
Merge branch 'feature/issue_2903' into develop
LL observations / logbook : mise à jour auto de la date de fin de marée en fonction des dates activités (comme en PS)
- Closes #2903
- - - - -
1ee55e18 by Tony Chemit at 2024-08-25T16:41:53+02:00
update pom
- - - - -
7c6fb362 by Tony Chemit at 2024-08-25T17:03:56+02:00
Remove unnecessary brace to one jaxx expression
- - - - -
118c75be by Tony Chemit at 2024-08-25T17:05:27+02:00
KeepBeanPropertyOrder in presets storage
- - - - -
15a53c7d by Tony Chemit at 2024-08-25T17:05:27+02:00
Add fileName property in FloatingObjectPreset (to be able to use it later)
- - - - -
3ecce51c by Tony Chemit at 2024-08-25T17:05:27+02:00
Improve FloatingObjectPresetStorage and load filename when reading storage, but never store it at write time
- - - - -
8e34c745 by Tony Chemit at 2024-08-25T17:05:27+02:00
Improve FloatingObjectPresetsStorage and add store method to be able to rewrite all the presets from the presetsMap parameter.
- - - - -
b376dfd9 by Tony Chemit at 2024-08-25T17:05:27+02:00
Replace # by -- in presets (otherwise it is a comment and is never loaded
- - - - -
ae93a42e by Tony Chemit at 2024-08-25T17:05:27+02:00
Introduce method reloadDefaultDcpPresets to be able to reload embedded presets
- - - - -
d90b4cd5 by Tony Chemit at 2024-08-25T17:05:27+02:00
Introduce method setMainI18nLanguage to be able to apply it in presets ui
- - - - -
0d964048 by Tony Chemit at 2024-08-25T17:05:28+02:00
Improve FloatingObjectPresetUIInitializer to use it form preset managers also
- - - - -
036e4838 by Tony Chemit at 2024-08-25T17:05:28+02:00
Open buildMaterialsList method to be used by presets manager
- - - - -
a1dee904 by Tony Chemit at 2024-08-25T17:05:28+02:00
Add presets manager UI
- - - - -
f82d2299 by Tony Chemit at 2024-08-25T17:05:28+02:00
Add new content body to display presets manager
- - - - -
0629f538 by Tony Chemit at 2024-08-25T17:06:01+02:00
Merge branch 'feature/issue-2826' into develop
Permettre le renommage, la suppression, éventuellement l'édition des présélections de FOB
- Closes #2826
- - - - -
83b2b845 by Tony Chemit at 2024-08-26T01:51:22+02:00
Add more i18n from TripAware
- - - - -
8a00bc8d by Tony Chemit at 2024-08-26T01:58:36+02:00
Introduce a simple update sql query for bulk changes and use it in DataGroupByDefinition
- - - - -
09a20308 by Tony Chemit at 2024-08-26T02:06:24+02:00
Introduce updateQualitativeProperty method in RootOpenableService and in dedicated SPI
- - - - -
aa105c0f by Tony Chemit at 2024-08-26T02:06:24+02:00
can now override RootListModelStates
- - - - -
49e9fdb2 by Tony Chemit at 2024-08-26T02:06:24+02:00
Introduce createReferenceCache method in ContentRootListUIModelStates and fill it in concrete classes (and reuse existing code on ContentRootOpenableUIModelStates)
- - - - -
178ce4fe by Tony Chemit at 2024-08-26T02:06:24+02:00
Add action BulkModify on ContentRootListUI
- - - - -
b992bcd8 by Tony Chemit at 2024-08-26T02:16:30+02:00
Add new BulkModify ui
- - - - -
7f6c01ef by Tony Chemit at 2024-08-26T02:20:21+02:00
Merge branch 'feature/issue-2816' into develop
Fonction de changement de programme en masse - Closes #2816
- - - - -
694e63c3 by Tony Chemit at 2024-08-26T13:43:01+02:00
Ajout des nouveaux groupBy dans le modèle
- - - - -
13a55c61 by Tony Chemit at 2024-08-26T13:46:20+02:00
Mise à jour des modèles générés
- - - - -
60ac3229 by Tony Chemit at 2024-08-26T13:46:20+02:00
Mise à jour des requètes pour les nouveaux groupBy
- - - - -
7cbe092d by Tony Chemit at 2024-08-26T13:46:20+02:00
Ajout dans les DataGroupByReferentialHelper des nouveaux référentiels utilisables dans les nouveaux groupBy
- - - - -
9b4ee21c by Tony Chemit at 2024-08-26T13:46:20+02:00
Ajout dans les libellés sur la qualité de donné du suffix du sous-domaine (obs ou logbook)
- - - - -
cceb2f6e by Tony Chemit at 2024-08-26T13:46:29+02:00
Mise à jour des fixtures
- - - - -
81ec3919 by Tony Chemit at 2024-08-26T13:46:39+02:00
Merge branch 'feature/issue-2924' into develop
Ajout de nouveaux critères dans la configuration de l'arbre de navigation - Closes #2924
- - - - -
2993dea4 by Tony Chemit at 2024-08-27T14:42:47+02:00
Fix DateSupport code (comparing Timestamp and Date is not ok)
- - - - -
4b6cf9fe by Tony Chemit at 2024-08-27T14:42:47+02:00
Fix DtoFormValidatorTransformer dayFunction and timeFunction (for timestamp property)
- - - - -
a5f0d534 by Tony Chemit at 2024-08-27T14:43:05+02:00
Add common I18n for xxxDate properties on Set
- - - - -
c89c59e3 by Tony Chemit at 2024-08-27T14:43:05+02:00
Decompose xxxTimestamp properties on Set
- - - - -
22b7e8d2 by Tony Chemit at 2024-08-27T14:43:05+02:00
Review validation temporal rules for Logbook.(Activity/Set)
- - - - -
c7d06f95 by Tony Chemit at 2024-08-27T14:43:05+02:00
Review validator on ui for temporal rules Logbook.(Activity/Set)
- - - - -
67dba823 by Tony Chemit at 2024-08-27T14:43:05+02:00
Review validation temporal rules for Observation.(Activity/Set)
- - - - -
5897abc9 by Tony Chemit at 2024-08-27T14:43:05+02:00
Review validator on ui for temporal rules Observation.(Activity/Set)
- - - - -
2c3004b6 by Tony Chemit at 2024-08-27T15:03:33+02:00
Merge branch 'feature/issue-2904' into develop
LL observations / logbook : Revue des contrôles sur la cohérences des dates sur les calées
- Closes #2904
- - - - -
885880af by Tony Chemit at 2024-08-28T18:17:52+02:00
Perte dans l'éditeur du type de mesure et de pesée lors de la sélection d'une ligne fraîchement crée dans le tableau des données d'échantillons - Closes #2925
- - - - -
91cd5555 by Tony Chemit at 2024-08-28T18:17:52+02:00
Sanitize SaveTableEntry code and when create property goes back to false
- - - - -
b34346ed by Tony Chemit at 2024-08-29T16:05:04+02:00
Amélioration de la conservation du paramétrage des UI - Closes #2926
- - - - -
f0d6b167 by Tony Chemit at 2024-08-29T16:05:48+02:00
Introduce WithIndex and ContainerChildWithIndexDto API
- - - - -
6b65e1ec by Tony Chemit at 2024-08-29T16:05:48+02:00
use ContainerChildWithIndexDto in ObServe model
- - - - -
16de6a08 by Tony Chemit at 2024-08-29T16:05:48+02:00
Be able to do actions on JXTableHeader (for the sort actions on reading form)
- - - - -
ebd1998a by Tony Chemit at 2024-08-29T16:05:48+02:00
Improve JXTableUtil to display index column with a specific renderer
- - - - -
5688aded by Tony Chemit at 2024-08-29T16:06:54+02:00
Review ContentTableUI API to use WithIndex objects, review also move actions
- - - - -
161fab9d by Tony Chemit at 2024-08-29T16:07:01+02:00
Adapt forms using WithIndex objects
- - - - -
b1408eb4 by Tony Chemit at 2024-08-29T16:07:54+02:00
Merge branch 'feature/issue-1203' into develop
Tableaux de saisie (captures, échantillons, équipements...) - Classement en cliquant sur les en-têtes de colonnes
- Closes #1203
- - - - -
6a093710 by Tony Chemit at 2024-08-30T11:34:21+02:00
Add FilterableComboBoxState state
- - - - -
21265de1 by Tony Chemit at 2024-08-30T11:34:28+02:00
Add ListHeaderState state
- - - - -
c1d72929 by Tony Chemit at 2024-08-30T11:35:12+02:00
use new states in ObserveSwingSession
- - - - -
8d17f01c by Tony Chemit at 2024-08-30T11:48:45+02:00
Merge branch 'feature/issue-2834' into develop
Sauvegarde des préférences utilisateur sur le classement des listes : gestion dans l'UI
- Closes #2834
- - - - -
585e7e3c by Tony Chemit at 2024-08-30T13:13:46+02:00
Make sure form is never modified on opening in updating mode - See #2928
- - - - -
338b09b9 by Tony Chemit at 2024-08-30T13:13:46+02:00
Never alter modified state when changing format (this code is actually not working, but will soon...) - See #2928
- - - - -
fb1673ec by Tony Chemit at 2024-08-30T13:14:02+02:00
Le changement de format des éditeurs de température ou de longueur altère l'état «modifié» du formulaire - Closes #2927
- - - - -
7e46fe94 by Tony Chemit at 2024-08-30T13:14:02+02:00
Add TemperatureEditorState state
- - - - -
f6dc862f by Tony Chemit at 2024-08-30T13:14:02+02:00
Add NauticalLengthEditorState state
- - - - -
b0b52a85 by Tony Chemit at 2024-08-30T13:14:02+02:00
Add CoordinatesEditorState state
- - - - -
bd320372 by Tony Chemit at 2024-08-30T13:14:02+02:00
use new states in ObserveSwingSession
- - - - -
df95fe00 by Tony Chemit at 2024-08-30T13:14:10+02:00
Merge branch 'feature/issue-2901' into develop
Permettre à l’utilisateur de sauvegarder les unités choisies (longueur, température et coordonnées)
- Closes #2901
- - - - -
631e84a7 by Tony Chemit at 2024-08-31T10:30:23+02:00
Add more SwingSession states for some widgets - Closes ultreiaio/jaxx#849
- - - - -
6e294852 by Tony Chemit at 2024-08-31T13:25:04+02:00
Update jaxx version - Closes #2928
- - - - -
d7d59ba3 by Tony Chemit at 2024-09-02T09:57:04+02:00
Fix WithIndex generation - See #1203
- - - - -
fb92220f by Tony Chemit at 2024-09-02T11:14:27+02:00
Fix onRemoveRow method (we already are using the modelRow) - See #1203
- - - - -
92243249 by Tony Chemit at 2024-09-02T11:14:36+02:00
Add new queries in TripDao
- - - - -
8b5e5e8d by Tony Chemit at 2024-09-02T11:14:36+02:00
Add new methods in TripService
- - - - -
090661ff by Tony Chemit at 2024-09-02T11:14:36+02:00
Add new labels (will be used for ui for new actions)
- - - - -
1c2c4ae4 by Tony Chemit at 2024-09-02T11:14:36+02:00
Open API (to hack to order of configuration actions)
- - - - -
29a53618 by Tony Chemit at 2024-09-02T11:14:36+02:00
Add ContentTableUITableModel.addNewEntry(bean) method to be able to create a new row from a given bean
- - - - -
76e86dd5 by Tony Chemit at 2024-09-02T11:14:36+02:00
Implements action AddActivitiesFromSample on Well form
- - - - -
cebcab9b by Tony Chemit at 2024-09-02T11:14:36+02:00
Implements action AddActivitiesFromSample on Sample form
- - - - -
64f01421 by Tony Chemit at 2024-09-02T11:15:24+02:00
Merge branch 'feature/issue-2734' into develop
La liste des activités associées à un échantillon pourrait être déduite du plan de cuves, et inversément - Closes #2734
- - - - -
f238bf01 by Tony Chemit at 2024-09-02T11:41:44+02:00
Add new ClientConfig option to store the speciesList and fill from the hardcoded list in consolidate action
- - - - -
c4d28d74 by Tony Chemit at 2024-09-02T12:03:44+02:00
Add the species list in consolidation request, then use it in consolidation code instead of the hardcoded list
- - - - -
4d45c7fb by Tony Chemit at 2024-09-02T12:03:44+02:00
Use the species list in Consolidation action in GUI (and for this time add a TODO to configure this list in config UI)
- - - - -
77540b5f by Tony Chemit at 2024-09-02T12:04:14+02:00
Merge branch 'feature/issue-2929' into develop
Rendre configurable la liste des espèces à inclure dans la consolidation du sampleActivity.wieghtedWeight - Closes #2929
- - - - -
de95fb1f by Tony Chemit at 2024-09-05T12:26:25+02:00
Add new client configuration option showSensibleCriteriaInTripBulkChanges
- - - - -
b7bc8cf9 by Tony Chemit at 2024-09-05T12:26:53+02:00
use new client configuration option showSensibleCriteriaInTripBulkChanges in BulkModify ui
- - - - -
1995338f by Tony Chemit at 2024-09-05T12:26:58+02:00
Merge branch 'feature/issue-2816' into develop
Fonction de changement de programme en masse - Closes #2816
- - - - -
eab2fdac by Tony Chemit at 2024-09-05T12:48:01+02:00
Remove ObserveSwingSession (use directly SwingSession)
- - - - -
efb846a1 by Tony Chemit at 2024-09-05T12:48:28+02:00
Remove ObServeSwingSessionConfig
- - - - -
0c970bb0 by Tony Chemit at 2024-09-05T12:48:59+02:00
do not use any longer ObserveSwingSessionHelper in ContentUIInitializer (everything is managed now by SwingSession)
- - - - -
c9a055b7 by Tony Chemit at 2024-09-05T12:49:04+02:00
Merge branch 'feature/issue-2834' into develop
Suppression du système de préférences d'ui codé en dure - Closes #2834
- - - - -
093c30be by Tony Chemit at 2024-09-05T13:50:20+02:00
fix license header
- - - - -
79bfcae5 by Tony Chemit at 2024-09-05T13:54:44+02:00
Hide species ids option (Will be re-add in #2931) - Closes #2929
- - - - -
0749d0a9 by Tony Chemit at 2024-09-05T13:54:56+02:00
Remove FloatingObjectPresetsManager and use now only a FloatingObjectPresetsStorage
- - - - -
6aadd14d by Tony Chemit at 2024-09-05T13:54:56+02:00
Use now only one client configuration option and simplify dcp-presets directory layout
- - - - -
88dde538 by Tony Chemit at 2024-09-05T13:54:56+02:00
Review FloatingObjectPresetsUI (remove tabs and rename FloatingObjectPresetsTabUI to FloatingObjectPresetsEditorUI)
- - - - -
f518f0e1 by Tony Chemit at 2024-09-05T13:55:03+02:00
Merge branch 'feature/issue-2826' into develop
Permettre le renommage, la suppression, éventuellement l'édition des présélections de FOB
- Closes #2826
- - - - -
7e07db53 by Tony Chemit at 2024-09-06T13:09:19+02:00
update decorator and pom
- - - - -
42d1aa35 by Tony Chemit at 2024-09-06T13:09:19+02:00
override DecoratorSorted.getComparator
- - - - -
36216614 by Tony Chemit at 2024-09-06T13:09:19+02:00
use Decorator comparator in RowSorter
- - - - -
b4144587 by Tony Chemit at 2024-09-06T13:10:02+02:00
Merge branch 'feature/issue_1203' into develop
Utilisation des décorateurs des colonnes de type décorable pour fournir
l'ordre lors d'un tri d'une telle colonne - Closes #1203
- - - - -
8c7782f6 by Tony Chemit at 2024-09-06T14:05:36+02:00
Update changelog for v.9.3.7 [skip CI]
- - - - -
eb20c1c9 by Tony Chemit at 2024-09-09T11:59:45+02:00
Move to maintain branch for 9.3.x
- - - - -
37097d0e by Tony Chemit at 2024-09-09T12:45:09+02:00
update gitflow maintain branches
- - - - -
3e35ad40 by Tony Chemit at 2024-09-09T15:26:12+02:00
Move I18nReferentialDto.isLabelTranslated method to WithI18n
- - - - -
1cb82ec5 by Tony Chemit at 2024-09-09T15:26:19+02:00
Fix some missing i18n keys
- - - - -
f7a62d35 by Tony Chemit at 2024-09-10T10:33:05+02:00
use correct commons-configuration2
- - - - -
744dd33f by Tony Chemit at 2024-09-10T10:33:13+02:00
Add FIXME to resolve
- - - - -
00040693 by Tony Chemit at 2024-09-10T10:33:26+02:00
Improve validation comments
- - - - -
ba87a51f by Tony Chemit at 2024-09-10T10:33:26+02:00
Depreciate xwork field validators
- - - - -
ccbb3689 by Tony Chemit at 2024-09-10T10:33:26+02:00
use new validation and jaxx validation API
- - - - -
2a1e654d by Tony Chemit at 2024-09-10T10:33:26+02:00
implements new field validator using new API
- - - - -
a102c9db by Tony Chemit at 2024-09-10T10:33:26+02:00
rewrite validation models
- - - - -
e06b0174 by Tony Chemit at 2024-09-10T10:33:26+02:00
Fix some validation errors discovered with the new validation implementation^^
- - - - -
0a710fc9 by Tony Chemit at 2024-09-10T10:33:26+02:00
Test both validation implementations in services tck
- - - - -
fcfd81b6 by Tony Chemit at 2024-09-10T10:33:26+02:00
update pom
- - - - -
1be378b9 by Tony Chemit at 2024-09-10T10:33:26+02:00
I18n does not parse any longer xml files
- - - - -
726d7919 by Tony Chemit at 2024-09-10T10:33:27+02:00
Manage extra validators in client datasource editors
- - - - -
ec7ced77 by Tony Chemit at 2024-09-10T10:33:27+02:00
use new validation and jaxx validation API
- - - - -
292a8147 by Tony Chemit at 2024-09-10T12:14:16+02:00
add a temporary configuration option to be able to change the validation default factory name
- - - - -
c4cdee6a by Tony Chemit at 2024-09-10T12:22:16+02:00
Merge branch 'feature/issue-2594' into develop-9.3.x
Suppression de la technologie XWorks (utilisé pour la validation) - Closes #2594
- - - - -
a0946e85 by Tony Chemit at 2024-09-10T12:27:59+02:00
compositionTabValid can not be bind to tableModels since there is some validation done outside of them... and must be always true on reading mode
- - - - -
701115b2 by Tony Chemit at 2024-09-10T12:28:54+02:00
Make table not sortable
- - - - -
258e73bc by Tony Chemit at 2024-09-10T12:29:17+02:00
Open ContentMessageTableModel.data property
- - - - -
92610da6 by Tony Chemit at 2024-09-10T12:36:45+02:00
Fix i18n key name (replace Section.template by Section.sectionTemplate)
- - - - -
eb37d7d8 by Tony Chemit at 2024-09-10T12:38:01+02:00
clean SetDetailCompositionUIInitializer code
- - - - -
3cc564d4 by Tony Chemit at 2024-09-10T12:40:16+02:00
Improve Reset action
- - - - -
7e4acdcc by Tony Chemit at 2024-09-10T12:49:33+02:00
Improve validation flow to validate less things (before we revalidate all sections each time...)
- - - - -
8727ebf7 by Tony Chemit at 2024-09-10T12:50:33+02:00
Improve open form performance
- - - - -
287a6f2c by Tony Chemit at 2024-09-10T12:51:03+02:00
Fix where to call validation helper
- - - - -
874e6ae2 by Tony Chemit at 2024-09-10T12:51:30+02:00
Limit when use rearrangeIds method
- - - - -
a9aa2e9f by Tony Chemit at 2024-09-10T13:50:55+02:00
Fix validators editors mapping (but still not working to display icons on validator ui)
- - - - -
baff3a02 by Tony Chemit at 2024-09-10T13:52:52+02:00
Merge branch 'feature/issue-2906' into develop-9.3.x
LL observations/composition détaillée : amélioration de la réactivité du formulaire en mode édition - Closes #2906
- - - - -
4baf1681 by Tony Chemit at 2024-09-10T15:01:06+02:00
Fix jaxx id
- - - - -
aa74e3ba by Tony Chemit at 2024-09-10T15:14:09+02:00
update pom
- - - - -
270eee57 by Tony Chemit at 2024-09-11T11:57:25+02:00
Improve table column sort for enum and boolean - See #1203
- - - - -
b4945146 by Tony Chemit at 2024-09-11T11:57:25+02:00
Introduce DecoratorTableRenderer
- - - - -
224a5b40 by Tony Chemit at 2024-09-11T12:06:35+02:00
Fix focus owner to number (but should review this in Focus session) - See #2902
- - - - -
4be41afb by Tony Chemit at 2024-09-11T15:16:58+02:00
Downgrade log4j version (need to understand new warnings)
- - - - -
c928e6ce by Tony Chemit at 2024-09-11T15:49:04+02:00
Fix observe.Common.tracelineLength I18n value
- - - - -
e2d5e24c by Tony Chemit at 2024-09-11T17:51:44+02:00
Fix consolidation printResult on SampleActivity
- - - - -
2c7121a6 by Tony Chemit at 2024-09-12T14:31:37+02:00
[services-test] Add default validation factory name in DataEntityServiceLocalWriteTest
- - - - -
37dcbbaf by Tony Chemit at 2024-09-13T13:42:32+02:00
update pom
- - - - -
66ca96c0 by Tony Chemit at 2024-09-13T15:03:51+02:00
[i18n] quelques améliorations demandées - See #2907#note_2097858285
- - - - -
a065e178 by Tony Chemit at 2024-09-13T15:03:56+02:00
[client] use a default weight measure method in create mode - See #2907
- - - - -
db656bff by Tony Chemit at 2024-09-16T09:55:28+02:00
[ui] Add a way to not create an empty row when data is empty...
- - - - -
a5aa662b by Tony Chemit at 2024-09-16T09:55:34+02:00
[ui] Need to validate inline models when edit them
- - - - -
fd17f34c by Tony Chemit at 2024-09-16T12:11:59+02:00
[persistence] add activity points except if settingStart is a valid point (Obs & Logbook)
- - - - -
674fa7bd by Tony Chemit at 2024-09-16T12:12:41+02:00
[ui] Remove date from any zone
- - - - -
e8808563 by Tony Chemit at 2024-09-16T12:13:22+02:00
[ui] Add date on activity point and settingStart one
- - - - -
57d997b6 by Tony Chemit at 2024-09-16T12:31:41+02:00
[ui] Use Setting and Hauling line colors for setting and hauling points as well
- - - - -
220b5523 by Tony Chemit at 2024-09-16T12:32:14+02:00
Merge branch 'feature/feature/issue-2875' into develop-9.3.x
A propos des dates d'activités sur la carte LL - Closes #2875
- - - - -
85ff10fc by Tony Chemit at 2024-09-16T12:56:28+02:00
Fix decorator in table for location on branchline
- - - - -
9f04456c by Tony Chemit at 2024-09-16T12:56:28+02:00
New design of form
- - - - -
c65391b4 by Tony Chemit at 2024-09-16T12:56:28+02:00
Fix focus owner to number (but should review this in Focus session)
- - - - -
fc3aa33c by Tony Chemit at 2024-09-16T14:50:25+02:00
Merge branch 'feature/issue-2907' into develop-9.3.x
LL observations/captures : réorganisation du formulaire - Closes #2907
- - - - -
64e8248a by Tony Chemit at 2024-09-18T11:19:31+02:00
Review validators (rename them to xxxObservation) and fix date control (activities are using timestamps)
- - - - -
d576b422 by Tony Chemit at 2024-09-18T11:19:31+02:00
[model] Add ll.Trip.activityLogbook
- - - - -
89c89321 by Tony Chemit at 2024-09-18T11:19:31+02:00
[api-dto-validation] Add ll.Trip.activityLogbook validators
- - - - -
7bbc8e49 by Tony Chemit at 2024-09-18T11:19:31+02:00
[api-validation] Use ll.Trip.activityLogbook validators
- - - - -
8f0f1bd4 by Tony Chemit at 2024-09-18T11:19:32+02:00
[persistence-resources] Update generated validation
- - - - -
fcf82cb3 by Tony Chemit at 2024-09-18T11:19:32+02:00
[services-test] Update validation fixtures
- - - - -
c254075e by Tony Chemit at 2024-09-18T11:19:32+02:00
[client] Update Trip node when saving obs Set or logbook Set
- - - - -
4312e9da by Tony Chemit at 2024-09-18T11:20:10+02:00
Remove validation rule : ps.logbook.Route.date <= Trip.endDate (Closes #2903)
- - - - -
85c15b26 by Tony Chemit at 2024-09-18T11:37:10+02:00
Merge branch 'feature/issue-2903' into develop-9.3.x
LL observations / logbook : mise à jour auto de la date de fin de marée en fonction des dates activités et calées (comme en PS)
- Closes #2903
- - - - -
ac32f6b4 by Tony Chemit at 2024-09-18T11:38:53+02:00
[api-validation] Update generated validation model
- - - - -
71b6d455 by Tony Chemit at 2024-09-18T11:38:53+02:00
[persistence-resources] Update generated validation
- - - - -
c3b93500 by Tony Chemit at 2024-09-18T11:38:53+02:00
[services-i18n] Add new validation messages
- - - - -
b0d468cb by Tony Chemit at 2024-09-18T11:38:53+02:00
[client] Add validation on Trip.activityLogbook
- - - - -
44218c02 by Tony Chemit at 2024-09-18T11:39:15+02:00
Merge branch 'feature/issue-2934' into develop-9.3.x
Certains forms acceptent des dates supérieures à la date du jour - Closes #2934
- - - - -
1dd2c857 by Tony Chemit at 2024-09-18T11:56:31+02:00
Ajout dans la configuration du client de l'option déjéà existante instance.server.checkServerVersion (onglet expert) - Closes #2936
- - - - -
51bea047 by Tony Chemit at 2024-09-18T11:56:58+02:00
Amélioration des poids +10/-10 et total des échantillons lors de l'import AVDTH - Closes #2918
- - - - -
808ef7b1 by Tony Chemit at 2024-09-18T13:01:37+02:00
Review server API doc (use now json validation files)
- - - - -
69ea51b1 by Tony Chemit at 2024-09-18T13:02:30+02:00
Update server API doc
- - - - -
039186d7 by Tony Chemit at 2024-09-18T16:48:25+02:00
[pom] Fix missing mapping.json files in jar - Closes #2935
- - - - -
a9155281 by Tony Chemit at 2024-09-18T16:48:35+02:00
[pom] Remove any dependencies to legacy validators and xwork and ognl \o/
- - - - -
1377258e by Tony Chemit at 2024-09-18T16:48:35+02:00
[toolkit-api-validation] Remove legacy validators
- - - - -
003b1b75 by Tony Chemit at 2024-09-18T16:48:35+02:00
[toolkit-templates] Remove legacy templates and rename GenerateCollectionUniqueKeyValidators2 to GenerateCollectionUniqueKeyValidators
- - - - -
0e26cd7c by Tony Chemit at 2024-09-18T16:48:35+02:00
[core-api-dto-validation] Remove legacy validators
- - - - -
68bc03b7 by Tony Chemit at 2024-09-18T16:48:35+02:00
[core-api-validation] Remove user legacy validation models
- - - - -
0b0c49e8 by Tony Chemit at 2024-09-18T16:48:35+02:00
[core-api-validation] Remove generated legacy validation models
- - - - -
f298b36e by Tony Chemit at 2024-09-18T16:48:36+02:00
[core-api-validation] Review tests
- - - - -
9c747f55 by Tony Chemit at 2024-09-18T16:48:36+02:00
[core-dto-api-validation] Update generated validators
- - - - -
6c01a9ab by Tony Chemit at 2024-09-18T16:48:36+02:00
[core-services-test] Adapt tests
- - - - -
ce1f84a3 by Tony Chemit at 2024-09-18T16:48:36+02:00
[server-configuration] Always use default validator factory name
- - - - -
2cabc480 by Tony Chemit at 2024-09-18T16:48:36+02:00
[client-configuration] Always use default validator factory name, remove hidden option to switch validation factory name
- - - - -
b3325b9b by Tony Chemit at 2024-09-18T16:48:36+02:00
[client-datasource-editor-xx-validation] Remove legacy validation resources
- - - - -
bab7b2c7 by Tony Chemit at 2024-09-18T16:49:20+02:00
Merge branch 'feature/remove-xwork' into develop-9.3.x
That's it xwork/ognl are dead - See #2594
- - - - -
d2b0e347 by Tony Chemit at 2024-09-18T17:04:01+02:00
Update changelog for v.9.3.7 [skip CI]
- - - - -
a6f03145 by Tony Chemit at 2024-09-19T10:12:08+02:00
Make deploy war works again \o/
- - - - -
e37ae573 by Tony Chemit at 2024-09-19T10:12:49+02:00
Unify profile name for tests
- - - - -
917af5ec by Tony Chemit at 2024-09-19T10:13:17+02:00
Add minor property to deploy at a better place
- - - - -
7edb83ea by Tony Chemit at 2024-09-19T10:13:35+02:00
Improve deploy release process
- - - - -
2a56a795 by Tony Chemit at 2024-09-19T12:11:14+02:00
Fix validation mapping.json file location
- - - - -
ece42953 by Tony Chemit at 2024-09-19T12:11:15+02:00
update pom
- - - - -
be40090b by Tony Chemit at 2024-09-19T12:11:15+02:00
Mettre à null le commentaire Activity.comment si celui ci n'est constitué que d'espaces - Closes #2923
- - - - -
9afdaf04 by Tony Chemit at 2024-09-19T12:15:14+02:00
Mettre à null le commentaire Batch.comment si celui ci n'est constitué que d'espaces - Closes #2923
- - - - -
e6da8389 by Tony Chemit at 2024-09-19T14:47:40+02:00
Do it for Report adapters (add some equals on Parameters to be able to test them) - See #2938
- - - - -
0ba99c91 by Tony Chemit at 2024-09-19T15:07:42+02:00
L'action n'est active que si une source de donnée est active - See #2826
- - - - -
6e3ae6ea by Tony Chemit at 2024-09-19T15:08:53+02:00
[jgitflow-maven-plugin]updating poms for 9.3.7 branch with snapshot versions[skip ci]
- - - - -
e39e3b43 by Tony Chemit at 2024-09-19T15:09:13+02:00
[jgitflow-maven-plugin]updating poms for branch'release/9.3.7' with non-snapshot versions[skip ci]
- - - - -
19ffbdb3 by Tony Chemit at 2024-09-19T15:25:53+02:00
[jgitflow-maven-plugin]merging 'release/9.3.7' into 'master-9.3.x'
- - - - -
30 changed files:
- .gitlab-ci.yml
- .mvn/pom.gitflow.develop
- .mvn/pom.gitflow.master
- CHANGELOG.md
- client/.mvn/pom.gitflow.develop
- client/.mvn/pom.gitflow.master
- client/configuration/.mvn/pom.gitflow.develop
- client/configuration/.mvn/pom.gitflow.master
- client/configuration/pom.xml
- client/configuration/src/main/config/Client.ini
- client/configuration/src/main/dcp-presets/ps/common/01-standard-fad-deployment-preset.yml → client/configuration/src/main/dcp-presets/01-standard-fad-deployment-preset.yml
- client/configuration/src/main/dcp-presets/ps/common/02-standard-fad-removal-preset.yml → client/configuration/src/main/dcp-presets/02-standard-fad-removal-preset.yml
- client/configuration/src/main/dcp-presets/ps/common/03-standard-fad-update-preset.yml → client/configuration/src/main/dcp-presets/03-standard-fad-update-preset.yml
- client/configuration/src/main/dcp-presets/ps/common/04-standard-fad-abandonned-preset.yml → client/configuration/src/main/dcp-presets/04-standard-fad-abandonned-preset.yml
- client/configuration/src/main/dcp-presets/ps/common/05-standard-fad-endOfUse-preset.yml → client/configuration/src/main/dcp-presets/05-standard-fad-endOfUse-preset.yml
- client/configuration/src/main/dcp-presets/ps/common/README.TXT → client/configuration/src/main/dcp-presets/README.TXT
- − client/configuration/src/main/dcp-presets/ps/logbook/README.TXT
- − client/configuration/src/main/dcp-presets/ps/observation/README.TXT
- client/configuration/src/main/filtered-resources/log4j2.xml
- client/configuration/src/main/filtered-resources/observe-log4j2.xml
- client/configuration/src/main/i18n/getters/config.getter
- client/configuration/src/main/i18n/getters/java.getter
- − client/configuration/src/main/java/fr/ird/observe/client/ObServeSwingSessionConfig.java
- − client/configuration/src/main/java/fr/ird/observe/client/ObserveSwingSession.java
- client/configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java
- client/configuration/src/main/java/fr/ird/observe/client/configuration/ClientResources.java
- client/configuration/src/test/java/fr/ird/observe/client/configuration/ClientConfigTest.java
- client/core/.mvn/pom.gitflow.develop
- client/core/.mvn/pom.gitflow.master
- client/core/pom.xml
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/ce49c8070caa701177444851…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/ce49c8070caa701177444851…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-9.3.x] 6 commits: [jgitflow-maven-plugin]updating poms for 9.3.7 branch with snapshot versions[skip ci]
by Tony CHEMIT (@tchemit) 19 Sep '24
by Tony CHEMIT (@tchemit) 19 Sep '24
19 Sep '24
Tony CHEMIT pushed to branch develop-9.3.x at ultreiaio / ird-observe
Commits:
6e3ae6ea by Tony Chemit at 2024-09-19T15:08:53+02:00
[jgitflow-maven-plugin]updating poms for 9.3.7 branch with snapshot versions[skip ci]
- - - - -
e39e3b43 by Tony Chemit at 2024-09-19T15:09:13+02:00
[jgitflow-maven-plugin]updating poms for branch'release/9.3.7' with non-snapshot versions[skip ci]
- - - - -
19ffbdb3 by Tony Chemit at 2024-09-19T15:25:53+02:00
[jgitflow-maven-plugin]merging 'release/9.3.7' into 'master-9.3.x'
- - - - -
2aef187f by Tony Chemit at 2024-09-19T15:25:58+02:00
[jgitflow-maven-plugin]updating develop poms to master versions to avoid merge conflicts[skip ci]
- - - - -
787d1488 by Tony Chemit at 2024-09-19T15:25:59+02:00
[jgitflow-maven-plugin]merging 'master-9.3.x' into 'develop-9.3.x'
- - - - -
9e9dcd0e by Tony Chemit at 2024-09-19T15:26:00+02:00
[jgitflow-maven-plugin]Updating develop poms back to pre merge state[skip ci]
- - - - -
0 changed files:
Changes:
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/1864a030ebc18581253dc2c6…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/1864a030ebc18581253dc2c6…
You're receiving this email because of your account on gitlab.com.
1
0
19 Sep '24
Tony CHEMIT pushed new branch release/9.3.7 at ultreiaio / ird-observe
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/tree/release/9.3.7
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-9.3.x] [jgitflow-maven-plugin]updating poms for 9.3.8-SNAPSHOT development[skip ci]
by Tony CHEMIT (@tchemit) 19 Sep '24
by Tony CHEMIT (@tchemit) 19 Sep '24
19 Sep '24
Tony CHEMIT pushed to branch develop-9.3.x at ultreiaio / ird-observe
Commits:
1864a030 by Tony Chemit at 2024-09-19T15:08:54+02:00
[jgitflow-maven-plugin]updating poms for 9.3.8-SNAPSHOT development[skip ci]
- - - - -
30 changed files:
- client/configuration/pom.xml
- client/core/pom.xml
- client/datasource/actions/pom.xml
- client/datasource/editor/api-test/pom.xml
- client/datasource/editor/api/pom.xml
- client/datasource/editor/common/pom.xml
- client/datasource/editor/ll-validation/pom.xml
- client/datasource/editor/ll/pom.xml
- client/datasource/editor/pom.xml
- client/datasource/editor/ps-validation/pom.xml
- client/datasource/editor/ps/pom.xml
- client/datasource/editor/spi/pom.xml
- client/datasource/pom.xml
- client/pom.xml
- client/runner/pom.xml
- core/api/dto-consolidation/pom.xml
- core/api/dto-decoration/pom.xml
- core/api/dto-pairing/pom.xml
- core/api/dto-validation/pom.xml
- core/api/dto/pom.xml
- core/api/pom.xml
- core/api/services/pom.xml
- core/api/tree/pom.xml
- core/api/validation/pom.xml
- core/persistence/avdth/pom.xml
- core/persistence/consolidation/pom.xml
- core/persistence/decoration/pom.xml
- core/persistence/java/pom.xml
- core/persistence/migration/pom.xml
- core/persistence/pom.xml
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/1864a030ebc18581253dc2c68…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/1864a030ebc18581253dc2c68…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-9.3.x] L'action n'est active que si une source de donnée est active - See #2826
by Tony CHEMIT (@tchemit) 19 Sep '24
by Tony CHEMIT (@tchemit) 19 Sep '24
19 Sep '24
Tony CHEMIT pushed to branch develop-9.3.x at ultreiaio / ird-observe
Commits:
0ba99c91 by Tony Chemit at 2024-09-19T15:07:42+02:00
L'action n'est active que si une source de donnée est active - See #2826
- - - - -
5 changed files:
- client/core/src/main/java/fr/ird/observe/client/datasource/api/ObserveDataSourcesManager.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetsUIBodyContent.java
- client/runner/src/main/i18n/translations/client-runner_en_GB.properties
- client/runner/src/main/i18n/translations/client-runner_es_ES.properties
- client/runner/src/main/i18n/translations/client-runner_fr_FR.properties
Changes:
=====================================
client/core/src/main/java/fr/ird/observe/client/datasource/api/ObserveDataSourcesManager.java
=====================================
@@ -38,6 +38,8 @@ import fr.ird.observe.decoration.DecoratorService;
import fr.ird.observe.navigation.id.Project;
import fr.ird.observe.server.security.InvalidAuthenticationTokenException;
import fr.ird.observe.services.ObserveServiceMainFactory;
+import io.ultreia.java4all.bean.AbstractJavaBean;
+import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition;
import io.ultreia.java4all.i18n.I18n;
import io.ultreia.java4all.util.sql.SqlScript;
import org.apache.logging.log4j.LogManager;
@@ -60,9 +62,11 @@ import java.util.UUID;
* @author Tony Chemit - dev(a)tchemit.fr
* @since 5.0
*/
-public class ObserveDataSourcesManager implements Closeable {
+@GenerateJavaBeanDefinition
+public class ObserveDataSourcesManager extends AbstractJavaBean implements Closeable {
private static final Logger log = LogManager.getLogger(ObserveDataSourcesManager.class);
+ public static final String PROPERTY_MAIN_DATA_SOURCE = "mainDataSource";
private final List<ObserveSwingDataSource> dataSources = new LinkedList<>();
private final ClientConfig config;
private final ObserveServiceMainFactory serviceFactory;
@@ -149,6 +153,7 @@ public class ObserveDataSourcesManager implements Closeable {
public void setMainDataSource(ObserveSwingDataSource dataSource) {
this.dataSource = dataSource;
+ firePropertyChange(PROPERTY_MAIN_DATA_SOURCE, dataSource);
}
public Optional<ObserveSwingDataSource> getOptionalMainDataSource() {
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetsUIBodyContent.java
=====================================
@@ -24,6 +24,7 @@ package fr.ird.observe.client.datasource.editor.ps.data.dcp.presets;
import com.google.auto.service.AutoService;
import fr.ird.observe.client.ObserveSwingApplicationContext;
+import fr.ird.observe.client.datasource.api.ObserveDataSourcesManager;
import fr.ird.observe.client.datasource.api.ObserveSwingDataSource;
import fr.ird.observe.client.datasource.editor.ps.data.dcp.actions.ShowFloatingObjectPresetsUI;
import fr.ird.observe.client.main.ObserveMainUI;
@@ -31,6 +32,7 @@ import fr.ird.observe.client.main.body.MainUIBodyContent;
import io.ultreia.java4all.util.SingletonSupplier;
import org.nuiton.jaxx.runtime.context.JAXXInitialContext;
+import javax.swing.JMenuItem;
import java.util.function.Supplier;
/**
@@ -65,6 +67,13 @@ public class FloatingObjectPresetsUIBodyContent extends MainUIBodyContent<Floati
@Override
public void install(ObserveMainUI mainUI) {
super.install(mainUI);
- ShowFloatingObjectPresetsUI.init(mainUI, mainUI.getShowFloatingObjectPresets(), new ShowFloatingObjectPresetsUI());
+ ObserveSwingApplicationContext applicationContext = (ObserveSwingApplicationContext) ObserveSwingApplicationContext.get();
+ ObserveDataSourcesManager dataSourcesManager = applicationContext.getDataSourcesManager();
+ JMenuItem editor = mainUI.getShowFloatingObjectPresets();
+ dataSourcesManager.addPropertyChangeListener(ObserveDataSourcesManager.PROPERTY_MAIN_DATA_SOURCE, evt -> {
+ ObserveSwingDataSource newValue = (ObserveSwingDataSource) evt.getNewValue();
+ editor.setEnabled(newValue != null);
+ });
+ ShowFloatingObjectPresetsUI.init(mainUI, editor, new ShowFloatingObjectPresetsUI());
}
}
=====================================
client/runner/src/main/i18n/translations/client-runner_en_GB.properties
=====================================
@@ -398,7 +398,7 @@ observe.ui.action.exit=Quit
observe.ui.action.exit.tip=quit Observe
observe.ui.action.export.tip=Export
observe.ui.action.floatingObjectPresets=Manage floating object presets
-observe.ui.action.floatingObjectPresets.tip=Manage floating object presets
+observe.ui.action.floatingObjectPresets.tip=Manage floating object presets (requires an open data source)
observe.ui.action.goDown.tip=Go down in navigation tree
observe.ui.action.goUp.tip=Go up in navigation tree
observe.ui.action.goto.next.stage=Next step
=====================================
client/runner/src/main/i18n/translations/client-runner_es_ES.properties
=====================================
@@ -398,7 +398,7 @@ observe.ui.action.exit=Salir
observe.ui.action.exit.tip=Salir de ObServe
observe.ui.action.export.tip=Export
observe.ui.action.floatingObjectPresets=Manage floating object presets \#TODO
-observe.ui.action.floatingObjectPresets.tip=Manage floating object presets \#TODO
+observe.ui.action.floatingObjectPresets.tip=Manage floating object presets (requires an open data source) \#TODO
observe.ui.action.goDown.tip=Descender hacia etapas porteriores
observe.ui.action.goUp.tip=Ascender hacia etapas anteriores
observe.ui.action.goto.next.stage=Siguiente
=====================================
client/runner/src/main/i18n/translations/client-runner_fr_FR.properties
=====================================
@@ -398,7 +398,7 @@ observe.ui.action.exit=Quitter
observe.ui.action.exit.tip=Quitter ObServe
observe.ui.action.export.tip=Exporter
observe.ui.action.floatingObjectPresets=Gérer les objets flottants de référence
-observe.ui.action.floatingObjectPresets.tip=Gérer les objets flottants de référence
+observe.ui.action.floatingObjectPresets.tip=Gérer les objets flottants de référence (nécessite une source de données ouverte)
observe.ui.action.goDown.tip=Descendre dans la navigation
observe.ui.action.goUp.tip=Remonter dans la navigation
observe.ui.action.goto.next.stage=Suivant
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/0ba99c91aeb12044cebfefe92…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/0ba99c91aeb12044cebfefe92…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] L'action n'est active que si une source de donnée est active - See #2826
by Tony CHEMIT (@tchemit) 19 Sep '24
by Tony CHEMIT (@tchemit) 19 Sep '24
19 Sep '24
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
82041437 by Tony Chemit at 2024-09-19T15:07:24+02:00
L'action n'est active que si une source de donnée est active - See #2826
- - - - -
5 changed files:
- client/core/src/main/java/fr/ird/observe/client/datasource/api/ObserveDataSourcesManager.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetsUIBodyContent.java
- client/runner/src/main/i18n/translations/client-runner_en_GB.properties
- client/runner/src/main/i18n/translations/client-runner_es_ES.properties
- client/runner/src/main/i18n/translations/client-runner_fr_FR.properties
Changes:
=====================================
client/core/src/main/java/fr/ird/observe/client/datasource/api/ObserveDataSourcesManager.java
=====================================
@@ -38,6 +38,8 @@ import fr.ird.observe.decoration.DecoratorService;
import fr.ird.observe.navigation.id.Project;
import fr.ird.observe.server.security.InvalidAuthenticationTokenException;
import fr.ird.observe.services.ObserveServiceMainFactory;
+import io.ultreia.java4all.bean.AbstractJavaBean;
+import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition;
import io.ultreia.java4all.i18n.I18n;
import io.ultreia.java4all.util.sql.SqlScript;
import org.apache.logging.log4j.LogManager;
@@ -60,9 +62,11 @@ import java.util.UUID;
* @author Tony Chemit - dev(a)tchemit.fr
* @since 5.0
*/
-public class ObserveDataSourcesManager implements Closeable {
+@GenerateJavaBeanDefinition
+public class ObserveDataSourcesManager extends AbstractJavaBean implements Closeable {
private static final Logger log = LogManager.getLogger(ObserveDataSourcesManager.class);
+ public static final String PROPERTY_MAIN_DATA_SOURCE = "mainDataSource";
private final List<ObserveSwingDataSource> dataSources = new LinkedList<>();
private final ClientConfig config;
private final ObserveServiceMainFactory serviceFactory;
@@ -149,6 +153,7 @@ public class ObserveDataSourcesManager implements Closeable {
public void setMainDataSource(ObserveSwingDataSource dataSource) {
this.dataSource = dataSource;
+ firePropertyChange(PROPERTY_MAIN_DATA_SOURCE, dataSource);
}
public Optional<ObserveSwingDataSource> getOptionalMainDataSource() {
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetsUIBodyContent.java
=====================================
@@ -24,6 +24,7 @@ package fr.ird.observe.client.datasource.editor.ps.data.dcp.presets;
import com.google.auto.service.AutoService;
import fr.ird.observe.client.ObserveSwingApplicationContext;
+import fr.ird.observe.client.datasource.api.ObserveDataSourcesManager;
import fr.ird.observe.client.datasource.api.ObserveSwingDataSource;
import fr.ird.observe.client.datasource.editor.ps.data.dcp.actions.ShowFloatingObjectPresetsUI;
import fr.ird.observe.client.main.ObserveMainUI;
@@ -31,6 +32,7 @@ import fr.ird.observe.client.main.body.MainUIBodyContent;
import io.ultreia.java4all.util.SingletonSupplier;
import org.nuiton.jaxx.runtime.context.JAXXInitialContext;
+import javax.swing.JMenuItem;
import java.util.function.Supplier;
/**
@@ -65,6 +67,13 @@ public class FloatingObjectPresetsUIBodyContent extends MainUIBodyContent<Floati
@Override
public void install(ObserveMainUI mainUI) {
super.install(mainUI);
- ShowFloatingObjectPresetsUI.init(mainUI, mainUI.getShowFloatingObjectPresets(), new ShowFloatingObjectPresetsUI());
+ ObserveSwingApplicationContext applicationContext = (ObserveSwingApplicationContext) ObserveSwingApplicationContext.get();
+ ObserveDataSourcesManager dataSourcesManager = applicationContext.getDataSourcesManager();
+ JMenuItem editor = mainUI.getShowFloatingObjectPresets();
+ dataSourcesManager.addPropertyChangeListener(ObserveDataSourcesManager.PROPERTY_MAIN_DATA_SOURCE, evt -> {
+ ObserveSwingDataSource newValue = (ObserveSwingDataSource) evt.getNewValue();
+ editor.setEnabled(newValue != null);
+ });
+ ShowFloatingObjectPresetsUI.init(mainUI, editor, new ShowFloatingObjectPresetsUI());
}
}
=====================================
client/runner/src/main/i18n/translations/client-runner_en_GB.properties
=====================================
@@ -399,7 +399,7 @@ observe.ui.action.exit=Quit
observe.ui.action.exit.tip=quit Observe
observe.ui.action.export.tip=Export
observe.ui.action.floatingObjectPresets=Manage floating object presets
-observe.ui.action.floatingObjectPresets.tip=Manage floating object presets
+observe.ui.action.floatingObjectPresets.tip=Manage floating object presets (requires an open data source)
observe.ui.action.goDown.tip=Go down in navigation tree
observe.ui.action.goUp.tip=Go up in navigation tree
observe.ui.action.goto.next.stage=Next step
=====================================
client/runner/src/main/i18n/translations/client-runner_es_ES.properties
=====================================
@@ -399,7 +399,7 @@ observe.ui.action.exit=Salir
observe.ui.action.exit.tip=Salir de ObServe
observe.ui.action.export.tip=Export
observe.ui.action.floatingObjectPresets=Manage floating object presets \#TODO
-observe.ui.action.floatingObjectPresets.tip=Manage floating object presets \#TODO
+observe.ui.action.floatingObjectPresets.tip=Manage floating object presets (requires an open data source) \#TODO
observe.ui.action.goDown.tip=Descender hacia etapas porteriores
observe.ui.action.goUp.tip=Ascender hacia etapas anteriores
observe.ui.action.goto.next.stage=Siguiente
=====================================
client/runner/src/main/i18n/translations/client-runner_fr_FR.properties
=====================================
@@ -399,7 +399,7 @@ observe.ui.action.exit=Quitter
observe.ui.action.exit.tip=Quitter ObServe
observe.ui.action.export.tip=Exporter
observe.ui.action.floatingObjectPresets=Gérer les objets flottants de référence
-observe.ui.action.floatingObjectPresets.tip=Gérer les objets flottants de référence
+observe.ui.action.floatingObjectPresets.tip=Gérer les objets flottants de référence (nécessite une source de données ouverte)
observe.ui.action.goDown.tip=Descendre dans la navigation
observe.ui.action.goUp.tip=Remonter dans la navigation
observe.ui.action.goto.next.stage=Suivant
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/820414376fb4b9d08df15ac7c…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/820414376fb4b9d08df15ac7c…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-9.3.x] 2 commits: Do it for Report adapters (add some equals on Parameters to be able to test them) - See #2938
by Tony CHEMIT (@tchemit) 19 Sep '24
by Tony CHEMIT (@tchemit) 19 Sep '24
19 Sep '24
Tony CHEMIT pushed to branch develop-9.3.x at ultreiaio / ird-observe
Commits:
e6da8389 by Tony Chemit at 2024-09-19T14:47:40+02:00
Do it for Report adapters (add some equals on Parameters to be able to test them) - See #2938
- - - - -
250b74cd by Tony Chemit at 2024-09-19T15:03:07+02:00
L'action n'est active que si une source de donnée est active - See #2826
- - - - -
12 changed files:
- client/core/src/main/java/fr/ird/observe/client/datasource/api/ObserveDataSourcesManager.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetsUIBodyContent.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/ReportVariableSupport.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/json/ReportRepeatVariableAdapter.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/json/ReportVariableAdapter.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/json/ReportVariableSupportAdapter.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/renderers/HighlightIfAbsoluteDeltaIsPositive.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/renderers/HighlightIfEquals18nReferentialValue.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/renderers/HighlightIfNumericalValueIsPositive.java
- + toolkit/api-report/src/test/java/fr/ird/observe/report/json/ReportColumnRenderersParametersAdapterTest.java
- + toolkit/api-report/src/test/java/fr/ird/observe/report/json/ReportRepeatVariableAdapterTest.java
- + toolkit/api-report/src/test/java/fr/ird/observe/report/json/ReportVariableAdapterTest.java
Changes:
=====================================
client/core/src/main/java/fr/ird/observe/client/datasource/api/ObserveDataSourcesManager.java
=====================================
@@ -38,6 +38,8 @@ import fr.ird.observe.decoration.DecoratorService;
import fr.ird.observe.navigation.id.Project;
import fr.ird.observe.server.security.InvalidAuthenticationTokenException;
import fr.ird.observe.services.ObserveServiceMainFactory;
+import io.ultreia.java4all.bean.AbstractJavaBean;
+import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition;
import io.ultreia.java4all.i18n.I18n;
import io.ultreia.java4all.util.sql.SqlScript;
import org.apache.logging.log4j.LogManager;
@@ -60,9 +62,11 @@ import java.util.UUID;
* @author Tony Chemit - dev(a)tchemit.fr
* @since 5.0
*/
-public class ObserveDataSourcesManager implements Closeable {
+@GenerateJavaBeanDefinition
+public class ObserveDataSourcesManager extends AbstractJavaBean implements Closeable {
private static final Logger log = LogManager.getLogger(ObserveDataSourcesManager.class);
+ public static final String PROPERTY_MAIN_DATA_SOURCE = "mainDataSource";
private final List<ObserveSwingDataSource> dataSources = new LinkedList<>();
private final ClientConfig config;
private final ObserveServiceMainFactory serviceFactory;
@@ -149,6 +153,7 @@ public class ObserveDataSourcesManager implements Closeable {
public void setMainDataSource(ObserveSwingDataSource dataSource) {
this.dataSource = dataSource;
+ firePropertyChange(PROPERTY_MAIN_DATA_SOURCE, dataSource);
}
public Optional<ObserveSwingDataSource> getOptionalMainDataSource() {
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetsUIBodyContent.java
=====================================
@@ -24,6 +24,7 @@ package fr.ird.observe.client.datasource.editor.ps.data.dcp.presets;
import com.google.auto.service.AutoService;
import fr.ird.observe.client.ObserveSwingApplicationContext;
+import fr.ird.observe.client.datasource.api.ObserveDataSourcesManager;
import fr.ird.observe.client.datasource.api.ObserveSwingDataSource;
import fr.ird.observe.client.datasource.editor.ps.data.dcp.actions.ShowFloatingObjectPresetsUI;
import fr.ird.observe.client.main.ObserveMainUI;
@@ -31,6 +32,7 @@ import fr.ird.observe.client.main.body.MainUIBodyContent;
import io.ultreia.java4all.util.SingletonSupplier;
import org.nuiton.jaxx.runtime.context.JAXXInitialContext;
+import javax.swing.JMenuItem;
import java.util.function.Supplier;
/**
@@ -65,6 +67,13 @@ public class FloatingObjectPresetsUIBodyContent extends MainUIBodyContent<Floati
@Override
public void install(ObserveMainUI mainUI) {
super.install(mainUI);
- ShowFloatingObjectPresetsUI.init(mainUI, mainUI.getShowFloatingObjectPresets(), new ShowFloatingObjectPresetsUI());
+ ObserveSwingApplicationContext applicationContext = (ObserveSwingApplicationContext) ObserveSwingApplicationContext.get();
+ ObserveDataSourcesManager dataSourcesManager = applicationContext.getDataSourcesManager();
+ JMenuItem editor = mainUI.getShowFloatingObjectPresets();
+ dataSourcesManager.addPropertyChangeListener(ObserveDataSourcesManager.PROPERTY_MAIN_DATA_SOURCE, evt -> {
+ ObserveSwingDataSource newValue = (ObserveSwingDataSource) evt.getNewValue();
+ editor.setEnabled(newValue != null);
+ });
+ ShowFloatingObjectPresetsUI.init(mainUI, editor, new ShowFloatingObjectPresetsUI());
}
}
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/ReportVariableSupport.java
=====================================
@@ -64,6 +64,10 @@ public abstract class ReportVariableSupport<V, D extends ReportVariableDefinitio
return definition().getName();
}
+ public final String getComment() {
+ return definition().getComment();
+ }
+
public final Class<V> getType() {
return definition().getType();
}
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/json/ReportRepeatVariableAdapter.java
=====================================
@@ -23,15 +23,10 @@ package fr.ird.observe.report.json;
*/
import com.google.auto.service.AutoService;
-import com.google.gson.JsonDeserializationContext;
-import com.google.gson.JsonObject;
-import com.google.gson.reflect.TypeToken;
import fr.ird.observe.report.ReportRepeatVariable;
import fr.ird.observe.report.definition.ReportRepeatVariableDefinition;
import io.ultreia.java4all.util.json.JsonAdapter;
-import java.lang.reflect.Type;
-
/**
* Created on 14/12/2022.
*
@@ -46,16 +41,4 @@ public class ReportRepeatVariableAdapter<V> extends ReportVariableSupportAdapter
return ReportRepeatVariable.class;
}
- @Override
- protected Type definitionType() {
- return new TypeToken<ReportRepeatVariableDefinition<V>>() {
- }.getType();
- }
-
- @Override
- protected ReportRepeatVariable<V> deserialize(JsonDeserializationContext context, JsonObject jsonObject, ReportRepeatVariableDefinition<V> definition) {
- ReportRepeatVariable<V> result = new ReportRepeatVariable<>(definition);
- deserializeValues(context, jsonObject, result);
- return result;
- }
}
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/json/ReportVariableAdapter.java
=====================================
@@ -27,13 +27,11 @@ import com.google.auto.service.AutoService;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
-import com.google.gson.reflect.TypeToken;
+import com.google.gson.JsonSerializationContext;
import fr.ird.observe.report.ReportVariable;
import fr.ird.observe.report.definition.ReportVariableDefinition;
import io.ultreia.java4all.util.json.JsonAdapter;
-import java.lang.reflect.Type;
-
/**
* @author Tony Chemit - dev(a)tchemit.fr
*/
@@ -46,22 +44,24 @@ public class ReportVariableAdapter<V> extends ReportVariableSupportAdapter<V, Re
}
@Override
- protected Type definitionType() {
- return new TypeToken<ReportVariableDefinition<V>>() {
- }.getType();
+ protected void deserialize(JsonDeserializationContext context, JsonObject jsonObject, ReportVariable<V> variable) {
+ super.deserialize(context, jsonObject, variable);
+ deserializeSelectedValue(context, jsonObject, variable);
}
@Override
- protected ReportVariable<V> deserialize(JsonDeserializationContext context, JsonObject jsonObject, ReportVariableDefinition<V> definition) {
- ReportVariable<V> result = new ReportVariable<>(definition);
- deserializeValues(context, jsonObject, result);
- deserializeSelectedValue(context, jsonObject, result);
- return result;
+ public void serialize(ReportVariable<V> src, JsonSerializationContext context, JsonObject jsonObject) {
+ super.serialize(src, context, jsonObject);
+ if (src.getSelectedValue() != null) {
+ jsonObject.add(ReportVariable.PROPERTY_SELECTED_VALUE, context.serialize(src.getSelectedValue()));
+ }
}
protected void deserializeSelectedValue(JsonDeserializationContext context, JsonObject jsonObject, ReportVariable<V> variable) {
JsonElement json = jsonObject.get(ReportVariable.PROPERTY_SELECTED_VALUE);
- V selectedValue = deserializeValue(context, variable.getType(), json);
- variable.setSelectedValue(selectedValue);
+ if (json != null) {
+ V selectedValue = deserializeValue(context, variable.getType(), json);
+ variable.setSelectedValue(selectedValue);
+ }
}
}
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/json/ReportVariableSupportAdapter.java
=====================================
@@ -28,6 +28,9 @@ import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
+import com.google.gson.JsonSerializationContext;
+import com.google.gson.JsonSerializer;
+import com.google.gson.reflect.TypeToken;
import fr.ird.observe.report.ReportVariableSupport;
import fr.ird.observe.report.definition.ReportVariableDefinitionSupport;
import io.ultreia.java4all.util.json.JsonAdapter;
@@ -44,21 +47,38 @@ import java.util.Set;
* @author Tony Chemit - dev(a)tchemit.fr
* @since 9.0.22
*/
-public abstract class ReportVariableSupportAdapter<V, D extends ReportVariableDefinitionSupport<V>, R extends ReportVariableSupport<V, D>> implements JsonAdapter, JsonDeserializer<R> {
+public abstract class ReportVariableSupportAdapter<V, D extends ReportVariableDefinitionSupport<V>, R extends ReportVariableSupport<V, D>> implements JsonAdapter, JsonSerializer<R>, JsonDeserializer<R> {
- protected abstract Type definitionType();
+ @Override
+ public JsonElement serialize(R src, Type typeOfSrc, JsonSerializationContext context) {
+ JsonObject jsonObject = new JsonObject();
+ jsonObject.add("V", context.serialize(src.definition().getType()));
+ jsonObject.add("D", context.serialize(src.definition().getClass()));
+ serialize(src, context, jsonObject);
+ return jsonObject;
+ }
- protected abstract R deserialize(JsonDeserializationContext context, JsonObject jsonObject, D definition);
+ protected void serialize(R src, JsonSerializationContext context, JsonObject jsonObject) {
+ jsonObject.add(ReportVariableSupport.PROPERTY_DEFINITION, context.serialize(src.definition()));
+ jsonObject.add(ReportVariableSupport.PROPERTY_VALUES, context.serialize(src.getValues()));
+ }
@Override
public final R deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
JsonObject jsonObject = json.getAsJsonObject();
- D definition = deserializeDefinition(context, jsonObject);
- return deserialize(context, jsonObject, definition);
+ Class<V> vType = context.deserialize(jsonObject.get("V"), Class.class);
+ Class<D> dType = context.deserialize(jsonObject.get("D"), Class.class);
+ Type definitionType = TypeToken.getParameterized(dType, vType).getType();
+
+ D definition = context.deserialize(jsonObject.get(ReportVariableSupport.PROPERTY_DEFINITION), definitionType);
+ @SuppressWarnings("unchecked") R variable = (R) definition.toVariable();
+
+ deserialize(context, jsonObject, variable);
+ return variable;
}
- protected D deserializeDefinition(JsonDeserializationContext context, JsonObject jsonObject) {
- return context.deserialize(jsonObject.get(ReportVariableSupport.PROPERTY_DEFINITION), definitionType());
+ protected void deserialize(JsonDeserializationContext context, JsonObject jsonObject, R variable) {
+ deserializeValues(context, jsonObject, variable);
}
protected void deserializeValues(JsonDeserializationContext context, JsonObject jsonObject, R variable) {
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/renderers/HighlightIfAbsoluteDeltaIsPositive.java
=====================================
@@ -31,6 +31,7 @@ import org.jdesktop.swingx.decorator.ComponentAdapter;
import org.jdesktop.swingx.decorator.HighlightPredicate;
import java.awt.Component;
+import java.util.Objects;
import static fr.ird.observe.report.renderers.HighlightIfAbsoluteDeltaIsPositive.Parameters;
@@ -116,6 +117,19 @@ public class HighlightIfAbsoluteDeltaIsPositive implements ColumnRendererConsume
public double getErrorThreshHold() {
return errorThreshHold;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof Parameters)) return false;
+ Parameters that = (Parameters) o;
+ return getColumn1() == that.getColumn1() && getColumn2() == that.getColumn2() && Double.compare(getWarningThreshHold(), that.getWarningThreshHold()) == 0 && Double.compare(getErrorThreshHold(), that.getErrorThreshHold()) == 0;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(getColumn1(), getColumn2(), getWarningThreshHold(), getErrorThreshHold());
+ }
}
static class ParametersHighlightPredicate implements HighlightPredicate {
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/renderers/HighlightIfEquals18nReferentialValue.java
=====================================
@@ -155,5 +155,18 @@ public class HighlightIfEquals18nReferentialValue implements ColumnRendererConsu
public Parameters setLabel(String labelError, String labelOk) {
return new Parameters(columns, idError, idOk, labelError, labelOk);
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof Parameters)) return false;
+ Parameters that = (Parameters) o;
+ return Objects.equals(getColumns(), that.getColumns()) && Objects.equals(getIdError(), that.getIdError()) && Objects.equals(getIdOk(), that.getIdOk()) && Objects.equals(getLabelError(), that.getLabelError()) && Objects.equals(getLabelOk(), that.getLabelOk());
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(getColumns(), getIdError(), getIdOk(), getLabelError(), getLabelOk());
+ }
}
}
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/renderers/HighlightIfNumericalValueIsPositive.java
=====================================
@@ -31,6 +31,7 @@ import org.jdesktop.swingx.decorator.ComponentAdapter;
import org.jdesktop.swingx.decorator.HighlightPredicate;
import java.awt.Component;
+import java.util.Objects;
import static fr.ird.observe.report.renderers.HighlightIfNumericalValueIsPositive.Parameters;
@@ -110,6 +111,19 @@ public class HighlightIfNumericalValueIsPositive implements ColumnRendererConsum
public double getWarningThreshHold() {
return warningThreshHold;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof Parameters)) return false;
+ Parameters that = (Parameters) o;
+ return getColumn() == that.getColumn() && Double.compare(getWarningThreshHold(), that.getWarningThreshHold()) == 0 && Double.compare(getErrorThreshHold(), that.getErrorThreshHold()) == 0;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(getColumn(), getWarningThreshHold(), getErrorThreshHold());
+ }
}
static class ParametersHighlightPredicate implements HighlightPredicate {
=====================================
toolkit/api-report/src/test/java/fr/ird/observe/report/json/ReportColumnRenderersParametersAdapterTest.java
=====================================
@@ -0,0 +1,66 @@
+package fr.ird.observe.report.json;
+
+/*-
+ * #%L
+ * ObServe Toolkit :: API :: Report
+ * %%
+ * Copyright (C) 2008 - 2024 IRD, Ultreia.io
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import fr.ird.observe.report.ReportColumnRenderersParameters;
+import fr.ird.observe.report.renderers.HighlightIfAbsoluteDeltaIsPositive;
+import fr.ird.observe.report.renderers.HighlightIfEquals18nReferentialValue;
+import fr.ird.observe.report.renderers.HighlightIfNumericalValueIsPositive;
+import io.ultreia.java4all.util.json.JsonAdapterProvider;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.List;
+
+/**
+ * Created at 19/09/2024.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since 9.3.7
+ */
+public class ReportColumnRenderersParametersAdapterTest {
+
+ private static void assertEquals(ReportColumnRenderersParameters expected, ReportColumnRenderersParameters actual) {
+ Assert.assertEquals(expected.getColumnRendererParameters(), actual.getColumnRendererParameters());
+ }
+
+ @Test
+ public void test() {
+
+ GsonBuilder gsonBuilder = new GsonBuilder().serializeNulls().setPrettyPrinting();
+ JsonAdapterProvider.offers(gsonBuilder::registerTypeAdapter, gsonBuilder::registerTypeHierarchyAdapter);
+ Gson gson = gsonBuilder.create();
+
+ ReportColumnRenderersParameters expected = new ReportColumnRenderersParameters(List.of(
+ new HighlightIfAbsoluteDeltaIsPositive().parseParameters("0|1|0.5f|0.1f"),
+ new HighlightIfEquals18nReferentialValue().parseParameters("0,1,2|ok|error"),
+ new HighlightIfNumericalValueIsPositive().parseParameters("0|1.0f|2.5f")
+ ));
+
+ String json = gson.toJson(expected);
+ ReportColumnRenderersParameters actual = gson.fromJson(json, ReportColumnRenderersParameters.class);
+ assertEquals(expected, actual);
+ }
+}
=====================================
toolkit/api-report/src/test/java/fr/ird/observe/report/json/ReportRepeatVariableAdapterTest.java
=====================================
@@ -0,0 +1,74 @@
+package fr.ird.observe.report.json;
+
+/*-
+ * #%L
+ * ObServe Toolkit :: API :: Report
+ * %%
+ * Copyright (C) 2008 - 2024 IRD, Ultreia.io
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.reflect.TypeToken;
+import fr.ird.observe.report.ReportRepeatVariable;
+import fr.ird.observe.report.definition.ReportRepeatVariableDefinition;
+import io.ultreia.java4all.util.json.JsonAdapterProvider;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Set;
+
+/**
+ * Created at 19/09/2024.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since 9.3.7
+ */
+public class ReportRepeatVariableAdapterTest {
+
+ private static <V> void assertEquals(ReportRepeatVariable<V> expected, ReportRepeatVariable<V> actual) {
+ Assert.assertEquals(expected.definition(), actual.definition());
+ Assert.assertEquals(expected.getName(), actual.getName());
+ Assert.assertEquals(expected.getRequest(), actual.getRequest());
+ Assert.assertEquals(expected.getComment(), actual.getComment());
+ Assert.assertEquals(expected.getType(), actual.getType());
+ Assert.assertEquals(expected.getValues(), actual.getValues());
+ Assert.assertEquals(expected.isAddNullValue(), actual.isAddNullValue());
+ }
+
+ @Test
+ public void test() {
+
+ GsonBuilder gsonBuilder = new GsonBuilder().serializeNulls().setPrettyPrinting();
+ JsonAdapterProvider.offers(gsonBuilder::registerTypeAdapter, gsonBuilder::registerTypeHierarchyAdapter);
+ Gson gson = gsonBuilder.create();
+
+ ReportRepeatVariable<String> expected = new ReportRepeatVariable<>(new ReportRepeatVariableDefinition<>(
+ "name",
+ String.class,
+ "Request",
+ "Comment",
+ false
+ ));
+ expected.setValues(Set.of("a", "b", "c"));
+
+ String json = gson.toJson(expected);
+ ReportRepeatVariable<String> actual = gson.fromJson(json, TypeToken.getParameterized(ReportRepeatVariable.class, String.class).getType());
+ assertEquals(expected, actual);
+ }
+}
=====================================
toolkit/api-report/src/test/java/fr/ird/observe/report/json/ReportVariableAdapterTest.java
=====================================
@@ -0,0 +1,80 @@
+package fr.ird.observe.report.json;
+
+/*-
+ * #%L
+ * ObServe Toolkit :: API :: Report
+ * %%
+ * Copyright (C) 2008 - 2024 IRD, Ultreia.io
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.reflect.TypeToken;
+import fr.ird.observe.report.ReportVariable;
+import fr.ird.observe.report.definition.ReportVariableDefinition;
+import io.ultreia.java4all.util.json.JsonAdapterProvider;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.lang.reflect.Type;
+import java.util.Set;
+
+/**
+ * Created at 19/09/2024.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since 9.3.7
+ */
+public class ReportVariableAdapterTest {
+
+ private static <V> void assertEquals(ReportVariable<V> expected, ReportVariable<V> actual) {
+ Assert.assertEquals(expected.definition(), actual.definition());
+ Assert.assertEquals(expected.getName(), actual.getName());
+ Assert.assertEquals(expected.getRequest(), actual.getRequest());
+ Assert.assertEquals(expected.getComment(), actual.getComment());
+ Assert.assertEquals(expected.getType(), actual.getType());
+ Assert.assertEquals(expected.getValues(), actual.getValues());
+ Assert.assertEquals(expected.getSelectedValue(), actual.getSelectedValue());
+ }
+
+ @Test
+ public void test() {
+ GsonBuilder gsonBuilder = new GsonBuilder().serializeNulls().setPrettyPrinting();
+ JsonAdapterProvider.offers(gsonBuilder::registerTypeAdapter, gsonBuilder::registerTypeHierarchyAdapter);
+ Gson gson = gsonBuilder.create();
+
+ ReportVariable<String> expected = new ReportVariable<>(new ReportVariableDefinition<>(
+ "name",
+ String.class,
+ "Request",
+ "Comment"
+ ));
+ expected.setValues(Set.of("a", "b", "c"));
+
+ String json = gson.toJson(expected);
+ Type type = TypeToken.getParameterized(ReportVariable.class, String.class).getType();
+ ReportVariable<String> actual = gson.fromJson(json, type);
+ Assert.assertEquals(expected, actual);
+
+ expected.setSelectedValue("a");
+ json = gson.toJson(expected);
+ actual = gson.fromJson(json, type);
+ assertEquals(expected, actual);
+
+ }
+}
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/9afdaf04c3e33e0a57a795e5…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/9afdaf04c3e33e0a57a795e5…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 2 commits: Do it for Report adapters (add some equals on Parameters to be able to test them) - See #2938
by Tony CHEMIT (@tchemit) 19 Sep '24
by Tony CHEMIT (@tchemit) 19 Sep '24
19 Sep '24
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
7e7bd7e0 by Tony Chemit at 2024-09-19T15:03:37+02:00
Do it for Report adapters (add some equals on Parameters to be able to test them) - See #2938
- - - - -
813f6b73 by Tony Chemit at 2024-09-19T15:03:41+02:00
L'action n'est active que si une source de donnée est active - See #2826
- - - - -
12 changed files:
- client/core/src/main/java/fr/ird/observe/client/datasource/api/ObserveDataSourcesManager.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetsUIBodyContent.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/ReportVariableSupport.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/json/ReportRepeatVariableAdapter.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/json/ReportVariableAdapter.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/json/ReportVariableSupportAdapter.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/renderers/HighlightIfAbsoluteDeltaIsPositive.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/renderers/HighlightIfEquals18nReferentialValue.java
- toolkit/api-report/src/main/java/fr/ird/observe/report/renderers/HighlightIfNumericalValueIsPositive.java
- + toolkit/api-report/src/test/java/fr/ird/observe/report/json/ReportColumnRenderersParametersAdapterTest.java
- + toolkit/api-report/src/test/java/fr/ird/observe/report/json/ReportRepeatVariableAdapterTest.java
- + toolkit/api-report/src/test/java/fr/ird/observe/report/json/ReportVariableAdapterTest.java
Changes:
=====================================
client/core/src/main/java/fr/ird/observe/client/datasource/api/ObserveDataSourcesManager.java
=====================================
@@ -38,6 +38,8 @@ import fr.ird.observe.decoration.DecoratorService;
import fr.ird.observe.navigation.id.Project;
import fr.ird.observe.server.security.InvalidAuthenticationTokenException;
import fr.ird.observe.services.ObserveServiceMainFactory;
+import io.ultreia.java4all.bean.AbstractJavaBean;
+import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition;
import io.ultreia.java4all.i18n.I18n;
import io.ultreia.java4all.util.sql.SqlScript;
import org.apache.logging.log4j.LogManager;
@@ -60,9 +62,11 @@ import java.util.UUID;
* @author Tony Chemit - dev(a)tchemit.fr
* @since 5.0
*/
-public class ObserveDataSourcesManager implements Closeable {
+@GenerateJavaBeanDefinition
+public class ObserveDataSourcesManager extends AbstractJavaBean implements Closeable {
private static final Logger log = LogManager.getLogger(ObserveDataSourcesManager.class);
+ public static final String PROPERTY_MAIN_DATA_SOURCE = "mainDataSource";
private final List<ObserveSwingDataSource> dataSources = new LinkedList<>();
private final ClientConfig config;
private final ObserveServiceMainFactory serviceFactory;
@@ -149,6 +153,7 @@ public class ObserveDataSourcesManager implements Closeable {
public void setMainDataSource(ObserveSwingDataSource dataSource) {
this.dataSource = dataSource;
+ firePropertyChange(PROPERTY_MAIN_DATA_SOURCE, dataSource);
}
public Optional<ObserveSwingDataSource> getOptionalMainDataSource() {
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetsUIBodyContent.java
=====================================
@@ -24,6 +24,7 @@ package fr.ird.observe.client.datasource.editor.ps.data.dcp.presets;
import com.google.auto.service.AutoService;
import fr.ird.observe.client.ObserveSwingApplicationContext;
+import fr.ird.observe.client.datasource.api.ObserveDataSourcesManager;
import fr.ird.observe.client.datasource.api.ObserveSwingDataSource;
import fr.ird.observe.client.datasource.editor.ps.data.dcp.actions.ShowFloatingObjectPresetsUI;
import fr.ird.observe.client.main.ObserveMainUI;
@@ -31,6 +32,7 @@ import fr.ird.observe.client.main.body.MainUIBodyContent;
import io.ultreia.java4all.util.SingletonSupplier;
import org.nuiton.jaxx.runtime.context.JAXXInitialContext;
+import javax.swing.JMenuItem;
import java.util.function.Supplier;
/**
@@ -65,6 +67,13 @@ public class FloatingObjectPresetsUIBodyContent extends MainUIBodyContent<Floati
@Override
public void install(ObserveMainUI mainUI) {
super.install(mainUI);
- ShowFloatingObjectPresetsUI.init(mainUI, mainUI.getShowFloatingObjectPresets(), new ShowFloatingObjectPresetsUI());
+ ObserveSwingApplicationContext applicationContext = (ObserveSwingApplicationContext) ObserveSwingApplicationContext.get();
+ ObserveDataSourcesManager dataSourcesManager = applicationContext.getDataSourcesManager();
+ JMenuItem editor = mainUI.getShowFloatingObjectPresets();
+ dataSourcesManager.addPropertyChangeListener(ObserveDataSourcesManager.PROPERTY_MAIN_DATA_SOURCE, evt -> {
+ ObserveSwingDataSource newValue = (ObserveSwingDataSource) evt.getNewValue();
+ editor.setEnabled(newValue != null);
+ });
+ ShowFloatingObjectPresetsUI.init(mainUI, editor, new ShowFloatingObjectPresetsUI());
}
}
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/ReportVariableSupport.java
=====================================
@@ -64,6 +64,10 @@ public abstract class ReportVariableSupport<V, D extends ReportVariableDefinitio
return definition().getName();
}
+ public final String getComment() {
+ return definition().getComment();
+ }
+
public final Class<V> getType() {
return definition().getType();
}
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/json/ReportRepeatVariableAdapter.java
=====================================
@@ -23,15 +23,10 @@ package fr.ird.observe.report.json;
*/
import com.google.auto.service.AutoService;
-import com.google.gson.JsonDeserializationContext;
-import com.google.gson.JsonObject;
-import com.google.gson.reflect.TypeToken;
import fr.ird.observe.report.ReportRepeatVariable;
import fr.ird.observe.report.definition.ReportRepeatVariableDefinition;
import io.ultreia.java4all.util.json.JsonAdapter;
-import java.lang.reflect.Type;
-
/**
* Created on 14/12/2022.
*
@@ -46,16 +41,4 @@ public class ReportRepeatVariableAdapter<V> extends ReportVariableSupportAdapter
return ReportRepeatVariable.class;
}
- @Override
- protected Type definitionType() {
- return new TypeToken<ReportRepeatVariableDefinition<V>>() {
- }.getType();
- }
-
- @Override
- protected ReportRepeatVariable<V> deserialize(JsonDeserializationContext context, JsonObject jsonObject, ReportRepeatVariableDefinition<V> definition) {
- ReportRepeatVariable<V> result = new ReportRepeatVariable<>(definition);
- deserializeValues(context, jsonObject, result);
- return result;
- }
}
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/json/ReportVariableAdapter.java
=====================================
@@ -27,13 +27,11 @@ import com.google.auto.service.AutoService;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
-import com.google.gson.reflect.TypeToken;
+import com.google.gson.JsonSerializationContext;
import fr.ird.observe.report.ReportVariable;
import fr.ird.observe.report.definition.ReportVariableDefinition;
import io.ultreia.java4all.util.json.JsonAdapter;
-import java.lang.reflect.Type;
-
/**
* @author Tony Chemit - dev(a)tchemit.fr
*/
@@ -46,22 +44,24 @@ public class ReportVariableAdapter<V> extends ReportVariableSupportAdapter<V, Re
}
@Override
- protected Type definitionType() {
- return new TypeToken<ReportVariableDefinition<V>>() {
- }.getType();
+ protected void deserialize(JsonDeserializationContext context, JsonObject jsonObject, ReportVariable<V> variable) {
+ super.deserialize(context, jsonObject, variable);
+ deserializeSelectedValue(context, jsonObject, variable);
}
@Override
- protected ReportVariable<V> deserialize(JsonDeserializationContext context, JsonObject jsonObject, ReportVariableDefinition<V> definition) {
- ReportVariable<V> result = new ReportVariable<>(definition);
- deserializeValues(context, jsonObject, result);
- deserializeSelectedValue(context, jsonObject, result);
- return result;
+ public void serialize(ReportVariable<V> src, JsonSerializationContext context, JsonObject jsonObject) {
+ super.serialize(src, context, jsonObject);
+ if (src.getSelectedValue() != null) {
+ jsonObject.add(ReportVariable.PROPERTY_SELECTED_VALUE, context.serialize(src.getSelectedValue()));
+ }
}
protected void deserializeSelectedValue(JsonDeserializationContext context, JsonObject jsonObject, ReportVariable<V> variable) {
JsonElement json = jsonObject.get(ReportVariable.PROPERTY_SELECTED_VALUE);
- V selectedValue = deserializeValue(context, variable.getType(), json);
- variable.setSelectedValue(selectedValue);
+ if (json != null) {
+ V selectedValue = deserializeValue(context, variable.getType(), json);
+ variable.setSelectedValue(selectedValue);
+ }
}
}
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/json/ReportVariableSupportAdapter.java
=====================================
@@ -28,6 +28,9 @@ import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
+import com.google.gson.JsonSerializationContext;
+import com.google.gson.JsonSerializer;
+import com.google.gson.reflect.TypeToken;
import fr.ird.observe.report.ReportVariableSupport;
import fr.ird.observe.report.definition.ReportVariableDefinitionSupport;
import io.ultreia.java4all.util.json.JsonAdapter;
@@ -44,21 +47,38 @@ import java.util.Set;
* @author Tony Chemit - dev(a)tchemit.fr
* @since 9.0.22
*/
-public abstract class ReportVariableSupportAdapter<V, D extends ReportVariableDefinitionSupport<V>, R extends ReportVariableSupport<V, D>> implements JsonAdapter, JsonDeserializer<R> {
+public abstract class ReportVariableSupportAdapter<V, D extends ReportVariableDefinitionSupport<V>, R extends ReportVariableSupport<V, D>> implements JsonAdapter, JsonSerializer<R>, JsonDeserializer<R> {
- protected abstract Type definitionType();
+ @Override
+ public JsonElement serialize(R src, Type typeOfSrc, JsonSerializationContext context) {
+ JsonObject jsonObject = new JsonObject();
+ jsonObject.add("V", context.serialize(src.definition().getType()));
+ jsonObject.add("D", context.serialize(src.definition().getClass()));
+ serialize(src, context, jsonObject);
+ return jsonObject;
+ }
- protected abstract R deserialize(JsonDeserializationContext context, JsonObject jsonObject, D definition);
+ protected void serialize(R src, JsonSerializationContext context, JsonObject jsonObject) {
+ jsonObject.add(ReportVariableSupport.PROPERTY_DEFINITION, context.serialize(src.definition()));
+ jsonObject.add(ReportVariableSupport.PROPERTY_VALUES, context.serialize(src.getValues()));
+ }
@Override
public final R deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
JsonObject jsonObject = json.getAsJsonObject();
- D definition = deserializeDefinition(context, jsonObject);
- return deserialize(context, jsonObject, definition);
+ Class<V> vType = context.deserialize(jsonObject.get("V"), Class.class);
+ Class<D> dType = context.deserialize(jsonObject.get("D"), Class.class);
+ Type definitionType = TypeToken.getParameterized(dType, vType).getType();
+
+ D definition = context.deserialize(jsonObject.get(ReportVariableSupport.PROPERTY_DEFINITION), definitionType);
+ @SuppressWarnings("unchecked") R variable = (R) definition.toVariable();
+
+ deserialize(context, jsonObject, variable);
+ return variable;
}
- protected D deserializeDefinition(JsonDeserializationContext context, JsonObject jsonObject) {
- return context.deserialize(jsonObject.get(ReportVariableSupport.PROPERTY_DEFINITION), definitionType());
+ protected void deserialize(JsonDeserializationContext context, JsonObject jsonObject, R variable) {
+ deserializeValues(context, jsonObject, variable);
}
protected void deserializeValues(JsonDeserializationContext context, JsonObject jsonObject, R variable) {
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/renderers/HighlightIfAbsoluteDeltaIsPositive.java
=====================================
@@ -31,6 +31,7 @@ import org.jdesktop.swingx.decorator.ComponentAdapter;
import org.jdesktop.swingx.decorator.HighlightPredicate;
import java.awt.Component;
+import java.util.Objects;
import static fr.ird.observe.report.renderers.HighlightIfAbsoluteDeltaIsPositive.Parameters;
@@ -116,6 +117,19 @@ public class HighlightIfAbsoluteDeltaIsPositive implements ColumnRendererConsume
public double getErrorThreshHold() {
return errorThreshHold;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof Parameters)) return false;
+ Parameters that = (Parameters) o;
+ return getColumn1() == that.getColumn1() && getColumn2() == that.getColumn2() && Double.compare(getWarningThreshHold(), that.getWarningThreshHold()) == 0 && Double.compare(getErrorThreshHold(), that.getErrorThreshHold()) == 0;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(getColumn1(), getColumn2(), getWarningThreshHold(), getErrorThreshHold());
+ }
}
static class ParametersHighlightPredicate implements HighlightPredicate {
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/renderers/HighlightIfEquals18nReferentialValue.java
=====================================
@@ -155,5 +155,18 @@ public class HighlightIfEquals18nReferentialValue implements ColumnRendererConsu
public Parameters setLabel(String labelError, String labelOk) {
return new Parameters(columns, idError, idOk, labelError, labelOk);
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof Parameters)) return false;
+ Parameters that = (Parameters) o;
+ return Objects.equals(getColumns(), that.getColumns()) && Objects.equals(getIdError(), that.getIdError()) && Objects.equals(getIdOk(), that.getIdOk()) && Objects.equals(getLabelError(), that.getLabelError()) && Objects.equals(getLabelOk(), that.getLabelOk());
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(getColumns(), getIdError(), getIdOk(), getLabelError(), getLabelOk());
+ }
}
}
=====================================
toolkit/api-report/src/main/java/fr/ird/observe/report/renderers/HighlightIfNumericalValueIsPositive.java
=====================================
@@ -31,6 +31,7 @@ import org.jdesktop.swingx.decorator.ComponentAdapter;
import org.jdesktop.swingx.decorator.HighlightPredicate;
import java.awt.Component;
+import java.util.Objects;
import static fr.ird.observe.report.renderers.HighlightIfNumericalValueIsPositive.Parameters;
@@ -110,6 +111,19 @@ public class HighlightIfNumericalValueIsPositive implements ColumnRendererConsum
public double getWarningThreshHold() {
return warningThreshHold;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof Parameters)) return false;
+ Parameters that = (Parameters) o;
+ return getColumn() == that.getColumn() && Double.compare(getWarningThreshHold(), that.getWarningThreshHold()) == 0 && Double.compare(getErrorThreshHold(), that.getErrorThreshHold()) == 0;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(getColumn(), getWarningThreshHold(), getErrorThreshHold());
+ }
}
static class ParametersHighlightPredicate implements HighlightPredicate {
=====================================
toolkit/api-report/src/test/java/fr/ird/observe/report/json/ReportColumnRenderersParametersAdapterTest.java
=====================================
@@ -0,0 +1,66 @@
+package fr.ird.observe.report.json;
+
+/*-
+ * #%L
+ * ObServe Toolkit :: API :: Report
+ * %%
+ * Copyright (C) 2008 - 2024 IRD, Ultreia.io
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import fr.ird.observe.report.ReportColumnRenderersParameters;
+import fr.ird.observe.report.renderers.HighlightIfAbsoluteDeltaIsPositive;
+import fr.ird.observe.report.renderers.HighlightIfEquals18nReferentialValue;
+import fr.ird.observe.report.renderers.HighlightIfNumericalValueIsPositive;
+import io.ultreia.java4all.util.json.JsonAdapterProvider;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.List;
+
+/**
+ * Created at 19/09/2024.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since 9.3.7
+ */
+public class ReportColumnRenderersParametersAdapterTest {
+
+ private static void assertEquals(ReportColumnRenderersParameters expected, ReportColumnRenderersParameters actual) {
+ Assert.assertEquals(expected.getColumnRendererParameters(), actual.getColumnRendererParameters());
+ }
+
+ @Test
+ public void test() {
+
+ GsonBuilder gsonBuilder = new GsonBuilder().serializeNulls().setPrettyPrinting();
+ JsonAdapterProvider.offers(gsonBuilder::registerTypeAdapter, gsonBuilder::registerTypeHierarchyAdapter);
+ Gson gson = gsonBuilder.create();
+
+ ReportColumnRenderersParameters expected = new ReportColumnRenderersParameters(List.of(
+ new HighlightIfAbsoluteDeltaIsPositive().parseParameters("0|1|0.5f|0.1f"),
+ new HighlightIfEquals18nReferentialValue().parseParameters("0,1,2|ok|error"),
+ new HighlightIfNumericalValueIsPositive().parseParameters("0|1.0f|2.5f")
+ ));
+
+ String json = gson.toJson(expected);
+ ReportColumnRenderersParameters actual = gson.fromJson(json, ReportColumnRenderersParameters.class);
+ assertEquals(expected, actual);
+ }
+}
=====================================
toolkit/api-report/src/test/java/fr/ird/observe/report/json/ReportRepeatVariableAdapterTest.java
=====================================
@@ -0,0 +1,74 @@
+package fr.ird.observe.report.json;
+
+/*-
+ * #%L
+ * ObServe Toolkit :: API :: Report
+ * %%
+ * Copyright (C) 2008 - 2024 IRD, Ultreia.io
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.reflect.TypeToken;
+import fr.ird.observe.report.ReportRepeatVariable;
+import fr.ird.observe.report.definition.ReportRepeatVariableDefinition;
+import io.ultreia.java4all.util.json.JsonAdapterProvider;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Set;
+
+/**
+ * Created at 19/09/2024.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since 9.3.7
+ */
+public class ReportRepeatVariableAdapterTest {
+
+ private static <V> void assertEquals(ReportRepeatVariable<V> expected, ReportRepeatVariable<V> actual) {
+ Assert.assertEquals(expected.definition(), actual.definition());
+ Assert.assertEquals(expected.getName(), actual.getName());
+ Assert.assertEquals(expected.getRequest(), actual.getRequest());
+ Assert.assertEquals(expected.getComment(), actual.getComment());
+ Assert.assertEquals(expected.getType(), actual.getType());
+ Assert.assertEquals(expected.getValues(), actual.getValues());
+ Assert.assertEquals(expected.isAddNullValue(), actual.isAddNullValue());
+ }
+
+ @Test
+ public void test() {
+
+ GsonBuilder gsonBuilder = new GsonBuilder().serializeNulls().setPrettyPrinting();
+ JsonAdapterProvider.offers(gsonBuilder::registerTypeAdapter, gsonBuilder::registerTypeHierarchyAdapter);
+ Gson gson = gsonBuilder.create();
+
+ ReportRepeatVariable<String> expected = new ReportRepeatVariable<>(new ReportRepeatVariableDefinition<>(
+ "name",
+ String.class,
+ "Request",
+ "Comment",
+ false
+ ));
+ expected.setValues(Set.of("a", "b", "c"));
+
+ String json = gson.toJson(expected);
+ ReportRepeatVariable<String> actual = gson.fromJson(json, TypeToken.getParameterized(ReportRepeatVariable.class, String.class).getType());
+ assertEquals(expected, actual);
+ }
+}
=====================================
toolkit/api-report/src/test/java/fr/ird/observe/report/json/ReportVariableAdapterTest.java
=====================================
@@ -0,0 +1,80 @@
+package fr.ird.observe.report.json;
+
+/*-
+ * #%L
+ * ObServe Toolkit :: API :: Report
+ * %%
+ * Copyright (C) 2008 - 2024 IRD, Ultreia.io
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.reflect.TypeToken;
+import fr.ird.observe.report.ReportVariable;
+import fr.ird.observe.report.definition.ReportVariableDefinition;
+import io.ultreia.java4all.util.json.JsonAdapterProvider;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.lang.reflect.Type;
+import java.util.Set;
+
+/**
+ * Created at 19/09/2024.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since 9.3.7
+ */
+public class ReportVariableAdapterTest {
+
+ private static <V> void assertEquals(ReportVariable<V> expected, ReportVariable<V> actual) {
+ Assert.assertEquals(expected.definition(), actual.definition());
+ Assert.assertEquals(expected.getName(), actual.getName());
+ Assert.assertEquals(expected.getRequest(), actual.getRequest());
+ Assert.assertEquals(expected.getComment(), actual.getComment());
+ Assert.assertEquals(expected.getType(), actual.getType());
+ Assert.assertEquals(expected.getValues(), actual.getValues());
+ Assert.assertEquals(expected.getSelectedValue(), actual.getSelectedValue());
+ }
+
+ @Test
+ public void test() {
+ GsonBuilder gsonBuilder = new GsonBuilder().serializeNulls().setPrettyPrinting();
+ JsonAdapterProvider.offers(gsonBuilder::registerTypeAdapter, gsonBuilder::registerTypeHierarchyAdapter);
+ Gson gson = gsonBuilder.create();
+
+ ReportVariable<String> expected = new ReportVariable<>(new ReportVariableDefinition<>(
+ "name",
+ String.class,
+ "Request",
+ "Comment"
+ ));
+ expected.setValues(Set.of("a", "b", "c"));
+
+ String json = gson.toJson(expected);
+ Type type = TypeToken.getParameterized(ReportVariable.class, String.class).getType();
+ ReportVariable<String> actual = gson.fromJson(json, type);
+ Assert.assertEquals(expected, actual);
+
+ expected.setSelectedValue("a");
+ json = gson.toJson(expected);
+ actual = gson.fromJson(json, type);
+ assertEquals(expected, actual);
+
+ }
+}
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/e7cc9e17a3846303b9bc0be1…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/e7cc9e17a3846303b9bc0be1…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-9.3.x] Mettre à null le commentaire Batch.comment si celui ci n'est constitué que d'espaces - Closes #2923
by Tony CHEMIT (@tchemit) 19 Sep '24
by Tony CHEMIT (@tchemit) 19 Sep '24
19 Sep '24
Tony CHEMIT pushed to branch develop-9.3.x at ultreiaio / ird-observe
Commits:
9afdaf04 by Tony Chemit at 2024-09-19T12:15:14+02:00
Mettre à null le commentaire Batch.comment si celui ci n'est constitué que d'espaces - Closes #2923
- - - - -
1 changed file:
- core/persistence/avdth/src/main/java/fr/ird/observe/persistence/avdth/data/localmarket/BatchReader.java
Changes:
=====================================
core/persistence/avdth/src/main/java/fr/ird/observe/persistence/avdth/data/localmarket/BatchReader.java
=====================================
@@ -116,8 +116,13 @@ public class BatchReader extends DataReader<Batch> {
String origin = resultSet.getString(8);
entity.setOrigin(origin);
String comment = resultSet.getString(9);
- entity.setComment(comment);
-
+ // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2923
+ if (comment != null) {
+ comment = comment.trim();
+ if (!comment.isEmpty()) {
+ entity.setComment(comment);
+ }
+ }
return entity;
}
}
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/9afdaf04c3e33e0a57a795e51…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/9afdaf04c3e33e0a57a795e51…
You're receiving this email because of your account on gitlab.com.
1
0