diff --git a/src/module_extraction/README.md b/src/module_extraction/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2bf5eb5277169ad7162e37165eaf8313088b0882 --- /dev/null +++ b/src/module_extraction/README.md @@ -0,0 +1,3 @@ +# module_extraction + +Module extraction for Vitis \ No newline at end of file diff --git a/src/module_extraction/_install/dependency.xml b/src/module_extraction/_install/dependency.xml new file mode 100755 index 0000000000000000000000000000000000000000..f8953c391d61601d251acb3624b2f30f5a0eb83d --- /dev/null +++ b/src/module_extraction/_install/dependency.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<installer> + <schema> + <name>s_extraction</name> + <dependenciesCollection> + <dependency> + <nature>schema</nature> + <name>s_vitis</name> + <object>vitis</object> + </dependency> + </dependenciesCollection> + </schema> + <dependenciesCollection> + <dependency> + <nature>framework</nature> + <name>vitis</name> + </dependency> + </dependenciesCollection> +</installer> diff --git a/src/module_extraction/_install/fileToDelete.txt b/src/module_extraction/_install/fileToDelete.txt new file mode 100755 index 0000000000000000000000000000000000000000..0f43fe95ffffa53fcfefcacba2c2e5215d7b6a89 --- /dev/null +++ b/src/module_extraction/_install/fileToDelete.txt @@ -0,0 +1,6 @@ +javascript/deps.js +javascript/script_module.js +javascript/statistics.js +javascript/widget/script_widget.js +javascript/widget/widgetMod.js +javascript/widget/deps.js \ No newline at end of file diff --git a/src/module_extraction/_install/folderToDelete.txt b/src/module_extraction/_install/folderToDelete.txt new file mode 100755 index 0000000000000000000000000000000000000000..b92d8976db30897968846102e68520be453b8313 --- /dev/null +++ b/src/module_extraction/_install/folderToDelete.txt @@ -0,0 +1,2 @@ +javascript/controllers +javascript/directives \ No newline at end of file diff --git a/src/module_extraction/module/forms/configuration/configuration_vitis_configuration_extractionConfig.json b/src/module_extraction/module/forms/configuration/configuration_vitis_configuration_extractionConfig.json new file mode 100644 index 0000000000000000000000000000000000000000..f25d20c9b7b577b5afc23a8b5b42b768efc9d7cd --- /dev/null +++ b/src/module_extraction/module/forms/configuration/configuration_vitis_configuration_extractionConfig.json @@ -0,0 +1 @@ +{"insert":{"rows":[],"tabs":{"position":"top","list":[{"label":"Tab 0","elements":[]}]}},"search":{"rows":[]},"display":{"rows":[]},"update":{"name":"configuration_extraction_module-form","title":"","input_size":"xxs","nb_cols":7,"javascript":false,"rows":[{"fields":[{"name":"color_mutualized","type":"text","label":"CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_COLOR_MUTUALIZED","nb_cols":12,"id":"color_mutualized","default_value":"green"}]},{"fields":[{"name":"color_no_mutualized","type":"text","label":"CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_COLOR_NO_MUTUALIZED","nb_cols":12,"id":"color_no_mutualized","default_value":"red"}]},{"fields":[{"name":"sig","type":"text","label":"CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_SIG","nb_cols":12,"id":"sig","default_value":"*.shp|*.*"}]},{"fields":[{"name":"dao","type":"text","label":"CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_DAO","nb_cols":12,"id":"dao","default_value":"*.dao"}]},{"fields":[{"type":"button","name":"form_submit","class":"btn-ungroup btn-group-sm","nb_cols":12,"buttons":[{"type":"submit","name":"form_submit","label":"FORM_UPDATE","class":"btn-primary"}],"id":"form_submit_6_1"}]}],"event":"updateProperties('extraction')","afterEvent":"editSectionForm()","tabs":{"position":"top","list":[{"label":"Tab 0","elements":["color_mutualized","color_no_mutualized","sig","dao","form_submit"]}]}},"datasources":{}} \ No newline at end of file diff --git a/src/module_extraction/module/forms/extraction/extraction_extraction_extraction.js b/src/module_extraction/module/forms/extraction/extraction_extraction_extraction.js new file mode 100755 index 0000000000000000000000000000000000000000..d83bebed77076de627a373d23da07dd8ebf5b03e --- /dev/null +++ b/src/module_extraction/module/forms/extraction/extraction_extraction_extraction.js @@ -0,0 +1,500 @@ +/* global angular, goog, vitisApp, bootbox */ + +//bloque les delete du destructeur à éviter +//'use strict'; + +console.info("Generateur_wab_generator_1 loaded --> your functions are ready"); +/*********************************************************************************** + Signaletique_Recap_0 Javascript + ***********************************************************************************/ + +var oFormRequired = { + "sUrl": "", + "scope_": {}, + "toDestructor": [] +}; +/** + * constructor_form + * Fonction appelé à l'initialisation du formulaire si dans la structure json javascript vaut "true" + * @param {type} scope + * @param {type} s_url + * @returns {undefined} + */ +var constructor_form = function (scope, s_url) { + ////////////////////////////////////////////////////////// + //Ne pas toucher + console.log("Constructor"); + + oFormRequired.sUrl = s_url; + oFormRequired.scope_ = scope; + //console.log(scope); + ////////////////////////////////////////////////////////// + // Permet de recharge le javascript d'une section à une autre + var envSrvc = angular.element(vitisApp.appWorkspaceListDrtv).injector().get(["envSrvc"]); + var formSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["formSrvc"]); + // + var oElemDefCt = formSrvc["getFormElementDefinition"]("id_conseil", envSrvc["sFormDefinitionName"], envSrvc["oFormDefinition"]); + var oElemDefCom = formSrvc["getFormElementDefinition"]("id_com", envSrvc["sFormDefinitionName"], envSrvc["oFormDefinition"]); + var oElemDefExtent = formSrvc["getFormElementDefinition"]("extent", envSrvc["sFormDefinitionName"], envSrvc["oFormDefinition"]); + + + //Comportements différents selon le mode (insert, update, search, display) (GTF : accés uniquement au mode insert) + //if (oFormRequired.scope_.sFormDefinitionName.indexOf("insert") > -1 || (oFormRequired.scope_.sFormDefinitionName.indexOf("update") > -1)) { + oFormRequired.toDestructor.push(oFormRequired.scope_.$watch("oFormValues." + oFormRequired.scope_.sFormDefinitionName + ".extent_method.selectedOption", function (value) { + //console.log(value); + if (value) { + if (value["value"]) { + //oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]["name"] = value["value"] + "_"; + if (value["value"] == "id_conseil") + { + oElemDefCt["visible"] = true; + oElemDefCom["visible"] = false; + oElemDefExtent["visible"] = false; + } + else if (value["value"] == "id_com") + { + oElemDefCt["visible"] = false; + oElemDefCom["visible"] = true; + oElemDefExtent["visible"] = false; + } + else + { + oElemDefCt["visible"] = false; + oElemDefCom["visible"] = false; + oElemDefExtent["visible"] = true; + } + } + else + { + oElemDefCt["visible"] = false; + oElemDefCom["visible"] = false; + } + + } + })); + //Evènement lorsqu'on choisie un CT + oFormRequired.toDestructor.push(oFormRequired.scope_.$watch("oFormValues." + oFormRequired.scope_.sFormDefinitionName + ".id_conseil.selectedOption", function (value) { + if (value && typeof(oFormRequired) !== "undefined") + { + getLayerTree(oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]).then( function(aNodes){ + var oTreeview = $("#layers_9_1_treeview")["treeview"](true); + $("layers_9_1_treeview")["treeview"](true); + //On recréer un arbre + oTreeview["init"]({"data": aNodes, + "onNodeChecked": oTreeview.options.onNodeChecked, + "onNodeUnchecked": oTreeview.options.onNodeUnchecked, + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true}); + scope.$applyAsync(); + }); + + getStatsTree(oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]).then( function(aNodes){ + var oTreeview = $("#statistique_9_1_treeview")["treeview"](true); + $("statistique_9_1_treeview")["treeview"](true); + //On recréer un arbre + oTreeview["init"]({"data": aNodes, + "onNodeChecked": oTreeview.options.onNodeChecked, + "onNodeUnchecked": oTreeview.options.onNodeUnchecked, + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true}); + scope.$applyAsync(); + }); + } + + })); + //Evènement lorsqu'on choisie une commune + oFormRequired.toDestructor.push(oFormRequired.scope_.$watch("oFormValues." + oFormRequired.scope_.sFormDefinitionName + ".id_com.selectedOption", function (value) { + if (value && typeof(oFormRequired) !== "undefined") + { + getLayerTree(oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]).then( function(aNodes){ + var oTreeview = $("#layers_9_1_treeview")["treeview"](true); + $("layers_9_1_treeview")["treeview"]({"data":aNodes}); + //On recréer un arbre + oTreeview["init"]({"data": aNodes, + "onNodeChecked": oTreeview.options.onNodeChecked, + "onNodeUnchecked": oTreeview.options.onNodeUnchecked, + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true}); + scope.$applyAsync(); + + }); + + getStatsTree(oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]).then( function(aNodes){ + var oTreeview = $("#statistique_9_1_treeview")["treeview"](true); + $("statistique_9_1_treeview")["treeview"](true); + //On recréer un arbre + oTreeview["init"]({"data": aNodes, + "onNodeChecked": oTreeview.options.onNodeChecked, + "onNodeUnchecked": oTreeview.options.onNodeUnchecked, + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true}); + scope.$applyAsync(); + }); + } + })); + //Evenement lorsqu'on saisie un nouveau polygone + oFormRequired.toDestructor.push(oFormRequired.scope_.$watch("oFormValues." + oFormRequired.scope_.sFormDefinitionName + ".extent", function (value) { + if (value && typeof(oFormRequired) !== "undefined") + { + //getLayerTree(value, "geom"); + getLayerTree(oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]).then( function(aNodes){ + //console.log(aNodes); + //layers_9_1_treeview + var oTreeview = $("#layers_9_1_treeview")["treeview"](true); + $("layers_9_1_treeview")["treeview"]({"data":aNodes}); + //On recréer un arbre + oTreeview["init"]({"data": aNodes, + "onNodeChecked": oTreeview.options.onNodeChecked, + "onNodeUnchecked": oTreeview.options.onNodeUnchecked, + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true}); + scope.$applyAsync(); + + }); + + getStatsTree(oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]).then( function(aNodes){ + var oTreeview = $("#statistique_9_1_treeview")["treeview"](true); + $("statistique_9_1_treeview")["treeview"](true); + //On recréer un arbre + oTreeview["init"]({"data": aNodes, + "onNodeChecked": oTreeview.options.onNodeChecked, + "onNodeUnchecked": oTreeview.options.onNodeUnchecked, + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true}); + scope.$applyAsync(); + }); + + + } + })); +}; + +/** + * Fonction appelée lorsqu'on choisit la CT ou la commune ou si on saisit un polygone dans le formulaire + * @return undefined + */ +function getLayerTree(oFormValues) { + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + var $q = angular.element(vitisApp.appHtmlFormDrtv).injector().get(["$q"]); + // + $log.info("getLayerTree"); + // Charge la liste des couches. + + var deferred = $q.defer(); + var promise = deferred.promise; + if (oFormValues.extent_method.selectedOption["value"] != "") { + ajaxRequest({ + "method": "GET", + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extractions/Layers", + "params": getUrlParams(), + "scope": angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"] + "']").scope(), + "success": function(response) { + if (response["data"]["status"] == 1) { + console.log(response["data"]); + var scope = angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"] + "']").scope(); + // Création de l'arborescence des couches pour le champ "treeview". + var aLayers = response["data"]["layers"]; + var aNodes = []; + var stats = true; + + if (typeof(aLayers) != "undefined") { + var aCategories = Object.keys(aLayers); + for (var i in aCategories) { + var aNode = {"text": aCategories[i], "nodes": []} + for (var j in aLayers[aCategories[i]]) { + if (aLayers[aCategories[i]][j]["statistique"] !== true) + { + stats = false; + aNode["nodes"].push({"text": aLayers[aCategories[i]][j]["text"], "value": aLayers[aCategories[i]][j]["value"], "mutualized": aLayers[aCategories[i]][j]["mutualized"]}); + } + } + if (stats !== true) + { + aNodes.push(aNode); + } + stats = true; + } + } + + this["setTreeviewNodesState"] = function (aNodes) { + for (var i in aNodes) { + if (typeof (aNodes[i]["nodes"]) != "undefined") + this["setTreeviewNodesState"](aNodes[i]["nodes"]); + else { + if (typeof (aNodes[i]["state"]) == "undefined") + { + aNodes[i]["state"] = {}; + } + var aCheckedItem = []; + var sValue = scope["oFormValues"][envSrvc["sFormDefinitionName"]]["layers"]; + if (typeof (sValue) == "string" && sValue != "") + { + aCheckedItem = sValue.split("|"); + } + if (aCheckedItem.indexOf(String(aNodes[i]["value"])) != -1) + { + aNodes[i]["state"]["checked"] = true; + } + //Si la couche est mutualisée + if (aNodes[i]['mutualized'] == true) + { + console.log(propertiesSrvc["color_mutualized"]); + aNodes[i]["color"] = propertiesSrvc["color_mutualized"]; + } else if (aNodes[i]['mutualized'] == false) { + aNodes[i]["color"] = propertiesSrvc["color_no_mutualized"]; + } + } + } + } + this["setTreeviewNodesState"](aNodes); + deferred.resolve(aNodes); + } else { + // + var oOptions = { + "className": "modal-danger" + }; + // Message d'erreur ? + if (response["data"]["errorMessage"] != null) + oOptions["message"] = response["data"]["errorMessage"]; + scope.$root["modalWindow"]("alert", "REQUEST_ERROR", oOptions); + } + } + }); + } + return promise; +} + +/** + * Fonction appelée lorsqu'on choisit la CT ou la commune ou si on saisit un polygone dans le formulaire + * @return undefined + */ +function getStatsTree(oFormValues) { + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + var $q = angular.element(vitisApp.appHtmlFormDrtv).injector().get(["$q"]); + // + $log.info("getLayerTree"); + // Charge la liste des couches. + + var deferred = $q.defer(); + var promise = deferred.promise; + if (oFormValues.extent_method.selectedOption["value"] != "") { + ajaxRequest({ + "method": "GET", + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extractions/Layers", + "params": getUrlParams(), + "scope": angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"] + "']").scope(), + "success": function(response) { + if (response["data"]["status"] == 1) { + console.log(response["data"]); + var scope = angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"] + "']").scope(); + // Création de l'arborescence des statistiques pour le champ "treeview". + var aLayers = response["data"]["layers"]; + var aNodes = []; + var stats = false; + + if (typeof(aLayers) != "undefined") { + var aCategories = Object.keys(aLayers); + for (var i in aCategories) { + var aNode = {"text": aCategories[i], "nodes": []} + for (var j in aLayers[aCategories[i]]) { + if (aLayers[aCategories[i]][j]["statistique"] === true) + { + stats = true; + aNode["nodes"].push({"text": aLayers[aCategories[i]][j]["text"], "value": aLayers[aCategories[i]][j]["value"], "mutualized": aLayers[aCategories[i]][j]["mutualized"]}); + } + } + if (stats === true) + { + aNodes.push(aNode); + } + stats = false; + } + } + + this["setTreeviewNodesState"] = function (aNodes) { + for (var i in aNodes) { + if (typeof (aNodes[i]["nodes"]) != "undefined") + this["setTreeviewNodesState"](aNodes[i]["nodes"]); + else { + if (typeof (aNodes[i]["state"]) == "undefined") + { + aNodes[i]["state"] = {}; + } + var aCheckedItem = []; + var sValue = scope["oFormValues"][envSrvc["sFormDefinitionName"]]["statistique"]; + if (typeof (sValue) == "string" && sValue != "") + { + aCheckedItem = sValue.split("|"); + } + if (aCheckedItem.indexOf(String(aNodes[i]["value"])) != -1) + { + aNodes[i]["state"]["checked"] = true; + } + //Si la couche est mutualisée + if (aNodes[i]['mutualized'] == true) + { + aNodes[i]["color"] = propertiesSrvc["color_mutualized"]; + } else if (aNodes[i]['mutualized'] == false) { + aNodes[i]["color"] = propertiesSrvc["color_no_mutualized"]; + } + } + } + } + this["setTreeviewNodesState"](aNodes); + deferred.resolve(aNodes); + } else { + // + var oOptions = { + "className": "modal-danger" + }; + // Message d'erreur ? + if (response["data"]["errorMessage"] != null) + oOptions["message"] = response["data"]["errorMessage"]; + scope.$root["modalWindow"]("alert", "REQUEST_ERROR", oOptions); + } + } + }); + } + return promise; +} + +/** + * Fonction qui renvoie les paramètres pour effectuer la requête AJAX + * @returns {getUrlParams.oUrlParams} + */ +function getUrlParams() { + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + var sTable = ""; + var sCompare_operator = ""; + var sColumn = ""; + var aValue = []; + var aValeur = []; + + if (oFormValues.extent_method.selectedOption["value"] == "id_conseil") + { + sTable = "ct"; + sColumn = "ct_id"; + sCompare_operator = "IN"; + aValue = oFormValues.id_conseil.selectedOption; + } + else if (oFormValues.extent_method.selectedOption["value"] == "id_com") + { + sTable = "commune"; + sColumn = "commune_id"; + sCompare_operator = "IN"; + aValue = oFormValues.id_com.selectedOption; + } + + if (oFormValues.extent_method.selectedOption["value"] == "extent") + { + sTable = "ct"; + sColumn = "geom"; + sCompare_operator = "INTERSECT"; + aValeur = "SRID=2154;"+ oFormValues.extent; + //console.log('Compare_operator ' + compare_operator + ' valeur ' + valeur ); + } + else + { + if(aValue) + { + for (var i = 0; i < aValue.length; i++) + { + //Si c'est une sélection vide + if(aValue[i]["value"] == "") + { + //On remplace la valeur vide par un id négatif + aValeur[i] = "-1"; + } + else if (oFormValues.extent_method.selectedOption["value"] == "id_conseil") + { + aValeur[i] = aValue[i]["value"]; + } + else if (oFormValues.extent_method.selectedOption["value"] == "id_com") + { + aValeur[i] = aValue[i]["value"]; + } + else if (oFormValues.extent_method.selectedOption["value"] == "id_conseil") + { + aValeur[i] = aValue[i]["value"]; + } + } + } + else + { + aValeur[0] = "-1"; + } + } + + var oUrlParams = { + "schema": propertiesSrvc["schema_extraction"], + "table": sTable, + "distinct": true, + "filter": { + "column": sColumn, + "compare_operator": sCompare_operator, + "value": aValeur + } + } + return oUrlParams; +} + +/** + * destructor_form + * Fonction appelé quand on quitte le formulaire nettoie toute les fonctions pour les rendres inutilisable en dehors du formulaire + * @returns {undefined} + */ +var destructor_form = function () { + console.log("Destructor"); + + for (var i = 0; i < oFormRequired.toDestructor.length; i++) { + oFormRequired.toDestructor[i] = undefined; + delete oFormRequired.toDestructor[i]; + } + + //supprimer la balise script du js pour pouvoir le recharger si on reviens sur le formulaire plus tard + angular.element('[src="' + oFormRequired.sUrl + '?version=' + oFormRequired.scope_["oProperties"]["build"] + '"]').remove(); + + oFormRequired = undefined; + delete oFormRequired; + + constructor_form = undefined; + delete constructor_form; + destructor_form = undefined; + delete destructor_form; +}; + +/**********************************************************************************/ diff --git a/src/module_extraction/module/forms/extraction/extraction_extraction_extraction.json b/src/module_extraction/module/forms/extraction/extraction_extraction_extraction.json new file mode 100755 index 0000000000000000000000000000000000000000..7cd9f2928d152472153680eeb50e4059f471fa71 --- /dev/null +++ b/src/module_extraction/module/forms/extraction/extraction_extraction_extraction.json @@ -0,0 +1,4838 @@ +{ + "display": { + "name": "extraction_extraction_extraction-form", + "title": "EXTRACTION_EXTRACTION_EXTRACTION_TITLE", + "input_size": "xxs", + "initEvent": "initExtractionExtractionForm()", + "nb_cols": 12, + "javascript": true, + "rows": [ + { + "fields": [ + { + "type": "label", + "name": "bo_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_BO_ID", + "required": false, + "nb_cols": 12, + "id": "bo_id_1_1" + } + ] + }, + { + "fields": [ + { + "type": "checkbox", + "name": "preco_tech", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TECHNIQUE", + "nb_cols": 4, + "id": "Element_6_2_1" + }, + { + "type": "checkbox", + "name": "chart_graph", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CARTOGRAPHIQUE", + "nb_cols": 4, + "id": "Element_6_2_2" + }, + { + "type": "checkbox", + "name": "metadonnees", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ISOGEO", + "nb_cols": 4, + "id": "Element_6_2_3" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "status", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATUS", + "required": false, + "nb_cols": 4, + "id": "status_2_1" + }, + { + "type": "label", + "name": "creation_date", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATION_DATE", + "required": false, + "nb_cols": 6, + "id": "creation_date_4_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "email", + "label": "FORM_EMAIL_USERS_USER", + "required": false, + "nb_cols": 4, + "id": "email_3_1" + }, + { + "type": "label", + "name": "company", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMPANY", + "required": false, + "nb_cols": 4, + "id": "company_8_1" + }, + { + "type": "label", + "name": "requestor", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REQUESTOR", + "required": false, + "nb_cols": 4, + "id": "requestor_5_1" + } + ] + }, + { + "fields": [ + { + "type": "linkurl", + "name": "ae", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_AE", + "required": false, + "nb_cols": 12, + "id": "ae_6_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "layers", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LAYERS", + "required": false, + "nb_cols": 12, + "id": "layers_9_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "coordsys_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COORDSYS_ID", + "required": false, + "nb_cols": 4, + "id": "coordsys_id_11_1" + }, + { + "type": "label", + "name": "vector_format_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_VECTOR_FORMAT_ID", + "required": false, + "nb_cols": 4, + "id": "vector_format_id_10_1" + }, + { + "type": "label", + "name": "raster_format_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RASTER_FORMAT_ID", + "required": false, + "nb_cols": 4, + "id": "raster_format_id_14_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "extent_method", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT_METHOD", + "required": false, + "nb_cols": 12, + "id": "extent_method_15_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "id_com", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_COM", + "required": false, + "nb_cols": 12, + "id": "id_com_22_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "id_conseil", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_CONSEIL", + "required": false, + "nb_cols": 12, + "id": "id_conseil_23_1" + } + ] + }, + { + "fields": [ + { + "type": "map_vmap", + "name": "extent", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT", + "required": false, + "nb_cols": 12, + "id": "extent_7_1", + "style": { + "height": "250px" + }, + "map_options": { + "proj": "EPSG:2154", + "type": "vmap", + "center": { + "extent": [ + 4510838297753.592, + 313452152357706.75, + 4510842604414.408, + 313452153911336.25 + ], + "coord": [ + 4510840451084, + 313452153134521.5 + ], + "scale": 23468294 + }, + "controls": { + "MP": true, + "ZO": true, + "SL": true, + "CP": true + }, + "layers": [], + "interactions": { + "multi_geometry": false, + "full_screen": true, + "RA": true, + "RO": true, + "ED": true, + "DP": false, + "DL": false, + "DPol": true, + "SE": true + }, + "draw_color": "rgba(54,184,255,0.6)", + "contour_color": "rgba(0,0,0,0.4)", + "contour_size": 2, + "circle_radius": 6, + "features": [], + "coord_accuracy": 8, + "tree": { + "name": "Tree", + "children": [ + { + "view": { + "center": [ + "902168", + "6269043" + ], + "zoom": 7, + "maxZoom": 28, + "minZoom": 0, + "projection": "EPSG:2154", + "extent": [ + 4510835482577.04, + 313452150322452.2, + 4510845419590.96, + 313452155946590.8 + ] + } + }, + { + "name": "extraction", + "children": [ + { + "name": "REF_ortho2011", + "layerType": "tilewms", + "url": "http://SCPA441.cpa.fr:8399/arcgis/services/REF_ortho2011/MapServer/WMSServer", + "index": -1, + "visible": true, + "opacity": 1, + "is_dynamic": false, + "is_filtered": false, + "version": "1.3.0", + "params": { + "LAYERS": "0", + "VERSION": "1.3.0", + "STYLES": "" + }, + "bo_queryable": false, + "layer_id": 1, + "select": true + }, + { + "name": "REF_CPA_LIMITE_COMMUNE", + "layerType": "tilewms", + "url": "http://SCPA441.cpa.fr:8399/arcgis/services/REF_CPA_LIMITE_COMMUNE/MapServer/WMSServer", + "index": -1, + "visible": true, + "opacity": 1, + "is_dynamic": false, + "is_filtered": false, + "version": "1.3.0", + "params": { + "LAYERS": "0,1", + "VERSION": "1.3.0", + "STYLES": "" + }, + "bo_queryable": false, + "layer_id": 2, + "select": true + } + ], + "visible": true + } + ] + } + } + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "history", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_HISTORY", + "required": false, + "nb_cols": 12, + "id": "history_3_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "note", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE", + "required": false, + "nb_cols": 12, + "id": "note_12_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "note_line", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE_LINE", + "required": false, + "nb_cols": 12, + "id": "note_line_13_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "signed", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SIGNED", + "required": false, + "nb_cols": 3, + "id": "signed_16_1" + }, + { + "type": "label", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "accepted_by_cpa", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ACCEPTED_BY_CPA", + "required": false, + "nb_cols": 3, + "id": "accepted_by_cpa_17_1" + }, + { + "type": "label", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "identification_complete", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_IDENTIFICATION_COMPLETE", + "required": false, + "nb_cols": 3, + "id": "identification_complete_18_1" + }, + { + "type": "label", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "definition_complete", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEFINITION_COMPLETE", + "required": false, + "nb_cols": 3, + "id": "definition_complete_19_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "comment", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMMENT", + "required": false, + "nb_cols": 12, + "id": "comment_20_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "priority_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_PRIORITY_ID", + "required": false, + "nb_cols": 12, + "id": "priority_id_21_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "status_name", + "nb_cols": 6, + "id": "Element_0_25_1" + }, + { + "type": "hidden", + "name": "tr_status_method", + "nb_cols": 6, + "id": "Element_0_25_2" + } + ] + }, + { + "class": "wab-method-button", + "fields": [ + { + "type": "button", + "class": "btn-ungroup btn-group-sm", + "nb_cols": 1, + "name": "display_button", + "id": "display_button", + "buttons": [ + { + "type": "button", + "name": "return_list", + "label": "FORM_RETURN_LIST", + "class": "btn-primary", + "event": "setMode(\"search\")", + "disabled": false + } + ] + }, + { + "type": "button", + "name": "Element_0", + "nb_cols": 1, + "id": "Element_0_25_2", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Autoriser l'extraction", + "class": "btn-primary", + "event": "setWabStatusMethod('trAutoriser')" + } + ] + }, + { + "type": "button", + "name": "Element_1", + "nb_cols": 1, + "id": "Element_1_25_3", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Demander l'AE", + "class": "btn-primary", + "event": "setWabStatusMethod('trDemander')", + "disabled": false + } + ] + }, + { + "type": "button", + "name": "Element_2", + "nb_cols": 1, + "id": "Element_2_25_4", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Générer l'AE", + "class": "btn-primary", + "event": "setWabStatusMethod('trGenerer')" + } + ] + }, + { + "type": "button", + "name": "Element_3", + "nb_cols": 1, + "id": "Element_3_25_5", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Créer", + "class": "btn-primary", + "event": "setWabStatusMethod('trNouveau')" + } + ] + }, + { + "type": "button", + "name": "Element_4", + "nb_cols": 1, + "id": "Element_4_25_6", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Refuser l'extraction", + "class": "btn-primary", + "event": "setWabStatusMethod('trRefuser')", + "disabled": false + } + ] + }, + { + "type": "button", + "name": "Element_5", + "nb_cols": 1, + "id": "Element_5_25_7", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Recharger l'acte d'engagement", + "class": "btn-primary", + "event": "setWabStatusMethod('trResoumettre')" + } + ] + }, + { + "type": "button", + "name": "Element_7", + "nb_cols": 1, + "id": "Element_7_25_9", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Soumettre l'AE", + "class": "btn-primary", + "event": "setWabStatusMethod('trSoumettre')" + } + ] + }, + { + "type": "button", + "name": "Element_8", + "nb_cols": 1, + "id": "Element_8_25_10", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Terminer", + "class": "btn-primary", + "event": "setWabStatusMethod('trTerminer')" + } + ] + } + ] + } + ], + "wab": { + "START": { + "controleur": { + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "rw", + "company": "rw", + "layers": "rw", + "coordsys_id": "rw", + "vector_format_id": "rw", + "raster_format_id": "rw", + "extent_method": "rw", + "id_com": "rw", + "id_conseil": "rw", + "extent": "rw", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "Element_1": "", + "statistique": "" + } + }, + "Nouveau": { + "controleur": { + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "rw", + "company": "rw", + "layers": "rw", + "coordsys_id": "rw", + "vector_format_id": "rw", + "raster_format_id": "rw", + "extent_method": "rw", + "id_com": "rw", + "id_conseil": "rw", + "extent": "rw", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "rw", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + } + }, + "AE Demandé": { + "controleur": { + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "Element_1": "", + "statistique": "" + } + }, + "AE Généré": { + "controleur": { + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "rw", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + } + }, + "AE Soumis": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "rw", + "accepted_by_cpa": "rw", + "identification_complete": "rw", + "definition_complete": "rw", + "comment": "rw", + "priority_id": "r", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "r", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + } + }, + "Autorisée": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "r", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "rw", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "Element_1": "", + "statistique": "" + } + }, + "Refusée": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + } + }, + "Terminée": { + "controleur": { + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "", + "raster_format_id": "r", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "r", + "priority_id": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "email": "", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "", + "raster_format_id": "r", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "r", + "priority_id": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + } + } + }, + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "bo_id", + "status", + "history", + "creation_date", + "requestor", + "ae", + "extent", + "email", + "company", + "layers", + "vector_format_id", + "coordsys_id", + "note", + "note_line", + "raster_format_id", + "extent_method", + "signed", + "accepted_by_cpa", + "identification_complete", + "definition_complete", + "comment", + "priority_id", + "id_com", + "id_conseil", + "display_button", + "status_name", + "ct_list", + "statistique", + "Element_3", + "Element_4", + "Element_5", + "Element_7", + "Element_8", + "tr_status_method", + "format", + "preco_tech", + "chart_graph", + "metadonnees" + ] + } + ] + } + }, + "search": { + "name": "extraction_extraction_extraction-form", + "title": "EXTRACTION_EXTRACTION_EXTRACTION_TITLE", + "input_size": "xxs", + "nb_cols": 12, + "javascript": false, + "rows": [ + { + "fields": [ + { + "type": "text", + "name": "company", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMPANY", + "nb_cols": 12, + "id": "company_8_1" + } + ] + }, + { + "fields": [ + { + "type": "button", + "class": "btn-ungroup btn-group-xs", + "nb_cols": 12, + "name": "search_button", + "id": "search_button", + "buttons": [ + { + "type": "button", + "name": "search", + "label": "FORM_SEARCH_BUTTON", + "class": "btn-primary", + "event": "setGridFilter()" + }, + { + "type": "reset", + "name": "reset", + "label": "FORM_RESET_BUTTON", + "class": "btn-primary", + "event": "resetGridFilter()" + } + ] + } + ] + } + ], + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "company", + "search_button" + ] + } + ] + } + }, + "insert": { + "name": "extraction_extraction_extraction-form", + "title": "EXTRACTION_EXTRACTION_EXTRACTION_TITLE_INSERT", + "input_size": "xxs", + "nb_cols": 12, + "javascript": true, + "rows": [ + { + "fields": [ + { + "type": "label", + "name": "bo_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TECHNIQUE", + "nb_cols": 12, + "id": "Element_0_2_1" + } + ] + }, + { + "fields": [ + { + "type": "checkbox", + "name": "preco_tech", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TECHNIQUE", + "required": false, + "nb_cols": 4, + "id": "checkbox_tech_2_1" + }, + { + "type": "checkbox", + "name": "chart_graph", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CARTOGRAPHIQUE", + "required": false, + "nb_cols": 4, + "id": "checkbox_carto" + }, + { + "type": "checkbox", + "name": "metadonnees", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ISOGEO", + "required": false, + "nb_cols": 4, + "id": "checkbox_iso" + } + ] + }, + { + "fields": [ + { + "type": "email", + "name": "email", + "label": "FORM_EMAIL_USERS_USER", + "required": true, + "nb_cols": 6, + "id": "email_3_1", + "pattern": "^(([a-zA-Z]|[0-9])|([-]|[_]|[.]))+[@](([a-zA-Z]|[0-9])|([-]|[_]|[.])){2,63}[.](([a-zA-Z0-9]){2,63})+$" + }, + { + "type": "text", + "name": "company", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMPANY", + "required": true, + "nb_cols": 6, + "id": "company_8_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "extent_method", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT_METHOD", + "required": true, + "nb_cols": 12, + "id": "extent_method_15_1", + "options": [ + "Commmunes|id_com", + "Conseils de Territoire|id_conseil", + "Etendue libre|extent" + ], + "id_from": "extent_method_15_1_from" + } + ] + }, + { + "fields": [ + { + "type": "list", + "name": "id_com", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_COM", + "required": false, + "nb_cols": 12, + "datasource": { + "datasource_id": "datasource_9", + "sort_order": "ASC", + "distinct": "true", + "label_key": "name", + "order_by": "name", + "id_key": "commune_id", + "attributs": "commune_id|name" + }, + "id": "id_com_22_1", + "id_from": "id_com_22_1_from", + "size": 10 + } + ] + }, + { + "fields": [ + { + "type": "list", + "name": "id_conseil", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_CONSEIL", + "required": false, + "nb_cols": 12, + "datasource": { + "datasource_id": "datasource_8", + "sort_order": "ASC", + "distinct": "true", + "label_key": "name", + "order_by": "name", + "id_key": "ct_id", + "attributs": "ct_id|name" + }, + "id": "id_conseil_23_1", + "id_from": "id_conseil_23_1_from", + "size": 10 + } + ] + }, + { + "fields": [ + { + "type": "map_vmap", + "name": "extent", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT", + "required": false, + "nb_cols": 12, + "id": "extent_7_1", + "style": { + "height": "250px" + }, + "map_options": { + "proj": "EPSG:2154", + "type": "vmap", + "center": { + "extent": [ + -1736177.943496094, + 5863277.723320313, + 2570482.873496094, + 7416907.166679688 + ], + "coord": [ + 417152.46499999985, + 6640092.445 + ], + "scale": 23468294 + }, + "controls": { + "MP": true, + "ZO": true, + "SL": true, + "CP": true + }, + "layers": [], + "interactions": { + "multi_geometry": false, + "full_screen": true, + "RA": true, + "RO": true, + "ED": true, + "DP": false, + "DL": false, + "DPol": true, + "SE": true + }, + "draw_color": "rgba(54,184,255,0.6)", + "contour_color": "rgba(0,0,0,0.4)", + "contour_size": 2, + "circle_radius": 6, + "features": [], + "coord_accuracy": 8, + "tree": { + "name": "Tree", + "children": [ + { + "view": { + "center": [ + "902168", + "6269043" + ], + "zoom": 7, + "maxZoom": 28, + "minZoom": 0, + "projection": "EPSG:2154", + "extent": [ + 4510835482577.04, + 313452150322452.2, + 4510845419590.96, + 313452155946590.8 + ] + } + }, + { + "name": "extraction", + "children": [ + { + "name": "REF_ortho2011", + "layerType": "tilewms", + "url": "http://SCPA441.cpa.fr:8399/arcgis/services/REF_ortho2011/MapServer/WMSServer", + "index": -1, + "visible": true, + "opacity": 1, + "is_dynamic": false, + "is_filtered": false, + "version": "1.3.0", + "params": { + "LAYERS": "0", + "VERSION": "1.3.0", + "STYLES": "" + }, + "bo_queryable": false, + "layer_id": 1, + "select": true + }, + { + "name": "REF_CPA_LIMITE_COMMUNE", + "layerType": "tilewms", + "url": "http://SCPA441.cpa.fr:8399/arcgis/services/REF_CPA_LIMITE_COMMUNE/MapServer/WMSServer", + "index": -1, + "visible": true, + "opacity": 1, + "is_dynamic": false, + "is_filtered": false, + "version": "1.3.0", + "params": { + "LAYERS": "0,1", + "VERSION": "1.3.0", + "STYLES": "" + }, + "bo_queryable": false, + "layer_id": 2, + "select": true + } + ], + "visible": true + } + ] + } + } + } + ] + }, + { + "class": "extraction-treeview", + "fields": [ + { + "type": "treeview", + "name": "layers", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LAYERS", + "required": false, + "nb_cols": 12, + "id": "layers_9_1", + "size": 20, + "options": { + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true, + "data": "getExtractionLayersTree()" + } + } + ] + }, + { + "fields": [ + { + "type": "treeview", + "name": "statistique", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATISTIQUE", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "statistique_9_1", + "options": { + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true, + "data": "getExtractionStatsTree()" + } + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "coordsys_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COORDSYS_ID", + "required": false, + "nb_cols": 4, + "id": "coordsys_id_11_1", + "datasource": { + "datasource_id": "datasource_1", + "sort_order": "ASC", + "distinct": "true", + "label_key": "coordsys", + "order_by": "coordsys", + "id_key": "coordsys_id", + "attributs": "coordsys_id|coordsys" + }, + "default_value": "Lambert93", + "id_from": "coordsys_id_11_1_from" + }, + { + "type": "select", + "name": "vector_format_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_VECTOR_FORMAT_ID", + "required": false, + "nb_cols": 4, + "id": "vector_format_id_10_1", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "label_key": "format", + "order_by": "format", + "id_key": "format_id", + "attributs": "format_id|format" + }, + "default_value": "SHAPE", + "id_from": "vector_format_id_10_1_from" + }, + { + "type": "select", + "name": "raster_format_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RASTER_FORMAT_ID", + "required": false, + "nb_cols": 4, + "id": "raster_format_id_14_1", + "datasource": { + "datasource_id": "datasource_3", + "sort_order": "ASC", + "distinct": "true", + "label_key": "format", + "order_by": "format", + "id_key": "format_id", + "attributs": "format_id|format" + }, + "default_value": "ECW", + "id_from": "raster_format_id_14_1_from" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "status", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATUS", + "required": false, + "nb_cols": 12, + "id": "status_2_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "history", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_HISTORY", + "required": false, + "nb_cols": 12, + "id": "history_3_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "creation_date", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATION_DATE", + "required": false, + "nb_cols": 12, + "id": "creation_date_4_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "requestor", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REQUESTOR", + "required": false, + "nb_cols": 12, + "id": "requestor_5_1" + } + ] + }, + { + "fields": [ + { + "type": "file_wsdata", + "name": "ae", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_AE", + "required": false, + "nb_cols": 12, + "id": "ae_6_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "note", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE", + "required": false, + "nb_cols": 12, + "id": "note_12_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "note_line", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE_LINE", + "required": false, + "nb_cols": 12, + "id": "note_line_13_1" + } + ] + }, + { + "fields": [ + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "signed", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SIGNED", + "required": false, + "nb_cols": 12, + "id": "signed_16_1" + } + ] + }, + { + "fields": [ + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "accepted_by_cpa", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ACCEPTED_BY_CPA", + "required": false, + "nb_cols": 12, + "id": "accepted_by_cpa_17_1" + } + ] + }, + { + "fields": [ + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "identification_complete", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_IDENTIFICATION_COMPLETE", + "required": false, + "nb_cols": 12, + "id": "identification_complete_18_1" + } + ] + }, + { + "fields": [ + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "definition_complete", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEFINITION_COMPLETE", + "required": false, + "nb_cols": 12, + "id": "definition_complete_19_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "comment", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMMENT", + "required": false, + "nb_cols": 12, + "id": "comment_20_1" + } + ] + }, + { + "fields": [ + { + "type": "integer", + "name": "priority_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_PRIORITY_ID", + "required": false, + "nb_cols": 12, + "id": "priority_id_21_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "status_name", + "nb_cols": 6, + "id": "Element_0_26_1", + "default_value": "START" + }, + { + "type": "hidden", + "name": "tr_status_method", + "nb_cols": 6, + "id": "Element_0_25_2" + } + ] + }, + { + "class": "wab-method-button", + "fields": [ + { + "type": "button", + "class": "btn-ungroup btn-group-sm", + "nb_cols": 6, + "name": "insert_button", + "id": "insert_button", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "FORM_CREATE", + "class": "btn-primary" + } + ] + }, + { + "type": "button", + "name": "return_list_button", + "nb_cols": 6, + "id": "return_list_button", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "return_list", + "label": "FORM_RETURN_LIST", + "class": "btn-primary", + "event": "setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "initExtractionExtractionForm()", + "beforeEvent": "setWabStatusMethod('trNouveau')", + "event": "sendSimpleForm()", + "afterEvent": "editSectionForm()", + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "bo_id", + "status", + "history", + "creation_date", + "requestor", + "ae", + "email", + "extent", + "company", + "layers", + "vector_format_id", + "coordsys_id", + "note", + "note_line", + "raster_format_id", + "extent_method", + "signed", + "accepted_by_cpa", + "identification_complete", + "definition_complete", + "comment", + "priority_id", + "id_com", + "id_conseil", + "insert_button", + "bo_id", + "status_name", + "tr_status_method", + "return_list_button", + "statistique" + ] + } + ] + }, + "wab": { + "START": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "return_list_button": "rw", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "rw", + "company": "rw", + "layers": "rw", + "coordsys_id": "rw", + "vector_format_id": "rw", + "raster_format_id": "rw", + "extent_method": "rw", + "id_com": "rw", + "id_conseil": "rw", + "extent": "rw", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "rw", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "return_list_button": "rw", + "chart_graph": "rw", + "metadonnees": "rw", + "preco_tech": "rw", + "statistique": "rw" + } + }, + "Nouveau": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "return_list_button": "rw", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "rw", + "company": "rw", + "layers": "rw", + "coordsys_id": "rw", + "vector_format_id": "rw", + "raster_format_id": "rw", + "extent_method": "rw", + "id_com": "rw", + "id_conseil": "rw", + "extent": "rw", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "r", + "status_name": "", + "tr_status_method": "", + "return_list_button": "rw", + "chart_graph": "rw", + "metadonnees": "rw", + "preco_tech": "rw", + "statistique": "rw" + } + }, + "AE Demandé": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "return_list_button": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "return_list_button": "rw", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "statistique": "r" + } + }, + "AE Généré": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "return_list_button": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "rw", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "r", + "status_name": "r", + "tr_status_method": "r", + "return_list_button": "rw", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "statistique": "r" + } + }, + "AE Soumis": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "rw", + "accepted_by_cpa": "rw", + "identification_complete": "rw", + "definition_complete": "rw", + "comment": "rw", + "priority_id": "r", + "insert_button": "", + "bo_id": "r", + "status_name": "r", + "tr_status_method": "r", + "return_list_button": "rw", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "r", + "insert_button": "", + "bo_id": "r", + "status_name": "r", + "tr_status_method": "r", + "return_list_button": "rw", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "statistique": "r" + } + }, + "Autorisée": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "r", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "insert_button": "", + "bo_id": "r", + "status_name": "r", + "tr_status_method": "r", + "return_list_button": "rw", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "return_list_button": "rw", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + } + }, + "Refusée": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "insert_button": "", + "bo_id": "r", + "status_name": "r", + "tr_status_method": "r", + "return_list_button": "rw", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "insert_button": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "return_list_button": "rw", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "statistique": "r" + } + }, + "Extraction terminée": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + } + }, + "Fichier invalidé": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + } + }, + "Fichier déposé": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + } + }, + "Fichier accepté": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + } + }, + "Dépôt terminé": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + } + } + } + }, + "update": { + "name": "extraction_extraction_extraction-form", + "title": "EXTRACTION_EXTRACTION_EXTRACTION_TITLE", + "input_size": "xxs", + "nb_cols": 12, + "javascript": true, + "rows": [ + { + "fields": [ + { + "type": "label", + "name": "bo_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_BO_ID", + "required": false, + "nb_cols": 12, + "id": "bo_id_1_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "status_name", + "nb_cols": 12, + "id": "Element_6_25_1" + }, + { + "type": "checkbox", + "name": "preco_tech", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TECHNIQUE", + "required": false, + "nb_cols": 4, + "id": "checkbox_tech_2_1" + }, + { + "type": "checkbox", + "name": "chart_graph", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CARTOGRAPHIQUE", + "required": false, + "nb_cols": 4, + "id": "checkbox_carto" + }, + { + "type": "checkbox", + "name": "metadonnees", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ISOGEO", + "required": false, + "nb_cols": 4, + "id": "checkbox_iso" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "creation_date", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATION_DATE", + "required": false, + "nb_cols": 12, + "id": "creation_date_4_1" + } + ] + }, + { + "fields": [ + { + "type": "email", + "name": "email", + "label": "FORM_EMAIL_USERS_USER", + "required": false, + "nb_cols": 4, + "id": "email_3_1", + "pattern": "^(([a-zA-Z]|[0-9])|([-]|[_]|[.]))+[@](([a-zA-Z]|[0-9])|([-]|[_]|[.])){2,63}[.](([a-zA-Z0-9]){2,63})+$" + }, + { + "type": "text", + "name": "company", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMPANY", + "required": true, + "nb_cols": 4, + "id": "company_8_1" + }, + { + "type": "text", + "name": "requestor", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REQUESTOR", + "required": false, + "nb_cols": 4, + "id": "requestor_5_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "extent_method", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT_METHOD", + "required": true, + "nb_cols": 12, + "id": "extent_method_15_1", + "options": [ + "Commmunes|id_com", + "Conseils de Territoire|id_conseil", + "Etendue libre|extent" + ], + "id_from": "extent_method_15_1_from" + } + ] + }, + { + "fields": [ + { + "type": "list", + "name": "id_com", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_COM", + "required": false, + "nb_cols": 12, + "datasource": { + "datasource_id": "datasource_9", + "sort_order": "ASC", + "distinct": "true", + "label_key": "name", + "order_by": "name", + "id_key": "commune_id", + "attributs": "commune_id|name" + }, + "id": "id_com_22_1", + "id_from": "id_com_22_1_from", + "size": 10 + } + ] + }, + { + "fields": [ + { + "type": "list", + "name": "id_conseil", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_CONSEIL", + "required": false, + "nb_cols": 12, + "datasource": { + "datasource_id": "datasource_8", + "sort_order": "ASC", + "distinct": "true", + "label_key": "name", + "order_by": "name", + "id_key": "ct_id", + "attributs": "ct_id|name" + }, + "id": "id_conseil_23_1", + "id_from": "id_conseil_23_1_from", + "size": 10 + } + ] + }, + { + "fields": [ + { + "type": "map_vmap", + "name": "extent", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT", + "required": false, + "nb_cols": 12, + "id": "extent_7_1", + "style": { + "height": "250px" + }, + "map_options": { + "proj": "EPSG:2154", + "type": "vmap", + "center": { + "extent": [ + 4510838297753.592, + 313452152357706.75, + 4510842604414.408, + 313452153911336.25 + ], + "coord": [ + 4510840451084, + 313452153134521.5 + ], + "scale": 23468294 + }, + "controls": { + "MP": true, + "ZO": true, + "SL": true, + "CP": true + }, + "layers": [], + "interactions": { + "multi_geometry": false, + "full_screen": true, + "RA": true, + "RO": true, + "ED": true, + "DP": false, + "DL": false, + "DPol": true, + "SE": true + }, + "draw_color": "rgba(54,184,255,0.6)", + "contour_color": "rgba(0,0,0,0.4)", + "contour_size": 2, + "circle_radius": 6, + "features": [], + "coord_accuracy": 8, + "tree": { + "name": "Tree", + "children": [ + { + "view": { + "center": [ + "902168", + "6269043" + ], + "zoom": 7, + "maxZoom": 28, + "minZoom": 0, + "projection": "EPSG:2154", + "extent": [ + 4510835482577.04, + 313452150322452.2, + 4510845419590.96, + 313452155946590.8 + ] + } + }, + { + "name": "extraction", + "children": [ + { + "name": "REF_ortho2011", + "layerType": "tilewms", + "url": "http://SCPA441.cpa.fr:8399/arcgis/services/REF_ortho2011/MapServer/WMSServer", + "index": -1, + "visible": true, + "opacity": 1, + "is_dynamic": false, + "is_filtered": false, + "version": "1.3.0", + "params": { + "LAYERS": "0", + "VERSION": "1.3.0", + "STYLES": "" + }, + "bo_queryable": false, + "layer_id": 1, + "select": true + }, + { + "name": "REF_CPA_LIMITE_COMMUNE", + "layerType": "tilewms", + "url": "http://SCPA441.cpa.fr:8399/arcgis/services/REF_CPA_LIMITE_COMMUNE/MapServer/WMSServer", + "index": -1, + "visible": true, + "opacity": 1, + "is_dynamic": false, + "is_filtered": false, + "version": "1.3.0", + "params": { + "LAYERS": "0,1", + "VERSION": "1.3.0", + "STYLES": "" + }, + "bo_queryable": false, + "layer_id": 2, + "select": true + } + ], + "visible": true + } + ] + } + } + } + ] + }, + { + "class": "extraction-treeview", + "fields": [ + { + "type": "treeview", + "name": "layers", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LAYERS", + "required": false, + "nb_cols": 12, + "id": "layers_9_1", + "size": 20, + "options": { + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true, + "data": "getExtractionLayersTree()" + } + } + ] + }, + { + "fields": [ + { + "type": "treeview", + "name": "statistique", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATISTIQUE", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "statistique_9_1", + "options": { + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true, + "data": "getExtractionStatsTree()" + } + } + ] + }, + { + "fields": [ + { + "type": "file_wsdata", + "name": "ae", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_AE", + "required": false, + "nb_cols": 12, + "id": "ae_6_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "coordsys_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COORDSYS_ID", + "required": false, + "nb_cols": 4, + "id": "coordsys_id_11_1", + "datasource": { + "datasource_id": "datasource_1", + "sort_order": "ASC", + "distinct": "true", + "label_key": "coordsys", + "order_by": "coordsys", + "id_key": "coordsys_id", + "attributs": "coordsys_id|coordsys" + }, + "id_from": "coordsys_id_11_1_from" + }, + { + "type": "select", + "name": "vector_format_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_VECTOR_FORMAT_ID", + "required": false, + "nb_cols": 4, + "id": "vector_format_id_10_1", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "label_key": "format", + "order_by": "format", + "id_key": "format_id", + "attributs": "format_id|format" + }, + "id_from": "vector_format_id_10_1_from" + }, + { + "type": "select", + "name": "raster_format_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RASTER_FORMAT_ID", + "required": false, + "nb_cols": 4, + "id": "raster_format_id_14_1", + "datasource": { + "datasource_id": "datasource_3", + "sort_order": "ASC", + "distinct": "true", + "label_key": "format", + "order_by": "format", + "id_key": "format_id", + "attributs": "format_id|format" + }, + "id_from": "raster_format_id_14_1_from" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "history", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_HISTORY", + "required": false, + "nb_cols": 12, + "id": "history_3_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "note", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE", + "required": false, + "nb_cols": 12, + "id": "note_12_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "note_line", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE_LINE", + "required": false, + "nb_cols": 12, + "id": "note_line_13_1" + } + ] + }, + { + "fields": [ + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true, + "$$hashKey": "object:2269" + }, + { + "label": "non", + "value": false, + "$$hashKey": "object:2270" + } + ] + }, + "name": "signed", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SIGNED", + "required": false, + "nb_cols": 3, + "id": "signed_16_1" + }, + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true, + "$$hashKey": "object:2277" + }, + { + "label": "non", + "value": false, + "$$hashKey": "object:2278" + } + ] + }, + "name": "accepted_by_cpa", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ACCEPTED_BY_CPA", + "required": false, + "nb_cols": 3, + "id": "accepted_by_cpa_17_1" + }, + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true, + "$$hashKey": "object:2285" + }, + { + "label": "non", + "value": false, + "$$hashKey": "object:2286" + } + ] + }, + "name": "identification_complete", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_IDENTIFICATION_COMPLETE", + "required": false, + "nb_cols": 3, + "id": "identification_complete_18_1" + }, + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true, + "$$hashKey": "object:2293" + }, + { + "label": "non", + "value": false, + "$$hashKey": "object:2294" + } + ] + }, + "name": "definition_complete", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEFINITION_COMPLETE", + "required": false, + "nb_cols": 3, + "id": "definition_complete_19_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "comment", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMMENT", + "required": false, + "nb_cols": 12, + "id": "comment_20_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "priority_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_PRIORITY_ID", + "required": false, + "nb_cols": 12, + "id": "priority_id_21_1", + "options": [ + "Heures Pleines|1", + "Heures creuses|0" + ], + "id_from": "priority_id_21_1_from" + } + ] + }, + { + "fields": [ + { + "type": "file_wsdata", + "name": "input_deposit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_INPUT_DEPOSIT", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_6_19_1" + } + ] + }, + { + "class": "wab-method-button", + "fields": [ + { + "type": "button", + "class": "btn-ungroup btn-group-sm", + "nb_cols": 1, + "name": "update_button", + "id": "update_button", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "FORM_UPDATE", + "class": "btn-primary" + } + ] + }, + { + "type": "button", + "name": "return_list_button", + "nb_cols": 1, + "id": "return_list_button", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "return_list", + "label": "FORM_RETURN_LIST", + "class": "btn-primary", + "event": "setMode(\"search\")" + } + ] + }, + { + "type": "button", + "name": "Element_2", + "nb_cols": 1, + "id": "Element_2_20_1", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEPOSIT", + "class": "btn-primary", + "event": "callBoMethod('trDeposer')" + } + ] + }, + { + "type": "button", + "name": "Element_0", + "nb_cols": 1, + "id": "Element_0_25_2", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ALLOW_EXTRACTION", + "class": "btn-primary", + "event": "callBoMethod('trAutoriser')" + } + ] + }, + { + "type": "button", + "name": "Element_1", + "nb_cols": 1, + "id": "Element_1_25_3", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ASK_AE", + "class": "btn-primary", + "event": "callBoMethod('trDemander')", + "disabled": false + } + ] + }, + { + "type": "button", + "name": "Element_3", + "nb_cols": 1, + "id": "Element_3_25_5", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATE", + "class": "btn-primary", + "event": "callBoMethod('trNouveau')" + } + ] + }, + { + "type": "button", + "name": "Element_4", + "nb_cols": 1, + "id": "Element_4_25_6", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REJECT_EXTRACTION", + "class": "btn-primary", + "event": "callBoMethod('trRefuser')" + } + ] + }, + { + "type": "button", + "name": "Element_5", + "nb_cols": 1, + "id": "Element_5_25_7", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RELOAD_AE", + "class": "btn-primary", + "event": "callBoMethod('trResoumettre')" + } + ] + }, + { + "type": "button", + "name": "Element_7", + "nb_cols": 1, + "id": "Element_7_25_9", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SEND_AE", + "class": "btn-primary", + "event": "callBoMethod('trSoumettre')" + } + ] + }, + { + "type": "button", + "name": "Element_8", + "nb_cols": 1, + "id": "Element_8_25_10", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TERMINATE", + "class": "btn-primary", + "event": "callBoMethod('trTerminer')" + } + ] + } + ] + } + ], + "initEvent": "initExtractionExtractionForm()", + "event": "sendSimpleForm()", + "afterEvent": "editSectionForm()", + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "bo_id", + "history", + "creation_date", + "requestor", + "ae", + "extent", + "company", + "layers", + "vector_format_id", + "coordsys_id", + "note", + "note_line", + "raster_format_id", + "extent_method", + "signed", + "accepted_by_cpa", + "identification_complete", + "definition_complete", + "comment", + "priority_id", + "id_com", + "id_conseil", + "update_button", + "status_name", + "Element_3", + "Element_4", + "Element_5", + "Element_7", + "Element_8", + "status_name", + "return_list_button", + "preco_tech", + "chart_graph", + "metadonnees", + "statistique", + "Element_2", + "input_deposit" + ] + } + ] + }, + "wab": { + "START": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "" + }, + "demandeur": { + "email": "rw", + "company": "rw", + "layers": "rw", + "coordsys_id": "rw", + "vector_format_id": "rw", + "raster_format_id": "rw", + "extent_method": "rw", + "id_com": "rw", + "id_conseil": "rw", + "extent": "rw", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "rw", + "Element_2": "", + "input_deposit": "" + } + }, + "Nouveau": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "" + }, + "demandeur": { + "email": "rw", + "company": "rw", + "layers": "rw", + "coordsys_id": "rw", + "vector_format_id": "rw", + "raster_format_id": "rw", + "extent_method": "rw", + "id_com": "rw", + "id_conseil": "rw", + "extent": "rw", + "history": "", + "creation_date": "r", + "requestor": "rw", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "r", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "rw", + "chart_graph": "rw", + "metadonnees": "rw", + "preco_tech": "rw", + "Element_0": "", + "statistique": "rw", + "Element_2": "", + "input_deposit": "" + } + }, + "AE Demandé": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "r", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "" + } + }, + "AE Généré": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "rw", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "r", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "rw", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "" + } + }, + "AE Soumis": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "r", + "note": "", + "note_line": "", + "signed": "rw", + "accepted_by_cpa": "rw", + "identification_complete": "rw", + "definition_complete": "rw", + "comment": "rw", + "priority_id": "r", + "bo_id": "r", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "rw", + "Element_5": "rw", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "Element_0": "rw", + "statistique": "r", + "Element_2": "", + "input_deposit": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "r", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "r", + "bo_id": "r", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "" + } + }, + "Autorisée": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "r", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "rw", + "bo_id": "r", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "" + }, + "demandeur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "" + } + }, + "Refusée": { + "controleur": { + "email": "", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "bo_id": "r", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "rw", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "bo_id": "r", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "rw", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "r" + } + }, + "Fichier invalidé": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + } + }, + "Fichier déposé": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + }, + "demandeur": { + "bo_id": "r", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "creation_date": "r", + "email": "r", + "company": "r", + "requestor": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "layers": "r", + "ae": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "rw", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "r" + } + }, + "Fichier accepté": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + } + }, + "Dépôt terminé": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + } + }, + "Extraction terminée": { + "controleur": { + "bo_id": "r", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "creation_date": "r", + "email": "r", + "company": "r", + "requestor": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "layers": "r", + "ae": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "history": "r", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "status_name": "", + "update_button": "", + "return_list_button": "rw", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "r" + }, + "demandeur": { + "bo_id": "r", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "creation_date": "r", + "email": "r", + "company": "r", + "requestor": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "layers": "r", + "ae": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "rw", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "r", + "Element_2": "rw", + "input_deposit": "rw" + } + } + } + }, + "datasources": { + "datasource_1": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_coordsys", + "description": "", + "parameters": { + "schema": "s_extraction", + "table": "rt_coordsys" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_1" + }, + "datasource_2": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_vector_format", + "description": "", + "parameters": { + "schema": "s_extraction", + "table": "rt_format", + "filter": { + "use_for_vector": true + } + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_2" + }, + "datasource_3": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_raster_format", + "description": "", + "parameters": { + "schema": "s_extraction", + "table": "rt_format", + "filter": { + "use_for_raster": true + } + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_3" + }, + "datasource_4": { + "type": "web_service", + "dataType": "externalDatabase", + "name": "datasource_commune", + "description": "", + "parameters": { + "server": "scpa7717", + "port": "5432", + "sgbd": "pgsql", + "login": "sigl", + "password": "sigl28sig", + "database": "sig", + "schema": "cad93", + "table": "commune" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_4" + }, + "datasource_5": { + "type": "web_service", + "dataType": "externalDatabase", + "name": "datasource_commune", + "description": "", + "parameters": { + "server": "scpa7717", + "port": "5432", + "sgbd": "pgsql", + "login": "sigl", + "password": "sigl28sig", + "database": "sig", + "schema": "ref93", + "table": "ref_amp_lim_ct" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_5" + }, + "datasource_6": { + "type": "web_service", + "dataType": "externalDatabase", + "name": "datasource_ct", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "server": "scpa7717", + "port": "5432", + "sgbd": "pgsql", + "login": "sigl", + "password": "sigl28sig", + "database": "sig", + "schema": "ref93", + "table": "ct" + }, + "ressource_id": "vitis/genericquerys/ct", + "id": "datasource_6" + }, + "datasource_7": { + "type": "web_service", + "dataType": "externalDatabase", + "name": "datasource_com", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "server": "GEWURZTRAMINER", + "port": "5432", + "sgbd": "pgsql", + "login": "postgres", + "password": "postgres", + "database": "vitis_gtf", + "schema": "s_extraction", + "table": "commune" + }, + "ressource_id": "vitis/genericquerys/commune", + "id": "datasource_7" + }, + "datasource_8": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_8", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "schema": "s_extraction", + "table": "ct" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_8" + }, + "datasource_9": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_9", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "schema": "s_extraction", + "table": "commune" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_9" + }, + "datasource_10": { + "type": "object", + "dataType": "text", + "name": "datasource_format", + "description": "", + "options": [ + "Vecteur|vector", + "Raster|raster" + ], + "id": "datasource_10" + } + } +} \ No newline at end of file diff --git a/src/module_extraction/module/forms/extraction_depot/extraction_depot_extraction_extraction_depot.js b/src/module_extraction/module/forms/extraction_depot/extraction_depot_extraction_extraction_depot.js new file mode 100755 index 0000000000000000000000000000000000000000..4b6c36e388f708f89ea5ec7df7eb9addd21813f7 --- /dev/null +++ b/src/module_extraction/module/forms/extraction_depot/extraction_depot_extraction_extraction_depot.js @@ -0,0 +1,254 @@ +/* global angular, goog, vitisApp, bootbox */ + +//bloque les delete du destructeur à éviter +//'use strict'; + +console.info("Generateur_wab_generator_1 loaded --> your functions are ready"); +/*********************************************************************************** + Signaletique_Recap_0 Javascript + ***********************************************************************************/ + +var oFormRequired = { + "sUrl": "", + "scope_": {}, + "toDestructor": [] +}; +/** + * constructor_form + * Fonction appelé à l'initialisation du formulaire si dans la structure json javascript vaut "true" + * @param {type} scope + * @param {type} s_url + * @returns {undefined} + */ +var constructor_form = function (scope, s_url) { + ////////////////////////////////////////////////////////// + //Ne pas toucher + console.log("Constructor"); + + oFormRequired.sUrl = s_url; + oFormRequired.scope_ = scope; + //console.log(scope); + ////////////////////////////////////////////////////////// + // Permet de recharge le javascript d'une section à une autre + var envSrvc = angular.element(vitisApp.appWorkspaceListDrtv).injector().get(["envSrvc"]); + var formSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["formSrvc"]); + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + + /*oFormRequired.toDestructor.push(oFormRequired.scope_.$watch("oFormValues." + oFormRequired.scope_.sFormDefinitionName + ".btn_refresh_treeview", function (value) { + console.log("DJFHVHJCHSJCJH"); + }*/ + + /** + * loadTreeview function. + * Crée le treeview des fichiers du projet fme. + **/ + scope["loadTreeviewDepot"] = function() { + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + // + $log.info("loadTreeviewDepot"); + + // Charge l'arborescence des logs. + ajaxRequest({ + "method": "GET", + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extraction_depots/Tree", + "scope": scope, + "success": function(response) { + if (response["data"]["status"] == 1) { + var aNodes = []; + data = response["data"]["tree"]; + scope["aSelectedWorkspaceFile"] = []; + scope["aTreeviewLogs"] = data; + // Crée l'arborescence dans l'élément. + + for (var i in response["data"]["content"]) { + var aNode = {"text": response["data"]["content"][i]["filename"].split("/").pop(), "nodes": []} + for (var j in response["data"]["content"][i]["content"]) { + aNode["nodes"].push({"text": response["data"]["content"][i]["content"][j]["filename"].split("/").pop(), "tags": response["data"]["content"][i]["content"][j]["lastModification"].split(),}); + } + aNodes.push(aNode); + } + + $("#Element_0_2_1_treeview")["treeview"]({ + "showBorder": false, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": true, + "multiSelect": false, + "showTags": true, + "data": aNodes + }); + } + } + }); + }; + + scope["deleteFileDepot"] = function () { + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + // + $log.info("deleteFileDepot"); + + var aSelectedNode = $("#Element_0_2_1_treeview")["treeview"]('getSelected') + + if (aSelectedNode.length > 0) + { + var aNodeParent = $("#Element_0_2_1_treeview")["treeview"]('getNode', aSelectedNode[0]["parentId"]); + ajaxRequest({ + "method": "DELETES", + "params": { + "file_name": aNodeParent["text"] + "/" + aSelectedNode[0]["text"] + }, + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extraction_depots", + "scope": scope, + "success": function(response) { + if (response["data"]["status"] == 1) { + } + } + }); + scope["loadTreeviewDepot"](); + } + else + { + var sErrorMessage = "EXTRACTION_DEPOT_DELETE_SELECT_A_FILE"; + var oOptions = { + "className": "modal-danger", + "message": sErrorMessage + }; + //$('#myModal').modal('toggle'); + scope.$root["modalWindow"]("dialog", "EXTRACTION_DEPORT_DELETE_NO_SELECTED", oOptions); + //$('#myModal').modal('hide'); + } + + } + scope["loadTreeviewDepot"](); + + scope["downloadFileDepot"] = function () { + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + // + $log.info("downloadFileDepot"); + + var aSelectedNode = $("#Element_0_2_1_treeview")["treeview"]('getSelected'); + var sFileName = aSelectedNode[0]["text"]; + var aNodeParent = $("#Element_0_2_1_treeview")["treeview"]('getNode', aSelectedNode[0]["parentId"]); + + if (aSelectedNode[0]["parentId"] == "") + { + if (sFileName != "") + { + ajaxRequest({ + "method": "GET", + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extraction_depots/File", + "scope": scope, + "params": { + "file_name": aNodeParent["text"] + "/" + aSelectedNode[0]["text"] + }, + "responseType": 'blob', + "success": function(response) { + if (typeof(window.navigator.msSaveOrOpenBlob) == "undefined") { + // Crée un lien et simule un click dessus. + var link = document.createElement('a'); + link.href = window.URL.createObjectURL(response["data"]); + link.download = sFileName; + link.style.display = 'none'; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } + else { + // Pour Edge et IE. + window.navigator.msSaveOrOpenBlob(response["data"], sFileName); + } + } + }); + } + } + } + //var iMaxUploadFileSize = parseInt(propertiesSrvc["max_upload_file_size"]); + + /** + * beforeProjectDirectory function. + * Traitement avant l'envoi du formulaire de la section "Répertoire Projet" (publication > Projet FME). + */ + angular.element(vitisApp.appMainDrtv).scope()["beforeDepositDirectory"] = function () { + // Injection des services. + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var $q = angular.element(vitisApp.appHtmlFormDrtv).injector().get(["$q"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + // + $log.info("beforeDepositDirectory"); + envSrvc.sMode = "update"; + var scope = this; + var deferred = $q.defer(); + var promise = deferred.promise; + // + var oFile = envSrvc["oFormValues"][envSrvc["sFormDefinitionName"]]["control_file"]; + var iMaxUploadFileSize = parseInt(propertiesSrvc["max_upload_file_size"]); + var sErrorMessage; + + // Vérification du fichier .fmw. + if (typeof (oFile) === "object" && typeof (oFile["aFiles"]) !== "undefined" && oFile["aFiles"].length > 0) { + // Taille maxi du fichier. + if (oFile["aFiles"][0]["size"] > iMaxUploadFileSize) + sErrorMessage = "ERROR_FILE_SIZE_EXTRACTION_LOAD_DEPOSIT_DIRECTORY"; + } + // Validation du formulaire. + if (typeof (sErrorMessage) === "undefined") + deferred.resolve(); + + // Affichage de la fenêtre modale d'erreur. + if (typeof (sErrorMessage) !== "undefined") { + var oOptions = { + "className": "modal-danger", + "message": sErrorMessage + }; + scope.$root["modalWindow"]("dialog", "FORM_VALIDATION_ERROR", oOptions); + } + // + return promise; + }; + + /** + * afterProjectDirectory function. + * Actions à effectuer après l'upload d'un fichier dans le répertoire d'un projet fme. + */ + angular.element(vitisApp.appMainDrtv).scope()["afterDepositDirectory"] = function () { + // Injection des services. + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + // + $log.info("afterDepositDirectory"); + // Remise à zéro du formulaire. + this["resetForm"](); + angular.element("input[type=file]")["fileinput"]("clear"); + // Recharge la liste des fichiers. + this["loadTreeviewDepot"](); + } + // +}; + + +/** + * destructor_form + * Fonction appelé quand on quitte le formulaire nettoie toute les fonctions pour les rendres inutilisable en dehors du formulaire + * @returns {undefined} + */ +var destructor_form = function () { + console.log("Destructor"); + + for (var i = 0; i < oFormRequired.toDestructor.length; i++) { + oFormRequired.toDestructor[i] = undefined; + delete oFormRequired.toDestructor[i]; + } + + //supprimer la balise script du js pour pouvoir le recharger si on reviens sur le formulaire plus tard + angular.element('[src="' + oFormRequired.sUrl + '?version=' + oFormRequired.scope_["oProperties"]["build"] + '"]').remove(); + + oFormRequired = undefined; + delete oFormRequired; + + constructor_form = undefined; + delete constructor_form; + destructor_form = undefined; + delete destructor_form; +}; + +/**********************************************************************************/ diff --git a/src/module_extraction/module/forms/extraction_depot/extraction_depot_extraction_extraction_depot.json b/src/module_extraction/module/forms/extraction_depot/extraction_depot_extraction_extraction_depot.json new file mode 100755 index 0000000000000000000000000000000000000000..6a36d947ec8e590d2577149e2020be105b55b46a --- /dev/null +++ b/src/module_extraction/module/forms/extraction_depot/extraction_depot_extraction_extraction_depot.json @@ -0,0 +1,291 @@ +{ + "search": { + "name": "extraction_deposit_directory_update_form", + "title": "EXTRACTION_DEPOT_TITLE", + "beforeEvent": "beforeDepositDirectory()", + "event": "sendSimpleForm()", + "afterEvent": "afterDepositDirectory()", + "input_size": "xs", + "nb_cols": 12, + "class": "project-directory-upload-form", + "javascript": true, + "rows": [ + { + "fields": [ + { + "type": "treeview", + "name": "FileTreeView", + "label": "", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_2_1", + "options": { + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true, + "data": "", + "dataLoadingEvent": "" + } + } + ] + }, + { + "fields": [ + { + "type": "button", + "class": "btn-ungroup btn-group-xs", + "name": "group-button", + "nb_cols": 12, + "buttons": [ + { + "type": "button", + "name": "btn_download_file", + "glyphicon": "download", + "class": "btn-primary btn-xs", + "event": "downloadFileDepot()", + "tooltip": { + "title": "FORM_DOWNLOAD_FILE_PUBLICATION_WORKSPACE_LOAD_PROJECT_DIRECTORY", + "placement": "bottom", + "trigger": "hover", + "container": "body" + } + }, + { + "type": "button", + "name": "btn_refresh_treeview", + "glyphicon": "refresh", + "class": "btn-primary btn-xs", + "event": "loadTreeviewDepot()", + "tooltip": { + "title": "FORM_RELOAD_DIRECTORY_PUBLICATION_WORKSPACE_LOAD_PROJECT_DIRECTORY", + "placement": "bottom", + "trigger": "hover", + "container": "body" + } + }, + { + "type": "button", + "name": "btn_delete_file", + "glyphicon": "trash", + "class": "btn-primary btn-xs", + "event": "deleteFileDepot()", + "tooltip": { + "title": "FORM_DELETE_FILE_PUBLICATION_WORKSPACE_LOAD_PROJECT_DIRECTORY", + "placement": "bottom", + "trigger": "hover" + } + } + ], + "id": "undefined_1_1" + } + ] + }, + { + "class": "form-field-inline", + "fields": [ + { + "type": "upload", + "name": "control_file", + "label": "EXTRACTION_DEPOT_FILE_UPLOAD", + "nb_cols": 6, + "id": "fmw_file_2_1" + } + ] + }, + { + "fields": [ + { + "type": "button", + "name": "Element_0", + "nb_cols": 12, + "id": "Element_0_5_1", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_DEPOT_FILE_UPDATE", + "class": "btn-primary" + } + ] + } + ] + } + ], + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "btn_download_file", + "btn_refresh_treeview", + "btn_delete_file", + "control_file", + "btn_upload_fmw_file", + "FileTreeView", + "Element_0" + ] + } + ] + } + }, + "update": { + "name": "extraction_deposit_directory_update_form", + "title": "EXTRACTION_DEPOT_TITLE", + "beforeEvent": "beforeProjectDirectory()", + "event": "sendSimpleForm()", + "afterEvent": "afterProjectDirectory()", + "input_size": "xs", + "nb_cols": 12, + "class": "project-directory-upload-form", + "rows": [ + { + "fields": [ + { + "type": "treeview", + "name": "FileTreeView", + "label": "", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_2_1", + "options": { + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true, + "data": "", + "dataLoadingEvent": "" + } + } + ] + }, + { + "fields": [ + { + "type": "button", + "class": "btn-ungroup btn-group-xs", + "name": "group-button", + "nb_cols": 12, + "buttons": [ + { + "type": "button", + "name": "btn_download_file", + "glyphicon": "download", + "class": "btn-primary btn-xs", + "event": "downloadFile()", + "tooltip": { + "title": "FORM_DOWNLOAD_FILE_PUBLICATION_WORKSPACE_LOAD_PROJECT_DIRECTORY", + "placement": "bottom", + "trigger": "hover", + "container": "body" + } + }, + { + "type": "button", + "name": "btn_refresh_treeview", + "glyphicon": "refresh", + "class": "btn-primary btn-xs", + "event": "loadTreeviewDepot()", + "tooltip": { + "title": "FORM_RELOAD_DIRECTORY_PUBLICATION_WORKSPACE_LOAD_PROJECT_DIRECTORY", + "placement": "bottom", + "trigger": "hover", + "container": "body" + } + }, + { + "type": "button", + "name": "btn_delete_file", + "glyphicon": "trash", + "class": "btn-primary btn-xs", + "event": "deleteFile()", + "tooltip": { + "title": "FORM_DELETE_FILE_PUBLICATION_WORKSPACE_LOAD_PROJECT_DIRECTORY", + "placement": "bottom", + "trigger": "hover" + } + } + ], + "id": "undefined_1_1" + } + ] + }, + { + "class": "form-field-inline", + "fields": [ + { + "type": "upload", + "name": "control_file", + "label": "EXTRACTION_DEPOT_FILE_UPLOAD", + "nb_cols": 6, + "id": "fmw_file_2_1" + } + ] + }, + { + "fields": [ + { + "type": "button", + "name": "Element_0", + "nb_cols": 12, + "id": "Element_0_5_1", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "FORM_UPLOAD_FILE_DEPOSIT", + "class": "btn-primary" + } + ] + } + ] + } + ], + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "btn_download_file", + "btn_refresh_treeview", + "btn_delete_file", + "control_file", + "btn_upload_fmw_file", + "FileTreeView", + "Element_0" + ] + } + ] + } + }, + "insert": {}, + "display": { + "name": "gtf_workspace_project_directory_display_form", + "title": "EXTRACTION_DEPOT_TITLE", + "input_size": "xs", + "nb_cols": 8, + "rows": [], + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [] + } + ] + } + }, + "datasources": {} +} \ No newline at end of file diff --git a/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_coordsys.json b/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_coordsys.json new file mode 100755 index 0000000000000000000000000000000000000000..5aa5221df726feb7afc0c8c75288d33a75631585 --- /dev/null +++ b/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_coordsys.json @@ -0,0 +1,240 @@ +{ + "display":{ + "name":"extraction_ref_extraction_coordsys-form", + "title":"EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"label", + "name":"coordsys_id", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS_ID", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"coordsys", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ] + }, + "search":{ + "name":"extraction_ref_extraction_coordsys-form", + "title":"EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"coordsys", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS", + "disabled":false, + "required":false, + "nb_cols":4 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ] + }, + "insert":{ + "name":"extraction_ref_extraction_coordsys-form", + "title":"EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"coordsys_id", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS_ID", + "disabled":false, + "required":true, + "nb_cols":12, + "id":"coordsys_id_1_1" + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"coordsys", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"coordsys_2_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "coordsys_id", + "coordsys", + "insert_button" + ] + } + ] + } + }, + "update":{ + "name":"extraction_ref_extraction_coordsys-form", + "title":"EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"coordsys_id", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS_ID", + "disabled":false, + "required":true, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"coordsys", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()" + } +} \ No newline at end of file diff --git a/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_format.json b/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_format.json new file mode 100755 index 0000000000000000000000000000000000000000..115f79f1a2f83c0ddb5d0dcba014275b6f057f5d --- /dev/null +++ b/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_format.json @@ -0,0 +1,393 @@ +{ + "display":{ + "name":"extraction_ref_extraction_format-form", + "title":"EXTRACTION_REF_EXTRACTION_FORMAT_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"label", + "name":"format_id", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT_ID", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"format", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "options":{ + "choices":[ + { + "label":"oui", + "value":true + }, + { + "label":"non", + "value":false + } + ] + }, + "name":"use_for_raster", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_RASTER", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "options":{ + "choices":[ + { + "label":"oui", + "value":true + }, + { + "label":"non", + "value":false + } + ] + }, + "name":"use_for_vector", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_VECTOR", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ] + }, + "search":{ + "name":"extraction_ref_extraction_format-form", + "title":"EXTRACTION_REF_EXTRACTION_FORMAT_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"format", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT", + "disabled":false, + "required":false, + "nb_cols":4, + "id":"format_2_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ] + }, + "insert":{ + "name":"extraction_ref_extraction_format-form", + "title":"EXTRACTION_REF_EXTRACTION_FORMAT_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"format_id", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT_ID", + "disabled":false, + "required":true, + "nb_cols":12, + "id":"format_id_1_1" + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"format", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"format_2_1" + } + ] + }, + { + "fields":[ + { + "type":"radio", + "options":{ + "choices":[ + { + "label":"oui", + "value":true, + "$$hashKey":"object:1221" + }, + { + "label":"non", + "value":false, + "$$hashKey":"object:1222" + } + ] + }, + "name":"use_for_raster", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_RASTER", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"use_for_raster_3_1" + } + ] + }, + { + "fields":[ + { + "type":"radio", + "options":{ + "choices":[ + { + "label":"oui", + "value":true, + "$$hashKey":"object:1234" + }, + { + "label":"non", + "value":false, + "$$hashKey":"object:1235" + } + ] + }, + "name":"use_for_vector", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_VECTOR", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"use_for_vector_4_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "format_id", + "format", + "use_for_raster", + "use_for_vector", + "insert_button" + ] + } + ] + } + }, + "update":{ + "name":"extraction_ref_extraction_format-form", + "title":"EXTRACTION_REF_EXTRACTION_FORMAT_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"format_id", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT_ID", + "disabled":false, + "required":true, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"format", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"radio", + "options":{ + "choices":[ + { + "label":"oui", + "value":true + }, + { + "label":"non", + "value":false + } + ] + }, + "name":"use_for_raster", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_RASTER", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"radio", + "options":{ + "choices":[ + { + "label":"oui", + "value":true + }, + { + "label":"non", + "value":false + } + ] + }, + "name":"use_for_vector", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_VECTOR", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()" + } +} \ No newline at end of file diff --git a/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_layer.json b/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_layer.json new file mode 100755 index 0000000000000000000000000000000000000000..0a47f292c15a1c2a35c13876c06025118848f201 --- /dev/null +++ b/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_layer.json @@ -0,0 +1,355 @@ +{ + "display":{ + "name":"extraction_ref_extraction_layer-form", + "title":"EXTRACTION_REF_EXTRACTION_LAYER_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"label", + "name":"layer_id", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER_ID", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"layer", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"category", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_CATEGORY", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"restriction", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_RESTRICTION", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"unused_attributes", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_UNUSED_ATTRIBUTES", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ] + }, + "search":{ + "name":"extraction_ref_extraction_layer-form", + "title":"EXTRACTION_REF_EXTRACTION_LAYER_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"layer", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER", + "disabled":false, + "required":false, + "nb_cols":4, + "id":"layer_2_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ] + }, + "insert":{ + "name":"extraction_ref_extraction_layer-form", + "title":"EXTRACTION_REF_EXTRACTION_LAYER_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"layer_id", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER_ID", + "disabled":false, + "required":true, + "nb_cols":12, + "id":"layer_id_1_1" + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"layer", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"layer_2_1" + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"category", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_CATEGORY", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"category_3_1" + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"restriction", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_RESTRICTION", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"restriction_4_1" + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"unused_attributes", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_UNUSED_ATTRIBUTES", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"unused_attributes_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "layer_id", + "layer", + "category", + "restriction", + "unused_attributes", + "insert_button" + ] + } + ] + } + }, + "update":{ + "name":"extraction_ref_extraction_layer-form", + "title":"EXTRACTION_REF_EXTRACTION_LAYER_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"layer_id", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER_ID", + "disabled":false, + "required":true, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"layer", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"category", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_CATEGORY", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"restriction", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_RESTRICTION", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"unused_attributes", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_UNUSED_ATTRIBUTES", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()" + } +} \ No newline at end of file diff --git a/src/module_extraction/module/forms/login/sign_up.json b/src/module_extraction/module/forms/login/sign_up.json new file mode 100755 index 0000000000000000000000000000000000000000..cc5bc1e559d8233dcbc5c1f679e74a23ba834094 --- /dev/null +++ b/src/module_extraction/module/forms/login/sign_up.json @@ -0,0 +1,230 @@ +{ + "search": { + "name": "login_form", + "input_size": "xs", + "event": "sendInscriptionRequest()", + "rows": [ + { + "fields": [ + { + "type": "text", + "name": "username", + "label": "SIGNUPUSERNAME", + "required": true, + "pattern": "^([a-zA-Z_0-9])+", + "nb_cols": 12, + "id": "Element_0_2_1" + } + ] + }, + { + "fields": [ + { + "type": "password", + "name": "password", + "label": "SIGNUPPASSWORD", + "required": true, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_4_1" + } + ] + }, + { + "fields": [ + { + "type": "password", + "name": "signuppasswordconfirmation", + "label": "SIGNUPPASSWORDCONFIRMATION", + "required": true, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_4_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "company", + "label": "SIGNUPORGANIZATION", + "required": true, + "pattern": "", + "nb_cols": 12, + "id": "Element_3_4_1", + "id_from": "Element_3_4_1_from" + } + ] + }, + { + "fields": [ + { + "type": "email", + "name": "mail", + "label": "SIGNUPMAIL", + "required": true, + "pattern": "^(([a-zA-Z]|[0-9])|([-]|[_]|[.]))+[@](([a-zA-Z]|[0-9])|([-]|[_]|[.])){2,63}[.](([a-zA-Z0-9]){2,63})+$", + "nb_cols": 12, + "id": "Element_2_3_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "phone", + "label": "SIGN_UP_PHONE", + "required": false, + "pattern": "^(\\+[0-9]{1,3})?([0-9]{8,15})$", + "nb_cols": 12, + "id": "Element_0_5_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "public_ip", + "label": "SIGN_UP_PUBLIC_IP", + "required": false, + "pattern": "^([0-9]{3}.[0-9]{3}.[0-9]{3})((/[0-9]+)?)$", + "nb_cols": 12, + "id": "Element_0_6_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "demandeur", + "label": "SIGN_UP_DEMANDEUR", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_8_1" + } + ] + }, + { + "fields": [ + { + "type": "email", + "name": "mail_demandeur", + "label": "SIGN_UP_MAIL_DEMANDEUR", + "required": false, + "pattern": "^(([a-zA-Z]|[0-9])|([-]|[_]|[.]))+[@](([a-zA-Z]|[0-9])|([-]|[_]|[.])){2,63}[.](([a-zA-Z0-9]){2,63})+$", + "nb_cols": 12, + "id": "Element_0_9_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "study_object", + "label": "SIGN_UP_STUDY_OBJECT", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_7_1" + } + ] + }, + { + "fields": [ + { + "type": "date", + "name": "start_date", + "label": "SIGN_UP_START_DATE", + "nb_cols": 6, + "id": "Element_0_10_1" + }, + { + "type": "date", + "name": "end_date", + "label": "SIGN_UP_END_DATE", + "nb_cols": 6, + "id": "Element_0_10_1" + } + ] + }, + { + "fields": [ + { + "type": "checkbox", + "name": "signupcgu", + "label": "ACCEPT_CGU", + "required": true, + "nb_cols": 12, + "id": "Element_5_5_1" + } + ] + }, + { + "fields": [ + { + "type": "captcha", + "nb_cols": 12, + "name": "captcha", + "class": "center", + "id": "captcha", + "key": "6LdWLR8UAAAAAExA8zTXKFIsIwhacAJw1tdpuFw1" + } + ] + }, + { + "fields": [ + { + "type": "button", + "name": "btn_signup", + "nb_cols": 12, + "id": "Element_42_5_1", + "class": "btn-ungroup btn-group-sm login-connect-btn", + "buttons": [ + { + "type": "submit", + "name": "form_signup", + "label": "SIGNUP_BUTTON", + "class": "btn-primary" + } + ] + } + ] + } + ], + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "username", + "password", + "signuppasswordconfirmation", + "mail", + "company", + "signupcgu", + "captcha", + "btn_signup", + "phone", + "public_ip", + "study_object", + "end_date", + "start_date", + "demandeur", + "mail_demandeur" + ] + } + ] + } + }, + "update": {}, + "insert": {}, + "display": {}, + "datasources": {} +} \ No newline at end of file diff --git a/src/module_extraction/module/javascript/script_module.js b/src/module_extraction/module/javascript/script_module.js new file mode 100755 index 0000000000000000000000000000000000000000..512ddc9aa81c30066e88837b1822c7ce22144fe1 --- /dev/null +++ b/src/module_extraction/module/javascript/script_module.js @@ -0,0 +1,412 @@ +/* global vitisApp, goog, angular, bootbox, oVFB */ + +'use strict'; +goog.provide('extraction.script_module'); +vitisApp.on('appMainDrtvLoaded', function () { + /** + * setWabStatusMethod function. + * Définition de la méthode de transition. + * @param {string} sMethodName Nom de la méthode wab. + **/ + angular.element(vitisApp.appMainDrtv).scope()["setWabStatusMethod"] = function (sMethodName) { + // Injection des services. + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + //var $rootScope = angular.element(vitisApp.appMainDrtv).injector().get(["$rootScope"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + // + $log.info("setWabStatusMethod", sMethodName); + envSrvc["oFormValues"][envSrvc["sFormDefinitionName"]]["tr_status_method"] = sMethodName; + // Envoi le formulaire. + if (envSrvc["sMode"] != "display") { + var sFormElementName = envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"]; + var formScope = angular.element("form[name='" + sFormElementName + "']").scope(); + if (envSrvc["sMode"] == "update") + formScope["sendForm"](); + } + }; + + /** + * loadExtractionConfig function. + * Chargement de la section "Configuration EXTRACTION" dans l''''onglet "Configuration". + * @expose + */ + angular.element(vitisApp.appMainDrtv).scope()["loadExtractionConfig"] = function () { + // Injection des services. + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var envSrvc = angular.element(vitisApp.appWorkspaceListDrtv).injector().get(["envSrvc"]); + // + $log.info("loadExtractionConfig"); + // Paramètres des properties dans les valeurs du formulaire de config de Extraction. + angular.element(vitisApp.appMainDrtv).scope()["setPropertiesFormValues"](); + // Surcharge l''''url du formulaire des properties de Extraction. + var scope = this; + var sTable = envSrvc["oSelectedObject"]["name"]; + scope["oFormRequestParams"] = { + "sUrl": "modules/extraction/forms/" + envSrvc["oSelectedMode"]["mode_id"] + "/" + sTable + "_" + envSrvc["oSectionForm"][sTable]["sections"][envSrvc["oSectionForm"][sTable]["iSelectedSectionIndex"]]["name"] + ".json" + }; + }; + + /** + * initExtractionExtractionForm function. + * Traitements avant l'affichage du formulaire de l'onglet "Extraction". + **/ + angular.element(vitisApp.appMainDrtv).scope()["initExtractionExtractionForm"] = function () { + // Injection des services. + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var $rootScope = angular.element(vitisApp.appMainDrtv).injector().get(["$rootScope"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var formSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["formSrvc"]); + // + $log.info("initExtractionExtractionForm"); + var oFormValues = envSrvc["oFormValues"][envSrvc["sFormDefinitionName"]]; + var oElemDef; + // Affiche le champ de form. correspondant au type de méthode choisie. + var aExtentMethod = ["id_com", "id_conseil", "extent"]; + for (var i in aExtentMethod) { + var oElemDef = formSrvc["getFormElementDefinition"](aExtentMethod[i], envSrvc["sFormDefinitionName"], envSrvc["oFormDefinition"]); + if (oFormValues["extent_method"] == aExtentMethod[i]) + oElemDef["visible"] = true; + else + oElemDef["visible"] = false; + } + // Libellé des champs "Commune" et "Bassin de vie". + if (envSrvc["sMode"] == "display") { + oFormValues["id_com"] = oFormValues["id_com_label"]; + oFormValues["id_conseil"] = oFormValues["id_conseil_label"]; + } + // Attends la fin du chargement de tous les champs du formulaire. + var clearListener = $rootScope.$on('formExtracted', function (event, sFormDefinitionName) { + // Supprime le "listener". + clearListener(); + // Evènement sur le <select> "méthode choisie" : affiche le champ de form. correspondant au choix. + var oExtentMethod = formSrvc["getFormElementDefinition"]("extent_method", envSrvc["sFormDefinitionName"], envSrvc["oFormDefinition"]); + if (oExtentMethod["type"] == "select" && document.getElementById(oExtentMethod["id"]) != null) { + document.getElementById(oExtentMethod["id"]).addEventListener("change", function () { + for (var i in aExtentMethod) { + var oElemDef = formSrvc["getFormElementDefinition"](aExtentMethod[i], envSrvc["sFormDefinitionName"], envSrvc["oFormDefinition"]); + if (this.value == aExtentMethod[i]) + oElemDef["visible"] = true; + else + oElemDef["visible"] = false; + } + var formScope = angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"]).scope(); + formScope.$apply(); + }); + } + }); + }; + + /** + * getExtractionLayersTree function. + * Retourne l'arborescence pour le champ treeview "layers". + **/ + angular.element(vitisApp.appMainDrtv).scope()["getExtractionLayersTree"] = function () { + // Injection des services. + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + var $q = angular.element(vitisApp.appHtmlFormDrtv).injector().get(["$q"]); + // + $log.info("getExtractionLayersTree"); + var deferred = $q.defer(); + var promise = deferred.promise; + // Charge la liste des couches. + ajaxRequest({ + "method": "GET", + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extractions/Layers", + "scope": angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"] + "']").scope(), + "success": function(response) { + if (response["data"]["status"] == 1) { + // Création de l'arborescence des couches pour le champ "treeview". + var aLayers = response["data"]["layers"]; + var aNodes = []; + var stats = true; + if (typeof(aLayers) != "undefined") { + var aCategories = Object.keys(aLayers); + for (var i in aCategories) { + var aNode = {"text": aCategories[i], "nodes": []} + for (var j in aLayers[aCategories[i]]) { + if (aLayers[aCategories[i]][j]["statistique"] !== true) + { + stats = false; + aNode["nodes"].push({"text": aLayers[aCategories[i]][j]["text"], "value": aLayers[aCategories[i]][j]["value"], "mutualized": aLayers[aCategories[i]][j]["mutualized"]}); + } + } + if (stats !== true) + { + aNodes.push(aNode); + } + stats = true; + } + } + + this["setTreeviewNodesState"] = function (aNodes) { + for (var i in aNodes) { + if (typeof (aNodes[i]["nodes"]) != "undefined") + { + this["setTreeviewNodesState"](aNodes[i]["nodes"]); + } + else { + //Si la couche est mutualisée + if (aNodes[i]['mutualized'] == true) + { + aNodes[i]["color"] = propertiesSrvc["color_mutualized"]; + } else if (aNodes[i]['mutualized'] == false) { + aNodes[i]["color"] = propertiesSrvc["color_no_mutualized"]; + } + } + } + } + this["setTreeviewNodesState"](aNodes); + + deferred.resolve(aNodes); + } else { + // + var oOptions = { + "className": "modal-danger" + }; + // Message d'erreur ? + if (response["data"]["errorMessage"] != null) + oOptions["message"] = response["data"]["errorMessage"]; + scope.$root["modalWindow"]("alert", "REQUEST_ERROR", oOptions); + } + } + }); + return promise; + }; + + + /** + * getExtractionLayersTree function. + * Retourne l'arborescence pour le champ treeview "layers". + **/ + angular.element(vitisApp.appMainDrtv).scope()["getExtractionStatsTree"] = function () { + // Injection des services. + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + var $q = angular.element(vitisApp.appHtmlFormDrtv).injector().get(["$q"]); + // + $log.info("getExtractionStatsTree"); + var deferred = $q.defer(); + var promise = deferred.promise; + // Charge la liste des couches. + ajaxRequest({ + "method": "GET", + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extractions/Layers", + "scope": angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"] + "']").scope(), + "success": function(response) { + if (response["data"]["status"] == 1) { + // Création de l'arborescence des couches pour le champ "treeview". + var aLayers = response["data"]["layers"]; + var aNodes = []; + var stats = false; + if (typeof(aLayers) != "undefined") { + var aCategories = Object.keys(aLayers); + for (var i in aCategories) { + var aNode = {"text": aCategories[i], "nodes": []} + for (var j in aLayers[aCategories[i]]) { + if (aLayers[aCategories[i]][j]["statistique"] === true) + { + stats = true; + aNode["nodes"].push({"text": aLayers[aCategories[i]][j]["text"], "value": aLayers[aCategories[i]][j]["value"], "mutualized": aLayers[aCategories[i]][j]["mutualized"]}); + } + } + if (stats === true) + { + aNodes.push(aNode); + } + stats = false; + } + } + + this["setTreeviewNodesState"] = function (aNodes) { + for (var i in aNodes) { + if (typeof (aNodes[i]["nodes"]) != "undefined") + { + this["setTreeviewNodesState"](aNodes[i]["nodes"]); + } + else { + //Si la couche est mutualisée + if (aNodes[i]['mutualized'] == true) + { + aNodes[i]["color"] = propertiesSrvc["color_mutualized"]; + } else if (aNodes[i]['mutualized'] == false) { + aNodes[i]["color"] = propertiesSrvc["color_no_mutualized"]; + } + } + } + } + this["setTreeviewNodesState"](aNodes); + + deferred.resolve(aNodes); + } else { + // + var oOptions = { + "className": "modal-danger" + }; + // Message d'erreur ? + if (response["data"]["errorMessage"] != null) + oOptions["message"] = response["data"]["errorMessage"]; + scope.$root["modalWindow"]("alert", "REQUEST_ERROR", oOptions); + } + } + }); + return promise; + }; + + /** + * appExtractionLayersColumn directive. + * Mise en forme de la colonne "layers" dans la liste de l'onglet "Extraction". + * @param {service} $translate Translate service. + * @ngInject + **/ + vitisApp.appExtractionLayersColumnDrtv = function ($translate) { + return { + link: function (scope, element, attrs) { + // 1er affichage ou tri de la liste : maj de la mise en forme. + var clearObserver = attrs.$observe("appExtractionLayersColumn", function (value) { + // Si le champ est vide : supprime l'icône. + if (scope["row"]["entity"][scope["col"]["field"]] == null || scope["row"]["entity"][scope["col"]["field"]] == "") + element[0].className = ""; + else { + // Classes css (ui-grid + spécifiques). + element[0].className = "ui-grid-cell-contents info-icon"; + // Traduction du titre et du contenu. + $translate(["EXTRACTION_REF_EXTRACTION_LAYER_LAYERS_TOOLTIP_TITLE"]).then(function (translations) { + // Création du "tooltip". + $(element)["popover"]({ + "trigger": "hover", + "container": "body", + "title": function () { + return translations["EXTRACTION_REF_EXTRACTION_LAYER_LAYERS_TOOLTIP_TITLE"]; + }, + "content": function () { + var sValue = scope["row"]["entity"][scope["col"]["field"]]; + return sValue.replace(/\|/g, "<br>"); + }, + // Placement du tooltip à gauche ou à droite suivant la position horizontale de l'élément. + "placement": function (oPopoverNode, oElementNode) { + return scope.$root["workspaceTooltipPlacement"](oElementNode); + }, + "html": true + }); + }); + } + }); + // Attends la suppression du scope. + scope.$on("$destroy", function () { + // Supprime le tooltip. + $(element)["popover"]("destroy"); + // Supprime l'observateur. + clearObserver(); + }); + } + } + }; + vitisApp["compileProvider"].directive('appExtractionLayersColumn', vitisApp.appExtractionLayersColumnDrtv); + + /** + * appExtractionRefUnusedAttributesColumn directive. + * Mise en forme de la colonne "unused_attributes" dans la liste de l'onglet "Extraction". + * @param {service} $translate Translate service. + * @ngInject + **/ + vitisApp.appExtractionRefUnusedAttributesColumnDrtv = function ($translate) { + return { + link: function (scope, element, attrs) { + // 1er affichage ou tri de la liste : maj de la mise en forme. + var clearObserver = attrs.$observe("appExtractionRefUnusedAttributesColumn", function (value) { + // Si le champ est vide : supprime l'icône. + if (scope["row"]["entity"][scope["col"]["field"]] == null || scope["row"]["entity"][scope["col"]["field"]] == "") + element[0].className = ""; + else { + // Classes css (ui-grid + spécifiques). + element[0].className = "ui-grid-cell-contents info-icon"; + // Traduction du titre et du contenu. + $translate(["EXTRACTION_REF_EXTRACTION_LAYER_UNUSED_ATTRIBUTES_TOOLTIP_TITLE"]).then(function (translations) { + // Création du "tooltip". + $(element)["popover"]({ + "trigger": "hover", + "container": "body", + "title": function () { + return translations["EXTRACTION_REF_EXTRACTION_LAYER_UNUSED_ATTRIBUTES_TOOLTIP_TITLE"]; + }, + "content": function () { + var sValue = scope["row"]["entity"][scope["col"]["field"]]; + return sValue.replace(/;/g, "<br>"); + }, + // Placement du tooltip à gauche ou à droite suivant la position horizontale de l'élément. + "placement": function (oPopoverNode, oElementNode) { + return scope.$root["workspaceTooltipPlacement"](oElementNode); + }, + "html": true + }); + }); + } + }); + // Attends la suppression du scope. + scope.$on("$destroy", function () { + // Supprime le tooltip. + $(element)["popover"]("destroy"); + // Supprime l'observateur. + clearObserver(); + }); + } + } + }; + vitisApp["compileProvider"].directive('appExtractionRefUnusedAttributesColumn', vitisApp.appExtractionRefUnusedAttributesColumnDrtv); + + angular.element(vitisApp.appMainDrtv).scope()["showModalSignUp"] = function () { + $("#modal_sign_up").modal('open'); + + var oFormValues = {}; + oFormValues["search"] = {}; + ajaxRequest({ + 'method': 'GET', + 'url': propertiesSrvc["web_server_name"] + '/' + propertiesSrvc["application"] + "/modules/extraction/forms/sign_up.json", + 'success': function (response) { + hideAjaxLoader(); + + var oFormReaderScope = angular.element($("#modal_sign_up_form_container").children()).scope(); + oFormReaderScope.$evalAsync(function () { + oFormReaderScope['ctrl']['setDefinitionName']("search"); + oFormReaderScope['ctrl']['setFormValues'](oFormValues); + oFormReaderScope['ctrl']['setFormDefinition'](response["data"]); + oFormReaderScope['ctrl']['loadForm'](); + }); + + $this.$timeout_(function () { + //Materialize.updateTextFields(); + $(".checkbox").removeClass("checkbox checkbox-margin"); + + //$this.cssSelectFormDefinitionListener(oFormReaderScope); + }, 100); + }, + 'error': function (response) { + hideAjaxLoader(); + console.error("ERROR"); + } + }); + }; +}); + +vitisApp.on('appInitCtrlLoaded', function () { + var $rootScope = angular.element(vitisApp.appMainDrtv).injector().get(["$rootScope"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var $translatePartialLoader = angular.element(vitisApp.appMainDrtv).injector().get(["$translatePartialLoader"]); + var $translate = angular.element(vitisApp.appMainDrtv).injector().get(["$translate"]); + // Chargement du template de login et des formulaires spécifiques à Extraction. + //envSrvc["sLoginTemplate"] = "modules/calimap/templates/loginTpl.html"; + //envSrvc["sLoginForm"] = "modules/extraction/forms/extraction/login.json"; + //envSrvc["sForgottenPasswordForm"] = "modules/calimap/forms/login/forgotten_password.json"; + envSrvc["sSignUpForm"] = "modules/extraction/forms/login/sign_up.json"; + // Chargement du fichier less pour le login. + //loadExternalCss(["modules/calimap/less/login.less"]); + // Chargement des fichiers de langues du module. + var clearListener = $rootScope.$on('endFormNgRepeat', function (event) { + clearListener(); + $translatePartialLoader["addPart"]("modules/extraction/lang"); + $translate["refresh"](); + }); +}); diff --git a/src/module_extraction/module/lang/lang-en.json b/src/module_extraction/module/lang/lang-en.json new file mode 100755 index 0000000000000000000000000000000000000000..de3d253d26b49e3f25fd4bb66b0425d87bcb3a5c --- /dev/null +++ b/src/module_extraction/module/lang/lang-en.json @@ -0,0 +1,111 @@ +{ + "TEXT_MODE_EXTRACTION" : "Gestion des extractions", + "TITLE_MODE_EXTRACTION" : "Extraction", + "TEXT_MODE_EXTRACTION_REF" : "Gestion références des extractions", + "TITLE_MODE_EXTRACTION_REF" : "extraction_ref", + "EXTRACTION_EXTRACTION_EXTRACTION_TITLE" : "Extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_TITLE_INSERT" : "Extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_BO_ID" : "Id métier", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATUS" : "Etat", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATION_DATE" : "Date de création", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REQUESTOR" : "Demandeur", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_AE" : "Acte d'engagement", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT" : "Etendue", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMPANY" : "Organisme", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LAYERS" : "Couches", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATISTIQUE" : "Données statistiques", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_VECTOR_FORMAT_ID" : "Format Vecteurs", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COORDSYS_ID" : "Système de coordonnées", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE" : "note", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE_LINE" : "note_line", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RASTER_FORMAT_ID" : "Format Images", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT_METHOD" : "Méthode de saisie", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SIGNED" : "Acte d'engagement signé", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ACCEPTED_BY_CPA" : "Validation de l'usage décrit pour les données", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_IDENTIFICATION_COMPLETE" : "Cadre d'identification complet", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEFINITION_COMPLETE" : "Définition des traitements non renseignée", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATE" : "Créer", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REJECT_EXTRACTION" : "Refuser l'extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RELOAD_AE" : "Recharger l'acte d'engagement", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SEND_AE" : "Soumettre l'AE", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TERMINATE" : "Terminer", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ASK_AE" : "Demander l'AE", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_GENERATE_AE" : "Générer l'AE", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ALLOW_EXTRACTION" : "Autoriser l'extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMMENT" : "Commentaires", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_PRIORITY_ID" : "Priorité", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_COM" : "Commune", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_CONSEIL" : "Conseil de Territoire", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_HISTORY" : "Historique", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TECHNIQUE" : "Générer précaunisations techniques", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CARTOGRAPHIQUE" : "Générer charte cartographique", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LISTE_TERRITOIRE" : "Liste des territoires", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LISTE_COMMUNE" : "Liste des communes", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_FORMAT" : "Format", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ISOGEO" : "Générer métadonnées isogéo", + "EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE" : "Système de coordonnées {{::coordsys_id}}", + "EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE_INSERT" : "Système de coordonnées", + "EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS_ID" : "ID", + "EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS" : "Nom", + "EXTRACTION_REF_EXTRACTION_FORMAT_TITLE" : "Format {{::format_id}}", + "EXTRACTION_REF_EXTRACTION_FORMAT_TITLE_INSERT" : "Format", + "EXTRACTION_REF_EXTRACTION_FORMAT_SELECT" : "Sélectionner un format :", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT_ID" : "ID", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT" : "Nom", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_RASTER" : "Raster", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_VECTOR" : "Vecteur", + "EXTRACTION_REF_EXTRACTION_LAYER_TITLE" : "Couche {{::layer_id}}", + "EXTRACTION_REF_EXTRACTION_LAYER_TITLE_INSERT" : "Couche", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER_ID" : "ID", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER" : "Nom", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_CATEGORY" : "Catégorie", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_RESTRICTION" : "Restriction", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_UNUSED_ATTRIBUTES" : "Attributs inutilisés", + "EXTRACTION_REF_EXTRACTION_LAYER_LAYERS_TOOLTIP_TITLE" : "Couches", + "EXTRACTION_REF_EXTRACTION_LAYER_UNUSED_ATTRIBUTES_TOOLTIP_TITLE" : "Attributs inutilisés", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_SCHEMA_EXTRACTION" : "", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_COLOR_MUTUALIZED" : "", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_COLOR_NO_MUTUALIZED" : "", + "TEXT_MODE_EXTRACTION_FORM" : "", + "TITLE_MODE_EXTRACTION_FORM" : "extraction_form", + "SIGN_UP_END_DATE" : "Date de fin de contrat", + "SIGN_UP_START_DATE" : "Date de début de contrat", + "SIGN_UP_STUDY_OBJECT" : "Objet de l'étude", + "SIGN_UP_PUBLIC_IP" : "IP publique fixe", + "SIGN_UP_PHONE" : "Téléphone", + "SIGN_UP_DEMANDEUR" : "Nom du demandeur", + "SIGN_UP_MAIL_DEMANDEUR" : "Adresse mail du demandeur", + "TEXT_MODE_EXTRACTION_DEPOT" : "", + "TITLE_MODE_EXTRACTION_DEPOT" : "extraction_depot", + "EXTRACTION_EXTRACTION_CP_TITLE_INSERT" : "Extraction", + "EXTRACTION_EXTRACTION_CP_FORM_TECHNIQUE" : "Générer précaunisations techniques", + "EXTRACTION_EXTRACTION_CP_FORM_CARTOGRAPHIQUE" : "Générer charte cartographique", + "EXTRACTION_EXTRACTION_CP_FORM_ISOGEO" : "Générer métadonnées isogéo", + "EXTRACTION_EXTRACTION_CP_FORM_COMPANY" : "Organisme", + "EXTRACTION_EXTRACTION_CP_FORM_EXTENT_METHOD" : "Méthode de saisie", + "EXTRACTION_EXTRACTION_CP_FORM_ID_COM" : "Commune", + "EXTRACTION_EXTRACTION_CP_FORM_ID_CONSEIL" : "Conseil de Territoire", + "EXTRACTION_EXTRACTION_CP_FORM_EXTENT" : "Etendue", + "EXTRACTION_EXTRACTION_CP_FORM_LAYERS" : "Couches", + "EXTRACTION_EXTRACTION_CP_FORM_STATISTIQUE" : "Données statistiques", + "EXTRACTION_EXTRACTION_CP_FORM_COORDSYS_ID" : "Système de coordonnées", + "EXTRACTION_EXTRACTION_CP_FORM_VECTOR_FORMAT_ID" : "Format Vecteurs", + "EXTRACTION_EXTRACTION_CP_FORM_RASTER_FORMAT_ID" : "Format Images", + "EXTRACTION_EXTRACTION_CP_FORM_STATUS" : "Etat", + "EXTRACTION_EXTRACTION_CP_FORM_HISTORY" : "Historique", + "EXTRACTION_EXTRACTION_CP_FORM_CREATION_DATE" : "Date de création", + "EXTRACTION_EXTRACTION_CP_FORM_REQUESTOR" : "Demandeur", + "EXTRACTION_EXTRACTION_CP_FORM_AE" : "Acte d'engagement", + "EXTRACTION_EXTRACTION_CP_FORM_NOTE" : "note", + "EXTRACTION_EXTRACTION_CP_FORM_NOTE_LINE" : "note_line", + "EXTRACTION_EXTRACTION_CP_FORM_SIGNED" : "Acte d'engagement signé", + "EXTRACTION_EXTRACTION_CP_FORM_ACCEPTED_BY_CPA" : "Validation de l'usage décrit pour les données", + "EXTRACTION_EXTRACTION_CP_FORM_IDENTIFICATION_COMPLETE" : "Cadre d'identification complet", + "EXTRACTION_EXTRACTION_CP_FORM_DEFINITION_COMPLETE" : "Définition des traitements non renseignée", + "EXTRACTION_EXTRACTION_CP_FORM_COMMENT" : "Commentaires", + "EXTRACTION_EXTRACTION_CP_FORM_PRIORITY_ID" : "Priorité", + "EXTRACTION_EXTRACTION_CP_TITLE" : "Extraction", + "EXTRACTION_EXTRACTION_CP_FORM_BO_ID" : "Id métier", + "EXTRACTION_DEPOT_EXTRACTION_EXTRACTION_DEPOT_TITLE" : "", + "EXTRACTION_DEPOT_EXTRACTION_EXTRACTION_DEPOT_TITLE_INSERT" : "" +} \ No newline at end of file diff --git a/src/module_extraction/module/lang/lang-fr.json b/src/module_extraction/module/lang/lang-fr.json new file mode 100755 index 0000000000000000000000000000000000000000..792ea68fc746e0212183148b9bce44d9e3013326 --- /dev/null +++ b/src/module_extraction/module/lang/lang-fr.json @@ -0,0 +1,123 @@ +{ + "TEXT_MODE_EXTRACTION" : "Gestion des extractions", + "TITLE_MODE_EXTRACTION" : "Extraction", + "TEXT_MODE_EXTRACTION_REF" : "Gestion références des extractions", + "TITLE_MODE_EXTRACTION_REF" : "extraction_ref", + "EXTRACTION_EXTRACTION_EXTRACTION_TITLE" : "Extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_TITLE_INSERT" : "Extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_BO_ID" : "Id métier", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATUS" : "Etat", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATION_DATE" : "Date de création", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REQUESTOR" : "Demandeur", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_AE" : "Acte d'engagement", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT" : "Etendue", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMPANY" : "Organisme", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LAYERS" : "Couches", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATISTIQUE" : "Données statistiques", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_VECTOR_FORMAT_ID" : "Format Vecteurs", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COORDSYS_ID" : "Système de coordonnées", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE" : "note", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE_LINE" : "note_line", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RASTER_FORMAT_ID" : "Format Images", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT_METHOD" : "Méthode de saisie", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SIGNED" : "Acte d'engagement signé", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ACCEPTED_BY_CPA" : "Validation de l'usage décrit pour les données", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_IDENTIFICATION_COMPLETE" : "Cadre d'identification complet", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEFINITION_COMPLETE" : "Définition des traitements non renseignée", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATE" : "Créer", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REJECT_EXTRACTION" : "Refuser l'extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RELOAD_AE" : "Recharger l'acte d'engagement", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SEND_AE" : "Soumettre l'AE", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TERMINATE" : "Terminer", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ASK_AE" : "Demander l'AE", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_GENERATE_AE" : "Générer l'AE", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ALLOW_EXTRACTION" : "Autoriser l'extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMMENT" : "Commentaires", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_PRIORITY_ID" : "Priorité", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_COM" : "Commune", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_CONSEIL" : "Conseil de Territoire", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_HISTORY" : "Historique", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TECHNIQUE" : "Générer précaunisations techniques", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CARTOGRAPHIQUE" : "Générer charte cartographique", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LISTE_TERRITOIRE" : "Liste des territoires", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LISTE_COMMUNE" : "Liste des communes", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_FORMAT" : "Format", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ISOGEO" : "Générer métadonnées isogéo", + "EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE" : "Système de coordonnées {{::coordsys_id}}", + "EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE_INSERT" : "Système de coordonnées", + "EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS_ID" : "ID", + "EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS" : "Nom", + "EXTRACTION_REF_EXTRACTION_FORMAT_TITLE" : "Format {{::format_id}}", + "EXTRACTION_REF_EXTRACTION_FORMAT_TITLE_INSERT" : "Format", + "EXTRACTION_REF_EXTRACTION_FORMAT_SELECT" : "Sélectionner un format :", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT_ID" : "ID", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT" : "Nom", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_RASTER" : "Raster", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_VECTOR" : "Vecteur", + "EXTRACTION_REF_EXTRACTION_LAYER_TITLE" : "Couche {{::layer_id}}", + "EXTRACTION_REF_EXTRACTION_LAYER_TITLE_INSERT" : "Couche", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER_ID" : "ID", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER" : "Nom", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_CATEGORY" : "Catégorie", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_RESTRICTION" : "Restriction", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_UNUSED_ATTRIBUTES" : "Attributs inutilisés", + "EXTRACTION_REF_EXTRACTION_LAYER_LAYERS_TOOLTIP_TITLE" : "Couches", + "EXTRACTION_REF_EXTRACTION_LAYER_UNUSED_ATTRIBUTES_TOOLTIP_TITLE" : "Attributs inutilisés", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_SCHEMA_EXTRACTION" : "", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_COLOR_MUTUALIZED" : "Couleur des couches mutualisées", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_COLOR_NO_MUTUALIZED" : "Couleur des couches non mutualisées", + "TEXT_MODE_EXTRACTION_FORM" : "", + "TITLE_MODE_EXTRACTION_FORM" : "extraction_form", + "SIGN_UP_END_DATE" : "Date de fin de contrat", + "SIGN_UP_START_DATE" : "Date de début de contrat", + "SIGN_UP_STUDY_OBJECT" : "Objet de l'étude", + "SIGN_UP_PUBLIC_IP" : "IP publique fixe", + "SIGN_UP_PHONE" : "Téléphone", + "SIGN_UP_DEMANDEUR" : "Nom du demandeur", + "SIGN_UP_MAIL_DEMANDEUR" : "Adresse mail du demandeur", + "TEXT_MODE_EXTRACTION_DEPOT" : "", + "TITLE_MODE_EXTRACTION_DEPOT" : "extraction_depot", + "EXTRACTION_EXTRACTION_CP_TITLE_INSERT" : "Extraction", + "EXTRACTION_EXTRACTION_CP_FORM_TECHNIQUE" : "Générer précaunisations techniques", + "EXTRACTION_EXTRACTION_CP_FORM_CARTOGRAPHIQUE" : "Générer charte cartographique", + "EXTRACTION_EXTRACTION_CP_FORM_ISOGEO" : "Générer métadonnées isogéo", + "EXTRACTION_EXTRACTION_CP_FORM_COMPANY" : "Organisme", + "EXTRACTION_EXTRACTION_CP_FORM_EXTENT_METHOD" : "Méthode de saisie", + "EXTRACTION_EXTRACTION_CP_FORM_ID_COM" : "Commune", + "EXTRACTION_EXTRACTION_CP_FORM_ID_CONSEIL" : "Conseil de Territoire", + "EXTRACTION_EXTRACTION_CP_FORM_EXTENT" : "Etendue", + "EXTRACTION_EXTRACTION_CP_FORM_LAYERS" : "Couches", + "EXTRACTION_EXTRACTION_CP_FORM_STATISTIQUE" : "Données statistiques", + "EXTRACTION_EXTRACTION_CP_FORM_COORDSYS_ID" : "Système de coordonnées", + "EXTRACTION_EXTRACTION_CP_FORM_VECTOR_FORMAT_ID" : "Format Vecteurs", + "EXTRACTION_EXTRACTION_CP_FORM_RASTER_FORMAT_ID" : "Format Images", + "EXTRACTION_EXTRACTION_CP_FORM_STATUS" : "Etat", + "EXTRACTION_EXTRACTION_CP_FORM_HISTORY" : "Historique", + "EXTRACTION_EXTRACTION_CP_FORM_CREATION_DATE" : "Date de création", + "EXTRACTION_EXTRACTION_CP_FORM_REQUESTOR" : "Demandeur", + "EXTRACTION_EXTRACTION_CP_FORM_AE" : "Acte d'engagement", + "EXTRACTION_EXTRACTION_CP_FORM_NOTE" : "note", + "EXTRACTION_EXTRACTION_CP_FORM_NOTE_LINE" : "note_line", + "EXTRACTION_EXTRACTION_CP_FORM_SIGNED" : "Acte d'engagement signé", + "EXTRACTION_EXTRACTION_CP_FORM_ACCEPTED_BY_CPA" : "Validation de l'usage décrit pour les données", + "EXTRACTION_EXTRACTION_CP_FORM_IDENTIFICATION_COMPLETE" : "Cadre d'identification complet", + "EXTRACTION_EXTRACTION_CP_FORM_DEFINITION_COMPLETE" : "Définition des traitements non renseignée", + "EXTRACTION_EXTRACTION_CP_FORM_COMMENT" : "Commentaires", + "EXTRACTION_EXTRACTION_CP_FORM_PRIORITY_ID" : "Priorité", + "EXTRACTION_EXTRACTION_CP_TITLE" : "Extraction", + "EXTRACTION_EXTRACTION_CP_FORM_BO_ID" : "Id métier", + "EXTRACTION_DEPOT_EXTRACTION_EXTRACTION_DEPOT_TITLE" : "", + "EXTRACTION_DEPOT_EXTRACTION_EXTRACTION_DEPOT_TITLE_INSERT" : "", + "EXTRACTION_DEPORT_DELETE_NO_SELECTED": "Aucun fichier sélectionné", + "EXTRACTION_DEPOT_DELETE_SELECT_A_FILE": "Veuillez sélectionner un fichier à supprimer", + "EXTRACTION_DEPOT_TITLE": "Dépot de fichiers", + "EXTRACTION_DEPOT_FILE_UPLOAD": "Fichier à envoyer", + "EXTRACTION_DEPOT_FILE_UPDATE": "Mettre à jour", + "ERROR_FILE_SIZE_EXTRACTION_LOAD_DEPOSIT_DIRECTORY" : "La taille du fichier est supérieure à la taille maximale autorisée.", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEPOSIT" : "Déposer", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_INPUT_DEPOSIT" : "Fichier à déposer", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_FORMAT_EXTENSION" : "Format du fichier", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SCHEMA_CONSTRAINT" : "Schéma des contraintes", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_SIG" : "Extensions SIG (séparées par |)", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_DAO" : "Extensions DAO (séparées par |)" +} diff --git a/src/module_extraction/module/less/main.less b/src/module_extraction/module/less/main.less new file mode 100755 index 0000000000000000000000000000000000000000..6fc121e62751d3bec645ea2f90b4d2ae50b0a9a7 --- /dev/null +++ b/src/module_extraction/module/less/main.less @@ -0,0 +1,5 @@ +// LESS +@ui-grid-bg-image: "../images/ui-grid/wbg.gif"; +@font-color-purple: #6d1a67; +@test-color: black; +@import 'projectDirectory.less'; \ No newline at end of file diff --git a/src/module_extraction/storage/Accounts.class.mail.inc b/src/module_extraction/storage/Accounts.class.mail.inc new file mode 100644 index 0000000000000000000000000000000000000000..bb977fddef9f8177b50895b88e5973253b4ce0b0 --- /dev/null +++ b/src/module_extraction/storage/Accounts.class.mail.inc @@ -0,0 +1,622 @@ +<?php + +$aMail["newUserTitle"] = "Un nouvel utilisateur vient juste de s'inscrire"; +$aMail["newUserTitleAutomated"] = "Vérification de votre adresse mail"; +$aMail["newUserBody"] = '<!-- 1 Column Text + Button : BEGIN --> + <tr> + <td bgcolor="#ffffff" style="padding: 0px; text-align: center;background-color:#8c8c8c; height:50px; margin-bottom:10px;"> + <h1 style="margin: 0; font-family: sans-serif; font-size: 24px; line-height: 27px; color: #FFFFFF; font-weight: normal;">[TITLE]</h1> + </td> + </tr> + <tr> + <td bgcolor="#ffffff" style="padding: 10px 20px; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #000000; text-align: center;"> + <p style="width:100%; font-weight:bold; text-align: justify; font-size: 20px;">Bonjour [FULLNAME],</p> + <p style="width:100%; text-align: left;font-size: 18px;">Nous vous remercions d\'avoir créé votre compte sur <b>[HOSTNAME]</b>.</p> + <p style="width:100%; text-align: left;font-size: 18px;"><b>Informations sur votre compte :</b></p> + <p style="width:100%; text-align: left;font-size: 18px;">Identifiant : [USERNAME]</p> + <p style="width:100%; text-align: left;font-size: 18px;">Organisme : [COMPANY] </p> + <p style="width:100%; text-align: left;font-size: 18px;">Mail : [MAIL]</p> + <p style="width:100%; text-align: left;font-size: 18px;">Téléphone : [PHONE] </p> + <p style="width:100%; text-align: left;font-size: 18px;">Ip publique fixe : [PUBLIC_IP] </p> + <p style="width:100%; text-align: left;font-size: 18px;">Nom du demandeur : [DEMANDEUR] </p> + <p style="width:100%; text-align: left;font-size: 18px;">Adresse mail du demandeur : [MAIL_DEMANDEUR] </p> + <p style="width:100%; text-align: left;font-size: 18px;">Objet de l\'étude : [STUDY_OBJECT] </p> + <p style="width:100%; text-align: left;font-size: 18px;margin-top: 20px;">Cliquez sur le bouton ci-dessous pour finaliser votre inscription :</p> + </td> + </tr> + <tr> + <td bgcolor="#ffffff" style="padding: 10px 20px; font-family: sans-serif; font-size: 20px; line-height: 20px; color: #555555;"> + <table role="presentation" aria-hidden="true" cellspacing="0" cellpadding="0" border="0" align="center" style="margin: auto"> + <tr> + <td style="border-radius: 3px; background: #5cb85c; text-align: center;" class="button-td"> + <a href="[URL]" style="background: #5cb85c; border: 15px solid #5cb85c; font-family: sans-serif; font-size: 18px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 0px; font-weight: bold;" class="button-a"> + <span style="color:#ffffff;">Je confirme mon adresse mail</span> + </a> + </td> + </tr> + </table> + <!-- Button : END --> + </td> + </tr> + <tr> + <td bgcolor="#ffffff" style="padding: 10px 20px; font-family: sans-serif; line-height: 20px; color: #000000; text-align: center;"> + <p style="width:100%; text-align: justify;font-size: 18px;">Si vous ne vous êtes pas inscrit(e) sur notre application <b>[HOSTNAME]</b>, ignorez simplement ce message.</p> + </td> + </tr> + <!-- 1 Column Text + Button : END -->'; + +$aMail["confirmationSignUpTitle"] = "Confirmation d'inscription"; +$aMail["genericBody"] = ' + <tr> + <td bgcolor="#ffffff" style="padding: 40px 40px 20px; text-align: center;"> + <h1 style="margin: 0; font-family: sans-serif; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">[MESSAGE]</h1> + </td> + </tr>'; + +$aMail["SignUpOk"] = '<tr> + <td bgcolor="#ffffff" style="padding: 40px 40px 20px; text-align: center;"> + <h1 style="margin: 0; font-family: sans-serif; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">L\'utilisateur a été ajouté, connectez vous sur la base de données pour lui donner des droits (Defaut: [ROLES])</h1> + </td> + </tr>'; +$aMail["SignUpError"] = '<tr> + <td bgcolor="#ffffff" style="padding: 40px 40px 20px; text-align: center;"> + <h1 style="margin: 0; font-family: sans-serif; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">L\'utilisateur n\'a pas pu être ajouté consultez les fichiers de log pour plus d\'informations</h1> + </td> + </tr>'; + +$aMail["signUpConfirmation"] = '<tr> + <td bgcolor="#ffffff" style="padding: 40px 40px 20px; text-align: center;"> + <h1 style="margin: 0; font-family: sans-serif; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal; margin-bottom: 15px;">Votre compte est maintenant activé, vous pouvez vous connecter. Pour avoir accès à plus de fonctionnalités contactez l\'administrateur</h1> + <a style="margin: 0; font-family: sans-serif; font-size: 22px; font-weight: normal;" href="[REDIRECTION]"> Retourner vers l\'application </a> + </td> + </tr>'; +$aMail["fpwdTitle"] = "Changez votre mot de passe"; +$aMail["fpwdUpdateOk"] = '<tr> + <td bgcolor="#ffffff" style="padding: 40px 40px 20px; text-align: center;"> + <h1 style="margin: 0; font-family: sans-serif; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">Le mot de passe a été mis à jour</h1> + </td> + </tr>'; +$aMail["fpwdUpdateError"] = '<tr> + <td bgcolor="#ffffff" style="padding: 40px 40px 20px; text-align: center;"> + <h1 style="margin: 0; font-family: sans-serif; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">Le mot de passe n\'a pas pu être mis à jour</h1> + </td> + </tr>'; +$aMail["alreadyUpdate"] = '<tr> + <td bgcolor="#ffffff" style="padding: 40px 40px 20px; text-align: center;"> + <h1 style="margin: 0; font-family: sans-serif; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">Le mot de passe à déjà été changé</h1> + </td> + </tr>'; + +$aMail["fpwdBody"] = '<!-- 1 Column Text + Button : BEGIN --> + <tr> + <td bgcolor="#ffffff" style="padding: 0px; text-align: center;background-color:#8c8c8c; height:50px; margin-bottom:10px;"> + <h1 style="margin: 0; font-family: sans-serif; font-size: 24px; line-height: 27px; color: #FFFFFF; font-weight: normal;">Changez votre mot de passe</h1> + </td> + </tr> + <tr> + <td bgcolor="#ffffff" style="padding: 10px 20px; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #000000; text-align: center;"> + <p style="width:100%; font-weight:bold; text-align: left; font-size: 20px;">Bonjour [LOGIN],</p> + <p style="width:100%; text-align: left;font-size: 18px;">Une tentative de récupération de votre compte à été effectué sur le site <b>[HOSTNAME]</b>.</p> + <p style="width:100%; text-align: left;font-size: 18px;margin-top: 10px;">Cliquez sur le bouton ci-dessous pour changer votre mot de passe :</p> + </td> + </tr> + <tr> + <td bgcolor="#ffffff" style="padding: 10px 20px; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555;"> + <table role="presentation" aria-hidden="true" cellspacing="0" cellpadding="0" border="0" align="center" style="margin: auto"> + <tr> + <td style="border-radius: 3px; background: #5cb85c; text-align: center;" class="button-td"> + <a href="[URL]" style="background: #5cb85c; border: 15px solid #5cb85c; font-family: sans-serif; font-size: 18px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 0px; font-weight: bold;" class="button-a"> + <span style="color:#ffffff;">Changer mon mot de passe</span> + </a> + </td> + </tr> + </table> + <!-- Button : END --> + </td> + </tr> + <tr> + <td bgcolor="#ffffff" style="padding: 10px 20px; font-family: sans-serif; line-height: 20px; color: #000000; text-align: center;"> + <p style="width:100%; text-align: justify;font-size: 18px;">Si vous n\'avez pas perdu votre mot de passe pour vous connecter à notre application <b>[HOSTNAME]</b>, ignorez simplement ce message.</p> + </td> + </tr> + <!-- 1 Column Text + Button : END -->'; + +$aMail["fpwdForm"] = '<!-- 1 Column Text + Button : BEGIN --> + <tr> + <td bgcolor="#ffffff" style="padding: 0px; text-align: center;background-color:#8c8c8c; height:50px; margin-bottom:10px;"> + <h1 style="margin: 0; font-family: sans-serif; font-size: 24px; line-height: 27px; color: #FFFFFF; font-weight: normal;">Saisissez votre nouveau mot de passe</h1> + </td> + </tr> + <tr> + <td bgcolor="#ffffff" style="padding: 20px 40px 40px; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555; text-align: center;"> + <form style="text-align:-webkit-right;"> + <div style="text-align:left;"> + <label for="password" style="font-weight: bold;">Nouveau mot de passe</label> + <input type="password" id="password" name="password" class="input-text-control" required/> + </div> + <div style="text-align:left;margin-top:10px;"> + <label for="password_confirm" style="font-weight: bold;">Confirmer votre nouveau mot de passe</label> + <input type="password" id="password_confirm" name="password_confirm" class="input-text-control" required/> + </div> + <div style="margin-top:20px;"> + <input type="hidden" name="token" value="[TOKEN]"/> + <input type="hidden" name="output" value="text/html"/> + <button style="background: #5cb85c; border: 15px solid #5cb85c; font-family: sans-serif; font-size: 15px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 0px; font-weight: bold;" class="button-a" type="button" onclick="sendRequest(\'[URL]\')"><span style="color:#ffffff;">Envoi</span></button> + </div> + </form> + </td> + </tr>'; + +$aMail["passwordScript"] = '<script> + var password = document.getElementById("password"), confirm_password = document.getElementById("password_confirm"); + + function validatePassword(){ + if(password.value != confirm_password.value) { + confirm_password.setCustomValidity("Les deux mots de passe doivent être identique"); + } else { + confirm_password.setCustomValidity(\'\'); + } + } + + password.onchange = validatePassword; + confirm_password.onkeyup = validatePassword; + + function sendRequest (sUrl){ + if(typeof(password.value)!== "undefined"){ + if(password.value != ""){ + var xhr = new XMLHttpRequest(); + xhr.open("PUT", sUrl); + sParams = JSON.stringify({"password": password.value}); + xhr.onreadystatechange = function (aEvt) { + if (xhr.readyState == 4) { + if (xhr.status == 200) { + var oJson = JSON.parse(xhr.responseText); + window.location.replace(oJson.sUrl); + } else { + //xhr.responseText; + } + } + } + xhr.send(sParams); + }else{console.log("saisissez un mot de passe2")} + }else{console.log("saisissez un mot de passe")} + } + </script>'; + +$aMail["mainBody"] = '<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> <!-- utf-8 works for most cases --> + <meta name="viewport" content="width=device-width"> <!-- Forcing initial-scale shouldn\'t be necessary --> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Use the latest (edge) version of IE rendering engine --> + <meta name="x-apple-disable-message-reformatting"> <!-- Disable auto-scale in iOS 10 Mail entirely --> + <title>VAM</title> <!-- The title tag shows in email notifications, like Android 4.4. --> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> + <!-- Web Font / @font-face : BEGIN --> + <!-- NOTE: If web fonts are not required, lines 10 - 27 can be safely removed. --> + + <!-- Desktop Outlook chokes on web font references and defaults to Times New Roman, so we force a safe fallback font. --> + <!--[if mso]> + <style> + * { + font-family: sans-serif !important; + } + </style> + <![endif]--> + + <!-- All other clients get the webfont reference; some will render the font and others will silently fail to the fallbacks. More on that here: http://stylecampaign.com/blog/2015/02/webfont-support-in-email/ --> + <!--[if !mso]><!--> + <!-- insert web font reference, eg: <link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet" type="text/css"> --> + <!--<![endif]--> + + <!-- Web Font / @font-face : END --> + + <!-- CSS Reset --> + <style> + + /* What it does: Remove spaces around the email design added by some email clients. */ + /* Beware: It can remove the padding / margin and add a background color to the compose a reply window. */ + html, + body { + margin: 0 auto !important; + padding: 0 !important; + height: 100% !important; + width: 100% !important; + /*min-width: 600px;*/ + } + + /* What it does: Stops email clients resizing small text. */ + * { + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; +} + +/* What it does: Centers email on Android 4.4 */ +div[style*="margin: 16px 0"] { + margin:0 !important; +} + +/* What it does: Stops Outlook from adding extra spacing to tables. */ +table, +td { + mso-table-lspace: 0pt !important; + mso-table-rspace: 0pt !important; +} + +/* What it does: Fixes webkit padding issue. Fix for Yahoo mail table alignment bug. Applies table-layout to the first 2 tables then removes for anything nested deeper. */ +table { + border-spacing: 0 !important; + border-collapse: collapse !important; + table-layout: fixed !important; + margin: 0 auto !important; +} +table table table { + table-layout: auto; +} + +/* What it does: Uses a better rendering method when resizing images in IE. */ +img { + -ms-interpolation-mode:bicubic; +} + +/* What it does: A work-around for iOS meddling in triggered links. */ +*[x-apple-data-detectors] { + color: inherit !important; + text-decoration: none !important; +} + +/* What it does: A work-around for Gmail meddling in triggered links. */ +.x-gmail-data-detectors, +.x-gmail-data-detectors *, +.aBn { + border-bottom: 0 !important; + //cursor: default !important; +} + +/* What it does: Prevents Gmail from displaying an download button on large, non-linked images. */ +.a6S { + display: none !important; + opacity: 0.01 !important; +} +/* If the above doesn\'t work, add a .g-img class to any image in question. */ +img.g-img + div { + display:none !important; +} + +/* What it does: Prevents underlining the button text in Windows 10 */ +.button-link { + text-decoration: none !important; +} + +blockquote { + font-style:normal; + text-align:left; + //margin-left: 32px!important; + margin: 5px 5px 0px 32px!important; + //padding-top:10px; + //font-family:"Segoe Print","Times New Roman", Verdana; + padding-left: 7px; + min-height: 30px; + //background-color: #EFEFEF; + border-left: 2px solid #8c8c8c; +} + +blockquote > p { + margin:4.5px; +} + +.input-text-control{ + display: block; + width: 100%; + height: 14px; + padding: 4px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; + color: #555; + background-color: #fff; + background-image: none; + border: 1px solid #ccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s; +} + +/* What it does: Removes right gutter in Gmail iOS app: https://github.com/TedGoas/Cerberus/issues/89 */ +/* Create one of these media queries for each additional viewport size you\'d like to fix */ +/* Thanks to Eric Lepetit (@ericlepetitsf) for help troubleshooting */ +@media only screen and (min-device-width: 375px) and (max-device-width: 413px) { /* iPhone 6 and 6+ */ + .email-container { + min-width: 375px !important; + } +} + +</style> + +<!-- What it does: Makes background images in 72ppi Outlook render at correct size. --> + <!--[if gte mso 9]> + <xml> + <o:OfficeDocumentSettings> + <o:AllowPNG/> + <o:PixelsPerInch>96</o:PixelsPerInch> + </o:OfficeDocumentSettings> + </xml> +<![endif]--> + +<!-- Progressive Enhancements --> +<style> + +/* What it does: Hover styles for buttons */ +.button-td, +.button-a { + transition: all 100ms ease-in; +} +.button-td:hover, +.button-a:hover { + background: #449D44 !important; + border-color: #449D44 !important; +} + +.bottom-strip{ + width: 120px !important; + height: 10px !important; + float: left !important; +} + +.square-logo-layout{ + width: 40px; + float: left !important; + background-color: #FFF;//#24292E; + border-radius: 50%; + font-size: 30px; + padding: 7.5px; + margin-right: 0px; + //color: #FFF; + cursor:pointer !important; +} + +.square-logo-layout > svg{ + cursor:pointer!important; +} + + +/* Media Queries */ +@media screen and (max-width: 600px) { + + .email-container { + width: 100% !important; + margin: auto !important; + } + + /* What it does: Forces elements to resize to the full width of their container. Useful for resizing images beyond their max-width. */ + .fluid { + max-width: 100% !important; + height: auto !important; + margin-left: auto !important; + margin-right: auto !important; + } + + /* What it does: Forces table cells into full-width rows. */ + .stack-column, + .stack-column-center { + display: block !important; + width: 100% !important; + max-width: 100% !important; + direction: ltr !important; + } + /* And center justify these ones. */ + .stack-column-center { + text-align: center !important; + } + + /* What it does: Generic utility class for centering. Useful for images, buttons, and nested tables. */ + .center-on-narrow { + text-align: center !important; + display: block !important; + margin-left: auto !important; + margin-right: auto !important; + float: none !important; + } + table.center-on-narrow { + display: inline-block !important; + } + + .input-text-control{ + display: block; + width: 100%; + height: 14px; + padding: 4px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; + color: #555; + background-color: #fff; + background-image: none; + border: 1px solid #ccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s; + } + + /* What it does: Adjust typography on small screens to improve readability */ + .email-container p { + font-size: 17px !important; + line-height: 22px !important; + } + +} + +</style> + +</head> +<body width="100%" bgcolor="#E5E5E5" style="margin: 0px; mso-line-height-rule: exactly;"> + <center style="width: 600px; margin: auto; background: #FFFFFF; text-align: left;"> + <!-- Email Header : BEGIN --> + <table role="presentation" aria-hidden="true" aria-hidden="true" cellspacing="0" cellpadding="0" border="0" align="center" width="600" style="margin: auto;" class="email-container"> + <tr> + <td style="padding: 20px 0px; text-align: center"> + <a href="http://www.veremes.com/" target="_blank"> + <svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="335px" height="100px" viewBox="0 0 335 100" enable-background="new 0 0 335 100" xml:space="preserve"> + <g> + <rect fill="#FFFFFF" width="335" height="100"/> + <g> + <path fill="#1A171B" d="M308.774,60.788c-0.99-1.493-2.537-2.688-4.64-3.589c-0.533-0.224-1.577-0.57-3.142-1.042 + c-1.563-0.47-2.75-0.959-3.567-1.472c-0.893-0.547-1.532-1.161-1.916-1.841c-0.386-0.682-0.577-1.517-0.577-2.511 + c0-1.4,0.466-2.572,1.398-3.516c0.933-0.944,2.098-1.417,3.498-1.417c1.561,0,2.793,0.437,3.695,1.308 + c0.901,0.873,1.402,2.1,1.505,3.681h4.622c-0.12-2.909-1.026-5.178-2.72-6.806c-1.69-1.626-3.972-2.439-6.845-2.439 + c-2.71,0-5.016,0.916-6.921,2.744c-1.904,1.831-2.856,4.057-2.856,6.678c0,2.319,0.569,4.168,1.714,5.551 + c1.143,1.383,3.582,2.734,7.318,4.056c2.334,0.858,3.947,1.775,4.838,2.754c0.891,0.98,1.336,2.274,1.336,3.884 + c0,1.612-0.561,2.947-1.682,4.007c-1.121,1.063-2.526,1.592-4.219,1.592c-1.772,0-3.262-0.69-4.463-2.071 + c-1.202-1.379-1.802-3.12-1.802-5.228v-0.122h-4.502c0.103,3.535,1.114,6.344,3.039,8.431c1.922,2.085,4.466,3.127,7.637,3.127 + c3.108,0,5.674-0.952,7.698-2.853c2.025-1.899,3.038-4.301,3.038-7.205C310.261,64.182,309.764,62.279,308.774,60.788z + M118.462,41.021c-5.17,0-9.417,1.679-12.739,5.035c-3.32,3.357-4.979,7.607-4.979,12.742c0,4.912,1.693,9.118,5.084,12.617 + c3.389,3.502,7.535,5.252,12.438,5.252c3.694,0,6.947-0.998,9.756-2.988c2.808-1.994,4.988-4.849,6.542-8.569h-4.866 + c-1.103,2.332-2.666,4.151-4.688,5.459c-2.023,1.308-4.302,1.962-6.834,1.962c-3.575,0-6.558-1.131-8.947-3.394 + c-2.391-2.263-3.718-5.226-3.983-8.894h30.413v-0.318c0-5.604-1.601-10.154-4.797-13.655 + C127.662,42.771,123.529,41.021,118.462,41.021z M105.366,56.472c0.509-3.468,1.901-6.219,4.17-8.258 + c2.27-2.037,5.04-3.056,8.313-3.056c3.517,0,6.368,0.948,8.556,2.844c2.188,1.897,3.692,4.719,4.509,8.47H105.366z M99.054,31.046 + L84.898,69.101L72.402,35.38l0.007-0.047l-0.079-0.217c-0.401-1.095-0.841-2.3-1.34-3.546l-0.194-0.523h-0.021 + c-2.108-5.143-5.249-10.879-10.817-12.957c-5.541-2.069-12.762-0.675-17.169,3.314c-3.422,3.096-5.471,7.843-6.089,14.111 + c0-0.002-0.117,1.154-0.117,1.154c-0.239,2.31-0.481,4.665-0.354,7.034l0.047,0.874l0.875-0.048l2.31-0.124l0.876-0.046 + l-0.049-0.876c-0.113-2.069,0.115-4.268,0.335-6.396c0-0.001,0.12-1.172,0.12-1.172c0.517-5.235,2.121-9.103,4.771-11.499 + c3.349-3.03,8.825-4.09,13.024-2.522c4.294,1.604,6.994,6.964,8.88,11.717l1.387,3.688l0.208,0.57l0.005-0.004L83.24,75.692h3.407 + l16.788-44.646H99.054z M268.755,41.021c-5.171,0-9.418,1.679-12.738,5.035c-3.32,3.357-4.979,7.607-4.979,12.742 + c0,4.912,1.692,9.118,5.084,12.617c3.389,3.502,7.535,5.252,12.438,5.252c3.695,0,6.947-0.998,9.758-2.988 + c2.807-1.994,4.986-4.849,6.54-8.569h-4.866c-1.102,2.332-2.666,4.151-4.688,5.459c-2.022,1.308-4.302,1.962-6.835,1.962 + c-3.574,0-6.557-1.131-8.945-3.394c-2.392-2.263-3.72-5.226-3.984-8.894h30.415v-0.318c0-5.604-1.603-10.154-4.8-13.655 + C277.955,42.771,273.821,41.021,268.755,41.021z M255.658,56.472c0.51-3.468,1.901-6.219,4.171-8.258 + c2.27-2.037,5.039-3.056,8.314-3.056c3.516,0,6.367,0.948,8.555,2.844c2.187,1.897,3.692,4.719,4.509,8.47H255.658z + M148.164,42.625c-1.253,0.705-2.409,1.808-3.465,3.315v-3.946h-4.074v33.698h4.379V55.395c0-3.099,0.583-5.334,1.754-6.711 + c1.17-1.376,3.11-2.187,5.821-2.431l-0.032-4.744C150.878,41.549,149.417,41.922,148.164,42.625z M172.22,41.021 + c-5.171,0-9.418,1.679-12.738,5.035c-3.321,3.357-4.981,7.607-4.981,12.742c0,4.912,1.694,9.118,5.085,12.617 + c3.389,3.502,7.535,5.252,12.438,5.252c3.695,0,6.947-0.998,9.757-2.988c2.808-1.994,4.988-4.849,6.541-8.569h-4.866 + c-1.102,2.332-2.665,4.151-4.688,5.459c-2.023,1.308-4.303,1.962-6.834,1.962c-3.574,0-6.557-1.131-8.947-3.394 + c-2.391-2.263-3.718-5.226-3.984-8.894h30.414v-0.318c0-5.604-1.6-10.154-4.799-13.655 + C181.419,42.771,177.286,41.021,172.22,41.021z M159.124,56.472c0.51-3.468,1.901-6.219,4.17-8.258 + c2.271-2.037,5.04-3.056,8.313-3.056c3.517,0,6.369,0.948,8.556,2.844c2.188,1.897,3.692,4.719,4.51,8.47H159.124z + M232.864,41.264c-2.51,0-4.779,0.509-6.809,1.518c-2.03,1.012-3.73,2.49-5.097,4.43c-1.106-1.818-2.712-3.264-4.82-4.338 + c-2.108-1.072-4.441-1.61-7-1.61c-2.212,0-4.191,0.379-5.941,1.134c-1.748,0.756-3.27,1.88-4.558,3.372v-3.776h-4.258v33.698 + h4.258V59.274c0-2.927,0.105-4.978,0.321-6.154c0.215-1.177,0.586-2.227,1.119-3.147c0.856-1.473,2.026-2.604,3.509-3.391 + c1.481-0.787,3.203-1.182,5.165-1.182c3.248,0,5.66,0.926,7.233,2.777c1.573,1.852,2.36,4.722,2.36,8.61v18.905h4.136V59.274 + c0-2.927,0.112-4.978,0.338-6.154c0.223-1.177,0.59-2.227,1.1-3.147c0.854-1.473,2.012-2.604,3.467-3.391 + c1.457-0.787,3.143-1.182,5.06-1.182c3.318,0,5.711,0.947,7.178,2.84c1.469,1.894,2.202,5.07,2.202,9.529v17.923h4.137V58.658 + c0-6.093-1.043-10.516-3.122-13.268C240.76,42.64,237.436,41.264,232.864,41.264z"/> + <g> + <path fill="#1A171B" d="M36.791,43.727c4.5,3.508,3.856-8.518,5.095-10.445c-0.251,0.39,1.045-0.227,1.359-0.68 + c0.714-1.033,0.78-1.304,1.783-0.467c0.685,0.57,4.073-2.156,5.011-2.76c-0.206-0.223,0.68,1.338,0.68,0.764 + c0,4.354-0.253,0.671,2.42,1.401c1.206,0.329,2.179-0.847,3.269,0.893c-0.283,0.31-0.566,0.621-0.849,0.933 + c4.111,1.071,3.139,4.072,7.134,6.029c-1.239,0.545-2.304,1.363-2.463,2.803c1.169,0.267,2.366,0.422,3.566,0.424 + c-0.34,0.311-0.679,0.622-1.02,0.934c2.158,0.346,2.307,2.235,4.671,1.699c-0.891,1.669-4.83,4.51-1.274,5.094 + c-0.198,0.085-0.396,0.171-0.594,0.255c0.745,0.477,1.172,1.362,1.868,1.868c-0.946,0.11-1.794,0.679-2.802,0.68 + c0.04,1.611,1.581,1.87,2.717,2.124c-2.577,1.72,0.311,0.894,0.722,2.122c-0.165-0.493,1.154,1.254,0.807,0.977 + c-0.173-0.139-1.318,0.596-0.807,1.062c0.174,0.158,4.875,0.583,1.98,1.482c-1.714,0.534-4.447,0.456-3.679,2.763 + c-1.174-0.126-1.886,0.235-2.845-0.083c0.154,0.687-0.067,0.846,0.213,1.442c-1.335,0.382-2.595-0.269-3.695-1.061 + c-0.042,0.268-0.084,0.537-0.127,0.806c-0.368-0.325-0.736-0.649-1.104-0.976c0.016,0.536-0.255,1.096-0.212,1.656 + c-0.877-0.677-5.258-4.209-2.972-1.189c0.905,1.195,1.842,1.439,2.93,2.463c-1.363,0.366-0.2,5.027,1.91,4.627 + c-1.045,1.709-3.151-0.414-4.289,1.828c1.419,0.304,0.683,0.515,1.826,1.146c-0.596-0.139-1.35,0.109-1.996-0.043 + c0.058,0.606,1.302,2.911,1.104,3.185c-0.761,1.05-2.778-1.146-3.949-1.146c-0.209,0.18-0.252,0.392-0.126,0.636 + c1.264,0.254,0.742,0.52,0.976,1.698c-2.448-0.878-0.467,0.231-0.467,1.104c0,3.686-2.677-0.092-2.548,2.505 + c-0.269-0.014-0.537-0.027-0.806-0.041c0.263,2.893-2.243-0.257-2.845,3.056c0.048,0.018-3.298-0.522-3.333-0.488 + c-1.136,1.135-1.402-0.027-2.174,0.598c-1.87,1.514-1.024-1.807-1.552-1.998c-0.694-0.253-2.246,1.984-2.455,0.573 + c-0.207-1.396-0.55-3.131-1.463-1.656c-0.954-0.37-3.546,0.314-3.842-0.572c-0.223-0.67-2.252-3.619-0.871-4.078 + c-0.407,0.137-1.347,0.543-1.719,0.765c0.857-2.833-1.515-2.188-3.185-1.146c0.104-1.69,0.899-3.521-1.083-3.247 + c0.293-0.662,0.337-1.645,0.828-2.356c-0.382,0.084-0.764,0.17-1.146,0.254c0.059-0.477,4.984-10.382,5.223-10.382 + c-0.199-0.062-0.369-0.169-0.51-0.318c-1.236,3.129-3.048,5.804-5.095,8.534c0.046-0.52-0.061-1.008-0.318-1.464 + c-0.23,0-1.983,2.339-2.548,2.61c0-0.253,0-0.509,0-0.763c-0.231,0.366-1.444,2.675-1.783,2.675c-0.329,0,0.481-1.796-0.51-1.467 + c-0.944,0.315-1.458,0.54-2.292,0.701c0.99-1.181,1.719-2.432-0.446-1.783c0.204-0.955-0.191-1.231-0.191-1.974 + c-0.159,0.41-0.393,0.771-0.7,1.084c-0.23-1.254-0.242-6.138-0.383-6.138c-1.46,0,0.123-2.937,0.341-3.312 + c-0.17-0.142-0.341-0.282-0.51-0.425c0.05,1.16-0.433,1.305-0.764,2.293c-1.08-1.767,1.521-3.314-0.764-3.99 + c0.311-0.256,0.623-0.51,0.934-0.765c-0.199-0.198-0.396-0.396-0.595-0.595c-0.269,0.61-0.729,1.216-1.02,1.783 + c-0.154-0.479,0.034-2.888,0.51-2.888c-0.313-0.017-0.624-0.044-0.935-0.084c0.723-0.973,0.495-1.264,1.444-1.699 + c-0.17-0.51-0.339-1.019-0.509-1.529c0.17,0.058,0.339,0.114,0.509,0.171c0.149,0.083-0.41-0.829-0.68-0.424 + c0.503-0.754,1.123-1.223,1.868-1.614c-0.283-0.17-0.566-0.34-0.849-0.51c0.664-0.432,1.176-1.357,2.038-1.698 + c-0.566-1.104-0.674-1.464-1.868-1.784c-0.033-2.104,1.163-9.234,2.717-8.407c-0.049-0.578-0.062-0.699,0.509-0.765 + c-0.087-1.145-0.637-0.797,0.595-1.104c-0.979-4.102,1.847-2.083,3.651-1.104c0-0.341,0-0.68,0-1.02 + c0.534,0.116,1.853,0.641,2.177,0.085c0.109-0.188-0.92-0.513-1.073-0.594c1.126-0.569,0.975-1.844,0.17-3.143 + c1.503,0.075,3.008,0.738,3.482-0.594c0.613,0.591,1.188,0.584,1.697,1.358c0.284-0.481,0.566-0.963,0.85-1.443 + c0.53,0.646,1.549,2.504,2.59,1.983c0.223-0.111,1.486,0.661,1.486,0.394c0-1.159,0.588-2.121,1.529-2.717 + C35.584,34.716,35.005,38.027,36.791,43.727"/> + </g> + </g> + </g> + </svg> + </a> + </td> + </tr> +</table> +<!-- Email Header : END --> + +<!-- Email Body : BEGIN --> +<table role="presentation" aria-hidden="true" cellspacing="0" cellpadding="0" border="0" align="center" width="600" style="margin: auto;" class="email-container"> + + [CONTENT] + +</table> +<!-- Email Body : END --> + +<!-- Email Footer : BEGIN --> +<table role="presentation" aria-hidden="true" cellspacing="0" cellpadding="0" border="0" align="center" width="600" style="margin: auto;" class="email-container"> + <tr> + <td style="padding: 0px;width: 100%;" class="x-gmail-data-detectors"> + <div class="bottom-strip" style="background-color: #39468A;"></div> + <div class="bottom-strip" style="background-color: #E74F23;"></div> + <div class="bottom-strip" style="background-color: #923288;"></div> + <div class="bottom-strip" style="background-color: #1C9DB2;"></div> + <div class="bottom-strip" style="background-color: #E10759;"></div> + </td> + </tr> +</table> +<table role="presentation" aria-hidden="true" cellspacing="0" cellpadding="0" border="0" align="center" width="600" style="margin: auto;" class="email-container"> + <tr> + <td style="padding: 10px;width: 50%;font-size: 12px; font-family: sans-serif; line-height:18px; text-align: center; color: #888888; cursor:pointer;" class="x-gmail-data-detectors"> + <a class="square-logo-layout" href="https://twitter.com/Veremes_Info" target="_blank" style="color: #24292E; cursor:pointer;"> + <!--<i class="fa fa-twitter" style=""></i>--> + <svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" style="fill: currentColor; cursor:pointer;"> + <title>Twitter</title> + <path d="M50,0a50,50,0,1,0,50,50A50,50,0,0,0,50,0ZM75.28,37c0,.56,0,1.12,0,1.68C75.32,56,62.2,75.83,38.21,75.83h0a37,37,0,0,1-20-5.86,24.62,24.62,0,0,0,3.11.18,26.13,26.13,0,0,0,16.2-5.58,13,13,0,0,1-12.18-9.06,12.34,12.34,0,0,0,2.45.24,13,13,0,0,0,3.44-.46A13,13,0,0,1,20.77,42.5v-.16A13.11,13.11,0,0,0,26.68,44a13.05,13.05,0,0,1-4-17.42A37,37,0,0,0,49.52,40.18a13.19,13.19,0,0,1-.34-3,13.05,13.05,0,0,1,22.57-8.92A26.11,26.11,0,0,0,80,25.12a13.08,13.08,0,0,1-5.73,7.22,26.23,26.23,0,0,0,7.49-2.06A26.49,26.49,0,0,1,75.28,37Z"/> + </svg> + </a> + <a class="square-logo-layout" href="https://www.linkedin.com/company/veremes/" target="_blank" style="color: #24292E; cursor:pointer;"> + <!--<i class="fa fa-linkedin" style=""></i>--> + <svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" style="fill: currentColor; cursor:pointer;"> + <title>LinkedIn</title> + <path d="M50,0a50,50,0,1,0,50,50A50,50,0,0,0,50,0ZM60.71,51a6.48,6.48,0,0,0-6.33,6.32V79.68H41.74V41.74H54.38v5a13.63,13.63,0,0,1,10.54-5.9A15,15,0,0,1,79.68,55.65v24H67V57.33A6.48,6.48,0,0,0,60.71,51ZM27,34.57A7.59,7.59,0,1,1,34.57,27,7.55,7.55,0,0,1,27,34.57Zm6.32,7.17V79.68H20.66V41.74Z"/> + </svg> + </a> + <a class="square-logo-layout" href="http://vm09.veremes.net/" target="_blank" style="color: #24292E; cursor:pointer;"> + <!--<i class="fa fa-github" style=""></i>--> + <svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" style="fill: currentColor; cursor:pointer;"> + <title>GitLab</title> + <path d="M50,0a50,50,0,1,0,50,50A50,50,0,0,0,50,0ZM75.18,15.1a1,1,0,0,1,2,0l9,27.81h-20Zm-52.34,0a1,1,0,0,1,2,0l9,27.81h-20ZM9.85,61A2.63,2.63,0,0,1,8.9,58l4.35-13.4L47.16,88.07Zm4.33-17h20l14.3,44Zm21.19,0H64.63L50,89Zm30.42,0h20L51.49,88ZM90.15,61,52.84,88.07,86.75,44.62,91.1,58A2.63,2.63,0,0,1,90.15,61Z"/> + </svg> + </a> + <a class="square-logo-layout" href="http://www.veremes.com/" target="_blank" style="color: #24292E; cursor:pointer;"> + <!--<i class="fa fa-globe" style=""></i>--> + <svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" style="fill: currentColor; cursor:pointer;"> + <defs> + <style>.cls-1{fill:none;}</style> + </defs> + <title>Veremes</title> + <path class="cls-1" d="M60.17,18.09h0S60.15,18.05,60.17,18.09Z"/> + <path class="cls-1" d="M48.39,26.38c.66-6.65,2.7-11.56,6.06-14.6a11.45,11.45,0,0,1,1.82-1.29A40.5,40.5,0,0,0,50,10l-1,0c-3.18,3.87-5.13,9.17-5.79,15.85l-.15,1.47c-.21,2.06-.42,4.16-.47,6.28-1.35-5.7-.83-9.69-1.1-15.87A4,4,0,0,0,39.6,21.2c0,.34-1.6-.64-1.88-.5-1.33.67-2.62-1.69-3.29-2.51L33.35,20c-.65-1-1.38-1-2.16-1.73-.6,1.69-2.51.85-4.42.76,1,1.65,1.21,3.26-.21,4,.19.1,1.5.51,1.36.75-.41.71-2.09,0-2.77-.11V25c-2.29-1.25-5.88-3.81-4.63,1.4-1.57.39-.87-.05-.76,1.4-.72.09-.71.24-.64,1-2-1.05-3.5,8-3.45,10.68,1.51.4,1.65.86,2.37,2.26-1.1.43-1.75,1.61-2.59,2.16l1.08.64a6,6,0,0,0-2.37,2c.34-.51,1.05.65.86.54l-.65-.22c.22.65.43,1.3.65,2-1.21.55-.92.92-1.83,2.15.39,0,.78.09,1.18.11-.6,0-.84,3.06-.65,3.67.37-.72,1-1.49,1.3-2.27l.75.76-1.18,1c2.9.86-.4,2.82,1,5.06.42-1.25,1-1.43,1-2.91l.65.54c-.28.48-2.29,4.21-.44,4.21.18,0,.2,6.2.49,7.79a4,4,0,0,0,.89-1.38c0,.95.5,1.3.24,2.51,2.75-.82,1.82.76.57,2.26a20.92,20.92,0,0,0,2.91-.89c1.26-.41.23,1.86.64,1.86s2-2.93,2.27-3.39v1c.72-.35,2.94-3.32,3.23-3.32a3.11,3.11,0,0,1,.41,1.86,46.51,46.51,0,0,0,6.47-10.83,1.46,1.46,0,0,0,.65.4c-.31,0-6.56,12.58-6.64,13.18l1.46-.32c-.63.9-.68,2.15-1,3,2.51-.35,1.5,2,1.37,4.13,2.12-1.33,5.14-2.15,4.05,1.45a15.73,15.73,0,0,1,2.18-1c-1.76.58.82,4.33,1.11,5.17.37,1.13,3.66.26,4.87.73,1.16-1.87,1.6.33,1.86,2.11s2.24-1,3.12-.73c.67.24-.4,4.46,2,2.53,1-.79,1.32.68,2.76-.75,0,0,4.29.64,4.23.62.77-4.21,3.94-.21,3.61-3.88l1,0c-.16-3.3,3.24,1.5,3.24-3.18,0-1.11-2.52-2.52.59-1.4-.29-1.5.37-1.84-1.24-2.16a.62.62,0,0,1,.16-.81c1.49,0,4,2.79,5,1.46.25-.35-1.33-3.28-1.4-4,.82.2,1.77-.12,2.53.06-1.45-.8-.52-1.07-2.32-1.46,1.45-2.84,4.12-.15,5.45-2.32C70.78,71.9,69.3,66,71,65.52c-1.38-1.3-2.57-1.61-3.72-3.13-2.9-3.83,2.66.65,3.78,1.51-.06-.71.28-1.42.27-2.1L72.76,63c0-.34.11-.69.16-1,1.4,1,3,1.83,4.69,1.35-.35-.76-.08-1-.27-1.83,1.22.4,2.12-.06,3.61.11-1-2.93,2.5-2.84,4.67-3.51,3.68-1.15-2.29-1.68-2.51-1.88-.65-.6.8-1.53,1-1.35.44.35-1.23-1.87-1-1.24-.52-1.56-4.19-.51-.92-2.7-1.44-.32-3.4-.65-3.45-2.69,1.28,0,2.36-.73,3.56-.87-.89-.64-1.43-1.76-2.37-2.37l.75-.32c-4.51-.74.49-4.35,1.62-6.47-3,.68-3.19-1.72-5.93-2.16l1.29-1.18a20.84,20.84,0,0,1-4.52-.54c.19-1.83,1.55-2.87,3.12-3.56-5.07-2.49-3.84-6.3-9.06-7.66L68.28,22c-1.38-2.21-2.62-.72-4.15-1.13-3.39-.93-3.07,3.75-3.07-1.78,0,.62-.81-.72-.89-1-1.22.8-5.47,4.21-6.34,3.49-1.27-1.06-1.35-.72-2.26.59-.4.58-2,1.36-1.73.87-.9,1.41-1,7.1-2.05,10.79,0-2,.25-4,.45-6Z"/> + <path d="M99.94,47.71l0-.64c0-.61-.08-1.23-.14-1.84,0-.16,0-.31,0-.46-.08-.74-.17-1.47-.28-2.2,0-.19-.06-.38-.1-.57q-.13-.86-.3-1.68l-.12-.64c-.15-.7-.31-1.39-.48-2.08,0-.15-.09-.3-.13-.45-.14-.56-.3-1.11-.46-1.65-.08-.24-.15-.49-.23-.73-.16-.51-.34-1-.52-1.54-.06-.17-.12-.35-.19-.53-.23-.62-.47-1.24-.73-1.85-.11-.27-.22-.53-.34-.8s-.35-.78-.53-1.17l-.38-.81c-.27-.56-.56-1.11-.85-1.66-.16-.3-.33-.59-.49-.88s-.35-.61-.53-.92-.37-.63-.57-.94L92,22.86q-.55-.86-1.14-1.68l-.45-.62c-.25-.35-.51-.69-.77-1-.13-.18-.27-.35-.41-.52q-1.36-1.74-2.9-3.35L86,15.35q-1.66-1.72-3.48-3.29L82.46,12a51.79,51.79,0,0,0-5.4-4h0a49.56,49.56,0,0,0-4.42-2.54h0A49.59,49.59,0,0,0,63.94,2h0c-1.56-.45-3.16-.83-4.78-1.13L58.49.73,57.21.52C56.59.43,56,.35,55.33.29L54.54.21,53,.1l-.73,0C51.51,0,50.76,0,50,0a50,50,0,1,0,50,50C100,49.23,100,48.47,99.94,47.71ZM49.84,23c-.31.49,1.33-.29,1.73-.87.91-1.31,1-1.65,2.26-.59.87.72,5.12-2.69,6.34-3.49,0,0,0-.06,0,0h0c.08.24.89,1.58.89,1,0,5.53-.32.85,3.07,1.78,1.53.41,2.77-1.08,4.15,1.13L67.2,23.14c5.22,1.36,4,5.17,9.06,7.66-1.57.69-2.93,1.73-3.12,3.56a20.84,20.84,0,0,0,4.52.54l-1.29,1.18c2.74.44,2.92,2.84,5.93,2.16-1.13,2.12-6.13,5.73-1.62,6.47l-.75.32c.94.61,1.48,1.73,2.37,2.37-1.2.14-2.28.86-3.56.87.05,2,2,2.37,3.45,2.69-3.27,2.19.4,1.14.92,2.7-.21-.63,1.46,1.59,1,1.24-.22-.18-1.67.75-1,1.35.22.2,6.19.73,2.51,1.88-2.17.67-5.64.58-4.67,3.51-1.49-.17-2.39.29-3.61-.11.19.87-.08,1.07.27,1.83-1.7.48-3.29-.34-4.69-1.35,0,.34-.11.69-.16,1l-1.4-1.24c0,.68-.33,1.39-.27,2.1C70,63,64.41,58.56,67.31,62.39c1.15,1.52,2.34,1.83,3.72,3.13-1.73.46-.25,6.38,2.43,5.87-1.33,2.17-4-.52-5.45,2.32,1.8.39.87.66,2.32,1.46-.76-.18-1.71.14-2.53-.06.07.77,1.65,3.7,1.4,4-1,1.33-3.53-1.46-5-1.46a.62.62,0,0,0-.16.81c1.61.32,1,.66,1.24,2.16-3.11-1.12-.59.29-.59,1.4,0,4.68-3.4-.12-3.24,3.18l-1,0c.33,3.67-2.84-.33-3.61,3.88.06,0-4.19-.67-4.23-.62-1.44,1.43-1.78,0-2.76.75-2.37,1.93-1.3-2.29-2-2.53-.88-.32-2.86,2.52-3.12.73s-.7-4-1.86-2.11c-1.21-.47-4.5.4-4.87-.73-.29-.84-2.87-4.59-1.11-5.17a15.73,15.73,0,0,0-2.18,1c1.09-3.6-1.93-2.78-4.05-1.45.13-2.15,1.14-4.48-1.37-4.13.37-.84.42-2.09,1-3l-1.46.32c.08-.6,6.33-13.18,6.64-13.18a1.46,1.46,0,0,1-.65-.4,46.51,46.51,0,0,1-6.47,10.83A3.11,3.11,0,0,0,28,67.51c-.29,0-2.51,3-3.23,3.32v-1c-.3.46-1.83,3.39-2.27,3.39s.62-2.27-.64-1.86a20.92,20.92,0,0,1-2.91.89c1.25-1.5,2.18-3.08-.57-2.26.26-1.21-.24-1.56-.24-2.51a4,4,0,0,1-.89,1.38c-.29-1.59-.31-7.79-.49-7.79-1.85,0,.16-3.73.44-4.21l-.65-.54c.06,1.48-.55,1.66-1,2.91-1.37-2.24,1.93-4.2-1-5.06l1.18-1L15,52.47c-.34.78-.93,1.55-1.3,2.27-.19-.61,0-3.67.65-3.67-.4,0-.79-.06-1.18-.11.91-1.23.62-1.6,1.83-2.15-.22-.65-.43-1.3-.65-2l.65.22c.19.11-.52-1-.86-.54a6,6,0,0,1,2.37-2l-1.08-.64c.84-.55,1.49-1.73,2.59-2.16-.72-1.4-.86-1.86-2.37-2.26-.05-2.68,1.47-11.73,3.45-10.68-.07-.73-.08-.88.64-1-.11-1.45-.81-1,.76-1.4-1.25-5.21,2.34-2.65,4.63-1.4v-1.3c.68.15,2.36.82,2.77.11.14-.24-1.17-.65-1.36-.75,1.42-.73,1.23-2.34.21-4,1.91.09,3.82.93,4.42-.76C32,19,32.7,19,33.35,20l1.08-1.83c.67.82,2,3.18,3.29,2.51.28-.14,1.88.84,1.88.5a4,4,0,0,1,1.94-3.45c.27,6.18-.25,10.17,1.1,15.87,0-2.12.26-4.22.47-6.28l.15-1.47c.66-6.68,2.61-12,5.79-15.85l1,0a40.5,40.5,0,0,1,6.27.49,11.45,11.45,0,0,0-1.82,1.29c-3.36,3-5.4,8-6.06,14.6l-.15,1.49c-.2,2-.41,4-.45,6C48.82,30.14,48.94,24.45,49.84,23Z"/> + </svg> + </a> + </td> + <td style="padding: 10px;width: 50%;font-size: 20px; font-family: sans-serif; line-height:18px; text-align: center; color: #000000;" class="x-gmail-data-detectors"> + <div style="margin-bottom:10px;">Pour toute question :</div> + <div>support@veremes.com</div> + </td> + </tr> +</table> +<!-- Email Footer : END --> + +</center> +[SCRIPT] +</body> +</html>'; +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/conf/properties.inc b/src/module_extraction/web_service/conf/properties.inc new file mode 100755 index 0000000000000000000000000000000000000000..ff2e872e55038e236e8d075f3d49e1edcfc40c6e --- /dev/null +++ b/src/module_extraction/web_service/conf/properties.inc @@ -0,0 +1,7 @@ +<?php +$properties['color_mutualized'] = 'green'; +$properties['color_no_mutualized'] = 'red'; +$properties['sig'] = '*.shp'; +$properties['dao'] = '*.dao'; +$properties['shared_dir'] = 'D:/serveur/gtf/vas/shared'; +?> diff --git a/src/module_extraction/web_service/conf/properties_server.inc b/src/module_extraction/web_service/conf/properties_server.inc new file mode 100644 index 0000000000000000000000000000000000000000..1f67047d0d601b6ed6b6b417d8fb04f48b6d6ceb --- /dev/null +++ b/src/module_extraction/web_service/conf/properties_server.inc @@ -0,0 +1,3 @@ +<?php + $properties['schema_extraction'] = 's_extraction'; +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/conf/selected_properties.inc b/src/module_extraction/web_service/conf/selected_properties.inc new file mode 100644 index 0000000000000000000000000000000000000000..90da243f98c3627294f8ffeace18aa019820f0ee --- /dev/null +++ b/src/module_extraction/web_service/conf/selected_properties.inc @@ -0,0 +1,18 @@ +<?php + +$aAdminFields = Array( + 'color_mutualized', + 'color_no_mutualized', + 'sig', + 'dao' +); +$aUserFields = Array( + 'color_mutualized', + 'color_no_mutualized', + 'sig', + 'dao' +); + +$properties['aAdminFields'] = array_merge($properties['aAdminFields'], $aAdminFields); +$properties['aUserFields'] = array_merge($properties['aUserFields'], $aUserFields); +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/conf/version.inc b/src/module_extraction/web_service/conf/version.inc new file mode 100755 index 0000000000000000000000000000000000000000..a8238eb5f7c4c4c6dd3aa8ac98592bf9ac868e5d --- /dev/null +++ b/src/module_extraction/web_service/conf/version.inc @@ -0,0 +1,7 @@ +<?php +// Numéro de la version de extraction +define ("VM_VERSION", "20XX.XX.XX"); +define ("VM_BUILD", "XXXXX"); +define ("VM_MONTH_YEAR", "XX_20XX"); +define ("VM_STATUS", "STABLE"); +?> diff --git a/src/module_extraction/web_service/sql/sqlQueries.xml b/src/module_extraction/web_service/sql/sqlQueries.xml new file mode 100755 index 0000000000000000000000000000000000000000..8e670ca0bc49b68c16652a51c89d590d64b6aa17 --- /dev/null +++ b/src/module_extraction/web_service/sql/sqlQueries.xml @@ -0,0 +1,662 @@ +<?xml version="1.0" encoding="utf-8"?> +<sqlQueries> + <title>Scripts d'installation et de mises à jour de la base du VAS</title> + <queriesCollection> + <query> + <type>init</type> + <version>2017-01-00</version> + <code> + <![CDATA[ + --Partie pour le module extraction version 2017-01-00 généré par WAB le 22/05/2018 à 09:09:32 + --Partie pour le module extraction version 2017-01-01 généré par WAB le 18/07/2017 à 09:52:00 + CREATE SCHEMA s_extraction AUTHORIZATION u_vitis; + GRANT ALL ON SCHEMA s_extraction TO u_vitis; + + GRANT USAGE ON SCHEMA s_extraction TO extraction_admin; + GRANT USAGE ON SCHEMA s_extraction TO extraction_user; + + CREATE SEQUENCE s_extraction.bo_id_extraction_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; + ALTER TABLE s_extraction.bo_id_extraction_seq OWNER TO u_vitis; + GRANT ALL ON SEQUENCE s_extraction.bo_id_extraction_seq TO u_vitis; + GRANT ALL ON SEQUENCE s_extraction.bo_id_extraction_seq TO extraction_admin; + GRANT ALL ON SEQUENCE s_extraction.bo_id_extraction_seq TO extraction_user; + + CREATE TABLE s_extraction.extraction (bo_id integer NOT NULL, status character varying(100), history text, creation_date date DEFAULT ('now'::text)::date, requestor character varying(50) DEFAULT "current_user"(), ae character varying(255), extent text, company character varying(50), layers text, vector_format_id character varying(100), coordsys_id character varying(50), note text, note_line text, raster_format_id character varying(100), extent_method character varying(50), signed boolean, accepted_by_cpa boolean, identification_complete boolean, definition_complete boolean, comment text, priority_id integer, id_com text, id_conseil text); + ALTER TABLE s_extraction.extraction OWNER TO u_vitis; + CREATE TABLE s_extraction.rt_coordsys (coordsys_id character varying(50) NOT NULL, coordsys character varying(100)); + ALTER TABLE s_extraction.rt_coordsys OWNER TO u_vitis; + CREATE TABLE s_extraction.rt_feature_model (feature_type character varying(200) NOT NULL, attribute_name character varying(200) NOT NULL, attribute_data_type character varying(200), geometry_type character varying(200), "order" integer); + ALTER TABLE s_extraction.rt_feature_model OWNER TO u_vitis; + CREATE TABLE s_extraction.rt_format (format_id character varying(100) NOT NULL, format character varying(255), use_for_raster boolean, use_for_vector boolean); + ALTER TABLE s_extraction.rt_format OWNER TO u_vitis; + CREATE TABLE s_extraction.rt_layer (layer_id character varying(100) NOT NULL, layer character varying(255), category character varying(50), restriction character varying(50), unused_attributes text); + ALTER TABLE s_extraction.rt_layer OWNER TO u_vitis; + CREATE TABLE s_extraction.version(version character varying(100) NOT NULL, build integer NOT NULL, date timestamp with time zone NOT NULL, active boolean NOT NULL, CONSTRAINT version_pkey PRIMARY KEY (version)); + ALTER TABLE s_extraction.version OWNER TO u_vitis; + INSERT INTO s_extraction.rt_coordsys (coordsys_id, coordsys) VALUES ('EPSG:27572', 'Lambert 2 étendu'); + INSERT INTO s_extraction.rt_coordsys (coordsys_id, coordsys) VALUES ('Lambert93', 'Lambert 93'); + INSERT INTO s_extraction.rt_coordsys (coordsys_id, coordsys) VALUES ('EPSG:3944', 'Lambert 93 CC44'); + INSERT INTO s_extraction.rt_coordsys (coordsys_id, coordsys) VALUES ('EPSG:4326', 'WGS 84'); + INSERT INTO s_extraction.rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('ECW', 'Er Mapper ECW', true, false); + INSERT INTO s_extraction.rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('ACAD', 'Autocad DWG', false, true); + INSERT INTO s_extraction.rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('SHAPE', 'Esri Shapefile', false, true); + INSERT INTO s_extraction.rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('MAPINFO', 'Mapinfo Tab', false, true); + INSERT INTO s_extraction.rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('MIF', 'Mapinfo MIF/MID', false, true); + INSERT INTO s_extraction.rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('GML', 'GML', false, true); + INSERT INTO s_extraction.rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('OGCKML', 'KML', false, true); + INSERT INTO s_extraction.rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('GEOJSON', 'GEOJSON', false, true); + INSERT INTO s_extraction.rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('TIFF', 'TIFF', true, false); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'id_geofla', 'fme_real64', 'fme_no_geom;fme_point;fme_line;fme_area;fme_surface;fme_collection', 1); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'code_arr', 'fme_varchar(1)', '', 2); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'code_chf', 'fme_varchar(3)', '', 3); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'nom_chf', 'fme_varchar(50)', '', 4); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'x_chf_lieu', 'fme_varchar(255)', '', 5); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'y_chf_lieu', 'fme_varchar(255)', '', 6); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'code_dept', 'fme_varchar(2)', '', 7); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'nom_dept', 'fme_varchar(30)', '', 8); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'code_reg', 'fme_varchar(2)', '', 9); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'nom_region', 'fme_varchar(30)', '', 10); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'id_geofla', 'fme_real64', 'fme_no_geom;fme_point;fme_line;fme_area;fme_surface;fme_collection', 1); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'code_cant', 'fme_varchar(2)', '', 2); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'code_chf', 'fme_varchar(3)', '', 3); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'nom_chf', 'fme_varchar(50)', '', 4); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'x_chf_lieu', 'fme_varchar(255)', '', 5); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'y_chf_lieu', 'fme_varchar(255)', '', 6); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'code_arr', 'fme_varchar(1)', '', 7); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'code_dept', 'fme_varchar(2)', '', 8); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'nom_dept', 'fme_varchar(30)', '', 9); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'code_reg', 'fme_varchar(2)', '', 10); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'nom_region', 'fme_varchar(30)', '', 11); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'id_geofla', 'fme_real64', 'fme_no_geom;fme_point;fme_line;fme_area;fme_surface;fme_collection', 1); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'code_comm', 'fme_varchar(3)', '', 2); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'insee_com', 'fme_varchar(5)', '', 3); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'nom_comm', 'fme_varchar(50)', '', 4); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'statut', 'fme_varchar(20)', '', 5); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'x_chf_lieu', 'fme_varchar(255)', '', 6); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'y_chf_lieu', 'fme_varchar(255)', '', 7); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'z_moyen', 'fme_varchar(255)', '', 8); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'superficie', 'fme_real64', '', 9); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'population', 'fme_real64', '', 10); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'code_cant', 'fme_varchar(2)', '', 11); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'code_arr', 'fme_varchar(1)', '', 12); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'code_dept', 'fme_varchar(2)', '', 13); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'nom_dept', 'fme_varchar(30)', '', 14); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'code_reg', 'fme_varchar(2)', '', 15); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'nom_region', 'fme_varchar(30)', '', 16); + INSERT INTO s_extraction.rt_layer (layer_id, layer, category, restriction, unused_attributes) VALUES ('geofla.arrondissement', 'Arrondissement', 'Arrondissement', 'interne', 'x_centroid;y_centroid'); + INSERT INTO s_extraction.rt_layer (layer_id, layer, category, restriction, unused_attributes) VALUES ('geofla.canton', 'Canton', 'Arrondissement', 'restreinit', 'x_centroid;y_centroid'); + INSERT INTO s_extraction.rt_layer (layer_id, layer, category, restriction, unused_attributes) VALUES ('geofla.commune', 'Commune', 'Commune', 'public', 'x_centroid;y_centroid'); + + ALTER TABLE ONLY s_extraction.extraction ADD CONSTRAINT pk_plan_bo_id PRIMARY KEY (bo_id); + ALTER TABLE ONLY s_extraction.rt_layer ADD CONSTRAINT pk_projet_type PRIMARY KEY (layer_id); + ALTER TABLE ONLY s_extraction.rt_format ADD CONSTRAINT pk_reseau PRIMARY KEY (format_id); + ALTER TABLE ONLY s_extraction.rt_coordsys ADD CONSTRAINT pk_rt_coordsys PRIMARY KEY (coordsys_id); + ALTER TABLE ONLY s_extraction.rt_feature_model ADD CONSTRAINT pk_rt_feature_model PRIMARY KEY (feature_type, attribute_name); + ALTER TABLE ONLY s_extraction.extraction ADD CONSTRAINT fk_coordsys_id FOREIGN KEY (coordsys_id) REFERENCES s_extraction.rt_coordsys(coordsys_id); + ALTER TABLE ONLY s_extraction.extraction ADD CONSTRAINT fk_format_id FOREIGN KEY (vector_format_id) REFERENCES s_extraction.rt_format(format_id); + + GRANT ALL ON TABLE s_extraction.extraction TO u_vitis; + GRANT ALL ON TABLE s_extraction.extraction TO extraction_user; + GRANT ALL ON TABLE s_extraction.rt_coordsys TO u_vitis; + GRANT ALL ON TABLE s_extraction.rt_coordsys TO extraction_admin; + GRANT ALL ON TABLE s_extraction.rt_feature_model TO u_vitis; + GRANT ALL ON TABLE s_extraction.rt_feature_model TO extraction_admin; + GRANT ALL ON TABLE s_extraction.rt_format TO u_vitis; + GRANT ALL ON TABLE s_extraction.rt_format TO extraction_admin; + GRANT ALL ON TABLE s_extraction.rt_layer TO u_vitis; + GRANT ALL ON TABLE s_extraction.rt_layer TO extraction_admin; + + CREATE SEQUENCE s_extraction.seq_common START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; + ALTER TABLE s_extraction.seq_common OWNER TO u_vitis; + GRANT ALL ON SEQUENCE s_extraction.seq_common TO u_vitis; + GRANT ALL ON SEQUENCE s_extraction.seq_common TO extraction_admin; + GRANT ALL ON SEQUENCE s_extraction.seq_common TO extraction_user; + + CREATE TABLE s_extraction.rt_extraction_status (status_id int4 NOT NULL DEFAULT nextval('s_extraction.seq_common'::regclass), name varchar(50) NOT NULL, progress int4 NOT NULL, PRIMARY KEY (status_id)); + GRANT ALL ON TABLE s_extraction.rt_extraction_status TO u_vitis; + GRANT ALL ON TABLE s_extraction.rt_extraction_status TO extraction_admin; + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('START', 0); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('Nouveau', 10); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('AE Demandé', 20); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('AE Généré', 30); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('AE Soumis', 40); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('Autorisée', 70); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('Refusée', 100); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('Terminée', 100); + + --Partie s_vitis généré par WAB le 18/07/2017 à 09:52:00 + DELETE FROM s_vitis.vm_section WHERE label_id ~ '^extraction_([0-9]+)$'; + DELETE FROM s_vitis.vm_table_field WHERE label_id ~ '^extraction_([0-9]+)$'; + DELETE FROM s_vitis.vm_table_button WHERE label_id ~ '^extraction_([0-9]+)$'; + DELETE FROM s_vitis.vm_module WHERE module_id='extraction'; + DELETE FROM s_vitis.vm_string WHERE string_id ~ '^extraction_([0-9]+)$'; + INSERT INTO s_vitis.vm_module (module_id, description, version, label) VALUES ('extraction','Module Extraction',0.1,'extraction'); + INSERT INTO s_vitis.group (group_id, name) SELECT (SELECT nextval('s_vitis.seq_common'::regclass)), 'demandeur' WHERE NOT EXISTS (SELECT group_id FROM s_vitis.group WHERE name='demandeur'); + INSERT INTO s_vitis.group (group_id, name) SELECT (SELECT nextval('s_vitis.seq_common'::regclass)), 'controleur' WHERE NOT EXISTS (SELECT group_id FROM s_vitis.group WHERE name='controleur'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_1'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field bo_id', 'extraction_4'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field status', 'extraction_6'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('objet extraction_extraction', 'extraction_0'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field progress_level', 'extraction_7'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_2'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field company', 'extraction_8'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_3'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field requestor', 'extraction_5'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field layers', 'extraction_9'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('objet extraction_coordsys', 'extraction_10'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_11'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_12'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_13'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('objet extraction_format', 'extraction_14'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_15'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_16'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_17'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('objet extraction_layer', 'extraction_18'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_19'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_20'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_21'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field coordsys_id', 'extraction_22'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field coordsys', 'extraction_23'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field format_id', 'extraction_24'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field format', 'extraction_25'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field use_for_raster', 'extraction_26'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field use_for_vector', 'extraction_27'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field layer_id', 'extraction_28'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field layer', 'extraction_29'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field category', 'extraction_30'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field restriction', 'extraction_31'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field unused_attributes', 'extraction_32'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_1','en','General'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_1','fr','Informations générales'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_0','fr','Extraction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_0','en','Extraction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_2','fr','Supprimer les plans'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_2','en','Supprimer les plans'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_3','fr','Ajouter une extraction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_3','en','Ajouter une extraction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_4','en','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_4','fr','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_5','en','Demandeur'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_5','fr','Demandeur'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_6','fr','Etat'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_6','en','Status'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_7','fr','Avancement'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_7','en','Progress level'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_8','fr','Organisme'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_8','en','Company'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_9','fr','Couches'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_9','en','Layers'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_10','en','Coordinate systems'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_10','fr','Systèmes de coordonnées'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_11','en','General'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_11','fr','Informations générales'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_12','en','Delete coordinate systems'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_12','fr','Supprimer les systèmes de coordonnées'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_13','en','Add coordinate systems'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_13','fr','Ajouter un système de coordonnées'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_14','en','Formats'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_14','fr','Formats'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_15','en','General'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_15','fr','Informations générales'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_16','en','Delete formats'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_16','fr','Supprimer les formats'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_17','en','Add format'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_17','fr','Ajouter un format'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_18','en','Layers'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_18','fr','Couches'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_19','en','General'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_19','fr','Informations générales'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_20','en','Delete layers'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_20','fr','Supprimer les couches'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_21','en','Add layer'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_21','fr','Ajouter une couche'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_22','en','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_22','fr','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_23','en','Name'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_23','fr','Nom'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_24','en','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_24','fr','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_25','en','Name'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_25','fr','Nom'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_26','en','Raster'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_26','fr','Raster'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_27','en','Vector'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_27','fr','Vecteur'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_28','en','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_28','fr','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_29','en','Name'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_29','fr','Nom'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_30','en','Category'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_30','fr','Catégorie'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_31','en','Restriction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_31','fr','Restriction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_32','en','Unused attributes'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_32','fr','Attributs inutilisés'); + INSERT INTO s_vitis.vm_mode (mode_id, module_id) VALUES ('extraction','extraction'); + INSERT INTO s_vitis.vm_mode (mode_id, module_id) VALUES ('extraction_ref','extraction'); + INSERT INTO s_vitis.vm_mode_rolname(index, mode_id, rolname) VALUES (0, 'extraction', 'extraction_user'); + INSERT INTO s_vitis.vm_mode_rolname(index, mode_id, rolname) VALUES (45, 'extraction_ref', 'extraction_admin'); + INSERT INTO s_vitis.vm_tab (tab_id, event, index, mode_id, label_id, ressource_id, edit_column, show_column, sorted_by, sorted_dir, name) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)),'loadList()', 0, 'extraction', 'extraction_0', 'extraction/extractions', 'editSectionForm', 'showSectionForm', 'bo_id', 'ASC', 'extraction_extraction'); + INSERT INTO s_vitis.vm_tab (tab_id, event, index, mode_id, label_id, ressource_id, edit_column, show_column, sorted_by, sorted_dir, name) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)),'loadList()', 0, 'extraction_ref', 'extraction_10', 'extraction/coordsyss', 'editSectionForm', 'showSectionForm', 'coordsys_id', 'ASC', 'extraction_coordsys'); + INSERT INTO s_vitis.vm_tab (tab_id, event, index, mode_id, label_id, ressource_id, edit_column, show_column, sorted_by, sorted_dir, name) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)),'loadList()', 1, 'extraction_ref', 'extraction_14', 'extraction/formats', 'editSectionForm', 'showSectionForm', 'format_id', 'ASC', 'extraction_format'); + INSERT INTO s_vitis.vm_tab (tab_id, event, index, mode_id, label_id, ressource_id, edit_column, show_column, sorted_by, sorted_dir, name) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)),'loadList()', 2, 'extraction_ref', 'extraction_18', 'extraction/layers', 'editSectionForm', 'showSectionForm', 'layer_id', 'ASC', 'extraction_layer'); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('deleteFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'DeleteSelection', 'extraction_2', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('add_smallFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'AddSectionForm', 'extraction_3', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('deleteFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'DeleteSelection', 'extraction_12', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('add_smallFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'AddSectionForm', 'extraction_13', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('deleteFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'DeleteSelection', 'extraction_16', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('add_smallFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'AddSectionForm', 'extraction_17', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('deleteFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'DeleteSelection', 'extraction_20', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('add_smallFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'AddSectionForm', 'extraction_21', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'bo_id', '1', '1', 1, 50, 'right', 'extraction_4', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'requestor', '1', '1', 2, 200, 'left', 'extraction_5', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'status', '1', '1', 3, 150, 'left', 'extraction_6', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'company', '1', '1', 5, 200, 'left', 'extraction_8', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'layers', '1', '1', 6, 60, 'center', 'extraction_9', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), '<div data-app-extraction-layers-column="{{row.entity[col.field]}}"></div>',(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'progress_level', '1', '1', 4, 150, 'center', 'extraction_7', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), '<div data-app-navbar data-mode="info" data-hidevalue data-striped data-active></div>',(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'coordsys_id', '1', '1', 0, 200, 'left', 'extraction_22', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'coordsys', '1', '1', 1, 200, 'left', 'extraction_23', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'format_id', '1', '1', 0, 100, 'left', 'extraction_24', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'format', '1', '1', 1, 200, 'left', 'extraction_25', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'use_for_raster', '1', '1', 2, 100, 'left', 'extraction_26', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), '<div data-app-set-boolean-icon-column="{{row.entity[col.field]}}"></div>', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'use_for_vector', '1', '1', 3, 100, 'left', 'extraction_27', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), '<div data-app-set-boolean-icon-column="{{row.entity[col.field]}}"></div>', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'layer_id', '1', '1', 0, 150, 'left', 'extraction_28', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'layer', '1', '1', 1, 150, 'left', 'extraction_29', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'category', '1', '1', 2, 150, 'left', 'extraction_30', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'restriction', '1', '1', 3, 100, 'left', 'extraction_31', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'unused_attributes', '1', '1', 4, 110, 'left', 'extraction_32', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), '<div data-app-extraction-ref-unused-attributes-column="{{row.entity[col.field]}}"></div>',(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_section (label_id, name, index, event, tab_id, template, ressource_id, module) VALUES ('extraction_1', 'general', 1, 'Javascript:loadSectionForm', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), 'workspaceListTpl.html', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), 'extraction'); + INSERT INTO s_vitis.vm_section (label_id, name, index, event, tab_id, template, ressource_id, module) VALUES ('extraction_11', 'general', 1, 'Javascript:loadSectionForm', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), 'workspaceListTpl.html', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), 'extraction'); + INSERT INTO s_vitis.vm_section (label_id, name, index, event, tab_id, template, ressource_id, module) VALUES ('extraction_15', 'general', 1, 'Javascript:loadSectionForm', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), 'workspaceListTpl.html', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), 'extraction'); + INSERT INTO s_vitis.vm_section (label_id, name, index, event, tab_id, template, ressource_id, module) VALUES ('extraction_19', 'general', 1, 'Javascript:loadSectionForm', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), 'workspaceListTpl.html', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), 'extraction'); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','START', 0); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Nouveau', 10); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','AE Demandé', 20); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','AE Généré', 30); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','AE Soumis', 40); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Autorisée', 70); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Refusée', 100); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Terminée', 100); + CREATE TABLE s_extraction.rt_extraction_status_group( status_id integer NOT NULL, group_id integer NOT NULL, extraction_status_group_id integer NOT NULL, CONSTRAINT pk_workspace_group PRIMARY KEY (extraction_status_group_id), CONSTRAINT fk_group_id_workspace FOREIGN KEY (group_id) REFERENCES s_vitis."group" (group_id) MATCH SIMPLE ON UPDATE RESTRICT ON DELETE CASCADE, CONSTRAINT fk_status_id FOREIGN KEY (status_id) REFERENCES s_extraction.rt_extraction_status (status_id) MATCH SIMPLE ON UPDATE RESTRICT ON DELETE CASCADE)WITH ( OIDS=FALSE); + ALTER TABLE s_extraction.rt_extraction_status_group OWNER TO u_vitis; + GRANT ALL ON TABLE s_extraction.rt_extraction_status_group TO u_vitis; + GRANT SELECT ON TABLE s_extraction.rt_extraction_status_group TO extraction_user; + GRANT SELECT ON TABLE s_extraction.rt_extraction_status_group TO extraction_admin; + CREATE OR REPLACE VIEW s_extraction.v_extraction AS SELECT extraction.bo_id,extraction.status,extraction.history,extraction.creation_date,extraction.requestor,extraction.ae,extraction.extent,extraction.company,extraction.layers,extraction.vector_format_id,extraction.vector_format_id AS format_id,extraction.coordsys_id,extraction.raster_format_id,extraction.extent_method,extraction.signed,extraction.accepted_by_cpa,extraction.identification_complete,extraction.definition_complete,extraction.priority_id,extraction.id_com,extraction.id_conseil,extraction.note,rt_extraction_status.progress AS progress_level,extraction.status AS status_name FROM s_extraction.extraction LEFT JOIN s_extraction.rt_extraction_status ON extraction.status::text = rt_extraction_status.name::text LEFT JOIN s_extraction.rt_extraction_status_group on rt_extraction_status.status_id = rt_extraction_status_group.status_id LEFT JOIN s_vitis.user_group ON "rt_extraction_status_group".group_id = user_group.group_id LEFT JOIN s_vitis."user" ON "user_group".user_id = "user".user_id WHERE "user".login::name = "current_user"(); + ALTER TABLE s_extraction.v_extraction OWNER TO u_vitis; + GRANT ALL ON TABLE s_extraction.v_extraction TO u_vitis; + GRANT ALL ON TABLE s_extraction.v_extraction TO extraction_admin; + GRANT ALL ON TABLE s_extraction.v_extraction TO extraction_user; + GRANT ALL ON TABLE s_extraction.extraction TO extraction_admin; + GRANT ALL ON TABLE s_extraction.extraction TO extraction_user; + GRANT ALL ON TABLE s_extraction.rt_coordsys TO extraction_admin; + GRANT SELECT ON TABLE s_extraction.rt_coordsys TO extraction_user; + GRANT ALL ON TABLE s_extraction.rt_extraction_status TO extraction_admin; + GRANT SELECT ON TABLE s_extraction.rt_extraction_status TO extraction_user; + GRANT ALL ON TABLE s_extraction.rt_format TO extraction_admin; + GRANT SELECT ON TABLE s_extraction.rt_format TO extraction_user; + GRANT ALL ON TABLE s_extraction.rt_layer TO extraction_admin; + GRANT SELECT ON TABLE s_extraction.rt_layer TO extraction_user; + GRANT SELECT ON TABLE s_extraction.rt_feature_model TO extraction_admin; + GRANT SELECT ON TABLE s_extraction.rt_feature_model TO extraction_user; + --Partie WABSQL générée par WAB le 04/05/2018 à 14:31:04 + -- Ces tables sont normalement prévues dans votre fichier VisualParadigm et sont necessaires pour le fonctionnement de vos objets WAB + --CREATE TABLE s_extraction.rt_extraction_status (status_id integer NOT NULL DEFAULT nextval('s_vitis.seq_common'::regclass), name character varying(50) NOT NULL, progress integer NOT NULL, CONSTRAINT rt_extraction_status_pkey PRIMARY KEY (status_id)); + --CREATE TABLE s_extraction.rt_extraction_status_group (status_id integer NOT NULL, group_id integer NOT NULL, link_id integer NOT NULL DEFAULT nextval('s_vitis.seq_common'::regclass), CONSTRAINT rt_extraction_status_group_pkey PRIMARY KEY (link_id), CONSTRAINT fk_extraction_status_group FOREIGN KEY (status_id) REFERENCES s_extraction.rt_extraction_status (status_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION); + CREATE TABLE s_extraction.extraction_history (history_id integer NOT NULL DEFAULT nextval('s_extraction.seq_common'::regclass), date timestamp with time zone NOT NULL, login character varying(50) NOT NULL, comment text NOT NULL, bo_id integer NOT NULL, CONSTRAINT extraction_history_pkey PRIMARY KEY (history_id), CONSTRAINT fk_extraction_history FOREIGN KEY (bo_id) REFERENCES s_extraction.extraction (bo_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION); + -- Vue basique pour vos objets WAB tenant compte de la restriction groupe état + --CREATE OR REPLACE VIEW s_extraction.v_extraction AS SELECT extraction.* FROM s_extraction.extraction LEFT JOIN s_extraction.rt_extraction_status ON rt_extraction_status.status_id = extraction.status_id JOIN s_extraction.rt_extraction_status_group ON rt_extraction_status.status_id = rt_extraction_status_group.status_id WHERE (rt_extraction_status_group.group_id IN ( SELECT user_group.group_id FROM s_vitis.user_group LEFT JOIN s_vitis."user" ON user_group.user_id = "user".user_id WHERE "user".login::name = "current_user"())); + -- u_vitis est propriétaire de toutes vos tables + ALTER TABLE s_extraction.version OWNER TO u_vitis; + ALTER TABLE s_extraction.rt_feature_model OWNER TO u_vitis; + ALTER TABLE s_extraction.extraction OWNER TO u_vitis; + --ALTER TABLE s_extraction.ct OWNER TO u_vitis; + --ALTER TABLE s_extraction.commune OWNER TO u_vitis; + ALTER TABLE s_extraction.rt_coordsys OWNER TO u_vitis; + ALTER TABLE s_extraction.v_extraction OWNER TO u_vitis; + ALTER TABLE s_extraction.rt_format OWNER TO u_vitis; + ALTER TABLE s_extraction.rt_layer OWNER TO u_vitis; + ALTER TABLE s_extraction.rt_extraction_status OWNER TO u_vitis; + ALTER TABLE s_extraction.rt_extraction_status_group OWNER TO u_vitis; + ALTER TABLE s_extraction.extraction_history OWNER TO u_vitis; + -- u_vitis propriétaire sur les tables des objets WAB + --ALTER TABLE s_extraction.rt_extraction_status OWNER to u_vitis; + --ALTER TABLE s_extraction.rt_extraction_status_group OWNER to u_vitis; + --ALTER TABLE s_extraction.extraction_history OWNER to u_vitis; + -- Gestion des droits d'après les méthodes php saisies pour vos objets (annule et remplace) + REVOKE ALL ON TABLE s_extraction.rt_coordsys FROM extraction_admin; + REVOKE ALL ON TABLE s_extraction.v_extraction FROM extraction_user; + REVOKE ALL ON TABLE s_extraction.rt_format FROM extraction_admin; + REVOKE ALL ON TABLE s_extraction.rt_layer FROM extraction_admin; + GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE s_extraction.rt_coordsys TO extraction_admin; + GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE s_extraction.v_extraction TO extraction_user; + GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE s_extraction.rt_format TO extraction_admin; + GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE s_extraction.rt_layer TO extraction_admin; + -- Droits sur les tables des objets WAB + GRANT SELECT ON TABLE s_extraction.rt_extraction_status TO extraction_user; + GRANT SELECT ON TABLE s_extraction.rt_extraction_status_group TO extraction_user; + GRANT SELECT, INSERT ON TABLE s_extraction.extraction_history TO extraction_user; + INSERT INTO s_gtf.messageclass (messageclass, messageclass_type) VALUES ('AE Généré','action'); + INSERT INTO s_gtf.messageclass (messageclass, messageclass_type) VALUES ('Extraction Aix','action'); + INSERT INTO s_gtf.messageclass_action (messageclass_action_id, messageclass, actionclass, index, parameters) VALUES ((SELECT nextval('s_gtf.seq_common'::regclass)),'AE Généré','BoAction',0,'bo_id_attribute=''bo_id''|method=''trGenerer''|class=''Extractions''|module=''extraction'''); + INSERT INTO s_gtf.messageclass_action (messageclass_action_id, messageclass, actionclass, index, parameters) VALUES ((SELECT nextval('s_gtf.seq_common'::regclass)),'AE Généré','EmailAction',1,'template_id = ' || (SELECT email_template_id FROM s_gtf.email_template WHERE name = 'Email demandeur AE généré')); + INSERT INTO s_gtf.messageclass_action (messageclass_action_id, messageclass, actionclass, index, parameters) VALUES ((SELECT nextval('s_gtf.seq_common'::regclass)),'Extraction Aix','EmailAction',1,'template_id = ' || (SELECT email_template_id FROM s_gtf.email_template WHERE name = 'Email controleur données extraites')); + INSERT INTO s_gtf.messageclass_action (messageclass_action_id, messageclass, actionclass, index, parameters) VALUES ((SELECT nextval('s_gtf.seq_common'::regclass)),'Extraction Aix','EmailAction',2,'template_id = ' || (SELECT email_template_id FROM s_gtf.email_template WHERE name = 'Email demandeur données extraites')); + INSERT INTO s_gtf.messageclass_action (messageclass_action_id, messageclass, actionclass, index, parameters) VALUES ((SELECT nextval('s_gtf.seq_common'::regclass)),'Extraction Aix','BoAction',0,'bo_id_attribute=''bo_id''|method=''trTerminerExtraction''|class=''Extractions''|module=''extraction'''); + INSERT INTO s_gtf.email_template (name, subject, body, "to", cc, cci, code, use_advanced, rt_emailcontext_id, attachment) VALUES ('Email demandeur AE généré', NULL, NULL, NULL, NULL, NULL, '$logo = $this->aProperties[''ws_data_dir'']."/gtf/LOGO_AMP.jpg";' || chr(13) || '$base64 = base64_encode(file_get_contents($logo));' || chr(13) || '$image = ''<img src="data:image/png;base64,''.$base64.''">'';' || chr(13) || 'require_once("gtf_lib/gtf_object/Order.class.inc");' || chr(13) || 'require_once("gtf_lib/gtf_object/User.class.inc");' || chr(13) || '$iBoId = $this->aObjects["oMessage"]->getBody(''bo_id'');' || chr(13) || '$sRequest = "SELECT * from s_extraction.extraction where bo_id = ".$iBoId;' || chr(13) || '$oPDOresult = $this->oBd->executeWithParams($sRequest, array());' || chr(13) || '$aBo = $this->oBd->ligneSuivante ($oPDOresult);' || chr(13) || '$iOrderId = $this->aObjects["oMessage"]->getBody(''order_id'');' || chr(13) || '$this->aObjects["oOrder"]= new orderLib($oBd, $iOrderId, $this->aObjects["oMessage"]->aProperties, "v_order");' || chr(13) || 'error_log( print_r($this->aObjects[''oOrder''], true));' || chr(13) || '$this->aObjects[''oUser''] = new User($oBd, $this->aObjects[''oOrder'']->aFields[''user_id''], $this->aObjects["oMessage"]->aProperties);' || chr(13) || '$this->to = $aBo[''email''];' || chr(13) || '$this->cc = $this->aObjects["oOrder"]->aFields[''email_notifications''];' || chr(13) || '$this->cci = '''';' || chr(13) || '$this->subject = ''[PAYS D\''AIX - SIGAM] Demande N° ''.$aBo[''bo_id''].'' - Acte d\''Engagement pour l\''utilisation des données SIG'';' || chr(13) || '$this->body = $image.''<p>Bonjour</p>' || chr(13) || '<p></p>' || chr(13) || '<p>Suite à votre demande n°''.$aBo[''bo_id''].'' en date du ''.date(''d/m/Y'',strtotime($aBo[''creation_date''])).'' pour l\''extraction des données, <u>merci de bien vouloir déposer l\''acte d\''engagement</u> ci-joint complété et signé, à l\''adresse suivante:<br/>' || chr(13) || '<A HREF="https://scpa430.cpa.fr/extraction">Application Extraction</A></p>' || chr(13) || '<p>Une fois réceptionné, l\''acte d\''engagement sera soumis à la validation du Territoire du Pays d\''Aix.<br/>' || chr(13) || 'Si celui-ci est validé, vous recevrez les données par mail (taille < 5Mo) ou par lien de téléchargement (taille > 5Mo).</p>' || chr(13) || '<p>Cordialement,</p>' || chr(13) || '<p>Le service d\''Information Géographique et Applicatifs Métiers (SIGAM)<br/>' || chr(13) || 'Territoire du Pays d\''Aix<br/>' || chr(13) || 'Tel : 04 42 93 83 50<br/>' || chr(13) || 'Mail : <a href="mailto:sig.paysdaix@ampmetropole.fr">sig.paysdaix@ampmetropole.fr</a> </p>'';' || chr(13) || '// les résultats de moins de 5 Mo sont envoyés en pièce jointe' || chr(13) || ' if (filesize($this->aObjects["oOrder"]->aFields[''result_file''])> (5*1024*1024)){' || chr(13) || ' $this->body .= ''<p>Le résultat est disponible par téléchargement :<br/><a href="'' . $this->aObjects["oOrder"]->aFields[''result_url''] . ''">Télécharger le résultat</a></p>'';' || chr(13) || ' } else {' || chr(13) || ' $this->aAttachments[0] = $this->aObjects["oOrder"]->aFields[''result_file''];' || chr(13) || ' }' || chr(13) || 'error_log(print_r($this->aObjects["oOrder"]->aFields, true));', '1', 'gtf', NULL); + INSERT INTO s_gtf.email_template (name, subject, body, "to", cc, cci, code, use_advanced, rt_emailcontext_id, attachment) VALUES ('Email demandeur AE à resoumettre', NULL, NULL, NULL, NULL, NULL, 'require_once("gtf_lib/gtf_object/User.class.inc");' || chr(13) || 'require_once("vmlib/logUtil.inc");' || chr(13) || '$iBoId = $this->aObjects["oBusinessObject"]->aValues[''bo_id''];' || chr(13) || '$sUserLogin = $this->aObjects["oBusinessObject"]->aValues[''requestor''];' || chr(13) || '$sSql = ''SELECT user_id FROM s_framework.user WHERE login=\''''.$this->aObjects[''oBusinessObject'']->aValues[''requestor''].''\'''';' || chr(13) || '//writeToErrorLog($sSql);' || chr(13) || '$oResult = $oBd->execute($sSql);' || chr(13) || 'if(!$oBd->erreurRencontree) {' || chr(13) || ' if ($oBd->nombreLigne ($oResult) > 0) {' || chr(13) || ' $this->aObjects[''oUser''] = new User($oBd, $oBd->objetSuivant($oResult)->user_id, $this->aObjects["oBusinessObject"]->aProperties);' || chr(13) || ' }' || chr(13) || '}' || chr(13) || '//$this->to = ''sig@agglo-paysdaix.fr'';' || chr(13) || '$this->to = $this->aObjects[''oBusinessObject'']->aValues[''email''];' || chr(13) || '$this->cc = '''';' || chr(13) || '$this->cci = '''';' || chr(13) || '$this->subject = ''[PAYS D\''AIX- SIGAM] Demande N° ''.$this->aObjects[''oBusinessObject'']->aValues[''bo_id''].'' - Acte d\''engagement non valide'';' || chr(13) || '$this->body = ''<p>Bonjour,</p>' || chr(13) || ' <p>Suite à votre demande n°''.$this->aObjects[''oBusinessObject'']->aValues[''bo_id''].'' en date du ''.date(''d/m/Y'',strtotime($this->aObjects[''oBusinessObject'']->aValues[''creation_date''])).'' pour l\''extraction des données, votre demande n\''a pas encore été validée pour la ou les raisons suivantes :<br/>'';' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''signed''] == "false"){' || chr(13) || ' $this->body .= '' - L\''acte d\''engagement n\''est pas signé<br/>'';' || chr(13) || '}' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''identification_complete''] == "false"){' || chr(13) || ' $this->body .= '' - Le cadre d\''identification du dépositaire est incomplet<br/>'';' || chr(13) || '}' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''definition_complete''] == "false"){' || chr(13) || ' $this->body .= '' - La définition des traitements pour l\''usage du cadastre est non renseignée<br/>'';' || chr(13) || '}' || chr(13) || 'error_log(print_r($this->aObjects[''oBusinessObject'']->aValues, true));' || chr(13) || '//$this->body .= ''<p>''.$this->aObjects[''oBusinessObject'']->aValues[''comment''].''</p>'';' || chr(13) || '$this->body .=''<p><u>Merci de bien vouloir déposer à nouveau l\''acte d\''engagement</u> à l\''adresse suivante :<br/>' || chr(13) || '<A HREF="https://scpa430.cpa.fr/extraction">Application Extraction</A></p>' || chr(13) || '<p>Une fois réceptionné, l\''acte d\''engagement sera soumis à la validation du Territoire du Pays d\''Aix.<br/>' || chr(13) || 'Si celui-ci est validé, vous recevrez les données par mail (taille < 5Mo) ou par lien de téléchargement (taille > 5Mo).</p>' || chr(13) || '<p>Cordialement,</p>' || chr(13) || '<p>Le service d\''Information Géographique et Applicatifs Métiers (SIGAM)<br/>' || chr(13) || 'Territoire du Pays d\''Aix<br/>' || chr(13) || 'Tel : 04 42 93 83 50<br/>' || chr(13) || 'Mail : <a href="mailto:sig.paysdaix@ampmetropole.fr">sig.paysdaix@ampmetropole.fr</a> </p>'';' || chr(13) || '$this->aAttachments[0] = '''';' || chr(13) || '', '1', 'gtf', NULL); + INSERT INTO s_gtf.email_template (name, subject, body, "to", cc, cci, code, use_advanced, rt_emailcontext_id, attachment) VALUES ('Email controleur données extraites', NULL, NULL, NULL, NULL, NULL, 'require_once("gtf_lib/gtf_object/Order.class.inc");' || chr(13) || 'require_once("gtf_lib/gtf_object/User.class.inc");' || chr(13) || '$iBoId = $this->aObjects["oMessage"]->getBody(''bo_id'');' || chr(13) || '$sRequest = "SELECT * from s_extraction.extraction where bo_id = ".$iBoId;' || chr(13) || '$oPDOresult = $this->oBd->executeWithParams($sRequest, array());' || chr(13) || '$aBo = $this->oBd->ligneSuivante ($oPDOresult);' || chr(13) || '$iOrderId = $this->aObjects["oMessage"]->getBody(''order_id'');' || chr(13) || '$this->aObjects["oOrder"]= new OrderLib($oBd, $iOrderId, $this->aObjects["oMessage"]->aProperties, "v_order");' || chr(13) || '$this->aObjects[''oUser''] = new User($oBd, $this->aObjects[''oOrder'']->aFields[''user_id''], $this->aObjects["oMessage"]->aProperties);' || chr(13) || '$this->to = ''sig.paysdaix@ampmetropole.fr'';' || chr(13) || '$this->cc = '''';' || chr(13) || '$this->cci = '''';' || chr(13) || '$this->subject = ''[GTF] - Demande N° ''.$aBo[''bo_id''].'' - Extraction des données'';' || chr(13) || '$this->body = ''<p>Les données concernant la demande n°''.$aBo[''bo_id''].'' en date du ''.date(''d/m/Y'',strtotime($aBo[''creation_date''])).'' ont été envoyées au demandeur.</p>' || chr(13) || '<p>Cordialement,</p>' || chr(13) || '<p>L\''application d\''extraction de données de GTF</p>'';' || chr(13) || '', '1', 'gtf', NULL); + INSERT INTO s_gtf.email_template (name, subject, body, "to", cc, cci, code, use_advanced, rt_emailcontext_id, attachment) VALUES ('public', NULL, NULL, NULL, NULL, NULL, '$logo = $this->aProperties[''ws_data_dir'']."/gtf/LOGO_AMP.jpg";' || chr(13) || '$base64 = base64_encode(file_get_contents($logo));' || chr(13) || '$image = ''<img src="data:image/png;base64,''.$base64.''">'';' || chr(13) || 'if ($this->aObjects["oOrder"]->aFields[''order_status_id''] == 3) {' || chr(13) || ' $this->to = '''' . $this->aObjects["oOrder"]->getUser()->aFields[''email''] . '''';' || chr(13) || ' $this->cc = '''' . $this->aObjects["oOrder"]->aFields[''email_notifications''] . '''';' || chr(13) || ' $this->cci = '''';' || chr(13) || ' $this->subject = ''[Pays d\''Aix - SIGAM] - Données extraites'';' || chr(13) || ' $this->body = $image.''<p>Bonjour,</p>'';' || chr(13) || ' $this->body .=''<p></p><p>Les données correspondant à votre demande en date du ''.date(''d/m/Y'',strtotime($this->aObjects["oOrder"]->aFields[''order_date''])).'' sont disponibles '';' || chr(13) || ' if (filesize($this->aObjects["oOrder"]->aFields[''result_file''])> 5242880){' || chr(13) || ' $this->body .= ''sur le lien de téléchargement suivant :<br/><a href="''.$this->aObjects["oOrder"]->aFields[''result_url''] . ''">Télécharger le résultat</a></p>'';' || chr(13) || ' } else {' || chr(13) || ' $this->body .= ''en pièce jointe.</p>'';' || chr(13) || ' $this->aAttachments[0] = $this->aObjects["oOrder"]->aFields[''result_file''];' || chr(13) || ' }' || chr(13) || ' $this->body .=''<p>Vous en souhaitant bonne réception,</p>' || chr(13) || ' <p>Cordialement,</p>' || chr(13) || ' <p>Le service d\''Information Géographique et Applicatifs Métiers (SIGAM)<br/>' || chr(13) || ' Conseil de Territoire du Pays d\''Aix<br/>' || chr(13) || ' Tel : 04 42 93 83 50<br/>' || chr(13) || ' Mail : <a href="mailto:sig.paysdaix@ampmetropole.fr">sig.paysdaix@ampmetropole.fr</a> </p>' || chr(13) || '' || chr(13) || ' '';' || chr(13) || '}else{' || chr(13) || ' $this->to = '''' . $this->aObjects["oOrder"]->getUser()->aFields[''email''] . '''';' || chr(13) || ' $this->subject = ''[GTF]-'' . $this->aObjects["oOrder"]->getWorkspace()->aFields[''name''] . '' - Echec du traitement'';' || chr(13) || ' $this->body = $image.''<p>Bonjour,</p>'';' || chr(13) || ' $this->body .= ''<p>La demande n°'' . $this->aObjects["oOrder"]->aFields[''order_id''] . '' pour le traitement <strong>'' . $this->aObjects["oOrder"]->getWorkspace()->aFields[''name''] . ''</strong> n\''a pu être exécutée correctement suite à une erreur.<br/> Veuillez contactez votre administrateur.<br/>'';' || chr(13) || ' $this->aAttachments[0] = $this->aObjects["oOrder"]->aFields[''log_file''];' || chr(13) || '}', '1', 'gtf', NULL); + INSERT INTO s_gtf.email_template (name, subject, body, "to", cc, cci, code, use_advanced, rt_emailcontext_id, attachment) VALUES ('Email contrôleur AE soumis', NULL, NULL, NULL, NULL, NULL, 'require_once("gtf_lib/gtf_object/User.class.inc");' || chr(13) || 'require_once("vmlib/logUtil.inc");' || chr(13) || '$iBoId = $this->aObjects["oBusinessObject"]->aValues[''bo_id''];' || chr(13) || '' || chr(13) || '//$this->to = ''sig.paysdaix@ampmetropole.fr'';' || chr(13) || '$this->to = ''sofian.pujo@veremes.com'';' || chr(13) || '$this->cc = '''';' || chr(13) || '$this->cci = '''';' || chr(13) || '$this->subject = ''[GTF] - Demande N° ''.$this->aObjects[''oBusinessObject'']->aValues[''bo_id''].'' - Dépôt de l\''Acte d\''Engagement à valider'';' || chr(13) || '$this->body = ''<p>Bonjour,</p>' || chr(13) || ' <p> </p>' || chr(13) || ' <p>L\''acte d\''engagement correspondant à la demande n°''.$this->aObjects[''oBusinessObject'']->aValues[''bo_id''].'' en date du ''.date(''d/m/Y'',strtotime($this->aObjects[''oBusinessObject'']->aValues[''creation_date''])).'' a été déposé sur le serveur par le demandeur.</p>' || chr(13) || ' <p></p>' || chr(13) || ' <p>Cordialement,</p>' || chr(13) || ' <p> </p>' || chr(13) || ' <p>L\''application d\''extraction de données de GTF</p>'';' || chr(13) || 'error_log($this->body);' || chr(13) || '$this->aAttachments[0] = '''';' || chr(13) || '', '1', 'gtf', NULL); + INSERT INTO s_gtf.email_template (name, subject, body, "to", cc, cci, code, use_advanced, rt_emailcontext_id, attachment) VALUES ('Email demandeur Extraction refusée', NULL, NULL, NULL, NULL, NULL, 'require_once("gtf_lib/gtf_object/User.class.inc");' || chr(13) || 'require_once("vmlib/logUtil.inc");' || chr(13) || '$iBoId = $this->aObjects["oBusinessObject"]->aValues[''bo_id''];' || chr(13) || '$sUserLogin = $this->aObjects["oBusinessObject"]->aValues[''requestor''];' || chr(13) || '$sSql = ''SELECT user_id FROM s_vitis.user WHERE login=\''''.$this->aObjects[''oBusinessObject'']->aValues[''requestor''].''\'''';' || chr(13) || '//writeToErrorLog($sSql);' || chr(13) || '$oResult = $oBd->execute($sSql);' || chr(13) || '/*if(!$oBd->erreurRencontree) {' || chr(13) || ' if ($oBd->nombreLigne ($oResult) > 0) {' || chr(13) || ' $this->aObjects[''oUser''] = new User($oBd, $oBd->objetSuivant($oResult)->user_id, $this->aObjects["oBusinessObject"]->aProperties);' || chr(13) || ' }' || chr(13) || '}*/' || chr(13) || '//$this->to = ''sig.paysdaix@ampmetropole.fr'';' || chr(13) || 'error_log(print_r($this->aObjects[''oBusinessObject''], true));' || chr(13) || '//$this->to = $this->aObjects[''oBusinessObject'']->aValues[''email''];' || chr(13) || '$this->cc = '''';' || chr(13) || '$this->cci = '''';' || chr(13) || '$this->subject = ''[PAYS D\''AIX - SIGAM] Demande N° ''.$this->aObjects[''oBusinessObject'']->aValues[''bo_id''].'' - Rejet de votre demande d\''extraction de données'';' || chr(13) || '$this->body = ''<p>Bonjour,</p>' || chr(13) || ' <p>Suite à votre demande n°''.$this->aObjects[''oBusinessObject'']->aValues[''bo_id''].'' en date du ''.date(''d/m/Y'',strtotime($this->aObjects[''oBusinessObject'']->aValues[''creation_date''])).'' pour l\''extraction des données, votre demande a été rejetée pour la ou les raisons suivantes :<br/>'';' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''signed''] == "false"){' || chr(13) || ' $this->body .= '' - L\''acte d\''engagement n\''est pas signé<br/>'';' || chr(13) || '}' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''accepted_by_cpa''] == "false"){' || chr(13) || ' $this->body .= '' - La CPA ne valide pas l\''usage décrit pour les données du cadastre<br/>'';' || chr(13) || '}' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''identification_complete''] == "false"){' || chr(13) || ' $this->body .= '' - Le cadre d\''identification du dépositaire est incomplet</p>'';' || chr(13) || '}' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''definition_complete''] == "false"){' || chr(13) || ' $this->body .= '' - La définition des traitements pour l\''usage du cadastre est non renseignée<br/>'';' || chr(13) || '}' || chr(13) || '$this->body .= $this->aObjects[''oBusinessObject'']->aValues[''comment''].''<br/>'';' || chr(13) || '$this->body .=''<p>Cordialement,</p>' || chr(13) || '<p>Le service d\''Information Géographique et Applicatifs Métiers (SIGAM)<br/>' || chr(13) || 'Territoire du Pays d\''Aix<br/>' || chr(13) || 'Tel : 04 42 93 83 50<br/>' || chr(13) || 'Mail : <a href="mailto:sig.paysdaix@ampmetropole.fr">sig.paysdaix@ampmetropole.fr</a> </p>'';' || chr(13) || '$this->aAttachments[0] = '''';' || chr(13) || '', '1', 'gtf', NULL); + INSERT INTO s_gtf.email_template (name, subject, body, "to", cc, cci, code, use_advanced, rt_emailcontext_id, attachment) VALUES ('Email demandeur données extraites', NULL, NULL, NULL, NULL, NULL, 'require_once("gtf_lib/gtf_object/Order.class.inc");' || chr(13) || 'require_once("gtf_lib/gtf_object/User.class.inc");' || chr(13) || '$iBoId = $this->aObjects["oMessage"]->getBody(''bo_id'');' || chr(13) || '$sRequest = "SELECT * from s_extraction.extraction where bo_id = ".$iBoId;' || chr(13) || '$oPDOresult = $this->oBd->executeWithParams($sRequest, array());' || chr(13) || '$aBo = $this->oBd->ligneSuivante ($oPDOresult);' || chr(13) || '$iOrderId = $this->aObjects["oMessage"]->getBody(''order_id'');' || chr(13) || '$this->aObjects["oOrder"]= new OrderLib($oBd, $iOrderId, $this->aObjects["oMessage"]->aProperties, "v_order");' || chr(13) || '$sUserLogin = $aBo[''requestor''];' || chr(13) || '$sSql = ''SELECT user_id FROM s_framework.user WHERE login=\''''.$this->aObjects[''oBusinessObject'']->aValues[''requestor''].''\'''';' || chr(13) || '$oResult = $oBd->execute($sSql);' || chr(13) || 'if(!$oBd->erreurRencontree) {' || chr(13) || ' if ($oBd->nombreLigne ($oResult) > 0) {' || chr(13) || ' $this->aObjects[''oUser''] = new User($oBd, $oBd->objetSuivant($oResult)->user_id, $this->aObjects["oMessage"]->aProperties);' || chr(13) || ' }' || chr(13) || '}' || chr(13) || '$this->to = $aBo[''email''];' || chr(13) || '$this->cc = $this->aObjects["oOrder"]->aFields[''email_notifications''];' || chr(13) || '$this->cci = '''';' || chr(13) || '$this->subject = ''[PAYS D\''AIX - SIGAM] Demande N° ''.$aBo[''bo_id''].'' - Données SIG extraites'';' || chr(13) || '$this->body = ''<p>Bonjour</p>' || chr(13) || '<p></p><p>Les données correspondant à votre demande n°''.$aBo[''bo_id''].'' en date du ''.date(''d/m/Y'',strtotime($aBo[''creation_date''])).'' sont disponibles '';' || chr(13) || ' if (filesize($this->aObjects["oOrder"]->aFields[''result_file''])> 5242880){' || chr(13) || ' $this->body .= ''sur le lien de téléchargement suivant :<br/><a href="https://sigdata.agglo-paysdaix.fr/public/gtf/''.$this->aObjects["oOrder"]->aFields[''result_url''] . ''">Télécharger le résultat</a></p>'';' || chr(13) || ' } else {' || chr(13) || ' $this->body .= ''en pièce jointe.</p>'';' || chr(13) || ' $this->aAttachments[0] = $this->aObjects["oOrder"]->aFields[''result_file''];' || chr(13) || ' }' || chr(13) || '$this->body .=''<p>Vous en souhaitant bonne réception,</p>' || chr(13) || '<p>Cordialement,</p>' || chr(13) || '<p>Le service d\''Information Géographique et Applicatifs Métiers (SIGAM)<br/>' || chr(13) || 'Terriroire du Pays d\''Aix<br/>' || chr(13) || 'Tel : 04 42 93 83 50<br/>' || chr(13) || 'Mail : <a href="mailto:sig.paysdaix@ampmetropole.fr">sig.paysdaix@ampmetropole.fr</a> </p>' || chr(13) || '' || chr(13) || ''';' || chr(13) || '// les résultats de moins de 5 Mo sont envoyés en pièce jointe' || chr(13) || ' ' || chr(13) || '', '1', 'gtf', NULL); + + ]]> + </code> + </query> + <query> + <type>update</type> + <version>2018-00-00</version> + <code> + <![CDATA[ + --Partie pour le module extraction version 2018-00-00 généré par WAB le 22/05/2018 à 09:09:32 + ALTER TABLE s_extraction.rt_layer ADD COLUMN ct_id integer; + UPDATE s_extraction.rt_layer set ct_id = 2; + ALTER TABLE s_extraction.rt_layer DROP CONSTRAINT pk_projet_type; + ALTER TABLE s_extraction.rt_layer ADD COLUMN layer_ct_id serial; + ALTER TABLE s_extraction.rt_layer ADD CONSTRAINT pk_layer_ct PRIMARY KEY (layer_ct_id); + ALTER TABLE s_extraction.rt_layer ADD COLUMN mutualized boolean; + ALTER TABLE s_extraction.rt_feature_model ADD COLUMN ct_id integer; + UPDATE s_extraction.rt_feature_model set ct_id = 2; + ALTER TABLE s_extraction.rt_feature_model ADD COLUMN layer_ct_id integer; + UPDATE s_extraction.rt_feature_model SET layer_ct_id = s_extraction.rt_layer.layer_ct_id FROM s_extraction.rt_layer WHERE rt_feature_model.feature_type = s_extraction.rt_layer.layer_id and rt_feature_model.ct_id = s_extraction.rt_feature_model.ct_id; + ALTER TABLE s_extraction.rt_feature_model DROP COLUMN ct_id; + ALTER TABLE s_extraction.rt_feature_model ALTER COLUMN layer_ct_id SET NOT NULL; + ALTER TABLE s_extraction.rt_layer ADD CONSTRAINT rt_layer_layer_id_ct_id_key UNIQUE (layer_id, ct_id); + ALTER TABLE ONLY s_extraction.rt_feature_model ADD CONSTRAINT fk_layer_ct_id FOREIGN KEY (layer_ct_id) REFERENCES s_extraction.rt_layer(layer_ct_id); + ALTER TABLE s_extraction.rt_feature_model ADD UNIQUE (feature_type, attribute_name, layer_ct_id); + ALTER TABLE s_extraction.extraction ADD COLUMN preco_tech boolean; + ALTER TABLE s_extraction.extraction ADD COLUMN chart_graph boolean; + ALTER TABLE s_extraction.extraction ADD COLUMN metadonnees boolean; + DROP VIEW s_extraction.v_extraction; + CREATE OR REPLACE VIEW s_extraction.v_extraction AS SELECT DISTINCT extraction.bo_id, extraction.status_id, extraction.history, extraction.creation_date, extraction.requestor, extraction.ae, extraction.extent, extraction.company, extraction.layers, extraction.vector_format_id, extraction.vector_format_id AS format_id, extraction.coordsys_id, extraction.raster_format_id, extraction.extent_method, extraction.signed, extraction.accepted_by_cpa, extraction.identification_complete, extraction.definition_complete, extraction.priority_id, extraction.id_com, extraction.id_conseil, extraction.email, extraction.note, extraction.preco_tech, extraction.chart_graph, extraction.metadonnees, rt_extraction_status.progress AS progress_level, rt_extraction_status.name AS status_name, rt_extraction_status.name AS status FROM s_extraction.extraction LEFT JOIN s_extraction.rt_extraction_status ON extraction.status_id = rt_extraction_status.status_id LEFT JOIN s_extraction.rt_extraction_status_group ON rt_extraction_status.status_id = rt_extraction_status_group.status_id LEFT JOIN s_vitis.user_group ON rt_extraction_status_group.group_id = user_group.group_id LEFT JOIN s_vitis."user" ON user_group.user_id = "user".user_id WHERE "user".login::name = "current_user"() AND (extraction.requestor::name = "current_user"() OR rt_extraction_status_group.group_id = 12); + ALTER TABLE s_extraction.v_extraction OWNER TO u_vitis; + GRANT ALL ON TABLE s_extraction.v_extraction TO extraction_user; + GRANT ALL ON TABLE s_extraction.v_extraction TO u_vitis; + GRANT ALL ON TABLE s_extraction.v_extraction TO extraction_admin; + COMMENT ON COLUMN s_extraction.extraction.history is 'deprecated'; + COMMENT ON COLUMN s_extraction.extraction.status is 'deprecated'; + CREATE SEQUENCE s_extraction.ct_ct_id_seq; + ALTER SEQUENCE s_extraction.ct_ct_id_seq OWNER TO u_vitis; + CREATE TABLE s_extraction.ct( ct_id integer NOT NULL DEFAULT nextval('s_extraction.ct_ct_id_seq'::regclass), name character varying(50) COLLATE pg_catalog."default" NOT NULL, format character varying(255) COLLATE pg_catalog."default", namedconnection character varying(255) COLLATE pg_catalog."default", geom geometry(MultiPolygon,2154), CONSTRAINT pk_ct PRIMARY KEY (ct_id) ); + ALTER TABLE s_extraction.ct OWNER to u_vitis; + GRANT SELECT ON TABLE s_extraction.ct TO extraction_admin; + GRANT SELECT ON TABLE s_extraction.ct TO extraction_user; + GRANT ALL ON TABLE s_extraction.ct TO u_vitis; + CREATE INDEX ct_ct_id ON s_extraction.ct USING btree (ct_id); + CREATE TABLE s_extraction.commune (commune_id character(6) COLLATE pg_catalog."default" NOT NULL,ct_id integer, name varchar(255) COLLATE pg_catalog."default" NOT NULL,geom geometry(Polygon,2154) NOT NULL,CONSTRAINT pk_commune PRIMARY KEY (commune_id), CONSTRAINT fk_ct_id FOREIGN KEY (ct_id) REFERENCES s_extraction.ct (ct_id) MATCH SIMPLE ON UPDATE RESTRICT ON DELETE SET NULL); + ALTER TABLE s_extraction.commune OWNER to u_vitis; + GRANT SELECT ON TABLE s_extraction.commune TO extraction_admin; + GRANT SELECT ON TABLE s_extraction.commune TO extraction_user; + GRANT ALL ON TABLE s_extraction.commune TO u_vitis; + --Partie WABSQL générée par WAB le 04/05/2018 à 10:02:22 + -- Ces tables sont normalement prévues dans votre fichier VisualParadigm et sont necessaires pour le fonctionnement de vos objets WAB + -- CREATE TABLE s_extraction.rt_extraction_status (status_id integer NOT NULL DEFAULT nextval('s_dtnet.seq_common'::regclass), name character varying(50) NOT NULL, progress integer NOT NULL, CONSTRAINT rt_extraction_status_pkey PRIMARY KEY (status_id)); + -- CREATE TABLE s_extraction.rt_extraction_status_group (status_id integer NOT NULL, group_id integer NOT NULL, link_id integer NOT NULL DEFAULT nextval('s_dtnet.seq_common'::regclass), CONSTRAINT rt_extraction_status_group_pkey PRIMARY KEY (link_id), CONSTRAINT fk_extraction_status_group FOREIGN KEY (status_id) REFERENCES s_extraction.rt_extraction_status (status_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION); + -- CREATE TABLE s_extraction.extraction_history (history_id integer NOT NULL DEFAULT nextval('s_extraction.seq_common'::regclass), date timestamp with time zone NOT NULL, login character varying(50) NOT NULL, comment text NOT NULL, bo_id integer NOT NULL, CONSTRAINT extraction_history_pkey PRIMARY KEY (history_id), CONSTRAINT fk_extraction_history FOREIGN KEY (bo_id) REFERENCES s_extraction.extraction (bo_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION); + -- Vue basique pour vos objets WAB tenant compte de la restriction groupe état + --CREATE VIEW s_extraction.v_extraction AS SELECT extraction.* FROM s_extraction.extraction LEFT JOIN s_extraction.rt_extraction_status ON rt_extraction_status.status_id = extraction.status_id JOIN s_extraction.rt_extraction_status_group ON rt_extraction_status.status_id = rt_extraction_status_group.status_id WHERE (rt_extraction_status_group.group_id IN ( SELECT user_group.group_id FROM s_vitis.user_group LEFT JOIN s_vitis."user" ON user_group.user_id = "user".user_id WHERE "user".login::name = "current_user"())); + -- u_vitis est propriétaire de toutes vos tables + ALTER TABLE s_extraction.rt_extraction_status_group OWNER TO u_vitis; + ALTER TABLE s_extraction.rt_format OWNER TO u_vitis; + ALTER TABLE s_extraction.v_extraction OWNER TO u_vitis; + ALTER TABLE s_extraction.rt_coordsys OWNER TO u_vitis; + ALTER TABLE s_extraction.rt_extraction_status OWNER TO u_vitis; + ALTER TABLE s_extraction.rt_layer OWNER TO u_vitis; + ALTER TABLE s_extraction.rt_feature_model OWNER TO u_vitis; + ALTER TABLE s_extraction.extraction OWNER TO u_vitis; + ALTER TABLE s_extraction.version OWNER TO u_vitis; + -- u_vitis propriétaire sur les tables des objets WAB + --ALTER TABLE s_extraction.rt_extraction_status OWNER to u_vitis; + --ALTER TABLE s_extraction.rt_extraction_status_group OWNER to u_vitis; + --ALTER TABLE s_extraction.extraction_history OWNER to u_vitis; + -- Gestion des droits d'après les méthodes php saisies pour vos objets (annule et remplace) + REVOKE ALL ON TABLE s_extraction.rt_coordsys FROM extraction_admin; + REVOKE ALL ON TABLE s_extraction.v_extraction FROM extraction_user; + REVOKE ALL ON TABLE s_extraction.rt_format FROM extraction_admin; + REVOKE ALL ON TABLE s_extraction.rt_layer FROM extraction_admin; + GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE s_extraction.rt_coordsys TO extraction_admin; + GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE s_extraction.v_extraction TO extraction_user; + GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE s_extraction.rt_format TO extraction_admin; + GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE s_extraction.rt_layer TO extraction_admin; + -- Droits sur les tables des objets WAB + GRANT SELECT ON TABLE s_extraction.rt_extraction_status TO extraction_user; + GRANT SELECT ON TABLE s_extraction.rt_extraction_status_group TO extraction_user; + GRANT SELECT, INSERT ON TABLE s_extraction.extraction_history TO extraction_user; + + + UPDATE s_gtf.email_template SET subject=NULL, body=NULL, "to"=NULL, cc=NULL, cci=NULL, code='$logo = $this->aProperties[''ws_data_dir'']."/gtf/LOGO_AMP.jpg";' || chr(13) || '$base64 = base64_encode(file_get_contents($logo));' || chr(13) || '$image = ''<img src="data:image/png;base64,''.$base64.''">'';' || chr(13) || 'require_once("gtf_lib/gtf_object/Order.class.inc");' || chr(13) || 'require_once("gtf_lib/gtf_object/User.class.inc");' || chr(13) || '$iBoId = $this->aObjects["oMessage"]->getBody(''bo_id'');' || chr(13) || '$sRequest = "SELECT * from s_extraction.extraction where bo_id = ".$iBoId;' || chr(13) || '$oPDOresult = $this->oBd->executeWithParams($sRequest, array());' || chr(13) || '$aBo = $this->oBd->ligneSuivante ($oPDOresult);' || chr(13) || '$iOrderId = $this->aObjects["oMessage"]->getBody(''order_id'');' || chr(13) || '$this->aObjects["oOrder"]= new orderLib($oBd, $iOrderId, $this->aObjects["oMessage"]->aProperties, "v_order");' || chr(13) || 'error_log( print_r($this->aObjects[''oOrder''], true));' || chr(13) || '$this->aObjects[''oUser''] = new User($oBd, $this->aObjects[''oOrder'']->aFields[''user_id''], $this->aObjects["oMessage"]->aProperties);' || chr(13) || '$this->to = $aBo[''email''];' || chr(13) || '$this->cc = $this->aObjects["oOrder"]->aFields[''email_notifications''];' || chr(13) || '$this->cci = '''';' || chr(13) || '$this->subject = ''[PAYS D\''AIX - SIGAM] Demande N° ''.$aBo[''bo_id''].'' - Acte d\''Engagement pour l\''utilisation des données SIG'';' || chr(13) || '$this->body = $image.''<p>Bonjour</p>' || chr(13) || '<p></p>' || chr(13) || '<p>Suite à votre demande n°''.$aBo[''bo_id''].'' en date du ''.date(''d/m/Y'',strtotime($aBo[''creation_date''])).'' pour l\''extraction des données, <u>merci de bien vouloir déposer l\''acte d\''engagement</u> ci-joint complété et signé, à l\''adresse suivante:<br/>' || chr(13) || '<A HREF="https://scpa430.cpa.fr/extraction">Application Extraction</A></p>' || chr(13) || '<p>Une fois réceptionné, l\''acte d\''engagement sera soumis à la validation du Territoire du Pays d\''Aix.<br/>' || chr(13) || 'Si celui-ci est validé, vous recevrez les données par mail (taille < 5Mo) ou par lien de téléchargement (taille > 5Mo).</p>' || chr(13) || '<p>Cordialement,</p>' || chr(13) || '<p>Le service d\''Information Géographique et Applicatifs Métiers (SIGAM)<br/>' || chr(13) || 'Territoire du Pays d\''Aix<br/>' || chr(13) || 'Tel : 04 42 93 83 50<br/>' || chr(13) || 'Mail : <a href="mailto:sig.paysdaix@ampmetropole.fr">sig.paysdaix@ampmetropole.fr</a> </p>'';' || chr(13) || '// les résultats de moins de 5 Mo sont envoyés en pièce jointe' || chr(13) || ' if (filesize($this->aObjects["oOrder"]->aFields[''result_file''])> (5*1024*1024)){' || chr(13) || ' $this->body .= ''<p>Le résultat est disponible par téléchargement :<br/><a href="'' . $this->aObjects["oOrder"]->aFields[''result_url''] . ''">Télécharger le résultat</a></p>'';' || chr(13) || ' } else {' || chr(13) || ' $this->aAttachments[0] = $this->aObjects["oOrder"]->aFields[''result_file''];' || chr(13) || ' }' || chr(13) || 'error_log(print_r($this->aObjects["oOrder"]->aFields, true));', use_advanced='1', rt_emailcontext_id='gtf', attachment=NULL WHERE "name"='Email demandeur AE généré'; + UPDATE s_gtf.email_template SET subject=NULL, body=NULL, "to"=NULL, cc=NULL, cci=NULL, code='require_once("gtf_lib/gtf_object/User.class.inc");' || chr(13) || 'require_once("vmlib/logUtil.inc");' || chr(13) || '$iBoId = $this->aObjects["oBusinessObject"]->aValues[''bo_id''];' || chr(13) || '$sUserLogin = $this->aObjects["oBusinessObject"]->aValues[''requestor''];' || chr(13) || '$sSql = ''SELECT user_id FROM s_framework.user WHERE login=\''''.$this->aObjects[''oBusinessObject'']->aValues[''requestor''].''\'''';' || chr(13) || '//writeToErrorLog($sSql);' || chr(13) || '$oResult = $oBd->execute($sSql);' || chr(13) || 'if(!$oBd->erreurRencontree) {' || chr(13) || ' if ($oBd->nombreLigne ($oResult) > 0) {' || chr(13) || ' $this->aObjects[''oUser''] = new User($oBd, $oBd->objetSuivant($oResult)->user_id, $this->aObjects["oBusinessObject"]->aProperties);' || chr(13) || ' }' || chr(13) || '}' || chr(13) || '//$this->to = ''sig@agglo-paysdaix.fr'';' || chr(13) || '$this->to = $this->aObjects[''oBusinessObject'']->aValues[''email''];' || chr(13) || '$this->cc = '''';' || chr(13) || '$this->cci = '''';' || chr(13) || '$this->subject = ''[PAYS D\''AIX- SIGAM] Demande N° ''.$this->aObjects[''oBusinessObject'']->aValues[''bo_id''].'' - Acte d\''engagement non valide'';' || chr(13) || '$this->body = ''<p>Bonjour,</p>' || chr(13) || ' <p>Suite à votre demande n°''.$this->aObjects[''oBusinessObject'']->aValues[''bo_id''].'' en date du ''.date(''d/m/Y'',strtotime($this->aObjects[''oBusinessObject'']->aValues[''creation_date''])).'' pour l\''extraction des données, votre demande n\''a pas encore été validée pour la ou les raisons suivantes :<br/>'';' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''signed''] == "false"){' || chr(13) || ' $this->body .= '' - L\''acte d\''engagement n\''est pas signé<br/>'';' || chr(13) || '}' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''identification_complete''] == "false"){' || chr(13) || ' $this->body .= '' - Le cadre d\''identification du dépositaire est incomplet<br/>'';' || chr(13) || '}' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''definition_complete''] == "false"){' || chr(13) || ' $this->body .= '' - La définition des traitements pour l\''usage du cadastre est non renseignée<br/>'';' || chr(13) || '}' || chr(13) || 'error_log(print_r($this->aObjects[''oBusinessObject'']->aValues, true));' || chr(13) || '//$this->body .= ''<p>''.$this->aObjects[''oBusinessObject'']->aValues[''comment''].''</p>'';' || chr(13) || '$this->body .=''<p><u>Merci de bien vouloir déposer à nouveau l\''acte d\''engagement</u> à l\''adresse suivante :<br/>' || chr(13) || '<A HREF="https://scpa430.cpa.fr/extraction">Application Extraction</A></p>' || chr(13) || '<p>Une fois réceptionné, l\''acte d\''engagement sera soumis à la validation du Territoire du Pays d\''Aix.<br/>' || chr(13) || 'Si celui-ci est validé, vous recevrez les données par mail (taille < 5Mo) ou par lien de téléchargement (taille > 5Mo).</p>' || chr(13) || '<p>Cordialement,</p>' || chr(13) || '<p>Le service d\''Information Géographique et Applicatifs Métiers (SIGAM)<br/>' || chr(13) || 'Territoire du Pays d\''Aix<br/>' || chr(13) || 'Tel : 04 42 93 83 50<br/>' || chr(13) || 'Mail : <a href="mailto:sig.paysdaix@ampmetropole.fr">sig.paysdaix@ampmetropole.fr</a> </p>'';' || chr(13) || '$this->aAttachments[0] = '''';' || chr(13) || '', use_advanced='1', rt_emailcontext_id='gtf', attachment=NULL WHERE "name"='Email demandeur AE à resoumettre'; + UPDATE s_gtf.email_template SET subject=NULL, body=NULL, "to"=NULL, cc=NULL, cci=NULL, code='require_once("gtf_lib/gtf_object/Order.class.inc");' || chr(13) || 'require_once("gtf_lib/gtf_object/User.class.inc");' || chr(13) || '$iBoId = $this->aObjects["oMessage"]->getBody(''bo_id'');' || chr(13) || '$sRequest = "SELECT * from s_extraction.extraction where bo_id = ".$iBoId;' || chr(13) || '$oPDOresult = $this->oBd->executeWithParams($sRequest, array());' || chr(13) || '$aBo = $this->oBd->ligneSuivante ($oPDOresult);' || chr(13) || '$iOrderId = $this->aObjects["oMessage"]->getBody(''order_id'');' || chr(13) || '$this->aObjects["oOrder"]= new OrderLib($oBd, $iOrderId, $this->aObjects["oMessage"]->aProperties, "v_order");' || chr(13) || '$this->aObjects[''oUser''] = new User($oBd, $this->aObjects[''oOrder'']->aFields[''user_id''], $this->aObjects["oMessage"]->aProperties);' || chr(13) || '$this->to = ''sig.paysdaix@ampmetropole.fr'';' || chr(13) || '$this->cc = '''';' || chr(13) || '$this->cci = '''';' || chr(13) || '$this->subject = ''[GTF] - Demande N° ''.$aBo[''bo_id''].'' - Extraction des données'';' || chr(13) || '$this->body = ''<p>Les données concernant la demande n°''.$aBo[''bo_id''].'' en date du ''.date(''d/m/Y'',strtotime($aBo[''creation_date''])).'' ont été envoyées au demandeur.</p>' || chr(13) || '<p>Cordialement,</p>' || chr(13) || '<p>L\''application d\''extraction de données de GTF</p>'';' || chr(13) || '', use_advanced='1', rt_emailcontext_id='gtf', attachment=NULL WHERE "name"='Email controleur données extraites'; + UPDATE s_gtf.email_template SET subject=NULL, body=NULL, "to"=NULL, cc=NULL, cci=NULL, code='$logo = $this->aProperties[''ws_data_dir'']."/gtf/LOGO_AMP.jpg";' || chr(13) || '$base64 = base64_encode(file_get_contents($logo));' || chr(13) || '$image = ''<img src="data:image/png;base64,''.$base64.''">'';' || chr(13) || 'if ($this->aObjects["oOrder"]->aFields[''order_status_id''] == 3) {' || chr(13) || ' $this->to = '''' . $this->aObjects["oOrder"]->getUser()->aFields[''email''] . '''';' || chr(13) || ' $this->cc = '''' . $this->aObjects["oOrder"]->aFields[''email_notifications''] . '''';' || chr(13) || ' $this->cci = '''';' || chr(13) || ' $this->subject = ''[Pays d\''Aix - SIGAM] - Données extraites'';' || chr(13) || ' $this->body = $image.''<p>Bonjour,</p>'';' || chr(13) || ' $this->body .=''<p></p><p>Les données correspondant à votre demande en date du ''.date(''d/m/Y'',strtotime($this->aObjects["oOrder"]->aFields[''order_date''])).'' sont disponibles '';' || chr(13) || ' if (filesize($this->aObjects["oOrder"]->aFields[''result_file''])> 5242880){' || chr(13) || ' $this->body .= ''sur le lien de téléchargement suivant :<br/><a href="''.$this->aObjects["oOrder"]->aFields[''result_url''] . ''">Télécharger le résultat</a></p>'';' || chr(13) || ' } else {' || chr(13) || ' $this->body .= ''en pièce jointe.</p>'';' || chr(13) || ' $this->aAttachments[0] = $this->aObjects["oOrder"]->aFields[''result_file''];' || chr(13) || ' }' || chr(13) || ' $this->body .=''<p>Vous en souhaitant bonne réception,</p>' || chr(13) || ' <p>Cordialement,</p>' || chr(13) || ' <p>Le service d\''Information Géographique et Applicatifs Métiers (SIGAM)<br/>' || chr(13) || ' Conseil de Territoire du Pays d\''Aix<br/>' || chr(13) || ' Tel : 04 42 93 83 50<br/>' || chr(13) || ' Mail : <a href="mailto:sig.paysdaix@ampmetropole.fr">sig.paysdaix@ampmetropole.fr</a> </p>' || chr(13) || '' || chr(13) || ' '';' || chr(13) || '}else{' || chr(13) || ' $this->to = '''' . $this->aObjects["oOrder"]->getUser()->aFields[''email''] . '''';' || chr(13) || ' $this->subject = ''[GTF]-'' . $this->aObjects["oOrder"]->getWorkspace()->aFields[''name''] . '' - Echec du traitement'';' || chr(13) || ' $this->body = $image.''<p>Bonjour,</p>'';' || chr(13) || ' $this->body .= ''<p>La demande n°'' . $this->aObjects["oOrder"]->aFields[''order_id''] . '' pour le traitement <strong>'' . $this->aObjects["oOrder"]->getWorkspace()->aFields[''name''] . ''</strong> n\''a pu être exécutée correctement suite à une erreur.<br/> Veuillez contactez votre administrateur.<br/>'';' || chr(13) || ' $this->aAttachments[0] = $this->aObjects["oOrder"]->aFields[''log_file''];' || chr(13) || '}', use_advanced='1', rt_emailcontext_id='gtf', attachment=NULL WHERE "name"='public'; + UPDATE s_gtf.email_template SET subject=NULL, body=NULL, "to"=NULL, cc=NULL, cci=NULL, code='require_once("gtf_lib/gtf_object/User.class.inc");' || chr(13) || 'require_once("vmlib/logUtil.inc");' || chr(13) || '$iBoId = $this->aObjects["oBusinessObject"]->aValues[''bo_id''];' || chr(13) || '' || chr(13) || '//$this->to = ''sig.paysdaix@ampmetropole.fr'';' || chr(13) || '$this->to = ''sofian.pujo@veremes.com'';' || chr(13) || '$this->cc = '''';' || chr(13) || '$this->cci = '''';' || chr(13) || '$this->subject = ''[GTF] - Demande N° ''.$this->aObjects[''oBusinessObject'']->aValues[''bo_id''].'' - Dépôt de l\''Acte d\''Engagement à valider'';' || chr(13) || '$this->body = ''<p>Bonjour,</p>' || chr(13) || ' <p> </p>' || chr(13) || ' <p>L\''acte d\''engagement correspondant à la demande n°''.$this->aObjects[''oBusinessObject'']->aValues[''bo_id''].'' en date du ''.date(''d/m/Y'',strtotime($this->aObjects[''oBusinessObject'']->aValues[''creation_date''])).'' a été déposé sur le serveur par le demandeur.</p>' || chr(13) || ' <p></p>' || chr(13) || ' <p>Cordialement,</p>' || chr(13) || ' <p> </p>' || chr(13) || ' <p>L\''application d\''extraction de données de GTF</p>'';' || chr(13) || 'error_log($this->body);' || chr(13) || '$this->aAttachments[0] = '''';' || chr(13) || '', use_advanced='1', rt_emailcontext_id='gtf', attachment=NULL WHERE "name"='Email contrôleur AE soumis'; + UPDATE s_gtf.email_template SET subject=NULL, body=NULL, "to"=NULL, cc=NULL, cci=NULL, code='require_once("gtf_lib/gtf_object/User.class.inc");' || chr(13) || 'require_once("vmlib/logUtil.inc");' || chr(13) || '$iBoId = $this->aObjects["oBusinessObject"]->aValues[''bo_id''];' || chr(13) || '$sUserLogin = $this->aObjects["oBusinessObject"]->aValues[''requestor''];' || chr(13) || '$sSql = ''SELECT user_id FROM s_vitis.user WHERE login=\''''.$this->aObjects[''oBusinessObject'']->aValues[''requestor''].''\'''';' || chr(13) || '//writeToErrorLog($sSql);' || chr(13) || '$oResult = $oBd->execute($sSql);' || chr(13) || '/*if(!$oBd->erreurRencontree) {' || chr(13) || ' if ($oBd->nombreLigne ($oResult) > 0) {' || chr(13) || ' $this->aObjects[''oUser''] = new User($oBd, $oBd->objetSuivant($oResult)->user_id, $this->aObjects["oBusinessObject"]->aProperties);' || chr(13) || ' }' || chr(13) || '}*/' || chr(13) || '//$this->to = ''sig.paysdaix@ampmetropole.fr'';' || chr(13) || 'error_log(print_r($this->aObjects[''oBusinessObject''], true));' || chr(13) || '//$this->to = $this->aObjects[''oBusinessObject'']->aValues[''email''];' || chr(13) || '$this->cc = '''';' || chr(13) || '$this->cci = '''';' || chr(13) || '$this->subject = ''[PAYS D\''AIX - SIGAM] Demande N° ''.$this->aObjects[''oBusinessObject'']->aValues[''bo_id''].'' - Rejet de votre demande d\''extraction de données'';' || chr(13) || '$this->body = ''<p>Bonjour,</p>' || chr(13) || ' <p>Suite à votre demande n°''.$this->aObjects[''oBusinessObject'']->aValues[''bo_id''].'' en date du ''.date(''d/m/Y'',strtotime($this->aObjects[''oBusinessObject'']->aValues[''creation_date''])).'' pour l\''extraction des données, votre demande a été rejetée pour la ou les raisons suivantes :<br/>'';' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''signed''] == "false"){' || chr(13) || ' $this->body .= '' - L\''acte d\''engagement n\''est pas signé<br/>'';' || chr(13) || '}' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''accepted_by_cpa''] == "false"){' || chr(13) || ' $this->body .= '' - La CPA ne valide pas l\''usage décrit pour les données du cadastre<br/>'';' || chr(13) || '}' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''identification_complete''] == "false"){' || chr(13) || ' $this->body .= '' - Le cadre d\''identification du dépositaire est incomplet</p>'';' || chr(13) || '}' || chr(13) || 'if($this->aObjects[''oBusinessObject'']->aValues[''definition_complete''] == "false"){' || chr(13) || ' $this->body .= '' - La définition des traitements pour l\''usage du cadastre est non renseignée<br/>'';' || chr(13) || '}' || chr(13) || '$this->body .= $this->aObjects[''oBusinessObject'']->aValues[''comment''].''<br/>'';' || chr(13) || '$this->body .=''<p>Cordialement,</p>' || chr(13) || '<p>Le service d\''Information Géographique et Applicatifs Métiers (SIGAM)<br/>' || chr(13) || 'Territoire du Pays d\''Aix<br/>' || chr(13) || 'Tel : 04 42 93 83 50<br/>' || chr(13) || 'Mail : <a href="mailto:sig.paysdaix@ampmetropole.fr">sig.paysdaix@ampmetropole.fr</a> </p>'';' || chr(13) || '$this->aAttachments[0] = '''';' || chr(13) || '', use_advanced='1', rt_emailcontext_id='gtf', attachment=NULL WHERE "name"='Email demandeur Extraction refusée'; + UPDATE s_gtf.email_template SET subject=NULL, body=NULL, "to"=NULL, cc=NULL, cci=NULL, code='require_once("gtf_lib/gtf_object/Order.class.inc");' || chr(13) || 'require_once("gtf_lib/gtf_object/User.class.inc");' || chr(13) || '$iBoId = $this->aObjects["oMessage"]->getBody(''bo_id'');' || chr(13) || '$sRequest = "SELECT * from s_extraction.extraction where bo_id = ".$iBoId;' || chr(13) || '$oPDOresult = $this->oBd->executeWithParams($sRequest, array());' || chr(13) || '$aBo = $this->oBd->ligneSuivante ($oPDOresult);' || chr(13) || '$iOrderId = $this->aObjects["oMessage"]->getBody(''order_id'');' || chr(13) || '$this->aObjects["oOrder"]= new OrderLib($oBd, $iOrderId, $this->aObjects["oMessage"]->aProperties, "v_order");' || chr(13) || '$sUserLogin = $aBo[''requestor''];' || chr(13) || '$sSql = ''SELECT user_id FROM s_framework.user WHERE login=\''''.$this->aObjects[''oBusinessObject'']->aValues[''requestor''].''\'''';' || chr(13) || '$oResult = $oBd->execute($sSql);' || chr(13) || 'if(!$oBd->erreurRencontree) {' || chr(13) || ' if ($oBd->nombreLigne ($oResult) > 0) {' || chr(13) || ' $this->aObjects[''oUser''] = new User($oBd, $oBd->objetSuivant($oResult)->user_id, $this->aObjects["oMessage"]->aProperties);' || chr(13) || ' }' || chr(13) || '}' || chr(13) || '$this->to = $aBo[''email''];' || chr(13) || '$this->cc = $this->aObjects["oOrder"]->aFields[''email_notifications''];' || chr(13) || '$this->cci = '''';' || chr(13) || '$this->subject = ''[PAYS D\''AIX - SIGAM] Demande N° ''.$aBo[''bo_id''].'' - Données SIG extraites'';' || chr(13) || '$this->body = ''<p>Bonjour</p>' || chr(13) || '<p></p><p>Les données correspondant à votre demande n°''.$aBo[''bo_id''].'' en date du ''.date(''d/m/Y'',strtotime($aBo[''creation_date''])).'' sont disponibles '';' || chr(13) || ' if (filesize($this->aObjects["oOrder"]->aFields[''result_file''])> 5242880){' || chr(13) || ' $this->body .= ''sur le lien de téléchargement suivant :<br/><a href="https://sigdata.agglo-paysdaix.fr/public/gtf/''.$this->aObjects["oOrder"]->aFields[''result_url''] . ''">Télécharger le résultat</a></p>'';' || chr(13) || ' } else {' || chr(13) || ' $this->body .= ''en pièce jointe.</p>'';' || chr(13) || ' $this->aAttachments[0] = $this->aObjects["oOrder"]->aFields[''result_file''];' || chr(13) || ' }' || chr(13) || '$this->body .=''<p>Vous en souhaitant bonne réception,</p>' || chr(13) || '<p>Cordialement,</p>' || chr(13) || '<p>Le service d\''Information Géographique et Applicatifs Métiers (SIGAM)<br/>' || chr(13) || 'Terriroire du Pays d\''Aix<br/>' || chr(13) || 'Tel : 04 42 93 83 50<br/>' || chr(13) || 'Mail : <a href="mailto:sig.paysdaix@ampmetropole.fr">sig.paysdaix@ampmetropole.fr</a> </p>' || chr(13) || '' || chr(13) || ''';' || chr(13) || '// les résultats de moins de 5 Mo sont envoyés en pièce jointe' || chr(13) || ' ' || chr(13) || '', use_advanced='1', rt_emailcontext_id='gtf', attachment=NULL WHERE "name"='Email demandeur données extraites'; + DELETE FROM s_gtf.messageclass_action WHERE messageclass LIKE 'extraction_%'; + INSERT INTO s_gtf.messageclass_action (messageclass_action_id, messageclass, actionclass, index, parameters) VALUES ((SELECT nextval('s_gtf.seq_common'::regclass)),'AE Généré','BoAction',0,'bo_id_attribute=''bo_id''|method=''trGenerer''|class=''Extractions''|module=''extraction'''); + INSERT INTO s_gtf.messageclass_action (messageclass_action_id, messageclass, actionclass, index, parameters) VALUES ((SELECT nextval('s_gtf.seq_common'::regclass)),'AE Généré','EmailAction',1,'template_id = ' || (SELECT email_template_id FROM s_gtf.email_template WHERE name = 'Email demandeur AE généré')); + INSERT INTO s_gtf.messageclass_action (messageclass_action_id, messageclass, actionclass, index, parameters) VALUES ((SELECT nextval('s_gtf.seq_common'::regclass)),'Extraction Aix','EmailAction',1,'template_id = ' || (SELECT email_template_id FROM s_gtf.email_template WHERE name = 'Email controleur données extraites')); + INSERT INTO s_gtf.messageclass_action (messageclass_action_id, messageclass, actionclass, index, parameters) VALUES ((SELECT nextval('s_gtf.seq_common'::regclass)),'Extraction Aix','EmailAction',2,'template_id = ' || (SELECT email_template_id FROM s_gtf.email_template WHERE name = 'Email demandeur données extraites')); + INSERT INTO s_gtf.messageclass_action (messageclass_action_id, messageclass, actionclass, index, parameters) VALUES ((SELECT nextval('s_gtf.seq_common'::regclass)),'Extraction Aix','BoAction',0,'bo_id_attribute=''bo_id''|method=''trTerminerExtraction''|class=''Extractions''|module=''extraction'''); + --Partie s_vitis généré par WAB le 22/05/2018 à 09:09:31 + DELETE FROM s_vitis.vm_section WHERE label_id ~ '^extraction_([0-9]+)$'; + DELETE FROM s_vitis.vm_table_field WHERE label_id ~ '^extraction_([0-9]+)$'; + DELETE FROM s_vitis.vm_table_button WHERE label_id ~ '^extraction_([0-9]+)$'; + DELETE FROM s_vitis.vm_module WHERE module_id='extraction'; + DELETE FROM s_vitis.vm_string WHERE string_id ~ '^extraction_([0-9]+)$'; + INSERT INTO s_vitis.vm_module (module_id, description, version, label) VALUES ('extraction','Module Extraction CG34',0.1,'Module Extraction'); + INSERT INTO s_vitis.group (group_id, name) SELECT (SELECT nextval('s_vitis.seq_common'::regclass)), 'demandeur' WHERE NOT EXISTS (SELECT group_id FROM s_vitis.group WHERE name='demandeur'); + INSERT INTO s_vitis.group (group_id, name) SELECT (SELECT nextval('s_vitis.seq_common'::regclass)), 'controleur' WHERE NOT EXISTS (SELECT group_id FROM s_vitis.group WHERE name='controleur'); + INSERT INTO s_vitis.privileges (rolname, description) SELECT 'extraction_admin', 'administrateur extraction' WHERE NOT EXISTS (SELECT rolname FROM s_vitis.privileges WHERE rolname='extraction_admin'); + INSERT INTO s_vitis.privileges (rolname, description) SELECT 'extraction_user', 'utilisateur extraction' WHERE NOT EXISTS (SELECT rolname FROM s_vitis.privileges WHERE rolname='extraction_user'); + SELECT s_vitis.create_role_if_not_exists('extraction_admin', 'NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION'); + SELECT s_vitis.create_role_if_not_exists('extraction_user', 'NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_1'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field bo_id', 'extraction_4'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field status', 'extraction_6'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('objet extraction_extraction', 'extraction_0'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field progress_level', 'extraction_7'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_2'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field company', 'extraction_8'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_3'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field requestor', 'extraction_5'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field layers', 'extraction_9'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('objet extraction_coordsys', 'extraction_10'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_11'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_12'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_13'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('objet extraction_format', 'extraction_14'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_15'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_16'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_17'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('objet extraction_layer', 'extraction_18'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_19'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_20'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_21'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field coordsys_id', 'extraction_22'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field coordsys', 'extraction_23'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field format_id', 'extraction_24'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field format', 'extraction_25'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field use_for_raster', 'extraction_26'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field use_for_vector', 'extraction_27'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field layer_id', 'extraction_28'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field layer', 'extraction_29'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field category', 'extraction_30'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field restriction', 'extraction_31'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field unused_attributes', 'extraction_32'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_33'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_34'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_35'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_36'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_37'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_38'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_39'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_40'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_41'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_42'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_43'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_44'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field bo_id', 'extraction_45'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field status', 'extraction_46'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field requestor', 'extraction_47'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field company', 'extraction_48'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field layers', 'extraction_49'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field coordsys_id', 'extraction_50'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field coordsys', 'extraction_51'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field format_id', 'extraction_52'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field format', 'extraction_53'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field use_for_raster', 'extraction_54'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field use_for_vector', 'extraction_55'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field layer_id', 'extraction_56'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field layer', 'extraction_57'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field category', 'extraction_58'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field restriction', 'extraction_59'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field unused_attributes', 'extraction_60'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('section extractionConfig', 'extraction_61'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_1','fr','Informations générales'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_1','en','General'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_4','fr','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_4','en','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_6','en','Status'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_6','fr','Etat'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_0','en','Extraction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_0','fr','Extraction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_7','en','Progress level'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_7','fr','Avancement'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_2','en','Supprimer les plans'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_2','fr','Supprimer les plans'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_8','en','Company'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_8','fr','Organisme'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_3','en','Ajouter une extraction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_3','fr','Ajouter une extraction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_5','fr','Demandeur'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_5','en','Demandeur'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_9','en','Layers'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_9','fr','Couches'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_10','fr','Systèmes de coordonnées'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_10','en','Coordinate systems'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_11','fr','Informations générales'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_11','en','General'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_12','fr','Supprimer les systèmes de coordonnées'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_12','en','Delete coordinate systems'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_13','fr','Ajouter un système de coordonnées'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_13','en','Add coordinate systems'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_14','fr','Formats'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_14','en','Formats'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_15','fr','Informations générales'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_15','en','General'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_16','fr','Supprimer les formats'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_16','en','Delete formats'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_17','fr','Ajouter un format'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_17','en','Add format'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_18','fr','Couches'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_18','en','Layers'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_19','fr','Informations générales'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_19','en','General'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_20','fr','Supprimer les couches'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_20','en','Delete layers'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_21','fr','Ajouter une couche'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_21','en','Add layer'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_22','fr','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_22','en','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_23','fr','Nom'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_23','en','Name'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_24','en','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_24','fr','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_25','fr','Nom'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_25','en','Name'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_26','fr','Raster'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_26','en','Raster'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_27','fr','Vecteur'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_27','en','Vector'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_28','fr','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_28','en','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_29','fr','Nom'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_29','en','Name'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_30','fr','Catégorie'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_30','en','Category'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_31','fr','Restriction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_31','en','Restriction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_32','fr','Attributs inutilisés'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_32','en','Unused attributes'); + INSERT INTO s_vitis.vm_mode (mode_id, module_id) VALUES ('extraction','extraction'); + INSERT INTO s_vitis.vm_mode (mode_id, module_id) VALUES ('extraction_ref','extraction'); + INSERT INTO s_vitis.vm_mode_rolname (index,mode_id, rolname) VALUES (0,'extraction','extraction_user'); + INSERT INTO s_vitis.vm_mode_rolname (index,mode_id, rolname) VALUES (1,'extraction_ref','extraction_admin'); + INSERT INTO s_vitis.vm_tab (tab_id, event, index, mode_id, label_id, ressource_id, edit_column, show_column, sorted_by, sorted_dir, name) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)),'loadList()', 1, 'extraction_ref', 'extraction_14', 'extraction/formats', 'editSectionForm', 'showSectionForm', 'format_id', 'ASC', 'extraction_format'); + INSERT INTO s_vitis.vm_tab (tab_id, event, index, mode_id, label_id, ressource_id, edit_column, show_column, sorted_by, sorted_dir, name) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)),'loadList()', 0, 'extraction_ref', 'extraction_10', 'extraction/coordsyss', 'editSectionForm', 'showSectionForm', 'coordsys_id', 'ASC', 'extraction_coordsys'); + INSERT INTO s_vitis.vm_tab (tab_id, event, index, mode_id, label_id, ressource_id, edit_column, show_column, sorted_by, sorted_dir, name) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)),'loadList()', 2, 'extraction_ref', 'extraction_18', 'extraction/layers', 'editSectionForm', 'showSectionForm', 'layer_id', 'ASC', 'extraction_layer'); + INSERT INTO s_vitis.vm_tab (tab_id, event, index, mode_id, label_id, ressource_id, edit_column, show_column, sorted_by, sorted_dir, name) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)),'loadList()', 0, 'extraction', 'extraction_0', 'extraction/extractions', 'editSectionForm', 'showSectionForm', 'bo_id', 'ASC', 'extraction_extraction'); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('add_smallFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'AddSectionForm', 'extraction_21', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('deleteFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'DeleteSelection', 'extraction_2', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('add_smallFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'AddSectionForm', 'extraction_3', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('deleteFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'DeleteSelection', 'extraction_12', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('add_smallFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'AddSectionForm', 'extraction_13', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('deleteFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'DeleteSelection', 'extraction_16', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('add_smallFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'AddSectionForm', 'extraction_17', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('deleteFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'DeleteSelection', 'extraction_20', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'bo_id', '1', '1', 0, 50, 'left', 'extraction_4', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'status', '1', '1', 2, 150, 'left', 'extraction_6', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'progress_level', '1', '1', 4, 150, 'center', 'extraction_7', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), '<div data-app-navbar data-mode="info" data-hidevalue data-striped data-active></div>',(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'company', '1', '1', 3, 200, 'left', 'extraction_8', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'requestor', '1', '1', 1, 200, 'left', 'extraction_5', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'layers', '1', '1', 5, 60, 'left', 'extraction_9', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), '<div data-app-extraction-layers-column="{{row.entity[col.field]}}"></div>',(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'coordsys_id', '1', '1', 0, 200, 'left', 'extraction_22', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'coordsys', '1', '1', 1, 200, 'left', 'extraction_23', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'format_id', '1', '1', 0, 100, 'left', 'extraction_24', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'format', '1', '1', 1, 200, 'left', 'extraction_25', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'use_for_raster', '1', '1', 2, 100, 'left', 'extraction_26', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), '<div data-app-set-boolean-icon-column="{{row.entity[col.field]}}"></div>',(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'use_for_vector', '1', '1', 3, 100, 'left', 'extraction_27', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), '<div data-app-set-boolean-icon-column="{{row.entity[col.field]}}"></div>',(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'layer_id', '1', '1', 0, 150, 'left', 'extraction_28', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'layer', '1', '1', 1, 150, 'left', 'extraction_29', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'category', '1', '1', 2, 150, 'left', 'extraction_30', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'restriction', '1', '1', 3, 100, 'left', 'extraction_31', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'unused_attributes', '1', '1', 4, 110, 'left', 'extraction_32', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), '<div data-app-extraction-ref-unused-attributes-column="{{row.entity[col.field]}}"></div>',(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_section (label_id, name, index, event, tab_id, template, ressource_id, module) VALUES ('extraction_15', 'general', 1, 'Javascript:loadSectionForm', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), 'workspaceListTpl.html', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), 'extraction'); + INSERT INTO s_vitis.vm_section (label_id, name, index, event, tab_id, template, ressource_id, module) VALUES ('extraction_11', 'general', 1, 'Javascript:loadSectionForm', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), 'workspaceListTpl.html', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), 'extraction'); + INSERT INTO s_vitis.vm_section (label_id, name, index, event, tab_id, template, ressource_id, module) VALUES ('extraction_19', 'general', 1, 'Javascript:loadSectionForm', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), 'workspaceListTpl.html', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), 'extraction'); + INSERT INTO s_vitis.vm_section (label_id, name, index, event, tab_id, template, ressource_id, module) VALUES ('extraction_1', 'general', 1, 'Javascript:loadSectionForm', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), 'workspaceListTpl.html', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), 'extraction'); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','START', 0); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Nouveau', 10); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','AE Généré', 30); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','AE Soumis', 40); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','AE Demandé', 20); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Dépôt terminé', 100); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Fichier déposé', 90); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Autorisée', 60); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Fichier accepté', 100); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Fichier invalidé', 80); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Extraction terminée', 80); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Refusée', 100); + TRUNCATE s_extraction.rt_extraction_status_group; + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='START'), (SELECT group_id FROM s_vitis."group" WHERE "name"='demandeur'), 1); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='Nouveau'), (SELECT group_id FROM s_vitis."group" WHERE "name"='demandeur'), 2); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='AE Demandé'), (SELECT group_id FROM s_vitis."group" WHERE "name"='demandeur'), 3); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='AE Généré'), (SELECT group_id FROM s_vitis."group" WHERE "name"='demandeur'), 4); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='AE Soumis'), (SELECT group_id FROM s_vitis."group" WHERE "name"='controleur'), 5); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='AE Soumis'), (SELECT group_id FROM s_vitis."group" WHERE "name"='demandeur'), 6); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='Autorisée'), (SELECT group_id FROM s_vitis."group" WHERE "name"='demandeur'), 7); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='Autorisée'), (SELECT group_id FROM s_vitis."group" WHERE "name"='controleur'), 8); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='Refusée'), (SELECT group_id FROM s_vitis."group" WHERE "name"='controleur'), 9); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='Refusée'), (SELECT group_id FROM s_vitis."group" WHERE "name"='demandeur'), 10); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='Extraction terminée'), (SELECT group_id FROM s_vitis."group" WHERE "name"='controleur'), 11); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='Fichier déposé'), (SELECT group_id FROM s_vitis."group" WHERE "name"='demandeur'), 12); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='Fichier invalidé'), (SELECT group_id FROM s_vitis."group" WHERE "name"='demandeur'), 13); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='Fichier accepté'), (SELECT group_id FROM s_vitis."group" WHERE "name"='demandeur'), 14); + INSERT INTO s_extraction.rt_extraction_status_group (status_id, group_id, link_id) VALUES ((SELECT status_id FROM s_extraction.rt_extraction_status WHERE "name"='Dépôt terminé'), (SELECT group_id FROM s_vitis."group" WHERE "name"='controleur'), 15); + + ]]> + </code> + </query> + </queriesCollection> +</sqlQueries> \ No newline at end of file diff --git a/src/module_extraction/web_service/ws/Coordsys.class.inc b/src/module_extraction/web_service/ws/Coordsys.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..5b03fbd7320755ee7bf0e441f72ad3eefaac9f60 --- /dev/null +++ b/src/module_extraction/web_service/ws/Coordsys.class.inc @@ -0,0 +1,90 @@ +<?php + +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc'; + +/** + * \file Coordsys.class.inc + * \class Coordsys + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Coordsys php class + * + * This class defines operation for one Coordsys + * + */ +class Coordsys extends ExtractionExtraction { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/coordsyss/{id_coordsys}", + * tags={"Coordsyss"}, + * summary="Get Coordsys", + * description="Request to get Coordsys by id", + * operationId="GET", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="id_coordsys", + * in="path", + * description="id_coordsys", + * required=true, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="Coordsys Response", + * @SWG\Schema(ref="#/definitions/coordsyss") + * ) + * ) + */ + + /** + * get informations about mode + */ + function GET() { + $this->aFields = $this->getFields($this->aProperties['schema_extraction'], "rt_coordsys", "coordsys_id"); + } + + /** + * delete a Point_situation + */ + function DELETE() { + $this->oConnection->oBd->delete($this->aProperties['schema_extraction'], 'rt_coordsys', 'coordsys_id', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new Error(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["coordsys_id"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> diff --git a/src/module_extraction/web_service/ws/Coordsyss.class.inc b/src/module_extraction/web_service/ws/Coordsyss.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..848539189da12b83dba01a72cc9a167fa84a5ec5 --- /dev/null +++ b/src/module_extraction/web_service/ws/Coordsyss.class.inc @@ -0,0 +1,266 @@ +<?php + +/** + * \file Coordsyss.class.inc + * \class Coordsyss + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Coordsyss php class + * + * This class defines Rest Api to Vitis Coordsyss + * + */ +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once 'Coordsys.class.inc'; + + +class Coordsyss extends ExtractionExtraction { + /** + * @SWG\Definition( + * definition="/coordsyss", + * allOf={ + * @SWG\Schema(ref="#/definitions/coordsyss") + * } + * ) + * * @SWG\Tag( + * name="Coordsyss", + * description="Operations about Coordsyss" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/coordsyss", + * tags={"Coordsyss"}, + * summary="Get Coordsyss", + * description="Request to get Coordsyss", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="coordsys Response", + * @SWG\Schema(ref="#/definitions/coordsyss") + * ) + * ) + */ + + /** + * get Coordsyss + * @return Coordsyss + */ + function GET() { + $aReturn = $this->genericGet($this->aProperties['schema_extraction'], "rt_coordsys", "coordsys_id"); + $sMessage = $aReturn['sMessage']; + return $sMessage; + } + + /** + * @SWG\Post(path="/coordsyss", + * tags={"Coordsyss"}, + * summary="Add coordsys", + * description="Request to add Coordsyss", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="coordsys Response", + * @SWG\Schema(ref="#/definitions/coordsyss") + * ) + * ) + */ + + /** + * insert coordsys + * @return id of the coordsys created + */ + function POST() { + $aReturn = $this->genericPost($this->aProperties['schema_extraction'], 'rt_coordsys', '', 'coordsys_id'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/coordsyss/{id_coordsys}", + * tags={"Coordsyss"}, + * summary="update Coordsyss", + * description="Request to update Coordsyss", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Coordsys token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_coordsys", + * in="path", + * description="id of the Coordsyss", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/coordsyss") + * ) + * ) + */ + + /** + * update coordsyss + * @return id of coordsyss updated or error object if a coordsyss is not updated + */ + function PUT() { + $aReturn = $this->genericPut($this->aProperties['schema_extraction'], 'rt_coordsys', 'coordsys_id'); + + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/coordsyss", + * tags={"Coordsyss"}, + * summary="delete Coordsyss", + * description="Request to delete Coordsyss", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the coordsys", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="coordsys Response", + * @SWG\Schema(ref="#/definitions/coordsyss") + * ) + * ) + */ + /** + * @SWG\Delete(path="/coordsyss/{id_coordsys}", + * tags={"Coordsyss"}, + * summary="delete Coordsyss", + * description="Request to delete Coordsyss", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Coordsys token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_coordsys", + * in="path", + * description="id of the Coordsyss", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/coordsyss") + * ) + * ) + */ + + /** + * delete coordsyss + * @return id of coordsyss deleted or error object if a coordsyss is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete($this->aProperties['schema_extraction'], 'rt_coordsys', 'coordsys_id'); + return $aReturn['sMessage']; + } + + +} + +?> diff --git a/src/module_extraction/web_service/ws/Extraction.class.inc b/src/module_extraction/web_service/ws/Extraction.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..a4eef6a4400d4809b3d9ea7c89e2e4558c3b628c --- /dev/null +++ b/src/module_extraction/web_service/ws/Extraction.class.inc @@ -0,0 +1,144 @@ +<?php + +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc'; + +/** + * \file Extraction.class.inc + * \class Extraction + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Extraction php class + * + * This class defines operation for one Extraction + * + */ +class Extraction extends ExtractionExtraction { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + public function __construct($aPath, $aValues, $properties, $bShortcut = false, $oConnection = false) + { + parent::__construct($aPath, $aValues, $properties, $bShortcut, $oConnection); + } + +/** + * @SWG\Get(path="/extractions/{id_extraction}", + * tags={"Extractions"}, + * summary="Get Extraction", + * description="Request to get Extraction by id", + * operationId="GET", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="id_extraction", + * in="path", + * description="id_extraction", + * required=true, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="Extraction Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + + /** + * get informations about mode + */ + public function GET() + { + require $this->sRessourcesFile; + $this->aFields = $this->getFields($this->aProperties['schema_extraction'], "extraction", "bo_id"); + // Url vers l'acte d'engagement. + if (!empty($this->aFields['ae'])) { + $this->aFields['ae'] = $this->aProperties['web_server_name'] . '/' . $this->aProperties['ws_data_alias'] . '/extraction/extraction_extraction_extraction/documents/' . $this->aValues["my_vitis_id"] . '/ae/' . $this->aFields['ae']; + } + + // Date au format Français. + if ($this->aProperties["language"] == 'fr') { + $oDate = new DateTime($this->aFields['creation_date']); + $this->aFields['creation_date'] = $oDate->format('d/m/Y'); + } + + // Libellés du champ "Commune". + if (!empty($this->aFields['id_com'])) { + //On donne les paramètres à remplacer dans la requête + $aSQLParams = array( + 'id_com' => array('value' => $this->aFields['id_com'], 'type' => 'group'), + ); + + $sSql = $aSql['getCommuneLabel']; + + $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, $aSQLParams); + if (!$this->oConnection->oBd->enErreur()) { + while ($aLine = $this->oConnection->oBd->ligneSuivante($oPDOresult)) { + $aCommune[] = $aLine['nom_com']; + } + $this->aFields['id_com_label'] = implode(',', $aCommune); + } + } + + // Libellés du champ "Conseil de Territoire". + if (!empty($this->aFields['id_conseil'])) { + + $aSQLParams = array( + 'id_conseil' => array('value' => $this->aFields['id_conseil'], 'type' => 'group'), + ); + //$sSql = str_replace('[id_conseil]', str_replace('|', ',', $this->aFields['id_conseil']), $aSql['getConseilLabel']); + $aConseil = []; + $sSql = $aSql['getConseilLabel']; + $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, $aSQLParams); + if (!$this->oConnection->oBd->enErreur()) { + while ($aLine = $this->oConnection->oBd->ligneSuivante($oPDOresult)) { + $aConseil[] = $aLine['nom_epci']; + } + if (is_array($aConseil)) { + $this->aFields['id_conseil_label'] = implode(',', $aConseil); + } else { + $this->aFields['id_conseil_label'][0] = $aConseil; + } + } + } + + // Nom de l'état de l'extraction. + $this->aFields['status_name'] = $this->aFields['status']; + } + + /** + * delete a Point_situation + */ + function DELETE() { + $this->oConnection->oBd->delete($this->aProperties['schema_extraction'], 'extraction', 'bo_id', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new Error(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["bo_id"] = $this->aValues["my_vitis_id"]; + } + } + +} diff --git a/src/module_extraction/web_service/ws/ExtractionExtraction.class.inc b/src/module_extraction/web_service/ws/ExtractionExtraction.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..a78555e5858c536431ffc68a6faf2e67ac9ff6ac --- /dev/null +++ b/src/module_extraction/web_service/ws/ExtractionExtraction.class.inc @@ -0,0 +1,48 @@ +<?php + +require_once dirname($_SERVER['SCRIPT_FILENAME']) . "/class/vitis_lib/DbClass.class.inc"; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/ws/vitis/Vitis.class.inc'; +require_once 'vmlib/logUtil.inc'; + +class ExtractionExtraction extends Vitis { + + //Chemin du fichier de ressources contenant les requêtes SQL + var $sRessourcesFile = 'ws/extraction/ExtractionExtraction.class.sql.inc'; + + function __construct($aPath, $aValues, $properties, $bShortcut) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * Upload un document dans le ws_data du module Extraction. + * @param type $sIndex + * @param type $sFolder + */ + public function uploadDocument($sIndex, $sFolder) + { + // Crée le répertoire si inexistant. + $sDirPath = $this->aProperties['ws_data_dir'] . '/extraction/' . $sFolder . '/documents/' . $this->aValues["my_vitis_id"] . '/' . $sIndex . '/'; + if (!is_dir($sDirPath)) { + mkdir($sDirPath, 0777, true); + } + + // Ecrit le fichier. + if (!empty($_FILES[$sIndex])) { + $sErrorMessage = uploadFile($sIndex, "", $sDirPath . $_FILES[$sIndex]["name"], $_FILES[$sIndex]['size'] + 1); + if ($sErrorMessage != "") { + writeToErrorLog($sErrorMessage); + } + + } else { + $sfileContentIndex = $sIndex . '_file'; + $sfileNameIndex = $sIndex . '_name'; + if (!empty($this->aValues[$sfileContentIndex])) { + + $this->aValues[$sIndex] = $this->aValues[$sfileNameIndex]; + $fp = fopen($sDirPath . $this->aValues[$sfileNameIndex], "w"); + fwrite($fp, $this->aValues[$sfileContentIndex]); + fclose($fp); + } + } + } +} diff --git a/src/module_extraction/web_service/ws/ExtractionExtraction.class.sql.inc b/src/module_extraction/web_service/ws/ExtractionExtraction.class.sql.inc new file mode 100755 index 0000000000000000000000000000000000000000..6edd56aa67d8308105e2ba9079059d21a9b939c2 --- /dev/null +++ b/src/module_extraction/web_service/ws/ExtractionExtraction.class.sql.inc @@ -0,0 +1,19 @@ +<?php +//Définition des requêtes de l'api Vitis +$aSql['checkIP'] = "SELECT user_id, ip_constraint FROM [sSchemaFramework].user WHERE login ='[sLogin]'"; +$aSql['getGroups'] = "SELECT group_id FROM [sSchemaFramework].user_group WHERE user_id = [user_id]"; +$aSql['loginUnique'] = 'SELECT UPPER("login") FROM [sSchemaFramework]."user" WHERE UPPER("login")=UPPER(\'sLoginUser\')'; +$aSql['getLoginbyId'] = 'SELECT "login" FROM [sSchemaFramework]."user" WHERE user_id=[user_id]'; +$aSql['getTableColumn'] = 'SELECT column_name FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = \'[sSchemaFramework]\' and table_name= \'[sTable]\''; +$aSql['getUserPrivileges'] = 'SELECT groname FROM pg_user s LEFT OUTER JOIN pg_group g on (s.usesysid = any(g.grolist) )inner join [sSchemaFramework].user on "user".login = usename WHERE user_id = [user_id]'; +$aSql['listDomain'] = 'SELECT distinct domain, alias FROM [sSchemaFramework].domain WHERE "type" = \'AD\''; +$aSql['createRolname'] = 'CREATE ROLE "vitis_[sDomain]" NOSUPERUSER INHERIT NOCREATEDB CREATEROLE;'; +$aSql['getInfoRolname'] = 'SELECT * FROM pg_authid WHERE rolname = \'vitis_[sDomain]\''; +// Extraction +$aSql['getCommuneLabel'] = 'SELECT nom_com FROM public.ref_cpa_limadm_commune WHERE id_com IN([id_com])'; +$aSql['getConseilLabel'] = 'SELECT nom_epci FROM public.ref_amp_lim_ct WHERE objectid IN([id_conseil])'; +$aSql['getRtLayer'] = 'SELECT layer_id, layer, category FROM [schema_extraction].rt_layer [sql_params] ORDER BY category, layer'; +$aSql['getUserGroups'] = 'SELECT name FROM [schema_framework]."group",[schema_framework].user_group WHERE "group".group_id = user_group.group_id AND user_group.user_id = [user_id]'; + +$aSql['getFormat'] = 'SELECT id_format FROM q_control."format" WHERE "format".extensions like [extension]'; +?> diff --git a/src/module_extraction/web_service/ws/Extraction_depots.class.inc b/src/module_extraction/web_service/ws/Extraction_depots.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..e424f2ce3af2e2606528fd45d84c2666d00bd2c0 --- /dev/null +++ b/src/module_extraction/web_service/ws/Extraction_depots.class.inc @@ -0,0 +1,440 @@ +<?php + +/** + * \file Extraction_depots.class.inc + * \class Extraction_depots + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Extraction_depots php class + * + * This class defines Rest Api to Vitis Extraction_depots + * + */ +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once 'Extraction_depot.class.inc'; +require_once __DIR__ . '/../../class/wab_lib/BusinessObject.class.inc'; +require_once __DIR__ . '/Extractions.class.inc'; + +class Extraction_depots extends ExtractionExtraction +{ + /** + * @SWG\Definition( + * definition="/extraction_depots", + * allOf={ + * @SWG\Schema(ref="#/definitions/extraction_depots") + * } + * ) + * * @SWG\Tag( + * name="Extraction_depots", + * description="Operations about Extraction_depots" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $bShortcut false to reinit variables + * @param type $oConnection connection object + */ + public function __construct($aPath, $aValues, $properties, $bShortcut = false, $oConnection = false) + { + parent::__construct($aPath, $aValues, $properties, $bShortcut, $oConnection); + } + + /** + * @SWG\Get(path="/extraction_depots", + * tags={"Extraction_depots"}, + * summary="Get Extraction_depots", + * description="Request to get Extraction_depots", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="extraction_depot Response", + * @SWG\Schema(ref="#/definitions/extraction_depots") + * ) + * ) + */ + + /** + * get Extraction_depots + * @return Extraction_depots + */ + public function GET() + { + if (!empty($this->aPath[2])) { + if ($this->aPath[2] == "Tree") { + $sDirPath = $this->aProperties['ws_data_dir'] . '/extraction/extraction_depot'; + //Création du dossier extraction_depot + if (!is_dir($sDirPath)) { + //Création du dossier du demandeur + if (!mkdir($sDirPath)) { + //Mettre une erreur dans le log d'erreur + } + } + $sDirPath = $this->aProperties['ws_data_dir'] . '/extraction/extraction_depot/' . $_SERVER["REMOTE_ADDR"]; + if (!is_dir($sDirPath)) { + if (!mkdir($sDirPath)) { + //Mettre une erreur dans le log d'erreur + } + } + $sDirPath = $this->aProperties['ws_data_dir'] . '/extraction/extraction_depot/' . $_SERVER["REMOTE_ADDR"] . "/Fichiers déposés"; + if (!is_dir($sDirPath)) { + if (!mkdir($sDirPath)) { + //Mettre une erreur dans le log d'erreur + } + } + $sDirPath = $this->aProperties['ws_data_dir'] . '/extraction/extraction_depot/' . $_SERVER["REMOTE_ADDR"] . "/Résultats"; + if (!is_dir($sDirPath)) { + if (!mkdir($sDirPath)) { + //Mettre une erreur dans le log d'erreur + } + } + $sDirPath = $this->aProperties['ws_data_dir'] . '/extraction/extraction_depot/' . $_SERVER["REMOTE_ADDR"]; + return json_encode($this->getFolderInfos($sDirPath)); + } elseif ($this->aPath[2] == "File") { + $this->getWorkspaceFile(); + } + } + } + + /** + * Get file. + */ + public function getWorkspaceFile() + { + $aReturn = array('status' => 1, 'message' => ''); + $sFilePath = $this->aProperties['ws_data_dir'] . '/extraction/extraction_depot/' . $_SERVER["REMOTE_ADDR"] . "/" . $this->aValues['file_name']; + // Le fichier existe ? + if (file_exists($sFilePath)) { + header("Content-Type: application/octet-stream"); + header("Content-Transfer-Encoding: Binary"); + header("Content-disposition: attachment; filename=\"" . $this->aValues['file_name'] . "\""); + header('Content-Length: ' . filesize($sFilePath)); + error_log(readfile($sFilePath)); + } + } + + /** + * + * @param string $sDirectoryPath + * @return array $aTree + */ + public function getFolderInfos($sDirectoryPath) + { + + if (is_dir($sDirectoryPath)) { + $aContentDir = scandir($sDirectoryPath); + $aTree = $this->getFileInfos($sDirectoryPath); + $aDir = array(); + for ($i = 0; $i < count($aContentDir); $i++) { + if ($aContentDir[$i] !== "." && $aContentDir[$i] !== "..") { + array_push($aDir, $this->getFolderInfos($sDirectoryPath . "/" . $aContentDir[$i])); + } + } + + $aTree["content"] = $aDir; + $aTree["status"] = 1; + return $aTree; + } else { + return $this->getFileInfos($sDirectoryPath); + } + } + + /** + * + * @param string $sFilePath + * @return array + */ + public function getFileInfos($sFilePath) + { + $iFileSize = filesize($sFilePath); + + $sFileSize = $iFileSize . "octets"; + if ($iFileSize > 1024) { + if ($iFileSize > 1024 * 1024) { + if ($iFileSize > 1024 * 1024 * 1024) { + $sFileSize = "-"; + } else { + $sFileSize = (ceil($iFileSize / (1024 * 1024))) . "Mo"; + } + } else { + $sFileSize = (ceil($iFileSize / 1024)) . "Ko"; + } + } + + $aFileName = explode(DIRECTORY_SEPARATOR, $sFilePath); + + return array("filename" => $aFileName[count($aFileName) - 1], "size" => $sFileSize, "lastModification" => date("d/m/Y H:i:s", filemtime($sFilePath))); + } + + /** + * @SWG\Delete(path="/[Class_name]s", + * tags={"[Class_name_upper]s"}, + * summary="delete [Class_name_upper]s", + * description="Request to delete [Class_name_upper]s", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the [Class_name]", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="[Class_name] Response", + * @SWG\Schema(ref="#/definitions/[Class_name]s") + * ) + * ) + */ + /** + * @SWG\Delete(path="/[Class_name]s/{id_[Class_name]}", + * tags={"[Class_name_upper]s"}, + * summary="delete [Class_name_upper]s", + * description="Request to delete [Class_name_upper]s", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="[Class_name_upper] token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_[Class_name]", + * in="path", + * description="id of the [Class_name_upper]s", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/[Class_name]s") + * ) + * ) + */ + + /** + * delete [Class_name]s + * @return id of [Class_name]s deleted or error object if a [Class_name]s is not deleted + */ + public function DELETES() + { + $sDirPath = $this->aProperties['ws_data_dir'] . '/extraction/extraction_depot/' . $_SERVER["REMOTE_ADDR"]; + //On supprime le fichier + $sMessage = unlink($sDirPath . "/" . $this->aValues['file_name']); + return $sMessage; + } + + /** + * @SWG\Put(path="/[Class_name]s/{id_[Class_name]}", + * tags={"[Class_name_upper]s"}, + * summary="update [Class_name_upper]s", + * description="Request to update [Class_name_upper]s", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="[Class_name_upper] token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_[Class_name]", + * in="path", + * description="id of the [Class_name_upper]s", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/[Class_name]s") + * ) + * ) + */ + + /** + * update [Class_name]s + * @return id of [Class_name]s updated or error object if a [Class_name]s is not updated + */ + public function PUT() + { + if (!empty($this->aValues["action"]) && $this->aValues["action"] == "Metadata") { + $aReturn = $this->reintegrateMetadata(); + + $aXmlRacineAttribute['status'] = $aReturn['status']; + $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], true, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); + } else { + $sDirName = $this->aProperties['ws_data_dir'] . '/extraction/extraction_depot/' . $_SERVER["REMOTE_ADDR"]; + $error_message = ""; + + // Si le dossier {id} n'existe pas (Important pour gérer les erreurs) + if (!is_dir($sDirName)) { + $error_message .= $sDirName . " does not exist"; + writeToErrorLog("WARNING: " . $error_message); + + $aXmlRacineAttribute['status'] = 0; + $this->aFields = array(); + $this->aFields['errorMessage'] = $error_message; + $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], true, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); + return $sMessage; + } + // Si le dossier {id}/Fichiers déposés n'existe pas (Important pour gérer les erreurs) + if (!is_dir($sDirName . "/Fichiers déposés")) { + $error_message .= $sDirName . "/Fichiers déposés does not exist"; + writeToErrorLog("WARNING: " . $error_message); + + $aXmlRacineAttribute['status'] = 0; + $this->aFields = array(); + $this->aFields['errorMessage'] = $error_message; + $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], true, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); + return $sMessage; + } + + // Si le dossier {id}/form n'existe pas il est crée + if (!is_dir($sDirName . "/Résultats")) { + writeToErrorLog("WARNING: " . $sDirName . "/Résultats"); + @mkdir($sDirName . "/Résultats"); + } + + if (!empty($this->aValues["control_file_file"])) { + $this->aValues["control_file"] = $this->aValues["control_file_name"]; + } + if (!empty($this->aValues["control_file_file"])) { + //if ($aReturn['sStatus'] == 1) { + $aXmlRacineAttribute['status'] = 1; + $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], true, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); + $sDirPath = $this->aProperties["upload_dir"] . "/" . getUniqRandomId(); + while (is_dir($sDirPath)) { + $sDirPath = $this->aProperties["upload_dir"] . "/" . getUniqRandomId(); + } + if (!mkdir($sDirPath)) { + return false; + } + // Sauvegarde le nouveau fichier. + $fp = fopen($sDirPath . '/' . utf8_decode($this->aValues["control_file_name"]), "w"); + fwrite($fp, $this->aValues["control_file_file"]); + fclose($fp); + + $sExtension = '*.' . end(explode(".", $this->aValues["control_file_name"])); + if (in_array($sExtension, explode("|", $this->aProperties['sig'])) or in_array($sExtension, explode("|", $this->aProperties['dao']))) { + $sSchemaContrainte = ""; + if (in_array($sExtension, explode("|", $this->aProperties['sig']))) { + $sSchemaContrainte = $this->aProperties["schema_sig"]; + } elseif (in_array($sExtension, explode("|", $this->aProperties['dao']))) { + $sSchemaContrainte = $this->aProperties["schema_dao"]; + } + + $this->sRessourcesFile = "ExtractionExtraction.class.sql.inc"; + require $this->sRessourcesFile; + $sSql = $aSql['getFormat']; + $aSQLParams = array( + 'extension' => array('type' => 'quoted_string', 'value' => '%' . $sExtension . '%'), + ); + + $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, $aSQLParams); + $sFormat = ""; + if (!$this->oConnection->oBd->enErreur()) { + $aResult = $this->oConnection->oBd->getResultTableAssoc($oPDOresult); + foreach ($aResult as $sFormats) { + $sFormat = $sFormats['id_format']; + } + } + + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + //$this->oBO->insertOrder('EM0160AYYTK48', 'bo_id=' . $this->aValues["bo_id"] . '|sourceDir=' . end(explode("/", $sDirPath)) . '/' . $this->aValues["control_file_name"] . '|sourceMotif=' . $sExtension . '|schema=' . $sSchemaContrainte . '|format=ACAD|destDir=' . $this->aProperties['ws_data_dir'] . '/extraction/extraction_depot/' . $_SERVER["REMOTE_ADDR"] . "/Fichiers déposés"); + $this->oBO->insertOrder('EM0160AYYTK48', 'bo_id=' . $this->aValues["bo_id"] . '|sourceDir=' . $sDirPath . '/' . $this->aValues["control_file_name"] . '|sourceMotif=' . $sExtension . '|schema=' . $sSchemaContrainte . '|format='.$sFormat.'|depotDir=' . $this->aProperties['ws_data_dir'] . '/extraction/extraction_depot/' . $_SERVER["REMOTE_ADDR"] . '/Fichiers déposés/' . $this->aValues["control_file_name"]); + } else { + //Si l'extension n'est pas bonne + $error_message .= $this->aValues["control_file_name"] . " format is not authaurized (" . $sExtension . ")"; + writeToErrorLog("WARNING: " . $error_message); + + $aXmlRacineAttribute['status'] = 0; + $this->aFields = array(); + $this->aFields['errorMessage'] = $error_message; + $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], true, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); + return $sMessage; + } + } + } + + return $sMessage; + } + +} diff --git a/src/module_extraction/web_service/ws/Extractions.class.inc b/src/module_extraction/web_service/ws/Extractions.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..010fefce2439a952b017ace4c43ef113c654de47 --- /dev/null +++ b/src/module_extraction/web_service/ws/Extractions.class.inc @@ -0,0 +1,645 @@ +<?php + +/** + * \file Extractions.class.inc + * \class Extractions + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Extractions php class + * + * This class defines Rest Api to Vitis Extractions + * + */ +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once 'Extraction.class.inc'; +require_once(dirname($_SERVER['SCRIPT_FILENAME']) . '/class/wab_lib/BusinessObject.class.inc'); + +class Extractions extends ExtractionExtraction +{ + + protected $iIdExtraction; + /** + * @SWG\Definition( + * definition="/extractions", + * allOf={ + * @SWG\Schema(ref="#/definitions/extractions") + * } + * ) + * * @SWG\Tag( + * name="Extractions", + * description="Operations about Extractions" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + public function __construct($aPath, $aValues, $properties, $bShortcut = false, $oConnection = false) + { + parent::__construct($aPath, $aValues, $properties, $bShortcut, $oConnection); + } + +/** + * @SWG\Get(path="/extractions", + * tags={"Extractions"}, + * summary="Get Extractions", + * description="Request to get Extractions", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="extraction Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + /** + * @SWG\Get(path="/extractions/Layers", + * tags={"Extractions"}, + * summary="Get extraction layers", + * description="Request to get the layers of the extractions", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + + /** + * get Extractions + * @return Extractions + */ + public function GET() + { + if (!empty($this->aPath[2]) && $this->aPath[2] == "Layers") { + $sMessage = $this->getLayers(); + } else { + $aReturn = $this->genericGet($this->aProperties['schema_extraction'], "v_extraction", "bo_id"); + $sMessage = $aReturn['sMessage']; + } + return $sMessage; + } + +/** + * @SWG\Post(path="/extractions", + * tags={"Extractions"}, + * summary="Add extraction", + * description="Request to add Extractions", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="extraction Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + + /** + * insert extraction + * @return id of the extraction created + */ + public function POST() + { + $aReturn = $this->genericPost($this->aProperties['schema_extraction'], 'extraction', $this->aProperties['schema_extraction'] . '.bo_id_extraction_seq', 'bo_id'); + $this->aValues["bo_id"] = $this->aValues['my_vitis_id']; + eval('$this->' . $this->aValues['tr_status_method'] . '();'); + return $aReturn['sMessage']; + } + +/** + * @SWG\Put(path="/extractions/{id_extraction}", + * tags={"Extractions"}, + * summary="update Extractions", + * description="Request to update Extractions", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Extraction token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_extraction", + * in="path", + * description="id of the Extractions", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + + /** + * update extractions + * @return id of extractions updated or error object if a extractions is not updated + */ + public function PUT() + { + // Upload l'acte d'engagement. + $this->uploadDocument('ae', 'extraction_extraction_extraction'); + // + $aReturn = $this->genericPut($this->aProperties['schema_extraction'], 'extraction', 'bo_id'); + $this->aValues["bo_id"] = $this->aValues['my_vitis_id']; + + //On vérifie que le fichier existe et ne soit pas vide + if (!empty($this->aValues['input_deposit_file'])) { + //On va déplacer le fichier dans un dossier temporaire + $aXmlRacineAttribute['status'] = 1; + $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], true, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); + $sDirPath = $this->aProperties["upload_dir"] . "/" . getUniqRandomId(); + //Récupération de sDirPath pour trDéposer + $this->sDirPath = $sDirPath; + + $sExtension = '*.' . end(explode(".", $this->aValues["input_deposit_name"])); + + //Si l'extension est autorisée + if (in_array($sExtension, explode("|", $this->aProperties['sig'])) || in_array($sExtension, explode("|", $this->aProperties['dao']))) { + + // Méthode de transition. + if (!empty($this->aValues['tr_status_method'])) { + eval('$this->' . $this->aValues['tr_status_method'] . '();'); + } + + $sSchemaContrainte = ""; + if (in_array($sExtension, explode("|", $this->aProperties['sig']))) { + $sSchemaContrainte = $this->aProperties["schema_sig"]; + } elseif (in_array($sExtension, explode("|", $this->aProperties['dao']))) { + $sSchemaContrainte = $this->aProperties["schema_dao"]; + } + + while (is_dir($sDirPath)) { + $sDirPath = $this->aProperties["upload_dir"] . "/" . getUniqRandomId(); + } + if (!mkdir($sDirPath)) { + return false; + } + // Sauvegarde le nouveau fichier. + $fp = fopen($sDirPath . '/' . utf8_decode($this->aValues["input_deposit_name"]), "w"); + fwrite($fp, $this->aValues["input_deposit_file"]); + fclose($fp); + + $this->sRessourcesFile = "ExtractionExtraction.class.sql.inc"; + require $this->sRessourcesFile; + $sSql = $aSql['getFormat']; + $aSQLParams = array( + 'extension' => array('type' => 'quoted_string', 'value' => '%' . $sExtension . '%'), + ); + + $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, $aSQLParams); + $sFormat = ""; + if (!$this->oConnection->oBd->enErreur()) { + $aResult = $this->oConnection->oBd->getResultTableAssoc($oPDOresult); + foreach ($aResult as $sFormats) { + $sFormat = $sFormats['id_format']; + } + } + + //Demande GTF + $this->oBO->insertOrder('EM0160AYYTK48', 'bo_id=' . $this->aValues["bo_id"] . '|sourceDir=' . end(explode("/", $sDirPath)) . '/' . $this->aValues["input_deposit_name"] . '|sourceMotif=' . $sExtension . '|depotDir=' . $sSchemaContrainte . '|format=' . $sFormat . '|depotDir=' . $this->aProperties['ws_data_dir'] . '/extraction/extraction_depot/' . $_SERVER["REMOTE_ADDR"] . "/Fichiers déposés/" . $this->aValues["input_deposit_name"]); + } else { + //Si l'extension n'est pas bonne + $error_message .= $this->aValues["input_deposit_name"] . " format is not authaurized (" . $sExtension . ")"; + writeToErrorLog("WARNING: " . $error_message); + + $aXmlRacineAttribute['status'] = 0; + $this->aFields = array(); + $this->aFields['errorMessage'] = $error_message; + $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], true, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); + return $sMessage; + } + } + return $aReturn['sMessage']; + } + +/** + * @SWG\Delete(path="/extractions", + * tags={"Extractions"}, + * summary="delete Extractions", + * description="Request to delete Extractions", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the extraction", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="extraction Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + /** + * @SWG\Delete(path="/extractions/{id_extraction}", + * tags={"Extractions"}, + * summary="delete Extractions", + * description="Request to delete Extractions", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Extraction token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_extraction", + * in="path", + * description="id of the Extractions", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + + /** + * delete extractions + * @return id of extractions deleted or error object if a extractions is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete($this->aProperties['schema_extraction'], 'extraction', 'bo_id'); + return $aReturn['sMessage']; + } + + /** + * Liste des couches. + */ + public function getLayers() + { + require $this->sRessourcesFile; + //On décode le json récupéré via le filtre + if (!empty($this->aValues["filter"])) { + $decode = $this->decodeJSONFilter($this->aValues["filter"], $this->aProperties['schema_extraction'], $this->aValues["table"]); + } + + if (is_object($this->aValues) || is_array($this->aValues)) { + $sJSONFilter = json_encode($this->aValues); + } + + if (!empty($sJSONFilter)) { + $aJSONFilter = json_decode($sJSONFilter, true); + + if (!empty($aJSONFilter["filter"])) { + if (is_object($aJSONFilter["filter"]) || is_array($aJSONFilter["filter"])) { + $sJSONFilter = json_encode($aJSONFilter["filter"]); + } + } + } + $aSQLParams = array( + 'schema_framework' => array('value' => $this->aProperties['schema_framework'], 'type' => 'schema_name'), + 'user_id' => array('value' => $_SESSION['ses_user_id'], 'type' => 'string'), + ); + + $sSql = $aSql['getUserGroups']; + $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, $aSQLParams); + if (!$this->oConnection->oBd->enErreur()) { + $aResult = $this->oConnection->oBd->getResultTableAssoc($oPDOresult); + foreach ($aResult as $aUserGroup) { + $aUserGroups[] = $aUserGroup['name']; + } + + if (!empty($aValues["filter"])) { + $aSQLParams = array( + 'schema_extraction' => array('value' => $this->aProperties['schema_extraction'], 'type' => 'schema_name'), + ); + + $sSql = $aSql['getCtId']; + //On donne la condition + if ($decode["request"]) { + $sSql .= " WHERE "; + $sSql .= $decode["request"]; + $sSql .= 'ORDER BY ct_id;'; + } + //error_log(print_r($sSql, true)); + $merge = array_merge($aSQLParams, $decode["params"]); + + $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, $merge); + + $aCtResult = $this->oConnection->oBd->getResultTableAssoc($oPDOresult); + } + // Restriction de l'utilisateur suivant ses groupes. + if (in_array('interne', $aUserGroups)) { + $sSqlParams = " ORDER BY category, layer_id;"; + } else if (in_array('restreint', $aUserGroups)) { + $sSqlParams = " AND restriction <> 'interne' ORDER BY category, layer_id;"; + } else { + $sSqlParams = " AND restriction = 'public' ORDER BY category, layer_id;"; + } + + // Liste des cartes. + $this->aFields['treeview_layers'] = array(); + + //Requête pour récupérer les couches + if (!empty($aValues["filter"])) { + $sSql = $aSql['getRtLayerWithCtId'] . $sSqlParams; + } else { + $sSql = $aSql['getRtLayer'] . $sSqlParams; + } + $ct_id; + if (!empty($aCtResult)) { + for ($i = 0; $i < sizeof($aCtResult); $i++) { + $ct_id .= $aCtResult[$i]["ct_id"] . "|"; + } + //On retire la dernière pipe qui ne sert à rien + $ct_idToSend = substr($ct_id, 0, -1); + } else { + //On donne un id qui n'existe pas pour éviter une erreur dans la requête SQL + $ct_idToSend = -1; + } + //error_log(print_r($aCtResult[$i]["ct_id"], true)); + $aSQLParams = array( + 'schema_extraction' => array('value' => $this->aProperties['schema_extraction'], 'type' => 'schema_name'), + 'aCtId' => array('value' => $ct_idToSend, 'type' => 'group'), + ); + $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, $aSQLParams); + if (!$this->oConnection->oBd->enErreur()) { + $aRtLayer = $this->oConnection->oBd->getResultTableAssoc($oPDOresult); + $aLayers = array(); + if (!empty($aRtLayer)) { + foreach ($aRtLayer as $aLayer) { + + $aLayers[$aLayer['category']][] = array("text" => $aLayer['layer'], "value" => $aLayer['layer_id'], "mutualized" => $aLayer['mutualized'], "statistique" => $aLayer['statistique']); + + } + } + $this->aFields['layers'] = $aLayers; + $aXmlRacineAttribute['status'] = 1; + $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], true, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); + } else { + $aXmlRacineAttribute['status'] = 0; + $this->aFields['error'] = "Request error."; + $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], true, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); + } + } else { + $aXmlRacineAttribute['status'] = 0; + $this->aFields['error'] = "Request error."; + $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], true, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); + } + //error_log(print_r($sMessage, true)); + return $sMessage; + } + + /** + * Transition Method trNouveau + */ + public function trNouveau() + { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Nouveau"); + + } + + /** + * Transition Method trGenerer + */ + public function trGenerer() + { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "AE Généré"); + + } + + /** + * Transition Method trResoumettre + */ + public function trResoumettre() + { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "AE Généré"); + //$this->sendmail(9904); + $this->sendmail(171); + } + + /** + * Transition Method trSoumettre + */ + public function trSoumettre() + { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "AE Soumis"); + //$this->oBO->sendmail(39); + $this->oBO->sendmail(174); + } + + /** + * Transition Method trDemander + */ + public function trDemander() + { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + $this->oBO->insertOrder('832HZ8J2PTCSG', 'bo_id=' . $this->aValues['bo_id']); + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "AE Demandé"); + + } + + /** + * Transition Method trReception + */ + public function trReception() + { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Dépôt terminé"); + + } + + /** + * Transition Method trDeposer + */ + public function trDeposer() + { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Fichier déposé"); + + } + + /** + * Transition Method trAutoriser + */ + public function trAutoriser() + { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + $this->oBO->insertOrder('8BCP8WGIOW4KO', 'bo_id=' . $this->aValues['bo_id']); + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Autorisée"); + + } + + /** + * Transition Method trAccepter + */ + public function trAccepter() + { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Fichier accepté"); + + //$this->oBO->sendmail(id_du_mail_pour_dire_que_le_fichier_est_accepté); + $this->trReception(); + + } + + /** + * Transition Method trInvalider + */ + public function trInvalider() + { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Fichier invalidé"); + $this->oBO->sendmail(1057); + $this->trRetour(); + + } + + /** + * Transition Method trRetour + */ + public function trRetour() + { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Extraction terminée"); + + } + + /** + * Transition Method trTerminerExtraction + */ + public function trTerminerExtraction() + { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Extraction terminée"); + + } + + /** + * Transition Method trRefuser + */ + public function trRefuser() + { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Refusée"); + //$this->sendmail(9902); + } + +} diff --git a/src/module_extraction/web_service/ws/Format.class.inc b/src/module_extraction/web_service/ws/Format.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..385d4329c156277a0c02029b8fef483d2d5976cd --- /dev/null +++ b/src/module_extraction/web_service/ws/Format.class.inc @@ -0,0 +1,90 @@ +<?php + +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc'; + +/** + * \file Format.class.inc + * \class Format + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Format php class + * + * This class defines operation for one Format + * + */ +class Format extends ExtractionExtraction { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/formats/{id_format}", + * tags={"Formats"}, + * summary="Get Format", + * description="Request to get Format by id", + * operationId="GET", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="id_format", + * in="path", + * description="id_format", + * required=true, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="Format Response", + * @SWG\Schema(ref="#/definitions/formats") + * ) + * ) + */ + + /** + * get informations about mode + */ + function GET() { + $this->aFields = $this->getFields($this->aProperties['schema_extraction'], "rt_format", "format_id"); + } + + /** + * delete a Point_situation + */ + function DELETE() { + $this->oConnection->oBd->delete($this->aProperties['schema_extraction'], 'rt_format', 'format_id', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new Error(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["format_id"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> diff --git a/src/module_extraction/web_service/ws/Formats.class.inc b/src/module_extraction/web_service/ws/Formats.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..15d7aecc746aa1288dea1c826a942b7a47c3e51a --- /dev/null +++ b/src/module_extraction/web_service/ws/Formats.class.inc @@ -0,0 +1,267 @@ +<?php + +/** + * \file Formats.class.inc + * \class Formats + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Formats php class + * + * This class defines Rest Api to Vitis Formats + * + */ +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once 'Format.class.inc'; + + +class Formats extends ExtractionExtraction { + /** + * @SWG\Definition( + * definition="/formats", + * allOf={ + * @SWG\Schema(ref="#/definitions/formats") + * } + * ) + * * @SWG\Tag( + * name="Formats", + * description="Operations about Formats" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/formats", + * tags={"Formats"}, + * summary="Get Formats", + * description="Request to get Formats", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="format Response", + * @SWG\Schema(ref="#/definitions/formats") + * ) + * ) + */ + + /** + * get Formats + * @return Formats + */ + function GET() { + $aReturn = $this->genericGet($this->aProperties['schema_extraction'], "rt_format", "format_id"); + $sMessage = $aReturn['sMessage']; + return $sMessage; + } + + /** + * @SWG\Post(path="/formats", + * tags={"Formats"}, + * summary="Add format", + * description="Request to add Formats", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="format Response", + * @SWG\Schema(ref="#/definitions/formats") + * ) + * ) + */ + + /** + * insert format + * @return id of the format created + */ + function POST() { + $aReturn = $this->genericPost($this->aProperties['schema_extraction'], 'rt_format', '', 'format_id'); + + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/formats/{id_format}", + * tags={"Formats"}, + * summary="update Formats", + * description="Request to update Formats", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Format token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_format", + * in="path", + * description="id of the Formats", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/formats") + * ) + * ) + */ + + /** + * update formats + * @return id of formats updated or error object if a formats is not updated + */ + function PUT() { + $aReturn = $this->genericPut($this->aProperties['schema_extraction'], 'rt_format', 'format_id'); + + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/formats", + * tags={"Formats"}, + * summary="delete Formats", + * description="Request to delete Formats", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the format", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="format Response", + * @SWG\Schema(ref="#/definitions/formats") + * ) + * ) + */ + /** + * @SWG\Delete(path="/formats/{id_format}", + * tags={"Formats"}, + * summary="delete Formats", + * description="Request to delete Formats", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Format token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_format", + * in="path", + * description="id of the Formats", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/formats") + * ) + * ) + */ + + /** + * delete formats + * @return id of formats deleted or error object if a formats is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete($this->aProperties['schema_extraction'], 'rt_format', 'format_id'); + return $aReturn['sMessage']; + } + + +} + +?> diff --git a/src/module_extraction/web_service/ws/Layer.class.inc b/src/module_extraction/web_service/ws/Layer.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..1d5a36e90a214d425a185f3160102bee30bd6894 --- /dev/null +++ b/src/module_extraction/web_service/ws/Layer.class.inc @@ -0,0 +1,90 @@ +<?php + +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc'; + +/** + * \file Layer.class.inc + * \class Layer + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Layer php class + * + * This class defines operation for one Layer + * + */ +class Layer extends ExtractionExtraction { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/layers/{id_layer}", + * tags={"Layers"}, + * summary="Get Layer", + * description="Request to get Layer by id", + * operationId="GET", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="id_layer", + * in="path", + * description="id_layer", + * required=true, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="Layer Response", + * @SWG\Schema(ref="#/definitions/layers") + * ) + * ) + */ + + /** + * get informations about mode + */ + function GET() { + $this->aFields = $this->getFields($this->aProperties['schema_extraction'], "rt_layer", "layer_id"); + } + + /** + * delete a Point_situation + */ + function DELETE() { + $this->oConnection->oBd->delete($this->aProperties['schema_extraction'], 'rt_layer', 'layer_id', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new Error(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["layer_id"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> diff --git a/src/module_extraction/web_service/ws/Layers.class.inc b/src/module_extraction/web_service/ws/Layers.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..8b11cd56f9b6b0a14a06ea1e689573570839ee09 --- /dev/null +++ b/src/module_extraction/web_service/ws/Layers.class.inc @@ -0,0 +1,267 @@ +<?php + +/** + * \file Layers.class.inc + * \class Layers + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Layers php class + * + * This class defines Rest Api to Vitis Layers + * + */ +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once 'Layer.class.inc'; + + +class Layers extends ExtractionExtraction { + /** + * @SWG\Definition( + * definition="/layers", + * allOf={ + * @SWG\Schema(ref="#/definitions/layers") + * } + * ) + * * @SWG\Tag( + * name="Layers", + * description="Operations about Layers" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/layers", + * tags={"Layers"}, + * summary="Get Layers", + * description="Request to get Layers", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="layer Response", + * @SWG\Schema(ref="#/definitions/layers") + * ) + * ) + */ + + /** + * get Layers + * @return Layers + */ + function GET() { + $aReturn = $this->genericGet($this->aProperties['schema_extraction'], "rt_layer", "layer_id"); + $sMessage = $aReturn['sMessage']; + return $sMessage; + } + + /** + * @SWG\Post(path="/layers", + * tags={"Layers"}, + * summary="Add layer", + * description="Request to add Layers", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="layer Response", + * @SWG\Schema(ref="#/definitions/layers") + * ) + * ) + */ + + /** + * insert layer + * @return id of the layer created + */ + function POST() { + $aReturn = $this->genericPost($this->aProperties['schema_extraction'], 'rt_layer', '', 'layer_id'); + + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/layers/{id_layer}", + * tags={"Layers"}, + * summary="update Layers", + * description="Request to update Layers", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Layer token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_layer", + * in="path", + * description="id of the Layers", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/layers") + * ) + * ) + */ + + /** + * update layers + * @return id of layers updated or error object if a layers is not updated + */ + function PUT() { + $aReturn = $this->genericPut($this->aProperties['schema_extraction'], 'rt_layer', 'layer_id'); + + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/layers", + * tags={"Layers"}, + * summary="delete Layers", + * description="Request to delete Layers", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the layer", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="layer Response", + * @SWG\Schema(ref="#/definitions/layers") + * ) + * ) + */ + /** + * @SWG\Delete(path="/layers/{id_layer}", + * tags={"Layers"}, + * summary="delete Layers", + * description="Request to delete Layers", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Layer token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_layer", + * in="path", + * description="id of the Layers", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/layers") + * ) + * ) + */ + + /** + * delete layers + * @return id of layers deleted or error object if a layers is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete($this->aProperties['schema_extraction'], 'rt_layer', 'layer_id'); + return $aReturn['sMessage']; + } + + +} + +?> diff --git a/src/module_extraction/web_service/ws/overview.phtml b/src/module_extraction/web_service/ws/overview.phtml new file mode 100755 index 0000000000000000000000000000000000000000..27e165d375458404f3a66e7ee8864f745b7ee923 --- /dev/null +++ b/src/module_extraction/web_service/ws/overview.phtml @@ -0,0 +1,24 @@ +<?php +/** + * @SWG\Swagger( + * basePath="/[service_alias]/extraction", + * host="[server]", + * schemes={"[protocol]"}, + * produces={ + * "application/json", + "application/xml", + "text/html" + * }, + * @SWG\Info( + * version="1.0.0", + * title="Extraction Test Rest", + * description="All fetaures to access server operation for extraction", + * ) + * ) + */ +?> + +<h1 class="titleOverview">Service Extraction</h1> +<p> + <a class="linkOverview" href="javascript:sService='extraction';LoadApi()">Extraction</a>: this is the most comprehensive service which should be used as a preference when developing applications communicating with Extraction. Those services allow you to administrate Extraction applications. +</p> \ No newline at end of file