[Zope-Checkins] CVS: Zope3/lib/python/Zope/Proxy - ContextWrapper.py:1.4 IContextWrapper.py:1.4

Jim Fulton jim@zope.com
Thu, 11 Jul 2002 14:21:38 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Proxy
In directory cvs.zope.org:/tmp/cvs-serv7355/lib/python/Zope/Proxy

Modified Files:
	ContextWrapper.py IContextWrapper.py 
Log Message:

Reimplemented service managers to be package based. Service managers
are no longer containers. They have a packages subobject (not a
packages service) that contains packages. TTW components are created
in packages. To register a component, create the appropriate component
directive objects (these should be called configuration objects).

This should be viewed as a prototype to illustrate the idea of
packages. Lots of things can change (especially UI) and many things
aren't done (e.g. visiting created directives).

In the course of this, I fixed a bunch of bugs and problems in
traversal machinery. 

I also renamed Zope.ComponentArchitecture.IServiceManager back to
IServiceService, since this interface doesn't actually specify any
management.  



=== Zope3/lib/python/Zope/Proxy/ContextWrapper.py 1.3 => 1.4 ===
 from Zope.Security.Proxy import Proxy, getChecker, getObject
 from Zope.ContextWrapper import Wrapper as _Wrapper
 from Zope.ContextWrapper import wrapperTypes, getobject, getdict
-from Zope.ContextWrapper import getcontext, getinnercontext
+from Zope.ContextWrapper import getcontext, getinnercontext, getinnerwrapper
 from Zope.Security.Checker import defineChecker, selectChecker, BasicTypes
 
 from IContextWrapper import IContextWrapper
@@ -58,6 +58,11 @@
     if type(_ob) is Proxy:
         _ob = getObject(_ob)
     return getdict(_ob)
+
+def getInnerWrapperData(_ob):
+    if type(_ob) is Proxy:
+        _ob = getObject(_ob)
+    return getdict(getinnerwrapper(_ob))
 
 def getWrapperContainer(_ob):
     if type(_ob) is Proxy:


=== Zope3/lib/python/Zope/Proxy/IContextWrapper.py 1.3 => 1.4 ===
         """Get the context wrapper data for an object
         """
 
+    def getInnerWrapperData(ob):
+        """Get the inner (container) context wrapper data for an object
+        """
+
     def getWrapperContainer(ob):
         """Get the object's container, as computed from a context wrapper
         """