QGIS API Documentation  3.6.0-Noosa (5873452)
qgswfstransaction.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgswfstransaction.h
3  -------------------------
4  begin : December 20 , 2016
5  copyright : (C) 2007 by Marco Hugentobler (original code)
6  (C) 2012 by RenĂ©-Luc D'Hont (original code)
7  (C) 2014 by Alessandro Pasotti (original code)
8  (C) 2017 by David Marteau
9  email : marco dot hugentobler at karto dot baug dot ethz dot ch
10  a dot pasotti at itopen dot it
11  david dot marteau at 3liz dot com
12  ***************************************************************************/
13 
14 /***************************************************************************
15  * *
16  * This program is free software; you can redistribute it and/or modify *
17  * it under the terms of the GNU General Public License as published by *
18  * the Free Software Foundation; either version 2 of the License, or *
19  * (at your option) any later version. *
20  * *
21  ***************************************************************************/
22 #ifndef QGSWFSTRANSACTION_H
23 #define QGSWFSTRANSACTION_H
24 
25 
26 namespace QgsWfs
27 {
29  {
30  QString typeName;
31 
32  QString handle;
33 
34  QDomNodeList featureNodeList;
35 
36  QStringList insertFeatureIds;
37 
38  bool error;
39 
40  QString errorMsg;
41  };
42 
44  {
45  QString typeName;
46 
47  QString handle;
48 
49  QMap<QString, QString> propertyMap;
50 
51  QDomElement geometryElement;
52 
54 
55  int totalUpdated = 0;
56 
57  bool error;
58 
59  QString errorMsg;
60  };
61 
63  {
64  QString typeName;
65 
66  QString handle;
67 
69 
70  int totalDeleted = 0;
71 
72  bool error;
73 
74  QString errorMsg;
75  };
76 
78  {
79  QList< transactionInsert > inserts;
80 
81  QList< transactionUpdate > updates;
82 
83  QList< transactionDelete > deletes;
84  };
85 
89  transactionInsert parseInsertActionElement( QDomElement &actionElem );
90 
94  transactionUpdate parseUpdateActionElement( QDomElement &actionElem );
95 
99  transactionDelete parseDeleteActionElement( QDomElement &actionElem );
100 
104  transactionRequest parseTransactionRequestBody( QDomElement &docElem );
105 
107 
112 
116  void performTransaction( transactionRequest &aRequest, QgsServerInterface *serverIface, const QgsProject *project );
117 
121  void writeTransaction( QgsServerInterface *serverIface, const QgsProject *project,
122  const QString &version, const QgsServerRequest &request,
123  QgsServerResponse &response );
124 
125 
129  QDomDocument createTransactionDocument( QgsServerInterface *serverIface, const QgsProject *project,
130  const QString &version, const QgsServerRequest &request );
131 
132 } // namespace QgsWfs
133 
134 #endif
135 
transactionDelete parseDeleteActionElement(QDomElement &actionElem)
Transform Delete element to transactionDelete.
QgsFeatureRequest featureRequest
QList< QgsFeature > QgsFeatureList
Definition: qgsfeature.h:571
transactionRequest parseTransactionParameters(QgsServerRequest::Parameters parameters)
transactionRequest parseTransactionRequestBody(QDomElement &docElem)
Transform RequestBody root element to getFeatureRequest.
QList< transactionUpdate > updates
QMap< QString, QString > propertyMap
QList< transactionInsert > inserts
WMS implementation.
Definition: qgswfs.cpp:35
This class wraps a request for features to a vector layer (or directly its vector data provider)...
void writeTransaction(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request, QgsServerResponse &response)
Output WFS transaction response.
Reads and writes project states.
Definition: qgsproject.h:89
QgsFeatureList featuresFromGML(QDomNodeList featureNodeList, QgsVectorDataProvider *provider)
Transform GML feature nodes to features.
QDomDocument createTransactionDocument(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request)
Create a wfs transaction document.
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
transactionUpdate parseUpdateActionElement(QDomElement &actionElem)
Transform Update element to transactionUpdate.
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins...
QList< transactionDelete > deletes
void performTransaction(transactionRequest &aRequest, QgsServerInterface *serverIface, const QgsProject *project)
Perform the transaction.
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
This is the base class for vector data providers.
transactionInsert parseInsertActionElement(QDomElement &actionElem)
Transform Insert element to transactionInsert.
QMap< QString, QString > Parameters
QgsFeatureRequest featureRequest