[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/ApplicationControl - ApplicationControl.py:1.3 metaConfigure.py:1.3

Jim Fulton jim@zope.com
Fri, 20 Dec 2002 14:46:14 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/ApplicationControl
In directory cvs.zope.org:/tmp/cvs-serv13062/Zope/App/OFS/ApplicationControl

Modified Files:
	ApplicationControl.py metaConfigure.py 
Log Message:
Refactored ApplicationControl so that the application controller is no
longer a root object. Rather, to avoid traversing a database object to
get to it, we create a separate RootFolder just so we can traverse it
to get to the application controller.

We (Guido and I) also renamed the global instance to have a name
starting with a lower case name. This caused the most file changes.

To do: rip out the application controller view registry in favor of
the actions menu.



=== Zope3/lib/python/Zope/App/OFS/ApplicationControl/ApplicationControl.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/OFS/ApplicationControl/ApplicationControl.py:1.2	Mon Jun 10 19:27:51 2002
+++ Zope3/lib/python/Zope/App/OFS/ApplicationControl/ApplicationControl.py	Fri Dec 20 14:45:44 2002
@@ -16,6 +16,8 @@
 $Id$"""
 
 from IApplicationControl import IApplicationControl
+from Zope.App.OFS.Content.Folder.RootFolder import RootFolder
+from Zope.Security.Checker import ProxyFactory, NamesChecker
 
 import time
 
@@ -47,5 +49,6 @@
     #
     ############################################################
 
-ApplicationController = ApplicationControl()
-
+applicationController = ApplicationControl()
+applicationControllerRoot = ProxyFactory(RootFolder(),
+                                         NamesChecker("__class__"))


=== Zope3/lib/python/Zope/App/OFS/ApplicationControl/metaConfigure.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/OFS/ApplicationControl/metaConfigure.py:1.2	Mon Jun 10 19:27:51 2002
+++ Zope3/lib/python/Zope/App/OFS/ApplicationControl/metaConfigure.py	Fri Dec 20 14:45:44 2002
@@ -16,7 +16,7 @@
 $Id$
 """
 
-from ApplicationControl import ApplicationController
+from ApplicationControl import applicationController
 from Zope.Configuration.Action import Action
 
 
@@ -24,7 +24,7 @@
     return [
         Action(
             discriminator = ('application-control:registerView', name),
-            callable = ApplicationController.registerView,
+            callable = applicationController.registerView,
             args = (name, title),
             )
         ]