QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
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  QStringList serverFids;
56 
57  int totalUpdated = 0;
58 
59  bool error;
60 
61  QString errorMsg;
62  };
63 
65  {
66  QString typeName;
67 
68  QString handle;
69 
71 
72  QStringList serverFids;
73 
74  int totalDeleted = 0;
75 
76  bool error;
77 
78  QString errorMsg;
79  };
80 
82  {
83  QList< transactionInsert > inserts;
84 
85  QList< transactionUpdate > updates;
86 
87  QList< transactionDelete > deletes;
88  };
89 
93  transactionInsert parseInsertActionElement( QDomElement &actionElem );
94 
98  transactionUpdate parseUpdateActionElement( QDomElement &actionElem, const QgsProject *project );
99 
103  transactionDelete parseDeleteActionElement( QDomElement &actionElem, const QgsProject *project );
104 
108  transactionRequest parseTransactionRequestBody( QDomElement &docElem, const QgsProject *project );
109 
111 
115  QgsFeatureList featuresFromGML( QDomNodeList featureNodeList, QgsVectorLayer *layer );
116 
120  void performTransaction( transactionRequest &aRequest, QgsServerInterface *serverIface, const QgsProject *project );
121 
125  void writeTransaction( QgsServerInterface *serverIface, const QgsProject *project,
126  const QString &version, const QgsServerRequest &request,
127  QgsServerResponse &response );
128 
129 
133  QDomDocument createTransactionDocument( QgsServerInterface *serverIface, const QgsProject *project,
134  const QString &version, const QgsServerRequest &request );
135 
136 } // namespace QgsWfs
137 
138 #endif
139 
QgsWfs::parseTransactionRequestBody
transactionRequest parseTransactionRequestBody(QDomElement &docElem, const QgsProject *project)
Transform RequestBody root element to getFeatureRequest.
Definition: qgswfstransaction.cpp:1114
QgsWfs::parseUpdateActionElement
transactionUpdate parseUpdateActionElement(QDomElement &actionElem, const QgsProject *project)
Transform Update element to transactionUpdate.
Definition: qgswfstransaction.cpp:1177
QgsWfs::transactionDelete
Definition: qgswfstransaction.h:65
QgsWfs::transactionInsert::typeName
QString typeName
Definition: qgswfstransaction.h:30
QgsWfs::parseInsertActionElement
transactionInsert parseInsertActionElement(QDomElement &actionElem)
Transform Insert element to transactionInsert.
Definition: qgswfstransaction.cpp:1237
QgsWfs::transactionUpdate::error
bool error
Definition: qgswfstransaction.h:59
QgsServerRequest
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
Definition: qgsserverrequest.h:39
QgsWfs::transactionUpdate
Definition: qgswfstransaction.h:44
QgsWfs::transactionInsert::featureNodeList
QDomNodeList featureNodeList
Definition: qgswfstransaction.h:34
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:95
QgsServerRequest::Parameters
QMap< QString, QString > Parameters
Definition: qgsserverrequest.h:44
QgsFeatureRequest
This class wraps a request for features to a vector layer (or directly its vector data provider).
Definition: qgsfeaturerequest.h:76
QgsWfs::transactionUpdate::typeName
QString typeName
Definition: qgswfstransaction.h:45
QgsWfs::transactionRequest::updates
QList< transactionUpdate > updates
Definition: qgswfstransaction.h:85
QgsWfs::writeTransaction
void writeTransaction(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request, QgsServerResponse &response)
Output WFS transaction response.
Definition: qgswfstransaction.cpp:53
QgsWfs::transactionUpdate::errorMsg
QString errorMsg
Definition: qgswfstransaction.h:61
QgsWfs
WMS implementation.
Definition: qgswfs.cpp:36
QgsWfs::transactionUpdate::totalUpdated
int totalUpdated
Definition: qgswfstransaction.h:57
QgsWfs::transactionDelete::typeName
QString typeName
Definition: qgswfstransaction.h:66
QgsWfs::transactionInsert::errorMsg
QString errorMsg
Definition: qgswfstransaction.h:40
QgsFeatureList
QList< QgsFeature > QgsFeatureList
Definition: qgsfeature.h:583
QgsWfs::transactionDelete::featureRequest
QgsFeatureRequest featureRequest
Definition: qgswfstransaction.h:70
QgsWfs::transactionDelete::totalDeleted
int totalDeleted
Definition: qgswfstransaction.h:74
QgsWfs::parseDeleteActionElement
transactionDelete parseDeleteActionElement(QDomElement &actionElem, const QgsProject *project)
Transform Delete element to transactionDelete.
Definition: qgswfstransaction.cpp:1148
QgsWfs::parseTransactionParameters
transactionRequest parseTransactionParameters(QgsServerRequest::Parameters parameters, const QgsProject *project)
Definition: qgswfstransaction.cpp:861
QgsWfs::transactionUpdate::propertyMap
QMap< QString, QString > propertyMap
Definition: qgswfstransaction.h:49
QgsWfs::transactionRequest::inserts
QList< transactionInsert > inserts
Definition: qgswfstransaction.h:83
QgsWfs::transactionUpdate::serverFids
QStringList serverFids
Definition: qgswfstransaction.h:55
QgsWfs::transactionRequest::deletes
QList< transactionDelete > deletes
Definition: qgswfstransaction.h:87
QgsWfs::transactionInsert
Definition: qgswfstransaction.h:29
QgsWfs::transactionInsert::handle
QString handle
Definition: qgswfstransaction.h:32
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:387
QgsWfs::transactionUpdate::handle
QString handle
Definition: qgswfstransaction.h:47
QgsWfs::featuresFromGML
QgsFeatureList featuresFromGML(QDomNodeList featureNodeList, QgsVectorLayer *layer)
Transform GML feature nodes to features.
Definition: qgswfstransaction.cpp:789
QgsWfs::performTransaction
void performTransaction(transactionRequest &aRequest, QgsServerInterface *serverIface, const QgsProject *project)
Perform the transaction.
Definition: qgswfstransaction.cpp:219
QgsWfs::createTransactionDocument
QDomDocument createTransactionDocument(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request)
Create a wfs transaction document.
Definition: qgswfstransaction.cpp:64
QgsWfs::transactionUpdate::featureRequest
QgsFeatureRequest featureRequest
Definition: qgswfstransaction.h:53
QgsWfs::transactionDelete::errorMsg
QString errorMsg
Definition: qgswfstransaction.h:78
QgsWfs::transactionUpdate::geometryElement
QDomElement geometryElement
Definition: qgswfstransaction.h:51
QgsWfs::transactionDelete::error
bool error
Definition: qgswfstransaction.h:76
QgsWfs::transactionInsert::error
bool error
Definition: qgswfstransaction.h:38
QgsWfs::transactionInsert::insertFeatureIds
QStringList insertFeatureIds
Definition: qgswfstransaction.h:36
QgsServerInterface
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins.
Definition: qgsserverinterface.h:61
QgsServerResponse
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
Definition: qgsserverresponse.h:44
QgsWfs::transactionRequest
Definition: qgswfstransaction.h:82
QgsWfs::transactionDelete::handle
QString handle
Definition: qgswfstransaction.h:68
QgsWfs::transactionDelete::serverFids
QStringList serverFids
Definition: qgswfstransaction.h:72