[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher - BaseRequest.py:1.1.2.28.10.1 IPublicationRequest.py:1.1.2.5.14.1

Jim Fulton jim@zope.com
Wed, 29 May 2002 11:10:23 -0400


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

Modified Files:
      Tag: Zope3InWonderland-branch
	BaseRequest.py IPublicationRequest.py 
Log Message:
- Added permission_id attribute to adapter and utility directives.

- Got rid of old getView, getResource, and getDefaultViewName.
  Renamed getRequestView to getView (and so on).

  Changed view interface to use context, rather than getContext.

  Introduced notion of presentation types (e.g. IBrowserPresentation, 
  which is cleaner than IBrowserPublisher).

- Began converting to get/queryFoo, which is much nicer.

- Many formatting fixups.



=== Zope3/lib/python/Zope/Publisher/BaseRequest.py 1.1.2.28 => 1.1.2.28.10.1 ===
         '_body',             # The request body as a string
         '_publication',      # publication object
-        '_viewskin',         # View skin
+        '_presentation_skin',         # View skin
         )
 
     environment = RequestDataProperty(RequestEnvironment)
@@ -167,18 +167,19 @@
 
     def setViewSkin(self, skin):
         'See Zope.Publisher.IPublicationRequest.IPublicationRequest'
-        self._viewskin = skin
+        self._presentation_skin = skin
 
     ######################################
-    # from: Zope.ComponentArchitecture.IViewService.IViewRequest
+    # from:
+    # Zope.ComponentArchitecture.IPresentationService.IPresentationRequest
 
-    def getViewSkin(self):
-        'See Zope.ComponentArchitecture.IViewService.IViewRequest'
-        return getattr(self, '_viewskin', '')
-
-    def getViewType(self):
-        'See Zope.ComponentArchitecture.IViewService.IViewRequest'
-        return getattr(self, '_viewtype', None)
+    def getPresentationSkin(self):
+        'See Zope.ComponentArchitecture.IViewService.IPresentationRequest'
+        return getattr(self, '_presentation_skin', '')
+
+    def getPresentationType(self):
+        'See Zope.ComponentArchitecture.IViewService.IPresentationRequest'
+        return getattr(self, '_presentation_type', None)
 
     # This is not part of the interface:
     def setViewType(self, viewtype):
@@ -189,7 +190,7 @@
 
         # XXX This will probably go away
 
-        self._viewtype = viewtype
+        self._presentation_type = viewtype
 
 
     ######################################


=== Zope3/lib/python/Zope/Publisher/IPublicationRequest.py 1.1.2.5 => 1.1.2.5.14.1 ===
 """
 
-from Zope.ComponentArchitecture.IViewService import IViewRequest
+from Zope.ComponentArchitecture.IPresentationRequest \
+     import IPresentationRequest
 
-class IPublicationRequest(IViewRequest):
+class IPublicationRequest(IPresentationRequest):
     """Interface provided by requests to IPublication objects
     """