21#ifndef QGSSERVERAPIUTILS_H
22#define QGSSERVERAPIUTILS_H
24#include "qgis_server.h"
34#ifdef HAVE_SERVER_PYTHON_PLUGINS
44#include <nlohmann/json_fwd.hpp>
45using namespace nlohmann;
67 static QList<QgsServerWmsDimensionProperties::WmsDimensionInfo> temporalDimensions(
const QgsVectorLayer *layer );
95 template<
typename T,
class T2>
static T parseTemporalInterval(
const QString &interval )
SIP_SKIP;
165 static const QVector<QgsVectorLayer *> publishedWfsLayers(
const QgsServerApiContext &context );
181#ifdef HAVE_SERVER_PYTHON_PLUGINS
189 const auto constLayers { project->
layers<T>() };
190 for (
const auto &layer : constLayers )
192 if ( !wfsLayerIds.contains( layer->
id() ) )
196#ifdef HAVE_SERVER_PYTHON_PLUGINS
202 result.push_back( layer );
215 static QString sanitizedFieldValue(
const QString &value );
221 static QStringList publishedCrsList(
const QgsProject *project );
234 static QString appendMapParameter(
const QString &path,
const QUrl &requestUrl );
A helper class that centralizes restrictions given by all the access control filter plugins.
bool layerReadPermission(const QgsMapLayer *layer) const
Returns the layer read right.
This class represents a coordinate reference system (CRS).
Class for parsing and evaluation of expressions (formerly called "search strings").
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
QVector< T > layers() const
Returns a list of registered map layers with a specified layer type.
A rectangle specified with double values.
Bad request error API exception.
The QgsServerApiContext class encapsulates the resources for a particular client request: the request...
const QgsProject * project() const
Returns the (possibly NULL) project.
QgsServerInterface * serverInterface() const
Returns the server interface.
The QgsServerApiUtils class contains helper functions to handle common API operations.
static const QVector< T > publishedWfsLayers(const QgsServerApiContext &context)
Returns the list of layers of type T accessible to the WFS service for a given project.
virtual QgsAccessControl * accessControls() const =0
Gets the registered access control filters.
Represents a vector layer which manages a vector based data sets.
SERVER_EXPORT QStringList wfsLayerIds(const QgsProject &project)
Returns the Layer ids list defined in a QGIS project as published in WFS.
#define SIP_THROW(name,...)
QgsTemporalRange< QDate > QgsDateRange
QgsRange which stores a range of dates.
const QgsCoordinateReferenceSystem & crs