[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/component - __init__.py:1.2 globalinterfaceservice.py:1.2 interfacefield.py:1.2
Jim Fulton
jim@zope.com
Wed, 25 Dec 2002 09:13:59 -0500
Update of /cvs-repository/Zope3/src/zope/app/interfaces/component
In directory cvs.zope.org:/tmp/cvs-serv15352/src/zope/app/interfaces/component
Added Files:
__init__.py globalinterfaceservice.py interfacefield.py
Log Message:
Grand renaming:
- Renamed most files (especially python modules) to lower case.
- Moved views and interfaces into separate hierarchies within each
project, where each top-level directory under the zope package
is a separate project.
- Moved everything to src from lib/python.
lib/python will eventually go away. I need access to the cvs
repository to make this happen, however.
There are probably some bits that are broken. All tests pass
and zope runs, but I haven't tried everything. There are a number
of cleanups I'll work on tomorrow.
=== Zope3/src/zope/app/interfaces/component/__init__.py 1.1 => 1.2 ===
--- /dev/null Wed Dec 25 09:13:59 2002
+++ Zope3/src/zope/app/interfaces/component/__init__.py Wed Dec 25 09:12:58 2002
@@ -0,0 +1,2 @@
+#
+# This file is necessary to make this directory a package.
=== Zope3/src/zope/app/interfaces/component/globalinterfaceservice.py 1.1 => 1.2 ===
--- /dev/null Wed Dec 25 09:13:59 2002
+++ Zope3/src/zope/app/interfaces/component/globalinterfaceservice.py Wed Dec 25 09:12:58 2002
@@ -0,0 +1,34 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+$Id$
+"""
+
+from zope.app.component.globalinterfaceservice import IInterfaceService
+
+class IGlobalInterfaceService(IInterfaceService):
+ """Global registry for Interface
+ """
+
+ def provideInterface(id, interface):
+ """Register an interface with a given id
+
+ The id is the full dotted name for the interface.
+
+ If the id is false, the id will be computed from the interface
+ module and name.
+
+ """
+
+__doc__ = IGlobalInterfaceService.__doc__ + __doc__
=== Zope3/src/zope/app/interfaces/component/interfacefield.py 1.1 => 1.2 ===
--- /dev/null Wed Dec 25 09:13:59 2002
+++ Zope3/src/zope/app/interfaces/component/interfacefield.py Wed Dec 25 09:12:58 2002
@@ -0,0 +1,30 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""These are the interfaces for the common fields.
+
+$Id$
+"""
+
+from zope.schema import Field
+from zope.schema.interfaces import IValueSet
+from zope.interface import Interface
+
+class IInterfaceField(IValueSet):
+ u"""Fields with Interfaces as values
+ """
+
+ type = Field(title=u"Base type",
+ description=u"All values must extend (or be) this type",
+ default=Interface,
+ )