[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser - globalbrowsermenuservice.py:1.12 icon.py:1.7 metaconfigure.py:1.6 viewmeta.py:1.19

Philipp von Weitershausen philikon@philikon.de
Wed, 9 Apr 2003 16:52:03 -0400


Update of /cvs-repository/Zope3/src/zope/app/publisher/browser
In directory cvs.zope.org:/tmp/cvs-serv3948/publisher/browser

Modified Files:
	globalbrowsermenuservice.py icon.py metaconfigure.py 
	viewmeta.py 
Log Message:
* introduced IXMLRepresentable interface for objects representing xml.

* introduced a new ZCML directive to register XML Schemas as interfaces
  by specifying their URI.

* changed the way interfaces are resolved in all configuration directives
  and some other places. Thus, you can now also specify the URI of an
  XML schema instead of a dotted interface name everywhere you are required
  to specify an interface name.


=== Zope3/src/zope/app/publisher/browser/globalbrowsermenuservice.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/publisher/browser/globalbrowsermenuservice.py:1.11	Tue Feb 11 21:17:27 2003
+++ Zope3/src/zope/app/publisher/browser/globalbrowsermenuservice.py	Wed Apr  9 16:51:32 2003
@@ -28,7 +28,7 @@
 
 from zope.app.security.permission import checkPermission
 
-from zope.app.component.metaconfigure import handler
+from zope.app.component.metaconfigure import handler, resolveInterface
 from zope.app.interfaces.publisher.browser import IBrowserMenuService
 from zope.app.pagetemplate.engine import Engine
 from zope.app.publication.browser import PublicationTraverser
@@ -168,7 +168,7 @@
         if for_ == '*':
             self.interface = None
         else:
-            self.interface = _context.resolve(for_)
+            self.interface = resolveInterface(_context, for_)
         self.menu = menu
 
     def menuItem(self, _context, action, title, description='',


=== Zope3/src/zope/app/publisher/browser/icon.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/publisher/browser/icon.py:1.6	Tue Feb 11 21:17:27 2003
+++ Zope3/src/zope/app/publisher/browser/icon.py	Wed Apr  9 16:51:32 2003
@@ -20,7 +20,7 @@
 import os
 import re
 
-from zope.app.component.metaconfigure import handler
+from zope.app.component.metaconfigure import handler, resolveInterface
 from zope.configuration.action import Action
 from zope.app.publisher.browser import metaconfigure
 from zope.app.traversing.namespace import getResourceInContext
@@ -64,7 +64,7 @@
 def IconDirective(_context, name, for_, file=None, resource=None,
                   layer='default', alt=None):
 
-    for_ = _context.resolve(for_)
+    for_ = resolveInterface(_context, for_)
     iname = for_.__name__
 
     if alt is None:


=== Zope3/src/zope/app/publisher/browser/metaconfigure.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/publisher/browser/metaconfigure.py:1.5	Tue Feb 11 21:17:27 2003
+++ Zope3/src/zope/app/publisher/browser/metaconfigure.py	Wed Apr  9 16:51:32 2003
@@ -22,7 +22,7 @@
 from zope.app.services.servicenames import Interfaces
 
 from zope.app.component.metaconfigure \
-     import defaultView as _defaultView, skin as _skin, handler
+    import defaultView as _defaultView, skin as _skin, handler, resolveInterface
 
 from zope.app.publisher.browser.resourcemeta import resource
 from zope.app.publisher.browser.i18nresourcemeta import I18nResource
@@ -42,7 +42,7 @@
         actions = []
 
     if for_ is not None:
-        for_ = _context.resolve(for_)
+        for_ = resolveInterface(_context, for_)
 
     type = IBrowserPresentation
 


=== Zope3/src/zope/app/publisher/browser/viewmeta.py 1.18 => 1.19 ===
--- Zope3/src/zope/app/publisher/browser/viewmeta.py:1.18	Tue Apr  8 08:21:37 2003
+++ Zope3/src/zope/app/publisher/browser/viewmeta.py	Wed Apr  9 16:51:32 2003
@@ -40,7 +40,7 @@
 
 from zope.publisher.browser import BrowserView
 
-from zope.app.component.metaconfigure import handler
+from zope.app.component.metaconfigure import handler, resolveInterface
 
 from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
 from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
@@ -398,7 +398,7 @@
 def defaultView(_context, name, for_=None):
 
     if for_ is not None:
-        for_ = _context.resolve(for_)
+        for_ = resolveInterface(_context, for_)
 
     actions = [
         Action(
@@ -449,7 +449,7 @@
     # Allow access for all names defined by named interfaces
     if allowed_interface.strip():
         for i in allowed_interface.strip().split():
-            i = _context.resolve(i)
+            i = resolveInterface(_context, i)
             actions .append(
                 Action(discriminator = None, callable = handler,
                        args = (Interfaces, 'provideInterface', None, i)
@@ -469,7 +469,7 @@
         for_ = None
 
     if for_ is not None:
-        for_ = _context.resolve(for_)
+        for_ = resolveInterface(_context, for_)
 
         actions .append(
             Action(discriminator = None, callable = handler,