[Checkins] SVN: zope.generic/trunk/src/zope/generic/ rename
information directive to informationProvider directive
Dominik Huber
dominik.huber at perse.ch
Thu Apr 13 19:41:42 EDT 2006
Log message for revision 66939:
rename information directive to informationProvider directive
Changed:
U zope.generic/trunk/src/zope/generic/component/DEPENDENCIES.cfg
U zope.generic/trunk/src/zope/generic/component/NEW_README.txt
U zope.generic/trunk/src/zope/generic/component/PUBLICATION.cfg
U zope.generic/trunk/src/zope/generic/component/README.txt
U zope.generic/trunk/src/zope/generic/component/configure.zcml
U zope.generic/trunk/src/zope/generic/component/meta.zcml
U zope.generic/trunk/src/zope/generic/component/metaconfigure.py
U zope.generic/trunk/src/zope/generic/component/metadirectives.py
U zope.generic/trunk/src/zope/generic/operation/metadirectives.py
U zope.generic/trunk/src/zope/generic/type/configure.zcml
U zope.generic/trunk/src/zope/generic/type/metaconfigure.py
U zope.generic/trunk/src/zope/generic/type/metadirectives.py
-=-
Modified: zope.generic/trunk/src/zope/generic/component/DEPENDENCIES.cfg
===================================================================
--- zope.generic/trunk/src/zope/generic/component/DEPENDENCIES.cfg 2006-04-13 22:55:09 UTC (rev 66938)
+++ zope.generic/trunk/src/zope/generic/component/DEPENDENCIES.cfg 2006-04-13 23:41:41 UTC (rev 66939)
@@ -1,9 +1,16 @@
-zope.generic.component
-zope.generic.testing
+BTrees
+persistent
zope.app.annotation
zope.app.component
+zope.app.event
+zope.app.location
+zope.app.testing
zope.component
zope.configuration
+zope.dottedname
+zope.event
+zope.generic.directlyprovides
+zope.generic.testing
zope.interface
zope.schema
-zope.testing
+zope.testing
\ No newline at end of file
Modified: zope.generic/trunk/src/zope/generic/component/NEW_README.txt
===================================================================
--- zope.generic/trunk/src/zope/generic/component/NEW_README.txt 2006-04-13 22:55:09 UTC (rev 66938)
+++ zope.generic/trunk/src/zope/generic/component/NEW_README.txt 2006-04-13 23:41:41 UTC (rev 66939)
@@ -69,14 +69,16 @@
TODO: Should be a dependency between informationRegistry and its configuration?
>>> registerDirective('''
- ... <generic:informationRegistry
+ ... <generic:informationProvider
... interface='example.ILogSupplierInformation'
+ ... registry='zope.generic.component.IInformationProviderInformation'
... />
... ''')
>>> registerDirective('''
- ... <generic:informationRegistry
+ ... <generic:informationProvider
... interface='example.ILogUserInformation'
+ ... registry='zope.generic.component.IInformationProviderInformation'
... />
... ''')
Modified: zope.generic/trunk/src/zope/generic/component/PUBLICATION.cfg
===================================================================
--- zope.generic/trunk/src/zope/generic/component/PUBLICATION.cfg 2006-04-13 22:55:09 UTC (rev 66938)
+++ zope.generic/trunk/src/zope/generic/component/PUBLICATION.cfg 2006-04-13 23:41:41 UTC (rev 66939)
@@ -1,11 +1,10 @@
Metadata-Version: 1.0
Name: zope.generic.component
-Summary: Information about interface based registrations
+Summary: Key interface and corresponding information providers
Author: Dominik Huber, Perse Engineering GmbH, Switzerland
Author-email: dominik.huber at perse.ch
License: ZPL 2.1
Description:
- Provide facility for reusable information registry. The information
- registries are implemented as utility providing IInformationRegistry.
- The name of the registry is given by the dotted name of the interface
- of the deciated information collected by the information registry.
+ This package offers a mechanism to declare a key interface (IKeyInterface).
+ The key interface can be used to lookup corresponding information providers
+ explicitly.
Modified: zope.generic/trunk/src/zope/generic/component/README.txt
===================================================================
--- zope.generic/trunk/src/zope/generic/component/README.txt 2006-04-13 22:55:09 UTC (rev 66938)
+++ zope.generic/trunk/src/zope/generic/component/README.txt 2006-04-13 23:41:41 UTC (rev 66939)
@@ -54,7 +54,7 @@
... pass
>>> registerDirective('''
- ... <generic:information
+ ... <generic:informationProvider
... interface="example.IFooMarker"
... registry="example.ISpecialInformation"
... label='Foo Specials' hint='Bla bla foo.'
@@ -193,7 +193,7 @@
>>> my_information_config = ConfigurationData(IMyConfiguration, {'my': u'My!'})
>>> registerDirective('''
- ... <generic:information
+ ... <generic:informationProvider
... interface="example.IFooMarker"
... registry="example.ISpecialInformation"
... label='Foo Specials' hint='Bla bla foo.'
@@ -202,7 +202,7 @@
... interface="example.IMyConfiguration"
... data="example.my_information_config"
... />
- ... </generic:information>
+ ... </generic:informationProvider>
... ''')
>>> from zope.generic.component.api import queryInformationProvider
Modified: zope.generic/trunk/src/zope/generic/component/configure.zcml
===================================================================
--- zope.generic/trunk/src/zope/generic/component/configure.zcml 2006-04-13 22:55:09 UTC (rev 66938)
+++ zope.generic/trunk/src/zope/generic/component/configure.zcml 2006-04-13 23:41:41 UTC (rev 66939)
@@ -3,13 +3,13 @@
xmlns:generic="http://namespaces.zope.org/generic"
i18n_domain="zope">
- <generic:information
+ <generic:informationProvider
interface=".IConfigurationInformation"
label="Configuration Information"
registry="zope.generic.component.IInformationProviderInformation"
/>
- <generic:information
+ <generic:informationProvider
interface=".IInformationProviderInformation"
label="Information Provider Information"
registry=".IInformationProviderInformation"
Modified: zope.generic/trunk/src/zope/generic/component/meta.zcml
===================================================================
--- zope.generic/trunk/src/zope/generic/component/meta.zcml 2006-04-13 22:55:09 UTC (rev 66938)
+++ zope.generic/trunk/src/zope/generic/component/meta.zcml 2006-04-13 23:41:41 UTC (rev 66939)
@@ -11,9 +11,9 @@
/>
<meta:complexDirective
- name="information"
- schema=".metadirectives.IInformationDirective"
- handler=".metaconfigure.InformationDirective"
+ name="informationProvider"
+ schema=".metadirectives.IInformationProviderDirective"
+ handler=".metaconfigure.InformationProviderDirective"
>
<meta:subdirective
@@ -23,19 +23,6 @@
</meta:complexDirective>
- <meta:complexDirective
- name="informationRegistry"
- schema=".metadirectives.IInformationRegistryDirective"
- handler=".metaconfigure.InformationRegistryDirective"
- >
-
- <meta:subdirective
- name="configuration"
- schema=".metadirectives.IConfigurationSubdirective"
- />
-
- </meta:complexDirective>
-
</meta:directives>
</configure>
Modified: zope.generic/trunk/src/zope/generic/component/metaconfigure.py
===================================================================
--- zope.generic/trunk/src/zope/generic/component/metaconfigure.py 2006-04-13 22:55:09 UTC (rev 66938)
+++ zope.generic/trunk/src/zope/generic/component/metaconfigure.py 2006-04-13 23:41:41 UTC (rev 66939)
@@ -87,7 +87,7 @@
-class InformationDirective(object):
+class InformationProviderDirective(object):
"""Provide a new information of a certain information registry."""
_information_type = None
@@ -158,13 +158,3 @@
callable = provideInterface,
args = (None, interface, iface_type),
)
-
-
-
-class InformationRegistryDirective(InformationDirective):
- """Provide a new information registry."""
-
- _information_type = IInformationProviderType
-
- def __init__(self, _context, interface, label=None, hint=None):
- super(InformationRegistryDirective, self).__init__(_context, interface, IInformationProviderInformation, label, hint)
Modified: zope.generic/trunk/src/zope/generic/component/metadirectives.py
===================================================================
--- zope.generic/trunk/src/zope/generic/component/metadirectives.py 2006-04-13 22:55:09 UTC (rev 66938)
+++ zope.generic/trunk/src/zope/generic/component/metadirectives.py 2006-04-13 23:41:41 UTC (rev 66939)
@@ -28,7 +28,7 @@
-class IBaseInformationDirective(Interface):
+class IBaseInformationProviderDirective(Interface):
"""Base information attributes."""
interface = GlobalInterface(
@@ -51,7 +51,7 @@
-class IConfigurationDirective(IBaseInformationDirective):
+class IConfigurationDirective(IBaseInformationProviderDirective):
"""Declare configuration schema.
Register configuration schema as interface utility typed by
@@ -60,7 +60,7 @@
-class IInformationDirective(IBaseInformationDirective):
+class IInformationProviderDirective(IBaseInformationProviderDirective):
"""Directive to register an information to corresponding information
registry."""
@@ -74,11 +74,6 @@
-class IInformationRegistryDirective(IBaseInformationDirective):
- """Directive to register an information registry."""
-
-
-
class IConfigurationSubdirective(Interface):
"""Declare a certain configuration of a type."""
Modified: zope.generic/trunk/src/zope/generic/operation/metadirectives.py
===================================================================
--- zope.generic/trunk/src/zope/generic/operation/metadirectives.py 2006-04-13 22:55:09 UTC (rev 66938)
+++ zope.generic/trunk/src/zope/generic/operation/metadirectives.py 2006-04-13 23:41:41 UTC (rev 66939)
@@ -24,11 +24,11 @@
from zope.configuration.fields import Tokens
from zope.generic.component import IConfigurationType
-from zope.generic.component.metadirectives import IBaseInformationDirective
+from zope.generic.component.metadirectives import IBaseInformationProviderDirective
-class IOperationDirective(IBaseInformationDirective):
+class IOperationDirective(IBaseInformationProviderDirective):
"""Register a public operation.
The operation will be registered as interface utility typed by IOperationType.
Modified: zope.generic/trunk/src/zope/generic/type/configure.zcml
===================================================================
--- zope.generic/trunk/src/zope/generic/type/configure.zcml 2006-04-13 22:55:09 UTC (rev 66938)
+++ zope.generic/trunk/src/zope/generic/type/configure.zcml 2006-04-13 23:41:41 UTC (rev 66939)
@@ -3,7 +3,7 @@
xmlns:generic="http://namespaces.zope.org/generic"
i18n_domain="zope">
- <generic:information
+ <generic:informationProvider
interface="zope.generic.component.IInformationProviderInformation"
label="Type Information Registry"
registry=".ITypeInformation"
Modified: zope.generic/trunk/src/zope/generic/type/metaconfigure.py
===================================================================
--- zope.generic/trunk/src/zope/generic/type/metaconfigure.py 2006-04-13 22:55:09 UTC (rev 66938)
+++ zope.generic/trunk/src/zope/generic/type/metaconfigure.py 2006-04-13 23:41:41 UTC (rev 66939)
@@ -33,7 +33,7 @@
from zope.generic.component.api import toDottedName
from zope.generic.component.api import ConfigurationData
from zope.generic.component.api import provideInformation
-from zope.generic.component.metaconfigure import InformationDirective
+from zope.generic.component.metaconfigure import InformationProviderDirective
from zope.generic.type import IInitializationHandler
from zope.generic.type import IInitializerConfiguration
@@ -78,7 +78,7 @@
-class TypeDirective(InformationDirective):
+class TypeDirective(InformationProviderDirective):
"""Provide a new logical type."""
# mark types with a type marker type
Modified: zope.generic/trunk/src/zope/generic/type/metadirectives.py
===================================================================
--- zope.generic/trunk/src/zope/generic/type/metadirectives.py 2006-04-13 22:55:09 UTC (rev 66938)
+++ zope.generic/trunk/src/zope/generic/type/metadirectives.py 2006-04-13 23:41:41 UTC (rev 66939)
@@ -24,11 +24,11 @@
from zope.configuration.fields import GlobalObject
from zope.interface import Interface
-from zope.generic.component.metadirectives import IBaseInformationDirective
+from zope.generic.component.metadirectives import IBaseInformationProviderDirective
-class ITypeDirective(IBaseInformationDirective):
+class ITypeDirective(IBaseInformationProviderDirective):
"""Declare attriubtes of the type directive.
Register an type information and a type factory.
More information about the Checkins
mailing list