Skip to content
Permalink
Browse files

[Server][Cache] Adding HAVE_SERVER_PYTHON_PLUGINS around accessContro…

…ls and cacheManager methods
  • Loading branch information
rldhont committed Oct 6, 2018
1 parent bc7cea2 commit 3bb64a7f1a091ee2028d6a4872354a58609c4797
@@ -36,12 +36,17 @@ namespace QgsWcs
void writeDescribeCoverage( QgsServerInterface *serverIface, const QgsProject *project, const QString &version,
const QgsServerRequest &request, QgsServerResponse &response )
{
QgsAccessControl *accessControl = serverIface->accessControls();

QgsAccessControl *accessControl = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
accessControl = serverIface->accessControls();
#endif
QDomDocument doc;
const QDomDocument *describeDocument = nullptr;

QgsServerCacheManager *cacheManager = serverIface->cacheManager();
QgsServerCacheManager *cacheManager = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
cacheManager = serverIface->cacheManager();
#endif
if ( cacheManager && cacheManager->getCachedDocument( &doc, project, request, accessControl ) )
{
describeDocument = &doc;
@@ -37,12 +37,17 @@ namespace QgsWcs
void writeGetCapabilities( QgsServerInterface *serverIface, const QgsProject *project, const QString &version,
const QgsServerRequest &request, QgsServerResponse &response )
{
QgsAccessControl *accessControl = serverIface->accessControls();

QgsAccessControl *accessControl = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
accessControl = serverIface->accessControls();
#endif
QDomDocument doc;
const QDomDocument *capabilitiesDocument = nullptr;

QgsServerCacheManager *cacheManager = serverIface->cacheManager();
QgsServerCacheManager *cacheManager = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
cacheManager = serverIface->cacheManager();
#endif
if ( cacheManager && cacheManager->getCachedDocument( &doc, project, request, accessControl ) )
{
capabilitiesDocument = &doc;
@@ -42,12 +42,17 @@ namespace QgsWfs
void writeDescribeFeatureType( QgsServerInterface *serverIface, const QgsProject *project, const QString &version,
const QgsServerRequest &request, QgsServerResponse &response )
{
QgsAccessControl *accessControl = serverIface->accessControls();

QgsAccessControl *accessControl = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
accessControl = serverIface->accessControls();
#endif
QDomDocument doc;
const QDomDocument *describeDocument = nullptr;

QgsServerCacheManager *cacheManager = serverIface->cacheManager();
QgsServerCacheManager *cacheManager = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
cacheManager = serverIface->cacheManager();
#endif
if ( cacheManager && cacheManager->getCachedDocument( &doc, project, request, accessControl ) )
{
describeDocument = &doc;
@@ -41,12 +41,17 @@ namespace QgsWfs
void writeGetCapabilities( QgsServerInterface *serverIface, const QgsProject *project, const QString &version,
const QgsServerRequest &request, QgsServerResponse &response )
{
QgsAccessControl *accessControl = serverIface->accessControls();

QgsAccessControl *accessControl = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
accessControl = serverIface->accessControls();
#endif
QDomDocument doc;
const QDomDocument *capabilitiesDocument = nullptr;

QgsServerCacheManager *cacheManager = serverIface->cacheManager();
QgsServerCacheManager *cacheManager = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
cacheManager = serverIface->cacheManager();
#endif
if ( cacheManager && cacheManager->getCachedDocument( &doc, project, request, accessControl ) )
{
capabilitiesDocument = &doc;
@@ -43,12 +43,17 @@ namespace QgsWfs
void writeGetCapabilities( QgsServerInterface *serverIface, const QgsProject *project, const QString &version,
const QgsServerRequest &request, QgsServerResponse &response )
{
QgsAccessControl *accessControl = serverIface->accessControls();

QgsAccessControl *accessControl = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
accessControl = serverIface->accessControls();
#endif
QDomDocument doc;
const QDomDocument *capabilitiesDocument = nullptr;

QgsServerCacheManager *cacheManager = serverIface->cacheManager();
QgsServerCacheManager *cacheManager = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
cacheManager = serverIface->cacheManager();
#endif
if ( cacheManager && cacheManager->getCachedDocument( &doc, project, request, accessControl ) )
{
capabilitiesDocument = &doc;
@@ -94,7 +94,10 @@ namespace QgsWms
const QString &version, const QgsServerRequest &request,
QgsServerResponse &response, bool projectSettings )
{
QgsAccessControl *accessControl = serverIface->accessControls();
QgsAccessControl *accessControl = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
accessControl = serverIface->accessControls();
#endif

QDomDocument doc;
const QDomDocument *capabilitiesDocument = nullptr;
@@ -110,7 +113,10 @@ namespace QgsWms
cache = accessControl->fillCacheKey( cacheKeyList );
QString cacheKey = cacheKeyList.join( '-' );

QgsServerCacheManager *cacheManager = serverIface->cacheManager();
QgsServerCacheManager *cacheManager = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
cacheManager = serverIface->cacheManager();
#endif
if ( cacheManager && cacheManager->getCachedDocument( &doc, project, request, accessControl ) )
{
capabilitiesDocument = &doc;
@@ -55,12 +55,18 @@ namespace QgsWms
const QString &version, const QgsServerRequest &request,
QgsServerResponse &response )
{
QgsAccessControl *accessControl = serverIface->accessControls();
QgsAccessControl *accessControl = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
accessControl = serverIface->accessControls();
#endif

QDomDocument doc;
const QDomDocument *contextDocument = nullptr;

QgsServerCacheManager *cacheManager = serverIface->cacheManager();
QgsServerCacheManager *cacheManager = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
cacheManager = serverIface->cacheManager();
#endif
if ( cacheManager && cacheManager->getCachedDocument( &doc, project, request, accessControl ) )
{
contextDocument = &doc;
@@ -39,8 +39,12 @@ namespace QgsWms
QgsWmsParameters wmsParameters( QUrlQuery( request.url() ) );

// Get cached image
QgsAccessControl *accessControl = serverIface->accessControls();
QgsServerCacheManager *cacheManager = serverIface->cacheManager();
QgsAccessControl *accessControl = nullptr;
QgsServerCacheManager *cacheManager = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
accessControl = serverIface->accessControls();
cacheManager = serverIface->cacheManager();
#endif
if ( cacheManager )
{
ImageOutputFormat outputFormat = parseImageFormat( format );
@@ -46,12 +46,17 @@ namespace QgsWmts
void writeGetCapabilities( QgsServerInterface *serverIface, const QgsProject *project, const QString &version,
const QgsServerRequest &request, QgsServerResponse &response )
{
QgsAccessControl *accessControl = serverIface->accessControls();

QgsAccessControl *accessControl = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
accessControl = serverIface->accessControls();
#endif
QDomDocument doc;
const QDomDocument *capabilitiesDocument = nullptr;

QgsServerCacheManager *cacheManager = serverIface->cacheManager();
QgsServerCacheManager *cacheManager = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
cacheManager = serverIface->cacheManager();
#endif
if ( cacheManager && cacheManager->getCachedDocument( &doc, project, request, accessControl ) )
{
capabilitiesDocument = &doc;
@@ -34,8 +34,12 @@ namespace QgsWmts
QUrlQuery query = translateWmtsParamToWmsQueryItem( QStringLiteral( "GetMap" ), params, project, serverIface );

// Get cached image
QgsAccessControl *accessControl = serverIface->accessControls();
QgsServerCacheManager *cacheManager = serverIface->cacheManager();
QgsAccessControl *accessControl = nullptr;
QgsServerCacheManager *cacheManager = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
accessControl = serverIface->accessControls();
cacheManager = serverIface->cacheManager();
#endif
if ( cacheManager )
{
QgsWmtsParameters::Format f = params.format();

0 comments on commit 3bb64a7

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