[z3-checkins] r5199 - in z3/Five/trunk: . demo/FiveViewsDemo handlers tests/products/FiveTest

faassen at codespeak.net faassen at codespeak.net
Mon Jun 21 17:38:29 MEST 2004


Author: faassen
Date: Mon Jun 21 17:38:28 2004
New Revision: 5199

Modified:
   z3/Five/trunk/demo/FiveViewsDemo/configure.zcml
   z3/Five/trunk/handlers/content.py
   z3/Five/trunk/meta.zcml
   z3/Five/trunk/metaconfigure.py
   z3/Five/trunk/tests/products/FiveTest/configure.zcml
Log:
Start to move schemas in zope.app instead of redefining them ourselves.
Use the same ZCML namespaces as zope 3 as much as possible. This means
that instead of five:page, you need browser:page; the 'five' namespace
is now reserved for directives that unique to Five.


Modified: z3/Five/trunk/demo/FiveViewsDemo/configure.zcml
==============================================================================
--- z3/Five/trunk/demo/FiveViewsDemo/configure.zcml	(original)
+++ z3/Five/trunk/demo/FiveViewsDemo/configure.zcml	Mon Jun 21 17:38:28 2004
@@ -1,7 +1,8 @@
 <configure xmlns="http://namespaces.zope.org/zope"
+           xmlns:browser="http://namespaces.zope.org/browser"
            xmlns:five="http://namespaces.zope.org/five">
 
-  <five:page
+  <browser:page
     for=".interfaces.ISimpleContent"
     class=".browser.SimpleContentView"
     attribute="eagle"
@@ -18,7 +19,7 @@
     class="OFS.Folder.Folder"
     />
 
-  <five:page
+  <browser:page
     for=".interfaces.IFolder"
     class=".browser.SimpleFolderView"
     attribute="eagle"
@@ -26,16 +27,14 @@
     permission="zope.Public"
     />
 
-  <five:content class=".simplecontent.SimpleContent">
+  <content class=".simplecontent.SimpleContent">
 
     <allow interface=".interfaces.IPublicSimpleContent" />
 
-    <deny interface=".interfaces.IPrivateSimpleContent" />
-
     <require permission="zope.ViewManagementScreens"
 	     interface=".interfaces.IProtectedSimpleContent"
 	     />
 
-  </five:content>
+  </content>
 
 </configure>

Modified: z3/Five/trunk/handlers/content.py
==============================================================================
--- z3/Five/trunk/handlers/content.py	(original)
+++ z3/Five/trunk/handlers/content.py	Mon Jun 21 17:38:28 2004
@@ -24,7 +24,7 @@
 from AccessControl import ClassSecurityInfo
 from Globals import InitializeClass
 from Products.Five.metaconfigure import interface as provideInterface
-from Products.Five.security.interfaces import IPermission
+from zope.app.security.interfaces import IPermission
 from Products.Five.security.permission import CheckerPublic, CheckerPrivate
 
 def dottedName(klass):

Modified: z3/Five/trunk/meta.zcml
==============================================================================
--- z3/Five/trunk/meta.zcml	(original)
+++ z3/Five/trunk/meta.zcml	Mon Jun 21 17:38:28 2004
@@ -6,98 +6,93 @@
 
     <meta:directive
         name="permission"
-        schema=".metadirectives.IDefinePermissionDirective"
+        schema="zope.app.security.metadirectives.IDefinePermissionDirective"
         handler=".metaconfigure.definePermission" />
 
     <meta:directive
         name="interface"
-        schema=".metadirectives.IInterfaceDirective"
+        schema="zope.app.component.metadirectives.IInterfaceDirective"
         handler=".metaconfigure.interface"
         />
 
     <meta:directive
         name="adapter"
-        schema=".metadirectives.IAdapterDirective"
+        schema="zope.app.component.metadirectives.IAdapterDirective"
         handler=".metaconfigure.adapter"
         />
 
     <meta:directive
         name="utility"
-        schema=".metadirectives.IUtilityDirective"
+        schema="zope.app.component.metadirectives.IUtilityDirective"
         handler=".metaconfigure.utility"
         />
 
     <meta:directive
         name="serviceType"
-        schema=".metadirectives.IServiceTypeDirective"
+        schema="zope.app.component.metadirectives.IServiceTypeDirective"
         handler=".metaconfigure.serviceType"
         />
 
     <meta:directive
         name="service"
-        schema=".metadirectives.IServiceDirective"
+        schema="zope.app.component.metadirectives.IServiceDirective"
         handler=".metaconfigure.service"
         />
 
-  </meta:directives>
+    <meta:complexDirective
+        name="content"
+        schema="zope.app.component.metadirectives.IClassDirective"
+        handler=".handlers.content.ContentDirective"
+        >
 
-  <meta:directives namespace="http://namespaces.zope.org/five">
+      <meta:subdirective
+          name="implements"
+          schema="zope.app.component.metadirectives.IImplementsSubdirective"
+          />
 
-    <meta:directive
-        name="page"
-        schema=".fivedirectives.IPageDirective"
-        handler=".fiveconfigure.page"
-        />
+      <meta:subdirective
+          name="require"
+          schema="zope.app.component.metadirectives.IRequireSubdirective"
+          />
+
+      <meta:subdirective
+          name="allow"
+          schema="zope.app.component.metadirectives.IAllowSubdirective"
+          />
+
+    </meta:complexDirective>
 
     <meta:directive
        name="layer"
-       schema=".fivedirectives.ILayerDirective"
+       schema="zope.app.component.metadirectives.ILayerDirective"
        handler=".fiveconfigure.layer"
        />
 
      <meta:directive
        name="skin"
-       schema=".fivedirectives.ISkinDirective"
+       schema="zope.app.component.metadirectives.ISkinDirective"
        handler=".fiveconfigure.skin"
        />
 
      <meta:directive
        name="defaultSkin"
-       schema=".fivedirectives.IDefaultSkinDirective"
+       schema="zope.app.component.metadirectives.IDefaultSkinDirective"
        handler=".fiveconfigure.defaultSkin"
        />
 
+  </meta:directives>
 
-     <!-- This is a simplified version of z3's content directive,        -->
-     <!-- to accomodate the fact that z2's security is not as powerful -->
-
-    <meta:complexDirective
-        name="content"
-        schema=".directives.content.IContentDirective"
-        handler=".handlers.content.ContentDirective"
-        >
-
-      <meta:subdirective
-          name="implements"
-          schema=".directives.content.IImplementsSubdirective"
-          />
-
-      <meta:subdirective
-          name="require"
-          schema=".directives.content.IRequireSubdirective"
-          />
-
-      <meta:subdirective
-          name="allow"
-          schema=".directives.content.IAllowSubdirective"
-          />
+  <meta:directives namespace="http://namespaces.zope.org/browser">
+    
+    <meta:directive
+        name="page"
+        schema="zope.app.publisher.browser.metadirectives.IPageDirective"
+        handler=".fiveconfigure.page"
+        />
 
-      <meta:subdirective
-          name="deny"
-          schema=".directives.content.IDenySubdirective"
-          />
+  </meta:directives>
 
-    </meta:complexDirective>
+  <meta:directives namespace="http://namespaces.zope.org/five">
 
     <!-- specific to Five -->
     <meta:directive

Modified: z3/Five/trunk/metaconfigure.py
==============================================================================
--- z3/Five/trunk/metaconfigure.py	(original)
+++ z3/Five/trunk/metaconfigure.py	Mon Jun 21 17:38:28 2004
@@ -18,8 +18,8 @@
 from zope.component import getService, getServices
 from zope.component.servicenames import Adapters
 from provideinterface import provideInterface
-from Products.Five.security.permission import Permission
-from Products.Five.security.interfaces import IPermission
+from zope.app.security.permission import Permission
+from zope.app.security.interfaces import IPermission
 
 def handler(serviceName, methodName, *args, **kwargs):
     method=getattr(getService(serviceName), methodName)
@@ -132,3 +132,4 @@
 def definePermission(_context, id, title, description=''):
     permission = Permission(id, title, description)
     utility(_context, IPermission, permission, name=id)
+

Modified: z3/Five/trunk/tests/products/FiveTest/configure.zcml
==============================================================================
--- z3/Five/trunk/tests/products/FiveTest/configure.zcml	(original)
+++ z3/Five/trunk/tests/products/FiveTest/configure.zcml	Mon Jun 21 17:38:28 2004
@@ -1,4 +1,5 @@
 <configure xmlns="http://namespaces.zope.org/zope"
+           xmlns:browser="http://namespaces.zope.org/browser"
            xmlns:five="http://namespaces.zope.org/five">
 
   <adapter
@@ -6,7 +7,7 @@
     provides=".interfaces.IAdapted"
     factory=".classes.Adapter" />
 
-  <five:page
+  <browser:page
     for=".interfaces.ISimpleContent"
     class=".browser.SimpleContentView"
     attribute="eagle"
@@ -14,7 +15,7 @@
     permission="zope.ViewManagementScreens"
     />
 
-  <five:page
+  <browser:page
     for=".interfaces.ISimpleContent"
     class=".browser.SimpleContentView"
     template="falcon.pt"
@@ -22,28 +23,28 @@
     permission="zope.ViewManagementScreens"
     />
 
-  <five:page
+  <browser:page
     for=".interfaces.ISimpleContent"
     template="owl.pt"
     name="owl.html"
     permission="zope.ViewManagementScreens"
     />
 
-  <five:page
+  <browser:page
     for=".interfaces.ISimpleContent"
     template="flamingo.pt"
     name="flamingo.html"
     permission="zope.ViewManagementScreens"
     />
 
-  <five:page
+  <browser:page
     for=".interfaces.ISimpleContent"
     template="flamingo2.pt"
     name="flamingo2.html"
     permission="zope.ViewManagementScreens"
     />
 
-  <five:page
+  <browser:page
     for=".interfaces.ISimpleContent"
     class=".browser.SimpleContentView"
     template="condor.pt"


More information about the z3-checkins mailing list