Skip to content
Permalink
Browse files

Merge pull request #36997 from elpaso/bugfix-gh36163-server-remove-al…

…lowmethod

Server: remove unused allowMethod
  • Loading branch information
elpaso committed Jun 5, 2020
2 parents 37bd3ae + 055d7c6 commit 79803c69d3cd32595add182fcd045d5a099d662f
@@ -94,11 +94,6 @@ Returns the version of the service
virtual const QString rootPath() const = 0;
%Docstring
Returns the root path for the API
%End

virtual bool allowMethod( QgsServerRequest::Method ) const;
%Docstring
Returns ``True`` if the given method is supported by the API, default implementation supports all methods.
%End

virtual bool accept( const QUrl &url ) const;
@@ -47,12 +47,6 @@ Constructor
%Docstring

:return: the version of the service
%End

virtual bool allowMethod( QgsServerRequest::Method ) const = 0;
%Docstring
Returns ``True`` if the given method is supported for that
service.
%End

virtual void executeRequest( const QgsServerRequest &request,
@@ -110,11 +110,6 @@ class SERVER_EXPORT QgsServerApi
*/
virtual const QString rootPath() const = 0;

/**
* Returns TRUE if the given method is supported by the API, default implementation supports all methods.
*/
virtual bool allowMethod( QgsServerRequest::Method ) const { return true; }

/**
* Returns TRUE if the given \a url is handled by the API, default implementation checks for the presence of rootPath inside the \a url path.
*/
@@ -61,12 +61,6 @@ class SERVER_EXPORT QgsService
*/
virtual QString version() const = 0;

/**
* Returns TRUE if the given method is supported for that
* service.
*/
virtual bool allowMethod( QgsServerRequest::Method ) const = 0;

/**
* Execute the requests and set result in QgsServerRequest
*/
@@ -26,11 +26,6 @@ class SampleService: public QgsService
QString name() const override { return "SampleService"; }
QString version() const override { return "1.0"; }

bool allowMethod( QgsServerRequest::Method method ) const override
{
return method == QgsServerRequest::GetMethod;
}

void executeRequest( const QgsServerRequest &request, QgsServerResponse &response,
const QgsProject *project ) override
{
@@ -50,11 +50,6 @@ namespace QgsWcs
QString name() const override { return QStringLiteral( "WCS" ); }
QString version() const override { return implementationVersion(); }

bool allowMethod( QgsServerRequest::Method method ) const override
{
return method == QgsServerRequest::GetMethod || method == QgsServerRequest::PostMethod;
}

void executeRequest( const QgsServerRequest &request, QgsServerResponse &response,
const QgsProject *project ) override
{
@@ -56,11 +56,6 @@ namespace QgsWfs
QString name() const override { return QStringLiteral( "WFS" ); }
QString version() const override { return implementationVersion(); }

bool allowMethod( QgsServerRequest::Method method ) const override
{
return method == QgsServerRequest::GetMethod || method == QgsServerRequest::PostMethod;
}

void executeRequest( const QgsServerRequest &request, QgsServerResponse &response,
const QgsProject *project ) override
{
@@ -62,11 +62,6 @@ namespace QgsWms
QString name() const override { return QStringLiteral( "WMS" ); }
QString version() const override { return mVersion; }

bool allowMethod( QgsServerRequest::Method method ) const override
{
return method == QgsServerRequest::GetMethod;
}

void executeRequest( const QgsServerRequest &request, QgsServerResponse &response,
const QgsProject *project ) override
{
@@ -48,11 +48,6 @@ namespace QgsWmts
QString name() const override { return QStringLiteral( "WMTS" ); }
QString version() const override { return implementationVersion(); }

bool allowMethod( QgsServerRequest::Method method ) const override
{
return method == QgsServerRequest::GetMethod || method == QgsServerRequest::PostMethod;
}

void executeRequest( const QgsServerRequest &request, QgsServerResponse &response,
const QgsProject *project ) override
{

0 comments on commit 79803c6

Please sign in to comment.
You can’t perform that action at this time.