[CMF-checkins] CVS: CMF/CMFSetup - toolset.py:1.2

Tres Seaver tseaver at zope.com
Tue Jun 29 17:50:01 EDT 2004


Update of /cvs-repository/CMF/CMFSetup
In directory cvs.zope.org:/tmp/cvs-serv15537

Modified Files:
	toolset.py 
Log Message:


  - Add tooset export.


=== CMF/CMFSetup/toolset.py 1.1 => 1.2 ===
--- CMF/CMFSetup/toolset.py:1.1	Fri Jun 25 16:21:56 2004
+++ CMF/CMFSetup/toolset.py	Tue Jun 29 17:49:30 2004
@@ -8,8 +8,11 @@
 from Acquisition import Implicit
 from Globals import InitializeClass
 
+from Products.PageTemplates.PageTemplateFile import PageTemplateFile
+
 from permissions import ManagePortal
 from utils import HandlerBase
+from utils import _xmldir
 
 class ToolInitializer( Implicit ):
 
@@ -103,6 +106,13 @@
                                     , 'class' : dotted_name
                                     }
 
+    security.declareProtected( ManagePortal, 'generateXML' )
+    def generateXML( self ):
+
+        """ Pseudo API.
+        """
+        return self._toolsetConfig()
+
     security.declareProtected( ManagePortal, 'parseXML' )
     def parseXML( self, text, encoding=None ):
 
@@ -132,6 +142,12 @@
 
         self._forbidden = []
         self._required = {}
+
+    security.declarePrivate( '_toolsetConfig' )
+    _toolsetConfig = PageTemplateFile( 'tscExport.xml'
+                                     , _xmldir
+                                     , __name__='toolsetConfig'
+                                     )
 
 InitializeClass( ToolInitializer )
 



More information about the CMF-checkins mailing list