mς γΈEc@sodZdklZlZdklZdefd„ƒYZdefd„ƒYZdeefd„ƒYZd S( sIFive interfaces $Id: interfaces.py 18584 2005-10-14 17:13:27Z regebro $ (s Interfaces Attribute(sIComponentLookuptIRegisterUtilitySimplycBs&tZdZdd„ZedƒZRS(s>Register utilities simply Allow local registrations of utilities, in a much simpler manner than Zope 3 does it currently. Note: The name of this interface is expressed as a verb (describing the action it expresses, namely registering utilities). The reason for that is that the names *utility registry* (successor of the Zope 3 utility service) and *utility registration* (object in a registration stack, part of the complicated registration framework in Zope 3) have different connotations in Zope 3 than we want to express here. tcCsdS(s(Registers a utility in the local contextN((tselft interfacetutilitytname((t</data/zmath/zope/lib/python/Products/Five/site/interfaces.pytregisterUtility$ss­The next local registry in the tree. This attribute represents the parent of this registry node. If the value is ``None``, then this registry represents the root of the tree(t__name__t __module__t__doc__Rt Attributetnext(((RRs  tIFiveUtilityRegistrycBsGtZdZded„Zdeed„Zed„Zed„ZRS(sLook up and register utilitiesRcCsdS(sΠGet the utility that provides interface Returns the nearest utility to the context that implements the specified interface. If one is not found, raises ComponentLookupError. N((RRtcontext((Rt getUtility1scCsdS(sΑLook for the utility that provides interface Returns the nearest utility to the context that implements the specified interface. If one is not found, returns default. N((RRtdefaultR((Rt queryUtility9scCsdS(suReturn the utilities that provide an interface An iterable of utility name-value pairs is returned. N((RR((RtgetUtilitiesFor@scCsdS(s½Return all registered utilities for an interface This includes overridden utilities. An iterable of utility instances is returned. No names are returned. N((RR((RtgetAllUtilitiesRegisteredForFs(RR R tNoneRRRR(((RR .s  tIFiveSiteManagercBstZdZRS(snFive site manager For the sake of forward-portability, registering utilities can be done directly on the site manager to cut out the middle man called utility service (this corresponds to Zope 3.1's understanding of site managers). An implementation of this interface will probably delegate the work to an IFiveUtilityService component, though.(RR R (((RROs N( R tzope.interfacet InterfaceR tzope.component.interfacestIComponentLookupRR R(R RRRRR ((Rt?s  !