Ñò
æ×qKc           @   sb  d  Z  d d k l Z d d k l Z d d k l Z d d d „  ƒ  YZ e ƒ  Z e i d e ƒ d d d	 „  ƒ  YZ e ƒ  Z e i d
 e ƒ d d d „  ƒ  YZ	 e	 ƒ  Z	 e i d e	 ƒ d d d „  ƒ  YZ
 e
 ƒ  Z
 y  d d k Z e i d e
 ƒ Wn e j
 o n Xd d d „  ƒ  YZ e ƒ  Z y  d d k Z e i d e ƒ Wn e j
 o n Xd S(   s»   
$RCSfile: Generators.py,v $

Default generators for result objects

Author: Philipp von Weitershausen <philikon@philikon.de>

$Id: Generators.py,v 1.2 2003/04/29 09:22:08 philikon Exp $
iÿÿÿÿ(   t
   implements(   t
   IGenerator(   t   GeneratorRegistryt   DTMLMethodGeneratorc           B   s*   e  Z e e ƒ d  „  Z d d d „ Z RS(   c   	      K   s_   d d k  l } | | ƒ } | | _ | | _ x* | i ƒ  D] \ } } t | | | ƒ q; W| S(   Niÿÿÿÿ(   t
   DTMLMethod(   t   OFS.DTMLMethodR   t   idt   titlet   itemst   setattr(	   t   selfR   R   t	   rawStringt   kwR   t	   resultObjt   namet   value(    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyt   createObject   s    		 c         C   s   | i  | ƒ | | | ƒ S(   N(   t   __of__(   R
   t   objt   clientt   REQUESTt   RESPONSE(    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyt	   getResult   s    N(   t   __name__t
   __module__R    R   R   t   NoneR   (    (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyR      s   
		s   DTML Methodt   DTMLDocumentGeneratorc           B   s*   e  Z e e ƒ d  „  Z d d d „ Z RS(   c   	      K   s_   d d k  l } | | ƒ } | | _ | | _ x* | i ƒ  D] \ } } t | | | ƒ q; W| S(   Niÿÿÿÿ(   t   DTMLDocument(   t   OFS.DTMLDocumentR   R   R   R   R	   (	   R
   R   R   R   R   R   R   R   R   (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyR   &   s    		 c         C   s   | i  | ƒ | | | ƒ S(   N(   R   (   R
   R   R   R   R   (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyR   /   s    N(   R   R   R    R   R   R   R   (    (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyR   "   s   
		s   DTML Documentt   FileGeneratorc           B   s*   e  Z e e ƒ d  „  Z d d d „ Z RS(   c   
      K   sh   d d k  l } | i d d ƒ } | | | | | ƒ } x* | i ƒ  D] \ } }	 t | | |	 ƒ qD W| S(   Niÿÿÿÿ(   t   Filet   content_types
   text/plain(   t	   OFS.ImageR   t   getR   R	   (
   R
   R   R   R   R   R   R   R   R   R   (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyR   9   s     c         C   s   | i  | ƒ i | | ƒ S(   N(   R   t
   index_html(   R
   R   R   R   R   (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyR   A   s    N(   R   R   R    R   R   R   R   (    (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyR   5   s   
	R   t   ZPTGeneratorc           B   s*   e  Z e e ƒ d  „  Z d d d „ Z RS(   c   
      K   sr   d d k  l } | i d d ƒ } | | | | ƒ } | i | ƒ x* | i ƒ  D] \ } }	 t | | |	 ƒ qN W| S(   Niÿÿÿÿ(   t   ZopePageTemplateR   s	   text/html(   t'   Products.PageTemplates.ZopePageTemplateR$   R!   t   pt_setTitleR   R	   (
   R
   R   R   R   R   R$   R   R   R   R   (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyR   K   s     c         C   s   | i  | ƒ | | | ƒ S(   N(   R   (   R
   R   R   R   R   (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyR   T   s    N(   R   R   R    R   R   R   R   (    (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyR#   G   s   
		Ns   Page Templatet   ParsedXMLGeneratorc           B   s*   e  Z e e ƒ d  „  Z d d d „ Z RS(   c         K   s;   d d k  l } | i d d ƒ } | | | d | ƒ} | S(   Niÿÿÿÿ(   t	   ParsedXMLR   s   text/xmlt   contentType(   t   Products.ParsedXML.ParsedXMLR(   R!   (   R
   R   R   R   R   R(   R   R   (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyR   b   s    c         C   s   | i  | ƒ i | | ƒ S(   N(   R   R"   (   R
   R   R   R   R   (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyR   h   s    N(   R   R   R    R   R   R   R   (    (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyR'   ^   s   
	s
   Parsed XML(    (    (    (    (    (   t   __doc__t   zope.interfaceR    t
   interfacesR   R   R   t   registerR   R   R#   t   Products.PageTemplatest   Productst   ImportErrorR'   t   Products.ParsedXML(    (    (    s/   /srv/Zope/Products/ZopeXMLMethods/Generators.pyt   <module>	   s4   					