Skip to content

Commit d018f03

Browse files
committedApr 8, 2017
[Server] remove QgsWfsProjectParser
1 parent eb3af08 commit d018f03

File tree

10 files changed

+1
-819
lines changed

10 files changed

+1
-819
lines changed
 

‎python/server/qgsconfigcache.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ class QgsConfigCache: QObject
3232
~QgsConfigCache();
3333

3434
QgsServerProjectParser* serverConfiguration( const QString& filePath );
35-
QgsWfsProjectParser* wfsConfiguration( const QString& filePath, const QgsAccessControl* accessControl );
3635
QgsWmsConfigParser* wmsConfiguration( const QString& filePath, const QgsAccessControl* accessControl, const QMap<QString, QString>& parameterMap = QMap< QString, QString >() );
3736

3837
private:

‎python/server/qgswfserver.sip

Lines changed: 0 additions & 125 deletions
This file was deleted.

‎python/server/server.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
%Include qgsserverprojectparser.sip
2424
%Include qgswmsconfigparser.sip
2525
%Include qgswmsprojectparser.sip
26-
%Include qgswfsprojectparser.sip
2726
%Include qgsconfigcache.sip
2827
%Include qgsserversettings.sip
2928
%Include qgsserverprojectutils.sip

‎src/server/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ SET(qgis_mapserv_SRCS
3434
qgsremotedatasourcebuilder.cpp
3535
qgssentdatasourcebuilder.cpp
3636
qgsserverlogger.cpp
37-
qgswfsprojectparser.cpp
3837
qgswmsconfigparser.cpp
3938
qgswmsprojectparser.cpp
4039
qgsserverprojectparser.cpp

‎src/server/qgsconfigcache.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "qgsconfigcache.h"
1919
#include "qgsmessagelog.h"
2020
#include "qgsmslayercache.h"
21-
#include "qgswfsprojectparser.h"
2221
#include "qgswmsprojectparser.h"
2322
#include "qgssldconfigparser.h"
2423
#include "qgsaccesscontrol.h"
@@ -76,32 +75,6 @@ QgsServerProjectParser *QgsConfigCache::serverConfiguration( const QString &file
7675
return new QgsServerProjectParser( doc, filePath );
7776
}
7877

79-
QgsWfsProjectParser *QgsConfigCache::wfsConfiguration(
80-
const QString &filePath
81-
, const QgsAccessControl *accessControl
82-
)
83-
{
84-
QgsWfsProjectParser *p = mWFSConfigCache.object( filePath );
85-
if ( !p )
86-
{
87-
QDomDocument *doc = xmlDocument( filePath );
88-
if ( !doc )
89-
{
90-
return nullptr;
91-
}
92-
p = new QgsWfsProjectParser(
93-
filePath
94-
, accessControl
95-
);
96-
mWFSConfigCache.insert( filePath, p );
97-
p = mWFSConfigCache.object( filePath );
98-
Q_ASSERT( p );
99-
}
100-
101-
QgsMSLayerCache::instance()->setProjectMaxLayers( p->wfsLayers().size() );
102-
return p;
103-
}
104-
10578
QgsWmsConfigParser *QgsConfigCache::wmsConfiguration(
10679
const QString &filePath
10780
, const QgsAccessControl *accessControl
@@ -182,7 +155,6 @@ QDomDocument *QgsConfigCache::xmlDocument( const QString &filePath )
182155
void QgsConfigCache::removeChangedEntry( const QString &path )
183156
{
184157
mWMSConfigCache.remove( path );
185-
mWFSConfigCache.remove( path );
186158

187159
//xml document must be removed last, as other config cache destructors may require it
188160
mXmlDocumentCache.remove( path );

‎src/server/qgsconfigcache.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
#include "qgis_server.h"
2929
#include "qgswmsconfigparser.h"
30-
#include "qgswfsprojectparser.h"
3130

3231
class QgsServerProjectParser;
3332
class QgsAccessControl;
@@ -41,10 +40,6 @@ class SERVER_EXPORT QgsConfigCache : public QObject
4140
static QgsConfigCache *instance();
4241

4342
QgsServerProjectParser *serverConfiguration( const QString &filePath );
44-
QgsWfsProjectParser *wfsConfiguration(
45-
const QString &filePath
46-
, const QgsAccessControl *accessControl
47-
);
4843
QgsWmsConfigParser *wmsConfiguration(
4944
const QString &filePath
5045
, const QgsAccessControl *accessControl
@@ -64,7 +59,6 @@ class SERVER_EXPORT QgsConfigCache : public QObject
6459

6560
QCache<QString, QDomDocument> mXmlDocumentCache;
6661
QCache<QString, QgsWmsConfigParser> mWMSConfigCache;
67-
QCache<QString, QgsWfsProjectParser> mWFSConfigCache;
6862

6963
private slots:
7064
//! Removes changed entry from this cache

‎src/server/qgswfsprojectparser.cpp

Lines changed: 0 additions & 572 deletions
This file was deleted.

‎src/server/qgswfsprojectparser.h

Lines changed: 0 additions & 61 deletions
This file was deleted.

‎src/server/services/wfs/qgswfsutils.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,6 @@ namespace QgsWfs
3131
return QStringLiteral( "1.0.0" );
3232
}
3333

34-
// Return the wms config parser (Transitional)
35-
QgsWfsProjectParser *getConfigParser( QgsServerInterface *serverIface )
36-
{
37-
QString configFilePath = serverIface->configFilePath();
38-
39-
QgsWfsProjectParser *parser = QgsConfigCache::instance()->wfsConfiguration( configFilePath, serverIface->accessControls() );
40-
if ( !parser )
41-
{
42-
throw QgsServiceException(
43-
QStringLiteral( "WFS configuration error" ),
44-
QStringLiteral( "There was an error reading the project file or the SLD configuration" ) );
45-
}
46-
return parser;
47-
}
48-
4934
QString serviceUrl( const QgsServerRequest &request, const QgsProject *project )
5035
{
5136
QString href;

‎src/server/services/wfs/qgswfsutils.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#define QGSWFSUTILS_H
2525

2626
#include "qgsmodule.h"
27-
#include "qgswfsprojectparser.h"
27+
#include "qgsfeaturerequest.h"
2828
#include "qgswfsserviceexception.h"
2929

3030
/**
@@ -40,14 +40,6 @@ namespace QgsWfs
4040
*/
4141
QString implementationVersion();
4242

43-
/**
44-
* Return the wms config parser (Transitional)
45-
*
46-
* XXX This is needed in the current implementation.
47-
* This should disappear as soon we get rid of singleton.
48-
*/
49-
QgsWfsProjectParser *getConfigParser( QgsServerInterface *serverIface );
50-
5143
/**
5244
* Service URL string
5345
*/

0 commit comments

Comments
 (0)
Please sign in to comment.