|
virtual | ~QgsServerOgcApiHandler () |
|
QString | contentTypeForAccept (const QString &accept) const |
| Looks for the first ContentType match in the accept header and returns its mime type, returns an empty string if there are not matches. More...
|
|
QgsServerOgcApi::ContentType | contentTypeFromRequest (const QgsServerRequest *request) const |
| Returns the content type from the request. More...
|
|
QList< QgsServerOgcApi::ContentType > | contentTypes () const |
| Returns the list of content types this handler can serve, default to JSON and HTML. More...
|
|
virtual QgsServerOgcApi::ContentType | defaultContentType () const |
| Returns the default response content type in case the client did not specifically ask for any particular content type. More...
|
|
virtual std::string | description () const =0 |
| Description. More...
|
|
virtual void | handleRequest (const QgsServerApiContext &context) const SIP_THROW(QgsServerApiBadRequestException) |
| Handles the request within its context. More...
|
|
std::string | href (const QgsServerApiContext &context, const QString &extraPath=QString(), const QString &extension=QString()) const |
| Returns an URL to self, to be used for links to the current resources and as a base for constructing links to sub-resources. More...
|
|
void | htmlDump (const json &data, const QgsServerApiContext &context) const |
| Writes data as HTML to the response stream in context using a template. More...
|
|
void | jsonDump (json &data, const QgsServerApiContext &context, const QString &contentType=QStringLiteral("application/json")) const |
| Writes data to the context response stream as JSON (indented if debug is active), an optional contentType can be specified. More...
|
|
json | jsonTags () const |
| Returns tags as JSON. More...
|
|
QgsVectorLayer * | layerFromContext (const QgsServerApiContext &context) const |
| Returns a vector layer instance from the "collectionId" parameter of the path in the given context, requires a valid project instance in the context. More...
|
|
json | link (const QgsServerApiContext &context, const QgsServerOgcApi::Rel &linkType=QgsServerOgcApi::Rel::self, const QgsServerOgcApi::ContentType contentType=QgsServerOgcApi::ContentType::JSON, const std::string &title="") const |
| Builds and returns a link to the resource. More...
|
|
json | links (const QgsServerApiContext &context) const |
| Returns all the links for the given request context. More...
|
|
virtual std::string | linkTitle () const =0 |
| Title for the handler link. More...
|
|
virtual QgsServerOgcApi::Rel | linkType () const =0 |
| Main role for the resource link. More...
|
|
virtual std::string | operationId () const =0 |
| Returns the operation id for template file names and other internal references. More...
|
|
virtual QList< QgsServerQueryStringParameter > | parameters (const QgsServerApiContext &context) const |
| Returns a list of query string parameters. More...
|
|
virtual QRegularExpression | path () const =0 |
| URL pattern for this handler, named capture group are automatically extracted and returned by values() More...
|
|
virtual json | schema (const QgsServerApiContext &context) const |
| Returns handler information from the context for the OPENAPI description (id, description and other metadata) as JSON. More...
|
|
virtual const QString | staticPath (const QgsServerApiContext &context) const |
| Returns the absolute path to the base directory where static resources for this handler are stored in the given context. More...
|
|
virtual std::string | summary () const =0 |
| Summary. More...
|
|
virtual QStringList | tags () const |
| Tags. More...
|
|
virtual const QString | templatePath (const QgsServerApiContext &context) const |
| Returns the HTML template path for the handler in the given context. More...
|
|
virtual QVariantMap | values (const QgsServerApiContext &context) const SIP_THROW(QgsServerApiBadRequestException) |
| Analyzes the incoming request context and returns the validated parameter map, throws QgsServerApiBadRequestError in case of errors. More...
|
|
void | write (json &data, const QgsServerApiContext &context, const json &htmlMetadata=nullptr) const |
| Writes data to the context response stream, content-type is calculated from the context request, optional htmlMetadata for the HTML templates can be specified and will be added as "metadata" to the HTML template variables. More...
|
|
void | write (QVariant &data, const QgsServerApiContext &context, const QVariantMap &htmlMetadata=QVariantMap()) const SIP_THROW(QgsServerApiBadRequestException) |
| Writes data to the context response stream, content-type is calculated from the context request, optional htmlMetadata for the HTML templates can be specified and will be added as "metadata" to the HTML template variables. More...
|
|