[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/catalog/ break up the ZCML to make it easier to re-use

Fred L. Drake, Jr. fdrake at gmail.com
Wed Mar 14 22:33:28 EDT 2007


Log message for revision 73180:
  break up the ZCML to make it easier to re-use

Changed:
  A   Zope3/trunk/src/zope/app/catalog/apidoc.zcml
  A   Zope3/trunk/src/zope/app/catalog/classes.zcml
  U   Zope3/trunk/src/zope/app/catalog/configure.zcml
  A   Zope3/trunk/src/zope/app/catalog/subscribers.zcml

-=-
Added: Zope3/trunk/src/zope/app/catalog/apidoc.zcml
===================================================================
--- Zope3/trunk/src/zope/app/catalog/apidoc.zcml	2007-03-15 00:42:34 UTC (rev 73179)
+++ Zope3/trunk/src/zope/app/catalog/apidoc.zcml	2007-03-15 02:33:28 UTC (rev 73180)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:apidoc="http://namespaces.zope.org/apidoc"
+    xmlns:zcml="http://namespaces.zope.org/zcml"
+    zcml:condition="have apidoc"
+    i18n_domain="zope"
+    >
+
+  <apidoc:bookchapter
+      id="indexcatalog"
+      title="Indexes and Catalogs"
+      />
+  <apidoc:bookchapter
+      id="catalog"
+      title="Catalog"
+      doc_path="README.txt"
+      parent="indexcatalog"
+      />
+
+  <configure package="zope.index">
+    <apidoc:bookchapter
+        id="fieldindex"
+        title="Field Indexes"
+        doc_path="field/README.txt"
+        parent="indexcatalog"
+        />
+    <apidoc:bookchapter
+        id="testindex"
+        title="Text Indexes"
+        doc_path="text/textindex.txt"
+        parent="indexcatalog"
+        />
+  </configure>
+
+</configure>


Property changes on: Zope3/trunk/src/zope/app/catalog/apidoc.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/catalog/classes.zcml
===================================================================
--- Zope3/trunk/src/zope/app/catalog/classes.zcml	2007-03-15 00:42:34 UTC (rev 73179)
+++ Zope3/trunk/src/zope/app/catalog/classes.zcml	2007-03-15 02:33:28 UTC (rev 73180)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:browser="http://namespaces.zope.org/browser"
+    >
+
+  <class class=".catalog.Catalog">
+    <factory
+        id="zope.app.catalog"
+        />
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
+    <require
+        interface="zope.app.catalog.interfaces.ICatalogQuery"
+        permission="zope.Public"
+        />
+    <require
+        interface="zope.app.catalog.interfaces.ICatalogEdit"
+        permission="zope.ManageServices"
+        />
+    <require
+        interface="zope.app.container.interfaces.IContainer"
+        permission="zope.ManageServices"
+        />
+  </class>
+
+  <class class=".catalog.ResultSet">
+    <require
+        attributes="__iter__ __len__"
+        permission="zope.Public"
+        />
+  </class>
+
+  <class class=".field.FieldIndex">
+    <require
+        permission="zope.ManageServices"
+        interface=".interfaces.IAttributeIndex
+                   zope.index.interfaces.IStatistics
+                  "
+        set_schema=".interfaces.IAttributeIndex"
+        />
+  </class>
+
+  <class class=".text.TextIndex">
+    <require
+        permission="zope.ManageServices"
+        interface=".interfaces.IAttributeIndex
+                   zope.index.interfaces.IStatistics
+                  "
+        set_schema=".interfaces.IAttributeIndex"
+        />
+  </class>
+
+  <interface interface="zope.index.text.interfaces.ISearchableText" />
+
+</configure>


Property changes on: Zope3/trunk/src/zope/app/catalog/classes.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/catalog/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/catalog/configure.zcml	2007-03-15 00:42:34 UTC (rev 73179)
+++ Zope3/trunk/src/zope/app/catalog/configure.zcml	2007-03-15 02:33:28 UTC (rev 73180)
@@ -1,115 +1,9 @@
-<configure
-    xmlns="http://namespaces.zope.org/zope"
-    xmlns:browser="http://namespaces.zope.org/browser"
-    i18n_domain="zope"
-    >
+<configure xmlns="http://namespaces.zope.org/zope">
 
-  <class class=".catalog.Catalog">
-    <factory
-        id="zope.app.catalog"
-        />
-    <implements
-        interface="zope.annotation.interfaces.IAttributeAnnotatable"
-        />
-    <require
-        interface="zope.app.catalog.interfaces.ICatalogQuery"
-        permission="zope.Public"
-        />
-    <require
-        interface="zope.app.catalog.interfaces.ICatalogEdit"
-        permission="zope.ManageServices"
-        />
-    <require
-        interface="zope.app.container.interfaces.IContainer"
-        permission="zope.ManageServices"
-        />
-  </class>
+  <include file="classes.zcml" />
+  <include file="subscribers.zcml" />
+  <include file="apidoc.zcml" />
 
-  <class class=".catalog.ResultSet">
-    <require
-        attributes="__iter__ __len__"
-        permission="zope.Public"
-        />
-  </class>
-
-  <subscriber
-      handler=".catalog.indexAdded"
-      for=".interfaces.ICatalogIndex
-           zope.app.container.interfaces.IObjectAddedEvent"
-      />
-
-  <subscriber
-      handler=".catalog.indexDocSubscriber"
-      for="zope.app.intid.interfaces.IIntIdAddedEvent"
-      />
-
-  <subscriber
-      handler=".catalog.reindexDocSubscriber"
-      for="zope.lifecycleevent.interfaces.IObjectModifiedEvent"
-      />
-
-  <subscriber
-      handler=".catalog.unindexDocSubscriber"
-      for="zope.app.intid.interfaces.IIntIdRemovedEvent"
-      />
-
-
-  <class class=".field.FieldIndex">
-    <require
-        permission="zope.ManageServices"
-        interface=".interfaces.IAttributeIndex
-                   zope.index.interfaces.IStatistics
-                  "
-        set_schema=".interfaces.IAttributeIndex"
-        />
-  </class>
-
-  <class class=".text.TextIndex">
-    <require
-        permission="zope.ManageServices"
-        interface=".interfaces.IAttributeIndex
-                   zope.index.interfaces.IStatistics
-                  "
-        set_schema=".interfaces.IAttributeIndex"
-        />
-  </class>
-
   <include package=".browser" />
 
-  <interface interface="zope.index.text.interfaces.ISearchableText" />
-
-  <!-- Registering documentation with API doc -->
-  <configure
-      xmlns:apidoc="http://namespaces.zope.org/apidoc"
-      xmlns:zcml="http://namespaces.zope.org/zcml"
-      zcml:condition="have apidoc">
-
-    <apidoc:bookchapter
-        id="indexcatalog"
-        title="Indexes and Catalogs"
-        />
-    <apidoc:bookchapter
-        id="catalog"
-        title="Catalog"
-        doc_path="README.txt"
-        parent="indexcatalog"
-        />
-
-    <configure package="zope.index">
-      <apidoc:bookchapter
-          id="fieldindex"
-          title="Field Indexes"
-          doc_path="field/README.txt"
-          parent="indexcatalog"
-          />
-      <apidoc:bookchapter
-          id="testindex"
-          title="Text Indexes"
-          doc_path="text/textindex.txt"
-          parent="indexcatalog"
-          />
-    </configure>
-
-  </configure>
-
 </configure>

Added: Zope3/trunk/src/zope/app/catalog/subscribers.zcml
===================================================================
--- Zope3/trunk/src/zope/app/catalog/subscribers.zcml	2007-03-15 00:42:34 UTC (rev 73179)
+++ Zope3/trunk/src/zope/app/catalog/subscribers.zcml	2007-03-15 02:33:28 UTC (rev 73180)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:browser="http://namespaces.zope.org/browser"
+    >
+
+  <subscriber
+      handler=".catalog.indexAdded"
+      for=".interfaces.ICatalogIndex
+           zope.app.container.interfaces.IObjectAddedEvent"
+      />
+
+  <subscriber
+      handler=".catalog.indexDocSubscriber"
+      for="zope.app.intid.interfaces.IIntIdAddedEvent"
+      />
+
+  <subscriber
+      handler=".catalog.reindexDocSubscriber"
+      for="zope.lifecycleevent.interfaces.IObjectModifiedEvent"
+      />
+
+  <subscriber
+      handler=".catalog.unindexDocSubscriber"
+      for="zope.app.intid.interfaces.IIntIdRemovedEvent"
+      />
+
+</configure>


Property changes on: Zope3/trunk/src/zope/app/catalog/subscribers.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native



More information about the Zope3-Checkins mailing list