[Zope-Checkins] CVS: Zope3/lib/python/Zope/ObjectHub - IObjectHub.py:1.1.2.3
Jeremy Hylton
jeremy@zope.com
Wed, 20 Mar 2002 16:01:58 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/ObjectHub
In directory cvs.zope.org:/tmp/cvs-serv12386
Modified Files:
Tag: Zope-3x-branch
IObjectHub.py
Log Message:
Reindent class doc string
=== Zope3/lib/python/Zope/ObjectHub/IObjectHub.py 1.1.2.2 => 1.1.2.3 ===
"""ObjectHub.
- Receives Object Modify Events from the Event Service, and
- changes these into RUID Object Modify Events, then passes
- these on to its PlugIns (possibly via some other EventChannels).
+ Receives Object Modify Events from the Event Service, and
+ changes these into RUID Object Modify Events, then passes
+ these on to its PlugIns (possibly via some other EventChannels).
- To map Object Modify Events onto RUID Object Modify Events, take
- the location from the Object Modify Event, look up the RUID for this
- location, and create an equivalent RUID Object Modify Event using this
- RUID.
+ To map Object Modify Events onto RUID Object Modify Events, take
+ the location from the Object Modify Event, look up the RUID for this
+ location, and create an equivalent RUID Object Modify Event using this
+ RUID.
- Note that we are concerned with locations and not with Objects.
- An object may have more than one location. That doesn't concern
- us here.
+ Note that we are concerned with locations and not with Objects.
+ An object may have more than one location. That doesn't concern
+ us here.
- Table of decisions about maintaining the location<->ruid lookup:
+ Table of decisions about maintaining the location<->ruid lookup:
- Register
-
- if location already in lookup:
- raise ObjectHubError, as this is implies bad state somewhere
- generate new ruid
- place ruid<->location into lookup, to say that we have an
- interesting object
+ Register
+
+ if location already in lookup:
+ raise ObjectHubError, as this is implies bad state somewhere
+ generate new ruid
+ place ruid<->location into lookup, to say that we have an
+ interesting object
- send out ruid object register event to plug-ins, via event channels
+ send out ruid object register event to plug-ins, via event channels
- Unregister
+ Unregister
- if location not in lookup:
- raise ObjectHubError, as this is implies bad state somewhere
- remove location<->ruid from lookup
+ if location not in lookup:
+ raise ObjectHubError, as this is implies bad state somewhere
+ remove location<->ruid from lookup
- send out ruid unregister event to plug-ins, via event channels
+ send out ruid unregister event to plug-ins, via event channels
- Add (specialises Register)
+ Add (specialises Register)
- as Register, except at the end send out ruid object add event
- instead
+ as Register, except at the end send out ruid object add event
+ instead
- Modify
+ Modify
- if location not in lookup:
- ignore this event, as we're not interested in this object
- else:
- look up ruid for the location
- send out ruid object modify event to plug-ins,
- via event channels
+ if location not in lookup:
+ ignore this event, as we're not interested in this object
+ else:
+ look up ruid for the location
+ send out ruid object modify event to plug-ins,
+ via event channels
- Move
+ Move
- if old_location not in lookup:
- ignore this event, as we're not interested in this object
- elif new_location is in lookup:
- raise ObjectHubError
- else:
- look up ruid for old_location
- change lookup:
- remove ruid<->old_location
- add ruid<->new_location
- send out ruid object context-change event to plug-ins,
- via event channels
+ if old_location not in lookup:
+ ignore this event, as we're not interested in this object
+ elif new_location is in lookup:
+ raise ObjectHubError
+ else:
+ look up ruid for old_location
+ change lookup:
+ remove ruid<->old_location
+ add ruid<->new_location
+ send out ruid object context-change event to plug-ins,
+ via event channels
- Remove (specialises Unregister)
+ Remove (specialises Unregister)
- if old_location not in lookup:
- ignore this event, as we're not interested in this object
- else:
- look up ruid for old_location
- change lookup:
- remove ruid<->old_location
- send out ruid object remove event to plug-ins,
- via event channels
+ if old_location not in lookup:
+ ignore this event, as we're not interested in this object
+ else:
+ look up ruid for old_location
+ change lookup:
+ remove ruid<->old_location
+ send out ruid object remove event to plug-ins,
+ via event channels
- # XXX: Possibly add Link to EventChannel.
- # This implies multiple locations for a ruid.
- # We'll refactor later if needed.
+ # XXX: Possibly add Link to EventChannel.
+ # This implies multiple locations for a ruid.
+ # We'll refactor later if needed.
- # Possibly also add registerObject and unregisterObject methods
- # unless these are better handled by events, or unless we don't
- # need them.
-
- """
+ # Possibly also add registerObject and unregisterObject methods
+ # unless these are better handled by events, or unless we don't
+ # need them.
+ """
def lookupRuid(location):