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

Jim Fulton jim@zope.com
Thu, 5 Dec 2002 05:01:57 -0500


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

Modified Files:
      Tag: ctheune-fix_appcontrol-branch
	ApplicationControl.py 
Log Message:
Application controllers should be treated as alternative application
roots.

We don't need the funny view any more, because we can use the standard
"root" view.


=== Zope3/lib/python/Zope/App/OFS/ApplicationControl/ApplicationControl.py 1.2.20.1 => 1.2.20.2 ===
--- Zope3/lib/python/Zope/App/OFS/ApplicationControl/ApplicationControl.py:1.2.20.1	Sun Nov 24 12:33:26 2002
+++ Zope3/lib/python/Zope/App/OFS/ApplicationControl/ApplicationControl.py	Thu Dec  5 05:01:57 2002
@@ -17,13 +17,14 @@
 
 from IApplicationControl import IApplicationControl
 from Zope.App.ZopePublication.TraversalViews.AbsoluteURL import SiteAbsoluteURL
+from Zope.App.Traversing.IContainmentRoot import IContainmentRoot
 
 import time
 
 class ApplicationControl:
     """ """
 
-    __implements__ = IApplicationControl
+    __implements__ = IApplicationControl, IContainmentRoot
 
     def __init__(self):
         self.start_time = time.time()
@@ -47,25 +48,6 @@
 
     #
     ############################################################
-
-# The AbsoluteURL traversal view
-#
-# Beeing manually hooked into the traversal process, the 
-# application controller needs some extra work, to provide the AbsoluteURL view.
-
-class ApplicationControlAbsoluteURL(SiteAbsoluteURL):
-    """Returns the absolute URL for the ApplicationController object.
-    """
-    
-    # XXX This is hardcoded in conjunction to the hardcoded Traversal.
-    name = "++etc++ApplicationController"
-
-    def __str__(self):
-        return "++etc++ApplicationController"
-
-    def breadcrumbs(self):
-        crumb = SiteAbsoluteURL.breadcrumbs(self)
-        return ({'name':'++etc++ApplicationController', 'url':crumb[0]["url"]+"/++etc++ApplicationController"}, )
 
 ApplicationController = ApplicationControl()