Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
9db1191e
by Tony CHEMIT at 2018-09-18T03:13:38Z
-
5fc6822c
by Tony CHEMIT at 2018-09-18T03:41:57Z
-
2b190843
by Tony CHEMIT at 2018-09-18T03:49:01Z
-
2affe04c
by Tony CHEMIT at 2018-09-18T04:10:40Z
-
4f2a89cb
by Tony CHEMIT at 2018-09-18T04:11:22Z
-
5d1bdbe0
by Tony CHEMIT at 2018-09-18T04:11:59Z
-
f927feaf
by Tony CHEMIT at 2018-09-18T04:12:21Z
-
9dbdf820
by Tony CHEMIT at 2018-09-18T04:13:15Z
-
716da68e
by Tony CHEMIT at 2018-09-18T04:15:33Z
-
7058994a
by Tony CHEMIT at 2018-09-18T04:17:40Z
-
3723f7dd
by Tony CHEMIT at 2018-09-18T04:18:24Z
26 changed files:
- + .mvn/gitlab-cache/milestones/647608-artifacts.json
- .mvn/gitlab-cache/milestones/647608-issues.json
- .mvn/gitlab-cache/milestones/647608.json
- CHANGELOG.md
- client/src/main/java/fr/ird/observe/client/ui/content/ref/ContentReferenceUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/content/ref/usage/UsageForDeleteUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/ref/usage/UsageForDesactivateUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/ref/usage/UsageForDisplayUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/ref/usage/UsageUIHandlerSupport.java
- persistence/pom.xml
- persistence/src/main/java/fr/ird/observe/binder/data/seine/NonTargetCatchEntityReferenceBinder.java
- pom.xml
- server/src/main/filtered-resources/mapping
- server/src/main/java/fr/ird/observe/server/injector/ObserveDtoInjector.java
- services-client/src/main/java/fr/ird/observe/services/client/ObserveRequestBuilder.java
- + services-client/src/main/java/fr/ird/observe/services/client/actions/synchro/referential/diff/ReferentialSynchronizeDiffServiceClient.java
- + services-client/src/main/java/fr/ird/observe/services/client/referential/ReferentialServiceClient.java
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/synchro/referential/ng/ReferentialSynchronizeServiceLocal.java
- services-local/src/main/java/fr/ird/observe/services/local/service/referential/ReferentialServiceLocal.java
- services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/legacy/UnidirectionalReferentialSynchronizeLocalService.java
- services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeService.java
- services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeSqlsRequest.java
- services/src/main/java/fr/ird/observe/services/service/data/NavigationService.java
- services/src/main/java/fr/ird/observe/services/service/data/TripManagementService.java
- services/src/main/java/fr/ird/observe/services/service/referential/ReferentialService.java
- services/src/main/java/fr/ird/observe/services/service/sql/SqlScriptProducerService.java
Changes:
| 1 |
+[
|
|
| 2 |
+ {
|
|
| 3 |
+ "name": "Application",
|
|
| 4 |
+ "filename": "observe-7.0-RC-20.zip",
|
|
| 5 |
+ "url": "https://ultreia.io/release/observe-7.0-RC-20.zip"
|
|
| 6 |
+ },
|
|
| 7 |
+ {
|
|
| 8 |
+ "name": "Serveur",
|
|
| 9 |
+ "filename": "observe-7.0-RC-20.war",
|
|
| 10 |
+ "url": "https://ultreia.io/release/observe-7.0-RC-20.war"
|
|
| 11 |
+ }
|
|
| 12 |
+]
|
|
| \ No newline at end of file |
| ... | ... | @@ -4,5 +4,8 @@ |
| 4 | 4 |
"projectId": 2722779,
|
| 5 | 5 |
"groupId": 0,
|
| 6 | 6 |
"title": "7.0-RC-20",
|
| 7 |
- "state": "active"
|
|
| 7 |
+ "description": "",
|
|
| 8 |
+ "dueDate": "Sep 18, 2018 2:00:00 AM",
|
|
| 9 |
+ "startDate": "Sep 17, 2018 2:00:00 AM",
|
|
| 10 |
+ "state": "closed"
|
|
| 8 | 11 |
}
|
| \ No newline at end of file |
| 1 | 1 |
# ObServe changelog
|
| 2 | 2 |
|
| 3 | 3 |
* Author [Tony Chemit](mailto:dev@tchemit.fr)
|
| 4 |
+ * Last generated at 2018-09-18 04:46.
|
|
| 4 | 5 |
* Last generated at 2018-09-16 22:22.
|
| 5 | 6 |
|
| 6 | 7 |
## Version [8.0-alpha-3](https://gitlab.com/ultreiaio/ird-observe/milestones/114)
|
| ... | ... | @@ -68,6 +69,23 @@ Premier lot du contrat IRD-2018-01-V8 |
| 68 | 69 |
* [[Evolution 922]](https://gitlab.com/ultreiaio/ird-observe/issues/922) **Ajoute le référentiel observe_common.DataQuality sur les données existantes** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
|
| 69 | 70 |
* [[Evolution 950]](https://gitlab.com/ultreiaio/ird-observe/issues/950) **Renommage de la classe seine.WeightCategory en seine.WeightCategorySeine** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
|
| 70 | 71 |
|
| 72 |
+## Version [7.0-RC-20](https://gitlab.com/ultreiaio/ird-observe/milestones/123)
|
|
| 73 |
+ |
|
| 74 |
+**Closed at 2018-09-18.**
|
|
| 75 |
+ |
|
| 76 |
+### Download
|
|
| 77 |
+* [Application (observe-7.0-RC-20.zip)](https://ultreia.io/release/observe-7.0-RC-20.zip)
|
|
| 78 |
+* [Serveur (observe-7.0-RC-20.war)](https://ultreia.io/release/observe-7.0-RC-20.war)
|
|
| 79 |
+ |
|
| 80 |
+### Issues
|
|
| 81 |
+ * [[Anomalie 1049]](https://gitlab.com/ultreiaio/ird-observe/issues/1049) **[LL] La suppression d'une marée en mode serveur provoque une exception** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 82 |
+ * [[Anomalie 1050]](https://gitlab.com/ultreiaio/ird-observe/issues/1050) **[PS][LL] La synchro avancée de marées plante** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 83 |
+ * [[Anomalie 1051]](https://gitlab.com/ultreiaio/ird-observe/issues/1051) **Suppression de lignes de référentiel : liste de ceux qui plantent avec erreur de type Dto** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 84 |
+ * [[Anomalie 1052]](https://gitlab.com/ultreiaio/ird-observe/issues/1052) **Suppression de lignes de référentiel : liste de ceux qui plantent avec erreurs spécifiques** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 85 |
+ * [[Anomalie 1053]](https://gitlab.com/ultreiaio/ird-observe/issues/1053) **Problème de socket en RC18 en connexion serveur directe à Tomcat (pas de HTTPD)** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 86 |
+ * [[Anomalie 1054]](https://gitlab.com/ultreiaio/ird-observe/issues/1054) **La synchro avancée du référentiel listes d'espèces provoque une exception** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 87 |
+ * [[Anomalie 1055]](https://gitlab.com/ultreiaio/ird-observe/issues/1055) **Suppression d'une référence "Equipement bateau" "Radio BLU" : erreur (RC20-SNAPSHOT)** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 88 |
+ |
|
| 71 | 89 |
## Version [7.0-RC-19](https://gitlab.com/ultreiaio/ird-observe/milestones/122)
|
| 72 | 90 |
|
| 73 | 91 |
**Closed at 2018-09-16.**
|
| ... | ... | @@ -144,12 +162,18 @@ Premier lot du contrat IRD-2018-01-V8 |
| 144 | 162 |
* [Serveur (observe-7.0-RC-15.war)](https://ultreia.io/release/observe-7.0-RC-15.war)
|
| 145 | 163 |
|
| 146 | 164 |
### Issues
|
| 147 |
- * [[Anomalie 942]](https://gitlab.com/ultreiaio/ird-observe/issues/942) **Plantage base en sortie de l'outil de traduction** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 148 |
- * [[Anomalie 943]](https://gitlab.com/ultreiaio/ird-observe/issues/943) **Trouver une solution aux problèmes de fiabilité d'H2** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 149 |
- * [[Anomalie 959]](https://gitlab.com/ultreiaio/ird-observe/issues/959) **[PS][UI] Problème d'UI lors de la création d'activités** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 150 |
- * [[Evolution 944]](https://gitlab.com/ultreiaio/ird-observe/issues/944) **Make configurable FOB Form observed system to auto-add to activity** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
|
|
| 151 |
- * [[Evolution 948]](https://gitlab.com/ultreiaio/ird-observe/issues/948) **Improve FOB Form (when creating)** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
|
|
| 152 |
- * [[Evolution 949]](https://gitlab.com/ultreiaio/ird-observe/issues/949) **Optimisation des flux de données** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
|
|
| 165 |
+ * [[Anomalie 976]](https://gitlab.com/ultreiaio/ird-observe/issues/976) **Ecran de configuration du référentiel taille-taille : libellés** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 166 |
+ * [[Anomalie 977]](https://gitlab.com/ultreiaio/ird-observe/issues/977) **Ecran de configuration du référentiel taille-taille : petit souci de validation** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 167 |
+ * [[Anomalie 979]](https://gitlab.com/ultreiaio/ird-observe/issues/979) **Création de marée : focus forcé sur la carto** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 168 |
+ * [[Anomalie 980]](https://gitlab.com/ultreiaio/ird-observe/issues/980) **Equipement bateau : première frappe inhibée** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 169 |
+ * [[Anomalie 981]](https://gitlab.com/ultreiaio/ird-observe/issues/981) **Validation écran activité : erreur pas visible sur l'onglet caractéristiques** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 170 |
+ * [[Anomalie 984]](https://gitlab.com/ultreiaio/ird-observe/issues/984) **Gestion référentiel taille-taille : message de validation douteux** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 171 |
+ * [[Anomalie 986]](https://gitlab.com/ultreiaio/ird-observe/issues/986) **La conversion taille-taille ne fonctionne toujours pas** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 172 |
+ * [[Evolution 885]](https://gitlab.com/ultreiaio/ird-observe/issues/885) **[LL][PS] Possibilité de classer les tableaux de captures/échantillons** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 173 |
+ * [[Evolution 978]](https://gitlab.com/ultreiaio/ird-observe/issues/978) **Ecran de configuration du référentiel taille-taille : liste des relations existantes** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 174 |
+ * [[Evolution 983]](https://gitlab.com/ultreiaio/ird-observe/issues/983) **[PS] Placement des champs sur échantillon faune accessoire** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 175 |
+ * [[Evolution 985]](https://gitlab.com/ultreiaio/ird-observe/issues/985) **Gestion référentiel taille-taille : les enregistrements existants ne sont pas modifiables** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 176 |
+ * [[Tâche 989]](https://gitlab.com/ultreiaio/ird-observe/issues/989) **Requêtes pour insertion préalable des systèmes observés 20, 21 et 22** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 153 | 177 |
|
| 154 | 178 |
## Version [7.0-RC-14](https://gitlab.com/ultreiaio/ird-observe/milestones/111)
|
| 155 | 179 |
|
| ... | ... | @@ -36,6 +36,7 @@ import fr.ird.observe.dto.decoration.ObserveI18nDecoratorHelper; |
| 36 | 36 |
import fr.ird.observe.dto.decoration.decorators.ReferentialReferenceDecorator;
|
| 37 | 37 |
import fr.ird.observe.dto.form.Form;
|
| 38 | 38 |
import fr.ird.observe.dto.form.FormDefinition;
|
| 39 |
+import fr.ird.observe.dto.reference.DtoReference;
|
|
| 39 | 40 |
import fr.ird.observe.dto.reference.ReferentialDtoReference;
|
| 40 | 41 |
import fr.ird.observe.dto.referential.I18nReferentialDto;
|
| 41 | 42 |
import fr.ird.observe.dto.referential.ProgramDto;
|
| ... | ... | @@ -49,8 +50,8 @@ import fr.ird.observe.spi.DtoModelHelper; |
| 49 | 50 |
import fr.ird.observe.spi.map.ImmutableSetDtoMap;
|
| 50 | 51 |
import org.apache.commons.lang3.StringUtils;
|
| 51 | 52 |
import org.apache.commons.lang3.tuple.Pair;
|
| 52 |
-import org.apache.logging.log4j.Logger;
|
|
| 53 | 53 |
import org.apache.logging.log4j.LogManager;
|
| 54 |
+import org.apache.logging.log4j.Logger;
|
|
| 54 | 55 |
import org.nuiton.decorator.Decorator;
|
| 55 | 56 |
import org.nuiton.jaxx.runtime.swing.CardLayout2Ext;
|
| 56 | 57 |
import org.nuiton.jaxx.validator.swing.SwingValidatorUtil;
|
| ... | ... | @@ -121,7 +122,7 @@ public class ContentReferenceUIHandler<D extends ReferentialDto, R extends Refer |
| 121 | 122 |
}
|
| 122 | 123 |
|
| 123 | 124 |
private static <E extends ReferentialDto, R extends ReferentialDtoReference<E, R>> Pair<Boolean, R> showUsagesForDelete(E entity,
|
| 124 |
- ImmutableSetDtoMap<ReferentialDtoReference> usages,
|
|
| 125 |
+ ImmutableSetDtoMap<DtoReference> usages,
|
|
| 125 | 126 |
List<R> referenceList) {
|
| 126 | 127 |
|
| 127 | 128 |
DecoratorService service = ObserveSwingApplicationContext.get().getDecoratorService();
|
| ... | ... | @@ -160,7 +161,7 @@ public class ContentReferenceUIHandler<D extends ReferentialDto, R extends Refer |
| 160 | 161 |
}
|
| 161 | 162 |
|
| 162 | 163 |
private static <E extends ReferentialDto, R extends ReferentialDtoReference<E, R>> Pair<Boolean, R> showUsagesForDesactivated(E entity,
|
| 163 |
- ImmutableSetDtoMap<ReferentialDtoReference> usages,
|
|
| 164 |
+ ImmutableSetDtoMap<DtoReference> usages,
|
|
| 164 | 165 |
List<R> referenceList) {
|
| 165 | 166 |
|
| 166 | 167 |
DecoratorService service = ObserveSwingApplicationContext.get().getDecoratorService();
|
| ... | ... | @@ -372,7 +373,7 @@ public class ContentReferenceUIHandler<D extends ReferentialDto, R extends Refer |
| 372 | 373 |
}
|
| 373 | 374 |
|
| 374 | 375 |
// recherche des utilisation du bean dans la base
|
| 375 |
- ImmutableSetDtoMap<ReferentialDtoReference> usages = getReferentialService().findAllUsages(bean);
|
|
| 376 |
+ ImmutableSetDtoMap<DtoReference> usages = getReferentialService().findAllUsages(bean);
|
|
| 376 | 377 |
|
| 377 | 378 |
DecoratorService dService = getDecoratorService();
|
| 378 | 379 |
Decorator<D> decorator = dService.getDecoratorByType(getBeanType());
|
| ... | ... | @@ -671,7 +672,7 @@ public class ContentReferenceUIHandler<D extends ReferentialDto, R extends Refer |
| 671 | 672 |
log.debug("entity status was desactivated, looking for usage");
|
| 672 | 673 |
}
|
| 673 | 674 |
|
| 674 |
- ImmutableSetDtoMap<ReferentialDtoReference> usages = getReferentialService().findAllUsages(bean);
|
|
| 675 |
+ ImmutableSetDtoMap<DtoReference> usages = getReferentialService().findAllUsages(bean);
|
|
| 675 | 676 |
|
| 676 | 677 |
if (usages.isEmpty()) {
|
| 677 | 678 |
if (log.isInfoEnabled()) {
|
| ... | ... | @@ -745,7 +746,7 @@ public class ContentReferenceUIHandler<D extends ReferentialDto, R extends Refer |
| 745 | 746 |
}
|
| 746 | 747 |
|
| 747 | 748 |
// recherche des utilisation du bean dans la base
|
| 748 |
- ImmutableSetDtoMap<ReferentialDtoReference> usages = getReferentialService().findAllUsages(bean);
|
|
| 749 |
+ ImmutableSetDtoMap<DtoReference> usages = getReferentialService().findAllUsages(bean);
|
|
| 749 | 750 |
|
| 750 | 751 |
R replaceReference = null;
|
| 751 | 752 |
|
| ... | ... | @@ -26,6 +26,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee. |
| 26 | 26 |
<import>
|
| 27 | 27 |
|
| 28 | 28 |
fr.ird.observe.spi.map.ImmutableSetDtoMap
|
| 29 |
+ fr.ird.observe.dto.reference.DtoReference
|
|
| 29 | 30 |
fr.ird.observe.dto.reference.ReferentialDtoReference
|
| 30 | 31 |
org.nuiton.jaxx.runtime.context.JAXXInitialContext
|
| 31 | 32 |
org.nuiton.jaxx.widgets.select.BeanFilterableComboBox
|
| ... | ... | @@ -36,7 +37,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee. |
| 36 | 37 |
|
| 37 | 38 |
<script><![CDATA[
|
| 38 | 39 |
|
| 39 |
-public static <R extends ReferentialDtoReference> UsageForDeleteUI<R> build(String message, ImmutableSetDtoMap<ReferentialDtoReference> usages, List references) {
|
|
| 40 |
+public static <R extends ReferentialDtoReference> UsageForDeleteUI<R> build(String message, ImmutableSetDtoMap<? extends DtoReference> usages, List references) {
|
|
| 40 | 41 |
return new UsageForDeleteUI<>(new JAXXInitialContext().add(message).add(usages).add(references));
|
| 41 | 42 |
}
|
| 42 | 43 |
|
| ... | ... | @@ -24,6 +24,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee. |
| 24 | 24 |
<JPanel layout='{new BorderLayout()}' genericType="R extends ReferentialDtoReference">
|
| 25 | 25 |
<import>
|
| 26 | 26 |
|
| 27 |
+ fr.ird.observe.dto.reference.DtoReference
|
|
| 27 | 28 |
fr.ird.observe.dto.reference.ReferentialDtoReference
|
| 28 | 29 |
fr.ird.observe.spi.map.ImmutableSetDtoMap
|
| 29 | 30 |
|
| ... | ... | @@ -36,7 +37,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee. |
| 36 | 37 |
|
| 37 | 38 |
<script><![CDATA[
|
| 38 | 39 |
|
| 39 |
-public static <R extends ReferentialDtoReference> UsageForDesactivateUI<R> build(String message, ImmutableSetDtoMap<ReferentialDtoReference> usages, List references) {
|
|
| 40 |
+public static <R extends ReferentialDtoReference> UsageForDesactivateUI<R> build(String message, ImmutableSetDtoMap<? extends DtoReference> usages, List references) {
|
|
| 40 | 41 |
return new UsageForDesactivateUI<>(new JAXXInitialContext().add(message).add(usages).add(references));
|
| 41 | 42 |
}
|
| 42 | 43 |
|
| ... | ... | @@ -25,6 +25,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee. |
| 25 | 25 |
|
| 26 | 26 |
<import>
|
| 27 | 27 |
|
| 28 |
+ fr.ird.observe.dto.reference.DtoReference
|
|
| 28 | 29 |
fr.ird.observe.dto.reference.ReferentialDtoReference
|
| 29 | 30 |
fr.ird.observe.spi.map.ImmutableSetDtoMap
|
| 30 | 31 |
org.nuiton.jaxx.runtime.context.JAXXInitialContext
|
| ... | ... | @@ -34,7 +35,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee. |
| 34 | 35 |
|
| 35 | 36 |
<script><![CDATA[
|
| 36 | 37 |
|
| 37 |
-public static <R extends ReferentialDtoReference> UsageForDisplayUI<R> build(String message, ImmutableSetDtoMap<ReferentialDtoReference> usages) {
|
|
| 38 |
+public static <R extends ReferentialDtoReference> UsageForDisplayUI<R> build(String message, ImmutableSetDtoMap<? extends DtoReference> usages) {
|
|
| 38 | 39 |
return new UsageForDisplayUI<>(new JAXXInitialContext().add(message).add(usages));
|
| 39 | 40 |
}
|
| 40 | 41 |
|
| ... | ... | @@ -24,9 +24,11 @@ package fr.ird.observe.client.ui.content.ref.usage; |
| 24 | 24 |
|
| 25 | 25 |
import fr.ird.observe.client.ObserveSwingApplicationContext;
|
| 26 | 26 |
import fr.ird.observe.dto.IdDto;
|
| 27 |
+import fr.ird.observe.dto.data.DataDto;
|
|
| 27 | 28 |
import fr.ird.observe.dto.decoration.DecoratorService;
|
| 28 | 29 |
import fr.ird.observe.dto.decoration.ObserveI18nDecoratorHelper;
|
| 29 | 30 |
import fr.ird.observe.dto.decoration.decorators.ReferentialReferenceDecorator;
|
| 31 |
+import fr.ird.observe.dto.reference.DataDtoReference;
|
|
| 30 | 32 |
import fr.ird.observe.dto.reference.DtoReference;
|
| 31 | 33 |
import fr.ird.observe.dto.reference.ReferentialDtoReference;
|
| 32 | 34 |
import fr.ird.observe.dto.referential.ReferentialDto;
|
| ... | ... | @@ -91,9 +93,12 @@ public abstract class UsageUIHandlerSupport<R extends ReferentialDtoReference, U |
| 91 | 93 |
Set references = usages.get(dtoType);
|
| 92 | 94 |
String typeTitle = t(ObserveI18nDecoratorHelper.getTypeI18nKey(dtoType));
|
| 93 | 95 |
addReferentialReferenceUsages(dtoType, references, typeTitle);
|
| 94 |
- |
|
| 95 | 96 |
}
|
| 96 |
- |
|
| 97 |
+ for (Class<? extends DataDtoReference> dtoType : usages.dataReferenceTypes()) {
|
|
| 98 |
+ Set references = usages.get(dtoType);
|
|
| 99 |
+ String typeTitle = t(ObserveI18nDecoratorHelper.getTypeI18nKey(dtoType));
|
|
| 100 |
+ addDataReferenceUsages(dtoType, references, typeTitle);
|
|
| 101 |
+ }
|
|
| 97 | 102 |
}
|
| 98 | 103 |
|
| 99 | 104 |
BeanFilterableComboBox<R> comboBox = getReplace();
|
| ... | ... | @@ -119,18 +124,18 @@ public abstract class UsageUIHandlerSupport<R extends ReferentialDtoReference, U |
| 119 | 124 |
});
|
| 120 | 125 |
}
|
| 121 | 126 |
|
| 122 |
-// protected <D extends DataDto, R extends DataDtoReference<D, R>> void addDataReferenceUsages(Class<R> dtoType,
|
|
| 123 |
-// Set<R> references,
|
|
| 124 |
-// String typeTitle) {
|
|
| 125 |
-//
|
|
| 126 |
-// String typetitle = n("observe.common.Dto.label.usage.data.title");
|
|
| 127 |
-// typetitle = t(typetitle, typeTitle, references.size());
|
|
| 128 |
-//
|
|
| 129 |
-// Decorator<?> decorator = ObserveSwingApplicationContext.get().getDecoratorService().getDataReferenceDecorator(dtoType);
|
|
| 130 |
-// Objects.requireNonNull(decorator, "could not find decorator for type " + dtoType);
|
|
| 131 |
-//
|
|
| 132 |
-// buildUsagePanel(decorator, references, typetitle);
|
|
| 133 |
-// }
|
|
| 127 |
+ protected <D extends DataDto, R extends DataDtoReference<D, R>> void addDataReferenceUsages(Class<R> dtoType,
|
|
| 128 |
+ Set<R> references,
|
|
| 129 |
+ String typeTitle) {
|
|
| 130 |
+ |
|
| 131 |
+ String typetitle = n("observe.common.Dto.label.usage.data.title");
|
|
| 132 |
+ typetitle = t(typetitle, typeTitle, references.size());
|
|
| 133 |
+ |
|
| 134 |
+ Decorator<?> decorator = ObserveSwingApplicationContext.get().getDecoratorService().getDataReferenceDecorator(dtoType);
|
|
| 135 |
+ Objects.requireNonNull(decorator, "could not find decorator for type " + dtoType);
|
|
| 136 |
+ |
|
| 137 |
+ buildUsagePanel(decorator, references, typetitle);
|
|
| 138 |
+ }
|
|
| 134 | 139 |
|
| 135 | 140 |
|
| 136 | 141 |
protected <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>> void addReferentialReferenceUsages(Class<R> referenceType,
|
| ... | ... | @@ -264,6 +264,7 @@ |
| 264 | 264 |
<input>friend:target/models:*.model</input>
|
| 265 | 265 |
</inputs>
|
| 266 | 266 |
<templates>
|
| 267 |
+ org.nuiton.topia.templates.TopiaEntityDaoTransformer,
|
|
| 267 | 268 |
org.nuiton.topia.templates.TopiaMetaTransformer,
|
| 268 | 269 |
org.nuiton.topia.templates.TopiaMetadataModelGenerator
|
| 269 | 270 |
</templates>
|
| ... | ... | @@ -28,6 +28,8 @@ import fr.ird.observe.dto.data.seine.NonTargetCatchReference; |
| 28 | 28 |
import fr.ird.observe.dto.referential.ReferentialLocale;
|
| 29 | 29 |
import fr.ird.observe.entities.seine.NonTargetCatch;
|
| 30 | 30 |
|
| 31 |
+import java.util.Optional;
|
|
| 32 |
+ |
|
| 31 | 33 |
/**
|
| 32 | 34 |
* Created on 24/11/15.
|
| 33 | 35 |
*
|
| ... | ... | @@ -41,9 +43,8 @@ public class NonTargetCatchEntityReferenceBinder extends DataEntityReferenceBind |
| 41 | 43 |
|
| 42 | 44 |
@Override
|
| 43 | 45 |
public NonTargetCatchReference toReference(ReferentialLocale referentialLocale, NonTargetCatch entity) {
|
| 44 |
- |
|
| 45 | 46 |
return new NonTargetCatchReference(entity, entity.getSpecies().getScientificLabel(),
|
| 46 |
- entity.getSpeciesFate().getLabel(referentialLocale));
|
|
| 47 |
+ Optional.ofNullable(entity.getSpeciesFate()).map(e->e.getLabel(referentialLocale)).orElse(null));
|
|
| 47 | 48 |
|
| 48 | 49 |
}
|
| 49 | 50 |
}
|
| ... | ... | @@ -26,7 +26,7 @@ |
| 26 | 26 |
<parent>
|
| 27 | 27 |
<groupId>io.ultreia.maven</groupId>
|
| 28 | 28 |
<artifactId>pom</artifactId>
|
| 29 |
- <version>2018.52</version>
|
|
| 29 |
+ <version>2018.54</version>
|
|
| 30 | 30 |
</parent>
|
| 31 | 31 |
|
| 32 | 32 |
<groupId>fr.ird.observe</groupId>
|
| ... | ... | @@ -152,13 +152,13 @@ |
| 152 | 152 |
<maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
|
| 153 | 153 |
<buildDate>${maven.build.timestamp}</buildDate>
|
| 154 | 154 |
|
| 155 |
- <observeToolkitVersion>4.3</observeToolkitVersion>
|
|
| 155 |
+ <observeToolkitVersion>4.4-SNAPSHOT</observeToolkitVersion>
|
|
| 156 | 156 |
<!--<lib.version.java4all.topia>1.1.1</lib.version.java4all.topia>-->
|
| 157 | 157 |
<!--<lib.version.java4all.eugene>3.0-alpha-22</lib.version.java4all.eugene>-->
|
| 158 | 158 |
<!--<lib.version.java4all.jaxx>3.0-alpha-35</lib.version.java4all.jaxx>-->
|
| 159 | 159 |
<!--<lib.version.nuiton.topia>3.4.2-SNAPSHOT</lib.version.nuiton.topia>-->
|
| 160 |
+ <!--<lib.version.java4all.topia>1.1.3</lib.version.java4all.topia>-->
|
|
| 160 | 161 |
<lib.version.nuiton.validation>3.1</lib.version.nuiton.validation>
|
| 161 |
- <lib.version.java4all.topia>1.1.3</lib.version.java4all.topia>
|
|
| 162 | 162 |
<xworkVersion>2.3.35</xworkVersion>
|
| 163 | 163 |
<!--<lib.version.hibernate>5.2.10.Final</lib.version.hibernate>-->
|
| 164 | 164 |
<!--can't use 1.4.197 (date has changed + blob also-->
|
| ... | ... | @@ -270,7 +270,7 @@ POST /api/v1/data/seine/TripSeineService/save |
| 270 | 270 |
POST /api/v1/referential/ReferentialService/computeMissingReferential v1.referential.ReferentialServiceRestApi.computeMissingReferential
|
| 271 | 271 |
DELETE /api/v1/referential/ReferentialService/delete v1.referential.ReferentialServiceRestApi.delete
|
| 272 | 272 |
GET /api/v1/referential/ReferentialService/exists v1.referential.ReferentialServiceRestApi.exists
|
| 273 |
-GET /api/v1/referential/ReferentialService/findAllUsages v1.referential.ReferentialServiceRestApi.findAllUsages
|
|
| 273 |
+POST /api/v1/referential/ReferentialService/findAllUsages v1.referential.ReferentialServiceRestApi.findAllUsages
|
|
| 274 | 274 |
GET /api/v1/referential/ReferentialService/getReferenceSet v1.referential.ReferentialServiceRestApi.getReferenceSet
|
| 275 | 275 |
POST /api/v1/referential/ReferentialService/getReferentialIds v1.referential.ReferentialServiceRestApi.getReferentialIds
|
| 276 | 276 |
GET /api/v1/referential/ReferentialService/getReferentialReferenceSets v1.referential.ReferentialServiceRestApi.getReferentialReferenceSets
|
| ... | ... | @@ -27,8 +27,8 @@ import com.google.gson.JsonParseException; |
| 27 | 27 |
import fr.ird.observe.dto.ObserveDto;
|
| 28 | 28 |
import io.ultreia.java4all.http.HRestClientService;
|
| 29 | 29 |
import org.apache.commons.beanutils.converters.AbstractConverter;
|
| 30 |
-import org.apache.logging.log4j.Logger;
|
|
| 31 | 30 |
import org.apache.logging.log4j.LogManager;
|
| 31 |
+import org.apache.logging.log4j.Logger;
|
|
| 32 | 32 |
import org.debux.webmotion.server.call.Call;
|
| 33 | 33 |
import org.debux.webmotion.server.handler.ExecutorParametersInjectorHandler;
|
| 34 | 34 |
import org.debux.webmotion.server.mapping.Mapping;
|
| ... | ... | @@ -58,7 +58,13 @@ public class ObserveDtoInjector extends AbstractConverter implements ExecutorPar |
| 58 | 58 |
ObserveDto observeDto = null;
|
| 59 | 59 |
if (ObserveDto.class.isAssignableFrom(type)) {
|
| 60 | 60 |
|
| 61 |
- Call.ParameterTree parameterTree = call.getParameterTree().getObject().get(name);
|
|
| 61 |
+ Call.ParameterTree parameterTree;
|
|
| 62 |
+ try {
|
|
| 63 |
+ parameterTree = call.getParameterTree().getObject().get(name);
|
|
| 64 |
+ } catch (RuntimeException e) {
|
|
| 65 |
+ log.error(String.format("Could not get parameterTree for mapping: %s, call: %s - name: %s, type: %s", mapping, call, name, type), e);
|
|
| 66 |
+ throw e;
|
|
| 67 |
+ }
|
|
| 62 | 68 |
|
| 63 | 69 |
String gsonContent = ((String[]) parameterTree.getValue())[0];
|
| 64 | 70 |
|
| ... | ... | @@ -53,6 +53,7 @@ public class ObserveRequestBuilder extends HRequestBuilder { |
| 53 | 53 |
super.checkBeforeBuild();
|
| 54 | 54 |
|
| 55 | 55 |
setTimeout(TimeUnit.MINUTES, serviceContext.getInitializer().getHttpTimeout());
|
| 56 |
+ setSocketTimeout(TimeUnit.MINUTES, serviceContext.getInitializer().getHttpTimeout());
|
|
| 56 | 57 |
|
| 57 | 58 |
if (serviceContext.withApplicationLocale()) {
|
| 58 | 59 |
addHeader(REQUEST_APPLICATION_LOCALE, serviceContext.getApplicationLocale().toString());
|
| 1 |
+package fr.ird.observe.services.client.actions.synchro.referential.diff;
|
|
| 2 |
+ |
|
| 3 |
+/*-
|
|
| 4 |
+ * #%L
|
|
| 5 |
+ * ObServe :: Services client implementation
|
|
| 6 |
+ * %%
|
|
| 7 |
+ * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io
|
|
| 8 |
+ * %%
|
|
| 9 |
+ * This program is free software: you can redistribute it and/or modify
|
|
| 10 |
+ * it under the terms of the GNU General Public License as
|
|
| 11 |
+ * published by the Free Software Foundation, either version 3 of the
|
|
| 12 |
+ * License, or (at your option) any later version.
|
|
| 13 |
+ *
|
|
| 14 |
+ * This program is distributed in the hope that it will be useful,
|
|
| 15 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 16 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 17 |
+ * GNU General Public License for more details.
|
|
| 18 |
+ *
|
|
| 19 |
+ * You should have received a copy of the GNU General Public
|
|
| 20 |
+ * License along with this program. If not, see
|
|
| 21 |
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 22 |
+ * #L%
|
|
| 23 |
+ */
|
|
| 24 |
+ |
|
| 25 |
+import com.google.common.collect.ImmutableSet;
|
|
| 26 |
+import fr.ird.observe.dto.referential.ReferentialDto;
|
|
| 27 |
+import org.apache.http.HttpStatus;
|
|
| 28 |
+ |
|
| 29 |
+import java.util.concurrent.TimeUnit;
|
|
| 30 |
+ |
|
| 31 |
+public class ReferentialSynchronizeDiffServiceClient extends GeneratedReferentialSynchronizeDiffServiceClient {
|
|
| 32 |
+ |
|
| 33 |
+ @Override
|
|
| 34 |
+ public <R extends ReferentialDto> ImmutableSet<R> getReferential(Class<R> referentialName, ImmutableSet<String> ids) {
|
|
| 35 |
+ return executeRequest(create("getReferential")
|
|
| 36 |
+ .addParameter("referentialName", referentialName)
|
|
| 37 |
+ .addParameter("ids", ids, String.class)
|
|
| 38 |
+ .addAuthToken()
|
|
| 39 |
+ .setTimeout(TimeUnit.MINUTES, 1)
|
|
| 40 |
+ .post(), HttpStatus.SC_OK).toImmutableSet(referentialName);
|
|
| 41 |
+ }
|
|
| 42 |
+ |
|
| 43 |
+}
|
|
| \ No newline at end of file |
| 1 |
+package fr.ird.observe.services.client.referential;
|
|
| 2 |
+ |
|
| 3 |
+/*-
|
|
| 4 |
+ * #%L
|
|
| 5 |
+ * ObServe :: Services client implementation
|
|
| 6 |
+ * %%
|
|
| 7 |
+ * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io
|
|
| 8 |
+ * %%
|
|
| 9 |
+ * This program is free software: you can redistribute it and/or modify
|
|
| 10 |
+ * it under the terms of the GNU General Public License as
|
|
| 11 |
+ * published by the Free Software Foundation, either version 3 of the
|
|
| 12 |
+ * License, or (at your option) any later version.
|
|
| 13 |
+ *
|
|
| 14 |
+ * This program is distributed in the hope that it will be useful,
|
|
| 15 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 16 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 17 |
+ * GNU General Public License for more details.
|
|
| 18 |
+ *
|
|
| 19 |
+ * You should have received a copy of the GNU General Public
|
|
| 20 |
+ * License along with this program. If not, see
|
|
| 21 |
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 22 |
+ * #L%
|
|
| 23 |
+ */
|
|
| 24 |
+ |
|
| 25 |
+import fr.ird.observe.dto.reference.ReferentialDtoReference;
|
|
| 26 |
+import fr.ird.observe.dto.referential.ReferentialDto;
|
|
| 27 |
+import fr.ird.observe.spi.DtoModelHelper;
|
|
| 28 |
+import org.apache.http.HttpStatus;
|
|
| 29 |
+ |
|
| 30 |
+import java.util.concurrent.TimeUnit;
|
|
| 31 |
+ |
|
| 32 |
+public class ReferentialServiceClient extends GeneratedReferentialServiceClient {
|
|
| 33 |
+ |
|
| 34 |
+ @Override
|
|
| 35 |
+ public <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>> R loadReference(Class<D> type, String id) {
|
|
| 36 |
+ Class<R> rrClass = DtoModelHelper.fromReferentialDto(type).toReferenceType();
|
|
| 37 |
+ return executeRequest(create("loadReference")
|
|
| 38 |
+ .addParameter("type", type)
|
|
| 39 |
+ .addParameter("id", id)
|
|
| 40 |
+ .addAuthToken()
|
|
| 41 |
+ .setTimeout(TimeUnit.MINUTES, 1)
|
|
| 42 |
+ .get(), HttpStatus.SC_OK).toJson(rrClass);
|
|
| 43 |
+ }
|
|
| 44 |
+}
|
|
| \ No newline at end of file |
| ... | ... | @@ -56,13 +56,19 @@ public class ReferentialSynchronizeServiceLocal extends ObserveServiceLocal impl |
| 56 | 56 |
public void executeSqlsRequests(ReferentialSynchronizeSqlsRequest request, ReferentialSynchronizeSqlsRequest oppositeSqlsRequest) {
|
| 57 | 57 |
|
| 58 | 58 |
long startTime = TimeLog.getTime();
|
| 59 |
- |
|
| 59 |
+ byte[] deleteAssociationSqlCode = request.getDeleteAssociationSqlCode();
|
|
| 60 | 60 |
byte[] insertSqlCode = oppositeSqlsRequest.getInsertSqlCode();
|
| 61 |
+ byte[] insertAssociationSqlCode = oppositeSqlsRequest.getInsertAssociationSqlCode();
|
|
| 61 | 62 |
byte[] updateSqlCode = oppositeSqlsRequest.getUpdateSqlCode();
|
| 62 | 63 |
byte[] deleteSqlCode = request.getDeleteSqlCode();
|
| 63 | 64 |
byte[] desactivateSqlCode = request.getDesactivateSqlCode();
|
| 64 | 65 |
|
| 65 |
- getTopiaPersistenceContext().executeSqlScripts(insertSqlCode, updateSqlCode, desactivateSqlCode, deleteSqlCode);
|
|
| 66 |
+ getTopiaPersistenceContext().executeSqlScripts(deleteAssociationSqlCode,
|
|
| 67 |
+ insertSqlCode,
|
|
| 68 |
+ insertAssociationSqlCode,
|
|
| 69 |
+ updateSqlCode,
|
|
| 70 |
+ desactivateSqlCode,
|
|
| 71 |
+ deleteSqlCode);
|
|
| 66 | 72 |
|
| 67 | 73 |
timeLog.log(startTime, "executeSqlsRequests");
|
| 68 | 74 |
|
| ... | ... | @@ -10,12 +10,12 @@ package fr.ird.observe.services.local.service.referential; |
| 10 | 10 |
* it under the terms of the GNU General Public License as
|
| 11 | 11 |
* published by the Free Software Foundation, either version 3 of the
|
| 12 | 12 |
* License, or (at your option) any later version.
|
| 13 |
- *
|
|
| 13 |
+ *
|
|
| 14 | 14 |
* This program is distributed in the hope that it will be useful,
|
| 15 | 15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 16 | 16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 17 | 17 |
* GNU General Public License for more details.
|
| 18 |
- *
|
|
| 18 |
+ *
|
|
| 19 | 19 |
* You should have received a copy of the GNU General Public
|
| 20 | 20 |
* License along with this program. If not, see
|
| 21 | 21 |
* <http://www.gnu.org/licenses/gpl-3.0.html>.
|
| ... | ... | @@ -25,11 +25,16 @@ package fr.ird.observe.services.local.service.referential; |
| 25 | 25 |
import com.google.common.base.Joiner;
|
| 26 | 26 |
import com.google.common.collect.ImmutableList;
|
| 27 | 27 |
import com.google.common.collect.ImmutableSet;
|
| 28 |
+import fr.ird.observe.binder.data.DataEntityReferenceBinderSupport;
|
|
| 28 | 29 |
import fr.ird.observe.binder.referential.ReferentialEntityDtoBinderSupport;
|
| 29 | 30 |
import fr.ird.observe.binder.referential.ReferentialEntityReferenceBinderSupport;
|
| 30 | 31 |
import fr.ird.observe.dto.IdDto;
|
| 32 |
+import fr.ird.observe.dto.data.DataDto;
|
|
| 31 | 33 |
import fr.ird.observe.dto.form.Form;
|
| 32 | 34 |
import fr.ird.observe.dto.form.FormDefinition;
|
| 35 |
+import fr.ird.observe.dto.reference.DataDtoReference;
|
|
| 36 |
+import fr.ird.observe.dto.reference.DataDtoReferenceSet;
|
|
| 37 |
+import fr.ird.observe.dto.reference.DtoReference;
|
|
| 33 | 38 |
import fr.ird.observe.dto.reference.ReferentialDtoReference;
|
| 34 | 39 |
import fr.ird.observe.dto.reference.ReferentialDtoReferenceSet;
|
| 35 | 40 |
import fr.ird.observe.dto.referential.ReferenceStatus;
|
| ... | ... | @@ -39,6 +44,7 @@ import fr.ird.observe.dto.referential.SpeciesGroupDto; |
| 39 | 44 |
import fr.ird.observe.dto.referential.seine.ObservedSystemReference;
|
| 40 | 45 |
import fr.ird.observe.dto.result.SaveResultDto;
|
| 41 | 46 |
import fr.ird.observe.entities.EntityMap;
|
| 47 |
+import fr.ird.observe.entities.ObserveDataEntity;
|
|
| 42 | 48 |
import fr.ird.observe.entities.longline.TripLongline;
|
| 43 | 49 |
import fr.ird.observe.entities.referentiel.ObserveReferentialEntity;
|
| 44 | 50 |
import fr.ird.observe.entities.referentiel.Species;
|
| ... | ... | @@ -59,13 +65,14 @@ import fr.ird.observe.services.service.sql.SqlScriptProducerService; |
| 59 | 65 |
import fr.ird.observe.spi.DbModelHelper;
|
| 60 | 66 |
import fr.ird.observe.spi.DtoModelClasses;
|
| 61 | 67 |
import fr.ird.observe.spi.DtoModelHelper;
|
| 68 |
+import fr.ird.observe.spi.context.DataEntityContext;
|
|
| 62 | 69 |
import fr.ird.observe.spi.context.ReferentialDtoEntityContext;
|
| 63 | 70 |
import fr.ird.observe.spi.context.ReferentialEntityContext;
|
| 64 | 71 |
import fr.ird.observe.spi.context.ReferentialReferenceEntityContext;
|
| 65 | 72 |
import fr.ird.observe.spi.map.ImmutableDtoMap;
|
| 66 | 73 |
import fr.ird.observe.spi.map.ImmutableSetDtoMap;
|
| 67 |
-import org.apache.logging.log4j.Logger;
|
|
| 68 | 74 |
import org.apache.logging.log4j.LogManager;
|
| 75 |
+import org.apache.logging.log4j.Logger;
|
|
| 69 | 76 |
import org.nuiton.topia.persistence.TopiaDao;
|
| 70 | 77 |
import org.nuiton.topia.persistence.TopiaEntity;
|
| 71 | 78 |
import org.nuiton.topia.persistence.metadata.TopiaMetadataModel;
|
| ... | ... | @@ -208,7 +215,7 @@ public class ReferentialServiceLocal extends ObserveServiceLocal implements Refe |
| 208 | 215 |
}
|
| 209 | 216 |
|
| 210 | 217 |
@Override
|
| 211 |
- public <D extends ReferentialDto> ImmutableSetDtoMap<ReferentialDtoReference> findAllUsages(D bean) {
|
|
| 218 |
+ public <D extends ReferentialDto> ImmutableSetDtoMap<DtoReference> findAllUsages(D bean) {
|
|
| 212 | 219 |
|
| 213 | 220 |
ReferentialDtoEntityContext<D, ?, ?> spi = DbModelHelper.fromReferentialDto(bean);
|
| 214 | 221 |
Class<ObserveReferentialEntity> entityType = spi.toEntityType();
|
| ... | ... | @@ -218,12 +225,14 @@ public class ReferentialServiceLocal extends ObserveServiceLocal implements Refe |
| 218 | 225 |
TopiaDao<ObserveReferentialEntity> dao = getTopiaPersistenceContext().getDao(entityType);
|
| 219 | 226 |
EntityMap allUsages = new EntityMap(dao.findAllUsages(entity));
|
| 220 | 227 |
|
| 221 |
- ImmutableSetDtoMap.Builder<ReferentialDtoReference> result = ImmutableSetDtoMap.builder();
|
|
| 228 |
+ ImmutableSetDtoMap.Builder<DtoReference> result = ImmutableSetDtoMap.builder();
|
|
| 222 | 229 |
for (Class<? extends TopiaEntity> type : allUsages.keySet()) {
|
| 223 | 230 |
List<? extends TopiaEntity> entities = allUsages.get(type);
|
| 224 | 231 |
if (ObserveReferentialEntity.class.isAssignableFrom(type)) {
|
| 225 | 232 |
//noinspection unchecked
|
| 226 |
- findAllUsageReferential(DbModelHelper.fromReferentialEntity((Class) type), (List) entities, result);
|
|
| 233 |
+ addAllReferentialUsage(DbModelHelper.fromReferentialEntity((Class) type), (List) entities, result);
|
|
| 234 |
+ } else {
|
|
| 235 |
+ adddAllDataUsage(DbModelHelper.fromDataEntity((Class) type), (List) entities, result);
|
|
| 227 | 236 |
}
|
| 228 | 237 |
}
|
| 229 | 238 |
return result.build();
|
| ... | ... | @@ -242,13 +251,20 @@ public class ReferentialServiceLocal extends ObserveServiceLocal implements Refe |
| 242 | 251 |
return result;
|
| 243 | 252 |
}
|
| 244 | 253 |
|
| 245 |
- private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void findAllUsageReferential(ReferentialEntityContext<D, R, E> spi, List<E> entities, ImmutableSetDtoMap.Builder<ReferentialDtoReference> result) {
|
|
| 254 |
+ private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void addAllReferentialUsage(ReferentialEntityContext<D, R, E> spi, List<E> entities, ImmutableSetDtoMap.Builder<DtoReference> result) {
|
|
| 246 | 255 |
Class<R> referenceType = spi.toReferenceType();
|
| 247 | 256 |
ReferentialEntityReferenceBinderSupport<D, R, E> binder = spi.toEntityReferenceBinder();
|
| 248 | 257 |
ReferentialDtoReferenceSet<R> referenceSet = toReferentialReferenceSet(binder, entities, null);
|
| 249 | 258 |
result.put(referenceType, referenceSet.toSet());
|
| 250 | 259 |
}
|
| 251 | 260 |
|
| 261 |
+ private <D extends DataDto, R extends DataDtoReference<D, R>, E extends ObserveDataEntity> void adddAllDataUsage(DataEntityContext<D, R, E> spi, List<E> entities, ImmutableSetDtoMap.Builder<DtoReference> result) {
|
|
| 262 |
+ Class<R> referenceType = spi.toReferenceType();
|
|
| 263 |
+ DataEntityReferenceBinderSupport<D, R, E> binder = spi.toEntityReferenceBinder();
|
|
| 264 |
+ DataDtoReferenceSet<R> referenceSet = toDataReferenceSet(binder, entities);
|
|
| 265 |
+ result.put(referenceType, referenceSet.toSet());
|
|
| 266 |
+ }
|
|
| 267 |
+ |
|
| 252 | 268 |
@Override
|
| 253 | 269 |
public <D extends ReferentialDto> boolean exists(Class<D> type, String id) {
|
| 254 | 270 |
if (log.isTraceEnabled()) {
|
| ... | ... | @@ -87,7 +87,7 @@ public interface UnidirectionalReferentialSynchronizeLocalService extends Observ |
| 87 | 87 |
//tc-20160713 On ne met pas cette permission, car il s'agit d'appliquer un script sql, sans avoir besoin des droits applicatifs
|
| 88 | 88 |
// @WriteReferentialPermission
|
| 89 | 89 |
@Write
|
| 90 |
- @Post
|
|
| 90 |
+ @Post(useMultiPartForm = true)
|
|
| 91 | 91 |
void applySqlRequests(ImmutableSet<String> sqlRequests);
|
| 92 | 92 |
|
| 93 | 93 |
@ReadReferentialPermission
|
| ... | ... | @@ -40,7 +40,7 @@ public interface ReferentialSynchronizeService extends ObserveService { |
| 40 | 40 |
|
| 41 | 41 |
// Note : sur cette méthode aucun droit métier à poser, les actions sont légitimes
|
| 42 | 42 |
@Write
|
| 43 |
- @Post
|
|
| 43 |
+ @Post(useMultiPartForm = true)
|
|
| 44 | 44 |
void executeSqlsRequests(ReferentialSynchronizeSqlsRequest localSqlsRequest, ReferentialSynchronizeSqlsRequest oppositeSqlsRequest);
|
| 45 | 45 |
|
| 46 | 46 |
}
|
| ... | ... | @@ -10,12 +10,12 @@ package fr.ird.observe.services.service.actions.synchro.referential.ng; |
| 10 | 10 |
* it under the terms of the GNU General Public License as
|
| 11 | 11 |
* published by the Free Software Foundation, either version 3 of the
|
| 12 | 12 |
* License, or (at your option) any later version.
|
| 13 |
- *
|
|
| 13 |
+ *
|
|
| 14 | 14 |
* This program is distributed in the hope that it will be useful,
|
| 15 | 15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 16 | 16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 17 | 17 |
* GNU General Public License for more details.
|
| 18 |
- *
|
|
| 18 |
+ *
|
|
| 19 | 19 |
* You should have received a copy of the GNU General Public
|
| 20 | 20 |
* License along with this program. If not, see
|
| 21 | 21 |
* <http://www.gnu.org/licenses/gpl-3.0.html>.
|
| ... | ... | @@ -23,8 +23,8 @@ package fr.ird.observe.services.service.actions.synchro.referential.ng; |
| 23 | 23 |
*/
|
| 24 | 24 |
|
| 25 | 25 |
import fr.ird.observe.dto.ObserveDto;
|
| 26 |
-import org.apache.logging.log4j.Logger;
|
|
| 27 | 26 |
import org.apache.logging.log4j.LogManager;
|
| 27 |
+import org.apache.logging.log4j.Logger;
|
|
| 28 | 28 |
|
| 29 | 29 |
/**
|
| 30 | 30 |
* Created on 08/08/16.
|
| ... | ... | @@ -37,18 +37,24 @@ public class ReferentialSynchronizeSqlsRequest implements ObserveDto { |
| 37 | 37 |
/** Logger. */
|
| 38 | 38 |
private static final Logger log = LogManager.getLogger(ReferentialSynchronizeSqlsRequest.class);
|
| 39 | 39 |
|
| 40 |
+ private final byte[] insertAssociationSqlCode;
|
|
| 40 | 41 |
private final byte[] insertSqlCode;
|
| 41 | 42 |
private final byte[] updateSqlCode;
|
| 43 |
+ private final byte[] deleteAssociationSqlCode;
|
|
| 42 | 44 |
private final byte[] deleteSqlCode;
|
| 43 | 45 |
private final byte[] desactivateSqlCode;
|
| 44 | 46 |
|
| 45 | 47 |
private ReferentialSynchronizeSqlsRequest(String insertSqlCode,
|
| 48 |
+ String insertAssociationSqlCode,
|
|
| 46 | 49 |
String updateSqlCode,
|
| 47 | 50 |
String deleteSqlCode,
|
| 51 |
+ String deleteAssociationSqlCode,
|
|
| 48 | 52 |
String desactivateSqlCode) {
|
| 49 | 53 |
this.insertSqlCode = insertSqlCode.getBytes();
|
| 54 |
+ this.insertAssociationSqlCode = insertAssociationSqlCode.getBytes();
|
|
| 50 | 55 |
this.updateSqlCode = updateSqlCode.getBytes();
|
| 51 | 56 |
this.deleteSqlCode = deleteSqlCode.getBytes();
|
| 57 |
+ this.deleteAssociationSqlCode = deleteAssociationSqlCode.getBytes();
|
|
| 52 | 58 |
this.desactivateSqlCode = desactivateSqlCode.getBytes();
|
| 53 | 59 |
}
|
| 54 | 60 |
|
| ... | ... | @@ -68,21 +74,33 @@ public class ReferentialSynchronizeSqlsRequest implements ObserveDto { |
| 68 | 74 |
return deleteSqlCode;
|
| 69 | 75 |
}
|
| 70 | 76 |
|
| 77 |
+ public byte[] getInsertAssociationSqlCode() {
|
|
| 78 |
+ return insertAssociationSqlCode;
|
|
| 79 |
+ }
|
|
| 80 |
+ |
|
| 81 |
+ public byte[] getDeleteAssociationSqlCode() {
|
|
| 82 |
+ return deleteAssociationSqlCode;
|
|
| 83 |
+ }
|
|
| 84 |
+ |
|
| 71 | 85 |
public byte[] getDesactivateSqlCode() {
|
| 72 | 86 |
return desactivateSqlCode;
|
| 73 | 87 |
}
|
| 74 | 88 |
|
| 75 | 89 |
public static class Builder {
|
| 76 | 90 |
|
| 91 |
+ private final StringBuilder addAssociationTasksBuilder = new StringBuilder();
|
|
| 77 | 92 |
private final StringBuilder addTasksBuilder = new StringBuilder();
|
| 78 | 93 |
private final StringBuilder updateTasksBuilder = new StringBuilder();
|
| 79 | 94 |
private final StringBuilder deleteTasksBuilder = new StringBuilder();
|
| 95 |
+ private final StringBuilder deleteAssociationTasksBuilder = new StringBuilder();
|
|
| 80 | 96 |
private final StringBuilder desactivateTasksBuilder = new StringBuilder();
|
| 81 | 97 |
|
| 82 | 98 |
public ReferentialSynchronizeSqlsRequest build() {
|
| 83 | 99 |
return new ReferentialSynchronizeSqlsRequest(addTasksBuilder.toString(),
|
| 100 |
+ addAssociationTasksBuilder.toString(),
|
|
| 84 | 101 |
updateTasksBuilder.toString(),
|
| 85 | 102 |
deleteTasksBuilder.toString(),
|
| 103 |
+ deleteAssociationTasksBuilder.toString(),
|
|
| 86 | 104 |
desactivateTasksBuilder.toString());
|
| 87 | 105 |
}
|
| 88 | 106 |
|
| ... | ... | @@ -90,7 +108,11 @@ public class ReferentialSynchronizeSqlsRequest implements ObserveDto { |
| 90 | 108 |
if (log.isInfoEnabled()) {
|
| 91 | 109 |
log.info("Add add sql: " + sql);
|
| 92 | 110 |
}
|
| 93 |
- addTasksBuilder.append(sql);
|
|
| 111 |
+ if (sql.startsWith("$$_INSERT")) {
|
|
| 112 |
+ addAssociationTasksBuilder.append(sql.substring(3));
|
|
| 113 |
+ } else {
|
|
| 114 |
+ addTasksBuilder.append(sql);
|
|
| 115 |
+ }
|
|
| 94 | 116 |
return this;
|
| 95 | 117 |
}
|
| 96 | 118 |
|
| ... | ... | @@ -107,7 +129,11 @@ public class ReferentialSynchronizeSqlsRequest implements ObserveDto { |
| 107 | 129 |
if (log.isInfoEnabled()) {
|
| 108 | 130 |
log.info("Add delete sql: " + sql);
|
| 109 | 131 |
}
|
| 110 |
- deleteTasksBuilder.append(sql);
|
|
| 132 |
+ if (sql.startsWith("$$_DELETE")) {
|
|
| 133 |
+ deleteAssociationTasksBuilder.append(sql.substring(3));
|
|
| 134 |
+ } else {
|
|
| 135 |
+ deleteTasksBuilder.append(sql);
|
|
| 136 |
+ }
|
|
| 111 | 137 |
return this;
|
| 112 | 138 |
}
|
| 113 | 139 |
|
| ... | ... | @@ -35,7 +35,7 @@ import io.ultreia.java4all.http.spi.Get; |
| 35 | 35 |
*/
|
| 36 | 36 |
public interface NavigationService extends ObserveService {
|
| 37 | 37 |
|
| 38 |
- @Get
|
|
| 38 |
+ @Get(useMultiPartForm = true)
|
|
| 39 | 39 |
NavigationResult getNavigation(NavigationRequest request);
|
| 40 | 40 |
|
| 41 | 41 |
@Get
|
| ... | ... | @@ -10,12 +10,12 @@ package fr.ird.observe.services.service.data; |
| 10 | 10 |
* it under the terms of the GNU General Public License as
|
| 11 | 11 |
* published by the Free Software Foundation, either version 3 of the
|
| 12 | 12 |
* License, or (at your option) any later version.
|
| 13 |
- *
|
|
| 13 |
+ *
|
|
| 14 | 14 |
* This program is distributed in the hope that it will be useful,
|
| 15 | 15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 16 | 16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 17 | 17 |
* GNU General Public License for more details.
|
| 18 |
- *
|
|
| 18 |
+ *
|
|
| 19 | 19 |
* You should have received a copy of the GNU General Public
|
| 20 | 20 |
* License along with this program. If not, see
|
| 21 | 21 |
* <http://www.gnu.org/licenses/gpl-3.0.html>.
|
| ... | ... | @@ -39,16 +39,16 @@ public interface TripManagementService extends ObserveService { |
| 39 | 39 |
|
| 40 | 40 |
@ReadDataPermission
|
| 41 | 41 |
@ReadReferentialPermission
|
| 42 |
- @Post(timeOut = 120)
|
|
| 42 |
+ @Post(timeOut = 120, useMultiPartForm = true)
|
|
| 43 | 43 |
ExportTripResult exportTrip(ExportTripRequest exportRequest);
|
| 44 | 44 |
|
| 45 | 45 |
@WriteDataPermission
|
| 46 |
- @Post(timeOut = 120)
|
|
| 46 |
+ @Post(timeOut = 120, useMultiPartForm = true)
|
|
| 47 | 47 |
@Write
|
| 48 | 48 |
DeleteTripResult deleteTrip(DeleteTripRequest request);
|
| 49 | 49 |
|
| 50 | 50 |
@WriteDataPermission
|
| 51 |
- @Post(timeOut = 120)
|
|
| 51 |
+ @Post(timeOut = 120, useMultiPartForm = true)
|
|
| 52 | 52 |
@Write
|
| 53 | 53 |
ImportTripResult importTrip(ImportTripRequest request);
|
| 54 | 54 |
|
| ... | ... | @@ -25,6 +25,7 @@ package fr.ird.observe.services.service.referential; |
| 25 | 25 |
import com.google.common.collect.ImmutableSet;
|
| 26 | 26 |
import fr.ird.observe.dto.IdDto;
|
| 27 | 27 |
import fr.ird.observe.dto.form.Form;
|
| 28 |
+import fr.ird.observe.dto.reference.DtoReference;
|
|
| 28 | 29 |
import fr.ird.observe.dto.reference.ReferentialDtoReference;
|
| 29 | 30 |
import fr.ird.observe.dto.reference.ReferentialDtoReferenceSet;
|
| 30 | 31 |
import fr.ird.observe.dto.referential.ReferentialDto;
|
| ... | ... | @@ -32,7 +33,6 @@ import fr.ird.observe.dto.referential.SpeciesDto; |
| 32 | 33 |
import fr.ird.observe.dto.referential.SpeciesGroupDto;
|
| 33 | 34 |
import fr.ird.observe.dto.referential.seine.ObservedSystemReference;
|
| 34 | 35 |
import fr.ird.observe.dto.result.SaveResultDto;
|
| 35 |
-import org.nuiton.topia.persistence.script.TopiaSqlScript;
|
|
| 36 | 36 |
import fr.ird.observe.services.service.ObserveService;
|
| 37 | 37 |
import fr.ird.observe.services.spi.ReadDataPermission;
|
| 38 | 38 |
import fr.ird.observe.services.spi.ReadReferentialPermission;
|
| ... | ... | @@ -44,6 +44,7 @@ import io.ultreia.java4all.http.spi.Delete; |
| 44 | 44 |
import io.ultreia.java4all.http.spi.Get;
|
| 45 | 45 |
import io.ultreia.java4all.http.spi.Nullable;
|
| 46 | 46 |
import io.ultreia.java4all.http.spi.Post;
|
| 47 |
+import org.nuiton.topia.persistence.script.TopiaSqlScript;
|
|
| 47 | 48 |
|
| 48 | 49 |
import java.util.Date;
|
| 49 | 50 |
import java.util.List;
|
| ... | ... | @@ -106,10 +107,10 @@ public interface ReferentialService extends ObserveService { |
| 106 | 107 |
@Write
|
| 107 | 108 |
<E extends ReferentialDto> void replaceReference(Class<E> beanType, String idToReplace, String replaceId);
|
| 108 | 109 |
|
| 109 |
- @Get
|
|
| 110 |
+ @Post(useMultiPartForm = true)
|
|
| 110 | 111 |
@ReadReferentialPermission
|
| 111 | 112 |
@ReadDataPermission
|
| 112 |
- <R extends ReferentialDto> ImmutableSetDtoMap<ReferentialDtoReference> findAllUsages(R bean);
|
|
| 113 |
+ <R extends ReferentialDto> ImmutableSetDtoMap<DtoReference> findAllUsages(R bean);
|
|
| 113 | 114 |
|
| 114 | 115 |
@Get
|
| 115 | 116 |
@ReadReferentialPermission
|
| ... | ... | @@ -123,12 +124,12 @@ public interface ReferentialService extends ObserveService { |
| 123 | 124 |
|
| 124 | 125 |
@ReadReferentialPermission
|
| 125 | 126 |
@ReadDataPermission
|
| 126 |
- @Post
|
|
| 127 |
+ @Post(useMultiPartForm = true)
|
|
| 127 | 128 |
MissingReferentialResult computeMissingReferential(MissingReferentialRequest request);
|
| 128 | 129 |
|
| 129 | 130 |
@ReadReferentialPermission
|
| 130 | 131 |
@WriteDataPermission
|
| 131 |
- @Post
|
|
| 132 |
+ @Post(useMultiPartForm = true)
|
|
| 132 | 133 |
@Write
|
| 133 | 134 |
void insertMissingReferential(TopiaSqlScript sqlContent);
|
| 134 | 135 |
|
| ... | ... | @@ -22,9 +22,9 @@ package fr.ird.observe.services.service.sql; |
| 22 | 22 |
* #L%
|
| 23 | 23 |
*/
|
| 24 | 24 |
|
| 25 |
-import org.nuiton.topia.persistence.script.TopiaSqlScript;
|
|
| 26 | 25 |
import fr.ird.observe.services.service.ObserveService;
|
| 27 | 26 |
import io.ultreia.java4all.http.spi.Get;
|
| 27 |
+import org.nuiton.topia.persistence.script.TopiaSqlScript;
|
|
| 28 | 28 |
|
| 29 | 29 |
/**
|
| 30 | 30 |
* Created on 31/12/15.
|
| ... | ... | @@ -33,9 +33,9 @@ import io.ultreia.java4all.http.spi.Get; |
| 33 | 33 |
*/
|
| 34 | 34 |
public interface SqlScriptProducerService extends ObserveService {
|
| 35 | 35 |
|
| 36 |
- @Get
|
|
| 36 |
+ @Get(useMultiPartForm = true)
|
|
| 37 | 37 |
TopiaSqlScript produceAddSqlScript(AddSqlScriptProducerRequest request);
|
| 38 | 38 |
|
| 39 |
- @Get
|
|
| 39 |
+ @Get(useMultiPartForm = true)
|
|
| 40 | 40 |
TopiaSqlScript produceDeleteSqlScript(DeleteSqlScriptProducerRequest request);
|
| 41 | 41 |
}
|