[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/app/ Merge r27007: Factory ids have to be real ids now,

Philipp von Weitershausen philikon at philikon.de
Wed Aug 11 16:15:46 EDT 2004


Log message for revision 27027:
  Merge r27007: Factory ids have to be real ids now,
  i.e. they need to contain at least a dot or be a URI.
  


Changed:
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/component/metadirectives.py
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/component/tests/test_contentdirective.py
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/component/tests/test_directives.py
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/component/tests/test_factory.py
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/dtmlpage/configure.zcml
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/errorservice/configure.zcml
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/folder/configure.zcml
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/configure.zcml
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/i18nfile/configure.zcml
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/principalannotation/configure.zcml
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/rotterdam/ftests.py
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/sqlscript/configure.zcml
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/zptpage/configure.zcml


-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/component/metadirectives.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/component/metadirectives.py	2004-08-11 20:13:04 UTC (rev 27026)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/component/metadirectives.py	2004-08-11 20:15:45 UTC (rev 27027)
@@ -259,7 +259,7 @@
         required=True
         )
     
-    id = zope.schema.TextLine(
+    id = zope.schema.Id(
         title=u"ID",
         required=False
         )
@@ -457,7 +457,7 @@
     Specify the factory used to create this content object
     """
 
-    id = zope.schema.TextLine(
+    id = zope.schema.Id(
         title=u"ID",
         description=u"""
         the identifier for this factory in the ZMI factory

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/component/tests/test_contentdirective.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/component/tests/test_contentdirective.py	2004-08-11 20:13:04 UTC (rev 27026)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/component/tests/test_contentdirective.py	2004-08-11 20:15:45 UTC (rev 27027)
@@ -146,15 +146,15 @@
 <permission id="zope.Foo" title="Zope Foo Permission" />
 
 <content class="zope.app.component.tests.exampleclass.ExampleClass">
-    <factory
-      id="Example"
+  <factory
+      id="test.Example"
       title="Example content"
       description="Example description"
-    />
+      />
 </content>
                        """)
         xmlconfig(f)
-        factory = zapi.getUtility(IFactory, 'Example')
+        factory = zapi.getUtility(IFactory, 'test.Example')
         self.assertEquals(factory.title, "Example content")
         self.assertEquals(factory.description, "Example description")
 
@@ -183,14 +183,14 @@
         f = configfile("""
 <content class="zope.app.component.tests.exampleclass.ExampleClass">
     <factory
-      id="Example"
+      id="test.Example"
       title="Example content"
       description="Example description"
     />
 </content>
             """)
         xmlconfig(f)
-        factory = zapi.getUtility(IFactory, 'Example')
+        factory = zapi.getUtility(IFactory, 'test.Example')
         self.assert_(hasattr(factory, '__Security_checker__'))
 
 

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/component/tests/test_directives.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/component/tests/test_directives.py	2004-08-11 20:13:04 UTC (rev 27026)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/component/tests/test_directives.py	2004-08-11 20:15:45 UTC (rev 27027)
@@ -893,14 +893,14 @@
         xmlconfig(StringIO(template % (
             '''
             <factory
-               id="foo"
+               id="foo.bar"
                component="zope.app.component.tests.factory.f"
                />
             '''
             )))
 
         from factory import X
-        self.assertEqual(zapi.createObject(None, 'foo').__class__, X)
+        self.assertEqual(zapi.createObject(None, 'foo.bar').__class__, X)
 
 def test_suite():
     return unittest.TestSuite((

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/component/tests/test_factory.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/component/tests/test_factory.py	2004-08-11 20:13:04 UTC (rev 27026)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/component/tests/test_factory.py	2004-08-11 20:15:45 UTC (rev 27027)
@@ -57,13 +57,13 @@
 <permission id="zope.Foo" title="Zope Foo Permission" />
 <content class="zope.app.component.tests.exampleclass.ExampleClass">
     <factory
-      id="Example"
+      id="test.Example"
       title="Example content"
       description="Example description"
        />
 </content>''')
         xmlconfig(f)
-        obj = createObject(None, 'Example')
+        obj = createObject(None, 'test.Example')
         obj = removeAllProxies(obj)
         self.failUnless(isinstance(obj, ExampleClass))
 

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/dtmlpage/configure.zcml
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/dtmlpage/configure.zcml	2004-08-11 20:13:04 UTC (rev 27026)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/dtmlpage/configure.zcml	2004-08-11 20:15:45 UTC (rev 27027)
@@ -11,7 +11,7 @@
 
   <content class=".dtmlpage.DTMLPage">
     <factory
-        id="DTMLPage"
+        id="zope.app.DTMLPage"
         title="DTML Page"
         description="A simple, content-based DTML Page"
         />

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/errorservice/configure.zcml
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/errorservice/configure.zcml	2004-08-11 20:13:04 UTC (rev 27026)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/errorservice/configure.zcml	2004-08-11 20:15:45 UTC (rev 27027)
@@ -9,7 +9,7 @@
 
   <content class=".ErrorReportingService">
     <factory
-        id="ErrorLogging"
+        id="zope.app.ErrorLogging"
         />
     <require
         permission="zope.Public"

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/folder/configure.zcml
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/folder/configure.zcml	2004-08-11 20:13:04 UTC (rev 27026)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/folder/configure.zcml	2004-08-11 20:15:45 UTC (rev 27027)
@@ -10,7 +10,7 @@
 
   <content class=".folder.Folder">
     <factory
-        id="Folder"
+        id="zope.app.content.Folder"
         title="Folder"
         description="Minimal folder"
         />

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/configure.zcml
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/configure.zcml	2004-08-11 20:13:04 UTC (rev 27026)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/configure.zcml	2004-08-11 20:15:45 UTC (rev 27027)
@@ -19,7 +19,7 @@
 <content 
     class=".translationdomain.TranslationDomain">
    <factory 
-        id="TranslationService" 
+        id="zope.app.TranslationService" 
         />
     <implements
         interface="zope.app.utility.interfaces.ILocalUtility" 
@@ -60,8 +60,9 @@
 </content>
 
 <factory 
-     component="zope.app.i18n.messagecatalog.MessageCatalog" 
-     id="Message Catalog"/>
+    component="zope.app.i18n.messagecatalog.MessageCatalog" 
+    id="zope.app.MessageCatalog"
+    />
 
 
 <!-- Setup Export and Import Filters -->

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/i18nfile/configure.zcml
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/i18nfile/configure.zcml	2004-08-11 20:13:04 UTC (rev 27026)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/i18nfile/configure.zcml	2004-08-11 20:15:45 UTC (rev 27027)
@@ -20,7 +20,7 @@
 
   <content class=".i18nfile.I18nFile">
     <factory
-        id="I18nFile"
+        id="zope.app.content.I18nFile"
         title="I18n File"
         description="An Internationalized File"
         />
@@ -47,7 +47,7 @@
 
   <content class=".i18nimage.I18nImage">
     <factory
-        id="I18nImage"
+        id="zope.app.content.I18nImage"
         title="I18n Image"
         description="An Internationalized Image"
         />

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/principalannotation/configure.zcml
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/principalannotation/configure.zcml	2004-08-11 20:13:04 UTC (rev 27026)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/principalannotation/configure.zcml	2004-08-11 20:15:45 UTC (rev 27027)
@@ -9,7 +9,7 @@
 
   <content class=".PrincipalAnnotationService">
     <factory
-        id="IPrincipalAnnotationService"
+        id="zope.app.PrincipalAnnotationService"
         />
     <require
         permission="zope.Public"

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/rotterdam/ftests.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/rotterdam/ftests.py	2004-08-11 20:13:04 UTC (rev 27026)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/rotterdam/ftests.py	2004-08-11 20:15:45 UTC (rev 27027)
@@ -22,23 +22,23 @@
     def testnavtree(self):
         # Add some folders
         response = self.publish("/+/action.html", basic='mgr:mgrpw', 
-                                form={'type_name':u'Folder', 
+                                form={'type_name':u'zope.app.content.Folder', 
                                       'id':u'First'})
         self.assertEqual(response.getStatus(), 302)
         response = self.publish("/+/action.html", basic='mgr:mgrpw', 
-                                form={'type_name':u'Folder', 
+                                form={'type_name':u'zope.app.content.Folder', 
                                       'id':u'S&econd'})
         self.assertEqual(response.getStatus(), 302)
         response = self.publish("/+/action.html", basic='mgr:mgrpw', 
-                                form={'type_name':u'Folder', 
+                                form={'type_name':u'zope.app.content.Folder', 
                                       'id':u'Third'})
         self.assertEqual(response.getStatus(), 302)
         response = self.publish("/First/+/action.html", basic='mgr:mgrpw', 
-                                form={'type_name':u'Folder', 
+                                form={'type_name':u'zope.app.content.Folder', 
                                       'id':u'Firsts"Folder'})
         self.assertEqual(response.getStatus(), 302)
         response = self.publish("/First/+/action.html", basic='mgr:mgrpw', 
-                                form={'type_name':u'Folder', 
+                                form={'type_name':u'zope.app.content.Folder', 
                                       'id':u'somesite'})
         self.assertEqual(response.getStatus(), 302)
 
@@ -66,7 +66,7 @@
         tree = minidom.parseString(response.getBody())
 
         response = self.publish("/First/+/action.html", basic='mgr:mgrpw', 
-                                form={'type_name':u'Folder', 
+                                form={'type_name':u'zope.app.content.Folder', 
                                       'id':u'Firsts2ndFolder'})
         self.assertEqual(response.getStatus(), 302)
 

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/sqlscript/configure.zcml
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/sqlscript/configure.zcml	2004-08-11 20:13:04 UTC (rev 27026)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/sqlscript/configure.zcml	2004-08-11 20:15:45 UTC (rev 27027)
@@ -21,7 +21,7 @@
 
   <content class=".sqlscript.SQLScript">
     <factory
-        id="SQLScript"
+        id="zope.app.content.SQLScript"
         title="SQL Script"
         description="A content-based script to execute dyanmic SQL."
         />

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/zptpage/configure.zcml
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/zptpage/configure.zcml	2004-08-11 20:13:04 UTC (rev 27026)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/zptpage/configure.zcml	2004-08-11 20:15:45 UTC (rev 27027)
@@ -10,7 +10,7 @@
 
   <content class=".zptpage.ZPTPage">
     <factory
-        id="ZPTPage"
+        id="zope.app.content.ZPTPage"
         title="ZPT Page"
         description="A simple, content-based Page Template"
         />



More information about the Zope3-Checkins mailing list