[Zope-Checkins] CVS: Zope3/lib/python/Zope/ComponentArchitecture - metaConfigure.py:1.1.2.2

Jim Fulton jim@zope.com
Mon, 19 Nov 2001 17:16:06 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/ComponentArchitecture
In directory cvs.zope.org:/tmp/cvs-serv12765

Modified Files:
      Tag: Zope-3x-branch
	metaConfigure.py 
Log Message:
Added presentation directives.


=== Zope3/lib/python/Zope/ComponentArchitecture/metaConfigure.py 1.1.2.1 => 1.1.2.2 ===
     provideFeature(resolve(for_), resolve(provides), resolve(component))
 
-def provideUtilityDir(provides, for_):
+def provideUtilityDir(component, provides):
     provideUtility(resolve(provides), resolve(component))
 
+def providePresentationDir(component, type, name, for_=None):
+    if for_ is not None: for_ = resolve(for_)
+    providePresentation(for_, name, resolve(type), resolve(component))
+
+def provideDefaultPresentationDir(component, type, name, for_=None):
+    if for_ is not None: for_ = resolve(for_)
+    providePresentation(for_, name, resolve(type), resolve(component))
+    providePresentation(for_, "", resolve(type), resolve(component))
+
 def metaConfigure():
-    register(namespace('ca'), 'feature', provideFeatureDir)
-    register(namespace('ca'), 'utility', provideUtilityDir)
+    register(namespace('zope'), 'feature', provideFeatureDir)
+    register(namespace('zope'), 'utility', provideUtilityDir)
+    register(namespace('zope'), 'presention', providePresentationDir)
+    register(namespace('zope'), 'defaultPresention',
+             provideDefaultPresentationDir)
+