m Ec@sFdZdkZdklZdklZdkZdZdZ dZ dei fdYZ d Z d Z d Zd Zd ZdefdYZdZdfdYZdhdZdhdZdhdZy'dklZdefdYZWn&ej odfdYZnXdS(s3Datatypes for the Zope schema for use with ZConfig.N(slogger(s ZODBDatabasecCs:|i}d}||jotdt|n|S(NtPYTHONtCs0security-policy-implementation must be one of %s(RR(tvaluetuppertokt ValueErrortrepr(RR((t6/data/zmath/zope/lib/python/Zope2/Startup/datatypes.pytsecurity_policy_implementations   cCs:|i}d}||jotdt|n|S(Ntust internationals!datetime-format must be one of %r(susR (RtlowerRRR(RR((Rtdatetime_format"s   cCs|iS(N(tsectiontenviron(R ((Rtcgi_environment+st LoggerFactorycBstZdZdZRS(sh A factory used to create loggers while delaying actual logger instance construction. We need to do this because we may want to reference a logger before actually instantiating it (for example, to allow the app time to set an effective user). An instance of this wrapper is a callable which, when called, returns a logger object. cCs/|i|_t|_tii||dS(N( R tgetSectionNametnametFalset propagatetloggerRt__init__tself(RR ((RR:s (t__name__t __module__t__doc__R(((RR1s cCsdkl}|i|S(N(sresolver(tZServer.medusatresolvertcaching_resolverthostname(RR((Rt dns_resolverAs cCs9|p tdn|idptd|n|S(Nsmount-point must not be emptyt/sAmount-point '%s' is invalid: mount points must begin with a slash(RRt startswith(R((Rt mount_pointGs  c Csy|id} | d} t}t| ||}| g}xl| dD]`}|i |yt ||}WqKt j o+di |}t||||}qKXqKW|SWn]tj oQdk}dk}|i}|id|td||ifnXdS(Nt.iitfiles1The object named by "%s" could not be imported %s(Rtsplitt componentststarttglobalstgt __import__tpackaget modulenamest componenttappendtgetattrtAttributeErrortjointnt ImportErrort tracebackt cStringIOtStringIOtIOt print_excRtgetvalue( RR5R,R7R)R+R4R-R2R'R&((Rtimportable_nameQs(      cCst|}|S(N(R:Rtob(RR;((Rtpython_dotted_pathks cCsdkl} dkl} tiitiit} tiitii| }||_ tiitii||_ |idjo h|_n|idjo h|_n|idjotii|id|_n|idjotii|id|_n|idjotii|id|_n|ip g|_nh}h}d}x|iD]w}|i} |ii}|||dkl}|djo|dn|d|dS(N(sConfigurationErrorR sNo root database configureds,No database configured for mount point at %s(R>R?R~(RR~R?((Rt_mountPathErrors  icCsq|djo|i|}n|ii|d}|djo+|id|}|i ||i}n|S(sIReturns an opened database. Requires either mount_path or name. RN( RRLRRsR~RQtgettdbtgetDatabaseFactorytfactoryRi(RR~Rtis_rootRR((Rt getDatabases  cCsX|djo|i|}n|ii|ptdt|n|i|S(Ns%s is not a configured database( RRLRRsR~RRZtKeyErrorR(RR~R((RRs  cCs4|ii|}|djo|i|n|S(N(RRRR~RRLR(RR~R((RRs"s ( RRRRRRRRRLRRRs(((RR[s       RcCs"t||||}t||S(sMinimal class factory. If any class is not found, this class factory will propagate the exception to the application, unlike the other class factories. N(R*tmodulet_globalst_sillytmR/R(tjarRRRRR((RtminimalClassFactory+scCsPy&t||||}t||SWn#tii |d||fSnXdS(s*Class factory without ZClass support. N( R*RRRRR/RtOFSt UninstalledtBrokenRRL(RRRRRR((RtsimpleClassFactory6s cCswyM|d djo|id|Snt||||}t||SWn#t i i |d||fSnXdS(s'Class factory with ZClass support. it*tZGlobalsN( RRtrootR*RRRR/RRRRRL(RRRRRR((RtzopeClassFactoryAs(s ServerFactorytTwistedServerFactorycBstZRS(N(RR(((RRXscBstZdZRS(NcCstddS(Ns"You do not have twisted installed.(R3(RR ((RR\s(RRR(((RR[s(s__doc__(s__doc__(s__doc__(RRBtZConfig.components.loggerRt ZODB.configRhtOFS.UninstalledRRR RRRR"R:R<ReRfRR[RRRtzope.app.twisted.servert ServerFactoryRR3(R RhRRfRRR"RRR:RRRRRReR<RR[RRB((Rt?s0         68 ?