U
    ¤Yˆh  ã                   @   s0   d Z ddlmZ ddlmZ G dd„ deƒ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.                                   *
*                                                                         *
***************************************************************************
é    )ÚQgsServerFilter)ÚLoggerc                       s$   e Zd Z‡ fdd„Zdd„ Z‡  ZS )ÚAtlasPrintFilterc                    s.   t t| ƒ |¡ tƒ | _| j d¡ || _d S )NzInit print filter)Úsuperr   Ú__init__r   ÚloggerÚinfoÚserver_iface)Úselfr	   ©Ú	__class__© ú3/var/www/lizmap/lizmap/plugins/atlasprint/filter.pyr      s    zAtlasPrintFilter.__init__c                 C   s¦   | j  ¡ }| ¡ }| d¡}|s$d S | ¡ dkr4d S d|kr@d S |d  ¡ dkrTd S |d  ¡ }| dd¡ | dd¡ |dkrŽ| dd	¡ n|d
kr¢| dd¡ d S )NÚSERVICEZwmsÚREQUEST)ÚgetprintatlasÚgetcapabilitiesatlasZATLASZVERSIONz1.0.0r   ZGetCapabilitiesr   ZGetPrint)r	   ÚrequestHandlerZparameterMapÚgetÚlowerÚsetParameter)r
   ZhandlerÚparamsÚserviceÚrequestr   r   r   ÚrequestReady!   s$    

zAtlasPrintFilter.requestReady)Ú__name__Ú
__module__Ú__qualname__r   r   Ú__classcell__r   r   r   r   r      s   r   N)Ú__doc__Úqgis.serverr   Úatlasprint.loggerr   r   r   r   r   r   Ú<module>   s   