mò .á¸Ec@s_dZdkZdklZdkZdklZdkl Z dk l Z dk l Z dkZdkZdkZdklZdklZgZed ƒZd „Zd „Zd efd „ƒYZeiieiieii ƒd„ƒZ!eiieiieƒd„ƒZ"eiieiieii#ƒd„ƒZ$d„Z%d„Z&d„Z'dS(sY Five subscriber definitions. $Id: subscribers.py 67823 2006-05-02 09:55:17Z philikon $ N(s getLogger(saq_base(sgetConfiguration(sgetSecurityManager(s ConflictError(sdispatchToSublocations(sIObjectMovedEventsOFS.subscriberscGsStodSn|djot|Œn&|djot|Œn t|ŒdS(s£Call a method if events have not been setup yet. This is the case for some unit tests that have not been converted to use the component architecture. Ntmanage_afterAddtmanage_beforeDelete(t deprecatedManageAddDeleteClassest method_nametcallManageAfterAddtargstcallManageBeforeDeletetcallManageAfterClone(RR((t./data/zmath/zope/lib/python/OFS/subscribers.pytcompatibilityCall's  cCsŒtpdSnx&tD]}t||ƒodSqqWtt||ƒdtƒodSn|i}t i d|i |i |ft ƒdS(s.Send a warning if a method is deprecated. Nt__five_method__s¦%s.%s.%s is deprecated and will be removed in Zope 2.11, you should use event subscribers instead, and meanwhile mark the class with (Rtclst isinstancetobtgetattrRtFalset __class__tclass_twarningstwarnt __module__t__name__tDeprecationWarning(R RRR ((RtmaybeWarnDeprecated7s  tObjectManagerSublocationscBsOtZdZeiieiiƒei i ei ii ƒd„Z d„ZRS(s/Get the sublocations for an ObjectManager. cCs ||_dS(N(t containertself(RR((Rt__init__Tsccs"x|iiƒD] }|VqWdS(N(RRt objectValuesR (RR ((Rt sublocationsWs(RRt__doc__tzopet componenttadaptstOFSt interfacestIObjectManagert interfacet implementstlocationt ISublocationsRR(((RRNs  cCsAtiii|ƒot||ƒnt||i|i ƒdS(s:Multi-subscriber for IItem + IObjectWillBeMovedEvent. N( R"R#R$t providedByR tdispatchToSublocationsteventRtobjectt oldParent(R R+((RtdispatchObjectWillBeMovedEventescCsAt||i|iƒtiii|ƒot ||ƒndS(s4Multi-subscriber for IItem + IObjectMovedEvent. N( RR R+R,t newParentR"R#R$R)R*(R R+((RtdispatchObjectMovedEventpscCs;t||iƒtiii|ƒot||ƒndS(s5Multi-subscriber for IItem + IObjectClonedEvent. N( RR R+R,R"R#R$R)R*(R R+((RtdispatchObjectClonedEventzscCs]|djodSntt|ƒddƒdjodSnt|dƒ|i||ƒdS(s2Compatibility subscriber for manage_afterAdd. NR(RtNoneRtaq_baseR RRtitem(R R4R((RR†s  cCsè|djodSntt|ƒddƒdjodSnt|dƒdk}y|i||ƒWn{|i i j o ‚nat j o ‚nLt iddtƒtƒio$tƒiƒidƒp‚qàqänXdS(s6Compatibility subscriber for manage_beforeDelete. NRs_delObject() threwtexc_infotManager(RR2RR3R RtOFS.ObjectManagerR"RR4t ObjectManagertBeforeDeleteExceptiont ConflictErrortLOGterrortTruetgetConfigurationt debug_modetgetSecurityManagertgetUserthas_role(R R4RR"((RRs$    cCsEtt|ƒddƒdjodSnt|dƒ|i|ƒdS(s4Compatibility subscriber for manage_afterClone. tmanage_afterCloneN(RR3R R2RRCR4(R R4((RR¦s  ((RRtloggingt getLoggertOFS.interfacesR"t AcquisitionR3t App.configR>t AccessControlR@tZODB.POSExceptionR:tzope.componentRtzope.interfacetzope.location.interfacestzope.app.container.containedR*tzope.app.container.interfacestIObjectMovedEventRR;R RR,RR tadapterR#tIItemtIObjectWillBeMovedEventR.R0tIObjectClonedEventR1RRR(RR;R*RRR:R1RRPR RR>R3RRR"R0RR@RER.((Rt?s2                $