Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions | Private Attributes
kss.core.kssview.SiteView Class Reference
Inheritance diagram for kss.core.kssview.SiteView:
Inheritance graph
[legend]
Collaboration diagram for kss.core.kssview.SiteView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __before_publishing_traverse__
def getSiteManager
def setSiteManager

Private Member Functions

def _eventRedispatcher

Private Attributes

 _sitemanager

Detailed Description

A browser view that is its own site

Definition at line 78 of file kssview.py.


Constructor & Destructor Documentation

def kss.core.kssview.SiteView.__init__ (   self,
  context,
  request 
)

Reimplemented in kss.core.kssview.AzaxBaseView, and kss.core.kssview.KSSView.

Definition at line 83 of file kssview.py.

00083 
00084     def __init__(self, context, request):
00085         super(SiteView, self).__init__(context, request)
00086 
00087         next = component.getSiteManager()
00088         self._sitemanager = SiteViewComponents('siteview')
00089         self._sitemanager.__bases__ = (next, )
00090         if HAS_FIVE_LSM:
00091             self._sitemanager.__parent__ = self
00092 
00093         # On Five, we should wrap it in the acquisition context
00094         # see, if self has aq_parent, it is done obligatoraly
00095         try:
00096             self.context.aq_parent
00097         except AttributeError:
00098             # Zope3 - No problem.
00099             wrapped_view = self
00100         else:
00101             wrapped_view = self.__of__(self.context)
00102 
00103         # register object event handler
00104         self._sitemanager.registerHandler(wrapped_view._eventRedispatcher)

Here is the caller graph for this function:


Member Function Documentation

def kss.core.kssview.SiteView.__before_publishing_traverse__ (   self,
  obj,
  request 
)

Definition at line 111 of file kssview.py.

00111 
00112     def __before_publishing_traverse__(self, obj, request):
00113         event.notify(BeforeTraverseEvent(self, request))

def kss.core.kssview.SiteView._eventRedispatcher (   self,
  event 
) [private]
This works similar to zope.component.event.objectEventNotify:
It dispatches object events to subscribers that listen to
(object, view, event).

Definition at line 123 of file kssview.py.

00123 
00124     def _eventRedispatcher(self, event):
00125         """This works similar to zope.component.event.objectEventNotify:
00126         It dispatches object events to subscribers that listen to
00127         (object, view, event)."""
00128         adapters = component.subscribers((event.object, self, event), None)
00129         for adapter in adapters:
00130             pass # getting them does the work

Definition at line 116 of file kssview.py.

00116 
00117     def getSiteManager(self):
00118         return self._sitemanager

def kss.core.kssview.SiteView.setSiteManager (   self,
  sm 
)

Definition at line 119 of file kssview.py.

00119 
00120     def setSiteManager(self, sm):
00121         raise TypeError("Site manager of SiteView can't be changed.")


Member Data Documentation

Definition at line 87 of file kssview.py.


The documentation for this class was generated from the following file: