mò ã¸Ec@s‡dkZdklZdkZdkZdklZdkl Z dk l Z ei Z de eifd„ƒYZ dfd„ZdS(N(sguarded_hasattr(s interfaces(sViewletManagerBase(sZopeTwoPageTemplateFiletViewletManagerBasecBs)tZdZd„Zd„Zd„ZRS(s2A base class for Viewlet managers to work in Zope2cCs tii|i|i|i|ftid|ƒ}|djotiii d|ƒ‚n|i |iƒ}t|dƒptiiid|ƒ‚n|S(s.See zope.interface.common.mapping.IReadMappingtnames!No provider with name `%s` found.trenders:You are not authorized to access the provider called `%s`.N(tzopet componenttqueryMultiAdaptertselftcontexttrequestt __parent__t interfacestIViewletRtviewlettNonetComponentLookupErrort__of__tguarded_hasattrtsecurityt Unauthorized(RRR ((t</data/zmath/zope/lib/python/Products/Five/viewlet/manager.pyt __getitem__s! cCsZg}xM|D]E\}}|i|iƒ}t|dƒo|i||fƒq q W|S(snSort out all content providers ``viewlets`` is a list of tuples of the form (name, viewlet). RN(tresultstviewletsRR RRRtappend(RRR RR((Rtfilter(s cCst|d„ƒS(sbSort the viewlets. ``viewlets`` is a list of tuples of the form (name, viewlet). cCs!tt|dƒt|dƒƒS(Ni(tcmptaq_basetxty(RR((Rt@sN(tsortedR(RR((Rtsort8s(t__name__t __module__t__doc__RRR(((RR s   cCs®|dj ot|ƒ}nt|jo?t|ƒdjotii|dƒp|tf}qint d|i ƒ|hd|<d|<ƒ}ti i||ƒ|S(NiisttemplateR (R#R tZopeTwoPageTemplateFileRtbasestlenR tIViewletManagert implementedByttypet interfacetgetNameRtViewletManagerRtclassImplements(RR*R#R%R,((RR,Bs  *(t AcquisitiontAccessControl.ZopeGuardsRtzope.interfaceRt zope.securityt zope.viewletR tzope.viewlet.managerRtorigManagerBaset&Products.Five.browser.pagetemplatefileR$RtExplicitR R,( RR4R R$RRR,RR.((Rt?s        6