diff --git a/README.md b/README.md index 8fd4e79..fa3d59f 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ Le code source a été compilé avec NetBeans 8.1 dans un environnement Linux. * Le logiciel NetBeans 8.1 version Linux est requis, il est téléchargeable sur la page suivante : https://netbeans.org/community/releases/81/ +Il faut également installer une nouvelle version de maven et la référencer dans les options de netbeans (Java > Maven) car les dépôts maven n'acceptent plus les requêtes non-https. + ## Importer le code dans NetBeans 1. Télécharger le zip correspondant au code source. Le zip doit contenir les deux dossiers **connectors** et **plugin-interface** @@ -28,11 +30,12 @@ Le logiciel NetBeans 8.1 version Linux est requis, il est téléchargeable sur l ## Compiler le code source -1. Vérifier les propriétés de chacun des deux projet, en accédant aux propriétés (Clic droit -> Properties) +1. Vérifier les propriétés de chacun des deux projets, en accédant aux propriétés (Clic droit -> Properties) - Catégorie General : modifier si besoin la version - Categorie Build>Compile : choisir la plateforme JAVA JDK 1.7 -2. Compiler le projet extract-connector-geoshop : +2. Compiler les deux projets extract-interface et extract-connector-geoshop : + - Depuis l'onglet files - clic droit -> Build With Dependencies (les tests unitaires sont exécutés en même temps) - Le fichier jar compilé est généré dans un sous-répertoire **target** du dossier **extract-connector-geoshop** (ex : /home/neuchatel/projects/geoshop/target/extract-connector-geoshop-1.2-RELEASE.jar) diff --git a/connectors/extract-connector-geoshop/.gitignore b/connectors/extract-connector-geoshop/.gitignore new file mode 100644 index 0000000..b7b9afb --- /dev/null +++ b/connectors/extract-connector-geoshop/.gitignore @@ -0,0 +1,57 @@ +# +# Project specific excludes +# + +tomcat + +# +# Default excludes +# + +# Binaries +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip +*.war +*.ear +*.sar +*.class + +# Maven +target/ + +# IntelliJ project files +*.iml +*.iws +*.ipr +.idea/ + +# eclipse project file +.settings/ +.classpath +.project + +# NetBeans specific +nbproject/private/ +build/ +nbbuild/ +dist/ +nbdist/ +nbactions.xml +nb-configuration.xml + + +# OS +.DS_Store + +# Misc +*.swp +release.properties +pom.xml.releaseBackup +pom.xml.tag + diff --git a/connectors/extract-connector-geoshop/pom.xml b/connectors/extract-connector-geoshop/pom.xml index 8917660..009ba56 100644 --- a/connectors/extract-connector-geoshop/pom.xml +++ b/connectors/extract-connector-geoshop/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.easysdi extract-connector-geoshop - 1.2-RELEASE + 1.2.1 jar diff --git a/connectors/extract-connector-geoshop/src/main/java/org/easysdi/extract/connectors/geoshop/Easysdiv4.java b/connectors/extract-connector-geoshop/src/main/java/org/easysdi/extract/connectors/geoshop/Easysdiv4.java index 02adee8..9873fca 100644 --- a/connectors/extract-connector-geoshop/src/main/java/org/easysdi/extract/connectors/geoshop/Easysdiv4.java +++ b/connectors/extract-connector-geoshop/src/main/java/org/easysdi/extract/connectors/geoshop/Easysdiv4.java @@ -1280,6 +1280,7 @@ private ConnectorImportResult addImportedProductsToResult(final String responseS JSONObject orderNode = orderArray.getJSONObject(i); final int orderId = orderNode.getInt("id"); String orderLabel = orderNode.getString("title"); + String orderType = orderNode.getString("order_type"); JSONObject client = orderNode.getJSONObject("client"); String clientName = client.getString("first_name") + " " + client.getString("last_name"); @@ -1316,7 +1317,7 @@ private ConnectorImportResult addImportedProductsToResult(final String responseS product.setProductGuid(String.valueOf(productId)); product.setProductLabel(productLabel); product.setOthersParameters("{\"data_format\" : \"" + productsArray.getJSONObject(productIndex) - .getString("data_format") + "\"}"); + .getString("data_format") + "\",\n" + "\"order_type\" : \"" + orderType + "\"}"); product.setPerimeter(orderNode.getString("geom")); product.setSurface(orderNode.getDouble("geom_area")); diff --git a/connectors/extract-connector-geoshop/target/classes/.netbeans_automatic_build b/connectors/extract-connector-geoshop/target/classes/.netbeans_automatic_build deleted file mode 100644 index e69de29..0000000 diff --git a/connectors/extract-connector-geoshop/target/classes/META-INF/services/org.easysdi.extract.connectors.common.IConnector b/connectors/extract-connector-geoshop/target/classes/META-INF/services/org.easysdi.extract.connectors.common.IConnector deleted file mode 100644 index 720332f..0000000 --- a/connectors/extract-connector-geoshop/target/classes/META-INF/services/org.easysdi.extract.connectors.common.IConnector +++ /dev/null @@ -1 +0,0 @@ -org.easysdi.extract.connectors.geoshop.Easysdiv4 diff --git a/connectors/extract-connector-geoshop/target/classes/connectors/easysdiv4/lang/fr/messages.properties b/connectors/extract-connector-geoshop/target/classes/connectors/easysdiv4/lang/fr/messages.properties deleted file mode 100644 index a670915..0000000 --- a/connectors/extract-connector-geoshop/target/classes/connectors/easysdiv4/lang/fr/messages.properties +++ /dev/null @@ -1,49 +0,0 @@ -# To change this license header, choose License Headers in Project Properties. -# To change this template file, choose Tools | Templates -# and open the template in the editor. -plugin.description=Connecteur pour la solution Geoshop Extract -plugin.help= -plugin.label=Plugin Geoshop Extract - -error.message.generic=La t\u00e2che Geoshop Extract a \u00e9chou\u00e9 - -label.serviceUrl=URL du service -label.login=Login distant -label.password=Mot de passe -label.uploadSize=Taille maximale d'upload (Mo) - -api.param.file=extract_result -api.param.is_rejected=is_rejected -api.param.comment=comment - -httperror.message.204=La requ\u00eate n'a retourn\u00e9 aucun contenu. -httperror.message.400=La syntaxe de la requ\u00eate est erron\u00e9e. -httperror.message.401=Une authentification est n\u00e9cessaire pour acc\u00e9der \u00e0 la ressource. -httperror.message.403=Le serveur a compris la requ\u00eate, mais refuse de l'ex\u00e9cuter. -httperror.message.404=Ressource non trouv\u00e9e. -httperror.message.405=M\u00e9thode de requ\u00eate non autoris\u00e9e. -httperror.message.406=La ressource demand\u00e9e n'est pas disponible dans un format qui respecterait les en-t\u00eates \"Accept\" de la requ\u00eate. -httperror.message.407=L'acc\u00e8s \u00e0 la ressource demand\u00e9 recquiert une authentification avec le proxy. -httperror.message.408=Temps d\u2019attente d\u2019une requ\u00eate du client \u00e9coul\u00e9. -httperror.message.409=La requ\u00eate ne peut \u00eatre trait\u00e9e en l\u2019\u00e9tat actuel. -httperror.message.410=La ressource n'est plus disponible et aucune adresse de redirection n\u2019est connue. -httperror.message.411=La longueur de la requ\u00eate n\u2019a pas \u00e9t\u00e9 pr\u00e9cis\u00e9e. -httperror.message.413=Traitement abandonn\u00e9 d\u00fb \u00e0 une requ\u00eate trop importante. -httperror.message.414=URI trop longue. -httperror.message.421=La requ\u00eate a \u00e9t\u00e9 envoy\u00e9e \u00e0 un serveur qui n'est pas capable de produire une r\u00e9ponse. -httperror.message.429=Le client a \u00e9mis trop de requ\u00eates dans un d\u00e9lai donn\u00e9. -httperror.message.431=Les ent\u00eates HTTP \u00e9mises d\u00e9passent la taille maximale admise par le serveur. -httperror.message.500=Erreur interne du serveur. -httperror.message.501=Fonctionnalit\u00e9 non support\u00e9e par le serveur. -httperror.message.502=Mauvaise r\u00e9ponse envoy\u00e9e \u00e0 un serveur interm\u00e9diaire par un autre serveur. -httperror.message.503=Service temporairement indisponible ou en maintenance. -httperror.message.504=Temps d\u2019attente d\u2019une r\u00e9ponse d\u2019un serveur \u00e0 un serveur interm\u00e9diaire \u00e9coul\u00e9. -httperror.message.505=Version HTTP non g\u00e9r\u00e9e par le serveur. - -exportresult.executing.failed=L'export a \u00e9chou\u00e9. -exportresult.prerequisite.error=Les conditions pour l'export ne sont pas remplies. -exportresult.prerequisite.nofile=Le traitement n'a g\u00e9n\u00e9r\u00e9 aucun fichier. -exportresult.upload.tooLarge=La taille du fichier \u00e0 exporter (%d\u00a0Mo) d\u00e9passe la limite fix\u00e9e pour le connecteur (%d\u00a0Mo). - -importorders.result.xmlempty=L'import des commandes a retourn\u00e9 un contenu vide. -importorder.exception=Une erreur est survenue lors de la tentative d'import des commandes diff --git a/connectors/extract-connector-geoshop/target/classes/connectors/easysdiv4/properties/config.properties b/connectors/extract-connector-geoshop/target/classes/connectors/easysdiv4/properties/config.properties deleted file mode 100644 index 07bd1af..0000000 --- a/connectors/extract-connector-geoshop/target/classes/connectors/easysdiv4/properties/config.properties +++ /dev/null @@ -1,33 +0,0 @@ -#06.02.2017 - Config file for easysdi connector -tokenEndPoint=token/ -getOrders.method=extract/order/ -setProduct.method=extract/orderitem/ -getOrders.attribute.guid=guid -getOrders.perimeterType.valid=coordinates -getOrders.xpath.orderlist=/orders/order -getOrders.xpath.order.label=/orders/order[@guid='']/name -getOrders.xpath.organism=/orders/order[@guid='']/client/organism/name -getOrders.xpath.organismGuid=/orders/order[@guid='']/client/organism/@guid -getOrders.xpath.client=//order[@guid='']/client/name -getOrders.xpath.clientGuid=//order[@guid='']/client/@guid -getOrders.xpath.clientDetails=//order[@guid='']/client/contact/address -getOrders.xpath.tiers=//order[@guid='']/tierce/organism/contact/address/organismname -getOrders.xpath.tiersdetails=//order[@guid='']/tierce/organism/contact/address -getOrders.xpath.surface=//order[@guid='']/perimeter/surface -getOrders.xpath.perimeter=//order[@guid='']/perimeter/contents/content -getOrders.xpath.perimeterType=//order[@guid='']/perimeter/@type -getOrders.xpath.productlist=//order[@guid='']/suppliers/supplier/products/product -setProduct.attribute.guid=guid -setProduct.xpath.product=/product -setProduct.xpath.order=/product/order -setProduct.xpath.remark=/product/remark -setProduct.xpath.filename=/product/filename -setProduct.rejection.filepath=connectors/easysdiv4/templates/export_rejection_case.xml -setProduct.success.filepath=connectors/easysdiv4/templates/export_localandpredefined_case.xml -setProductResult.node.code=sdi:code -setProductResult.node.message=sdi:message -setProductResult.node.details=sdi:details -code.serviceUrl=url -code.login=login -code.password=pass -code.uploadSize=uploadSize diff --git a/connectors/extract-connector-geoshop/target/classes/connectors/easysdiv4/templates/export_localandpredefined_case.xml b/connectors/extract-connector-geoshop/target/classes/connectors/easysdiv4/templates/export_localandpredefined_case.xml deleted file mode 100644 index d35d9bc..0000000 --- a/connectors/extract-connector-geoshop/target/classes/connectors/easysdiv4/templates/export_localandpredefined_case.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - available - - - - local - file.xml - \ No newline at end of file diff --git a/connectors/extract-connector-geoshop/target/classes/connectors/easysdiv4/templates/export_rejection_case.xml b/connectors/extract-connector-geoshop/target/classes/connectors/easysdiv4/templates/export_rejection_case.xml deleted file mode 100644 index 9e815b0..0000000 --- a/connectors/extract-connector-geoshop/target/classes/connectors/easysdiv4/templates/export_rejection_case.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - rejected - - - \ No newline at end of file diff --git a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/ConnectorConfig.class b/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/ConnectorConfig.class deleted file mode 100644 index f07b280..0000000 Binary files a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/ConnectorConfig.class and /dev/null differ diff --git a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/ConnectorImportResult.class b/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/ConnectorImportResult.class deleted file mode 100644 index 53b893f..0000000 Binary files a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/ConnectorImportResult.class and /dev/null differ diff --git a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/Easysdiv4.class b/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/Easysdiv4.class deleted file mode 100644 index 4a9ebc2..0000000 Binary files a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/Easysdiv4.class and /dev/null differ diff --git a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/ExportRequest.class b/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/ExportRequest.class deleted file mode 100644 index 566ac42..0000000 Binary files a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/ExportRequest.class and /dev/null differ diff --git a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/ExportResult.class b/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/ExportResult.class deleted file mode 100644 index ad00a1e..0000000 Binary files a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/ExportResult.class and /dev/null differ diff --git a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/LocalizedMessages.class b/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/LocalizedMessages.class deleted file mode 100644 index f35dc2d..0000000 Binary files a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/LocalizedMessages.class and /dev/null differ diff --git a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/Product.class b/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/Product.class deleted file mode 100644 index c6cd5c1..0000000 Binary files a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/Product.class and /dev/null differ diff --git a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/utils/ZipUtils.class b/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/utils/ZipUtils.class deleted file mode 100644 index 1453c07..0000000 Binary files a/connectors/extract-connector-geoshop/target/classes/org/easysdi/extract/connectors/geoshop/utils/ZipUtils.class and /dev/null differ diff --git a/connectors/extract-connector-geoshop/target/extract-connector-geoshop-1.2-RELEASE.jar b/connectors/extract-connector-geoshop/target/extract-connector-geoshop-1.2-RELEASE.jar deleted file mode 100644 index 8cdc229..0000000 Binary files a/connectors/extract-connector-geoshop/target/extract-connector-geoshop-1.2-RELEASE.jar and /dev/null differ diff --git a/connectors/extract-connector-geoshop/target/maven-archiver/pom.properties b/connectors/extract-connector-geoshop/target/maven-archiver/pom.properties deleted file mode 100644 index 0a583e0..0000000 --- a/connectors/extract-connector-geoshop/target/maven-archiver/pom.properties +++ /dev/null @@ -1,5 +0,0 @@ -#Generated by Maven -#Mon Feb 15 23:00:50 CET 2021 -version=1.2-RELEASE -groupId=org.easysdi -artifactId=extract-connector-geoshop diff --git a/connectors/extract-connector-geoshop/target/original-extract-connector-geoshop-1.2-RELEASE.jar b/connectors/extract-connector-geoshop/target/original-extract-connector-geoshop-1.2-RELEASE.jar deleted file mode 100644 index 1f7b2ee..0000000 Binary files a/connectors/extract-connector-geoshop/target/original-extract-connector-geoshop-1.2-RELEASE.jar and /dev/null differ diff --git a/connectors/extract-connector-geoshop/target/surefire-reports/TEST-org.easysdi.extract.connectors.geoshop.Easysdiv4Test.xml b/connectors/extract-connector-geoshop/target/surefire-reports/TEST-org.easysdi.extract.connectors.geoshop.Easysdiv4Test.xml deleted file mode 100644 index 27d6582..0000000 --- a/connectors/extract-connector-geoshop/target/surefire-reports/TEST-org.easysdi.extract.connectors.geoshop.Easysdiv4Test.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/connectors/extract-connector-geoshop/target/surefire-reports/org.easysdi.extract.connectors.geoshop.Easysdiv4Test.txt b/connectors/extract-connector-geoshop/target/surefire-reports/org.easysdi.extract.connectors.geoshop.Easysdiv4Test.txt deleted file mode 100644 index 0fdbfcb..0000000 --- a/connectors/extract-connector-geoshop/target/surefire-reports/org.easysdi.extract.connectors.geoshop.Easysdiv4Test.txt +++ /dev/null @@ -1,4 +0,0 @@ -------------------------------------------------------------------------------- -Test set: org.easysdi.extract.connectors.geoshop.Easysdiv4Test -------------------------------------------------------------------------------- -Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.863 sec diff --git a/connectors/extract-connector-geoshop/target/test-classes/.netbeans_automatic_build b/connectors/extract-connector-geoshop/target/test-classes/.netbeans_automatic_build deleted file mode 100644 index e69de29..0000000 diff --git a/connectors/extract-connector-geoshop/target/test-classes/org/easysdi/extract/connectors/geoshop/Easysdiv4Test.class b/connectors/extract-connector-geoshop/target/test-classes/org/easysdi/extract/connectors/geoshop/Easysdiv4Test.class deleted file mode 100644 index 7895bf6..0000000 Binary files a/connectors/extract-connector-geoshop/target/test-classes/org/easysdi/extract/connectors/geoshop/Easysdiv4Test.class and /dev/null differ diff --git a/plugin-interface/.gitignore b/plugin-interface/.gitignore new file mode 100644 index 0000000..b7b9afb --- /dev/null +++ b/plugin-interface/.gitignore @@ -0,0 +1,57 @@ +# +# Project specific excludes +# + +tomcat + +# +# Default excludes +# + +# Binaries +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip +*.war +*.ear +*.sar +*.class + +# Maven +target/ + +# IntelliJ project files +*.iml +*.iws +*.ipr +.idea/ + +# eclipse project file +.settings/ +.classpath +.project + +# NetBeans specific +nbproject/private/ +build/ +nbbuild/ +dist/ +nbdist/ +nbactions.xml +nb-configuration.xml + + +# OS +.DS_Store + +# Misc +*.swp +release.properties +pom.xml.releaseBackup +pom.xml.tag + diff --git a/plugin-interface/pom.xml b/plugin-interface/pom.xml index b6285f4..85b9e86 100644 --- a/plugin-interface/pom.xml +++ b/plugin-interface/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.easysdi extract-plugin-interface - 1.2-RELEASE + 1.2.1 jar