U
    Yh	                     @   sj   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ dZd	Zd
ZG dd dZdS )u  
/***************************************************************************
    QGIS Server Plugin Filters: Add a new request to print a specific atlas
    feature
    ---------------------
    Date                 : October 2017
    Copyright            : (C) 2017 by Michaël Douchin - 3Liz
    Email                : mdouchin at 3liz dot com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
    )QgsServerInterface)AtlasPrintFilter)Logger)	Plausible)AtlasPrintService)versionzCopyright 2024, 3LizzGPL version 3zinfo@3liz.orgc                   @   s    e Zd ZdZeddddZdS )AtlasPrintServerz>Plugin for QGIS server
    this plugin loads AtlasPrint filterN)server_ifacereturnc              
   C   s  || _ t | _| jdt  zt | _| j  W n: t	k
rr } z| j
| | jd W 5 d }~X Y nX z| }|t  W n6 t	k
r } z| jd|  W 5 d }~X Y nX z|t| j d W n8 t	k
r } z| jd|  W 5 d }~X Y nX d S )NzInit server version "{}"z!Error while calling the API statsz$Error loading filter atlasprint : {}2   )r	   r   Zloggerinfoformatr   r   Z	plausibleZrequest_stat_event	ExceptionZlog_exceptionZcriticalserviceRegistryZregisterServicer   registerFilterr   )selfr	   eZreg r   3/var/www/lizmap/lizmap/plugins/atlasprint/server.py__init__&   s(    zAtlasPrintServer.__init__)__name__
__module____qualname____doc__r   r   r   r   r   r   r   "   s   r   N)r   qgis.serverr   Zatlasprint.filterr   Zatlasprint.loggerr   Zatlasprint.plausibler   Zatlasprint.servicer   Zatlasprint.toolsr   __copyright__Z__license__Z	__email__r   r   r   r   r   <module>   s   