[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZMI - IconDirective.py:1.1.2.1 TabsDirective.py:1.1.2.1 provideClass.py:1.1.2.6 metaConfigure.py:NONE
Jim Fulton
jim@zope.com
Thu, 3 Jan 2002 14:29:54 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZMI
In directory cvs.zope.org:/tmp/cvs-serv16747/App/ZMI
Modified Files:
Tag: Zope-3x-branch
provideClass.py
Added Files:
Tag: Zope-3x-branch
IconDirective.py TabsDirective.py
Removed Files:
Tag: Zope-3x-branch
metaConfigure.py
Log Message:
Refactored configuration framework:
- Configuration directives must be written to a
a different framework. See
ConfigurationDirectiveInterfaces.
- Configuration directives now don't take actions immediately.
Instead, they return a sequence of discriminators and callables
objects with arguments. This allows configuration to be defered to
allow overriding and conflct detection.
- Can now detect conflicting directives
- Can override directives. Directives in including configuration files
override directives in included files. Conflicting directives are
decided based on discriminators.
- Added new directives for defining directives. All directives, except
for a few bootstrap irectives, are now configurable in the
configuration file. This makes directives a little more discoverable
and facilitates extension of directives.
=== Added File Zope3/lib/python/Zope/App/ZMI/IconDirective.py ===
##############################################################################
#
# Copyright (c) 2001 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
#
##############################################################################
"""
Revision information: $Id: IconDirective.py,v 1.1.2.1 2002/01/03 19:29:23 jim Exp $
"""
def IconDirective(for_, file):
#stub
return ()
=== Added File Zope3/lib/python/Zope/App/ZMI/TabsDirective.py ===
##############################################################################
#
# Copyright (c) 2001 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
#
##############################################################################
"""
Revision information: $Id: TabsDirective.py,v 1.1.2.1 2002/01/03 19:29:23 jim Exp $
"""
from Zope.Configuration.ConfigurationDirectiveInterfaces \
import INonEmptyDirective
class TabsDirective:
__implements__ = INonEmptyDirective
def __init__(self, for_):
pass
#stub
def tab(self, label, action):
return ()
#stub
def __call__(self):
return ()
=== Zope3/lib/python/Zope/App/ZMI/provideClass.py 1.1.2.5 => 1.1.2.6 ===
from Zope.ComponentArchitecture.IFactory import IFactory
from Zope.ComponentArchitecture import provideFactory
+from Zope.Configuration.name import resolve
import Addable
class ClassFactory:
@@ -37,3 +38,12 @@
factory = ClassFactory(_class, permission)
provideFactory(qualified_name, factory)
Addable.provideAddable(qualified_name, title, description)
+
+def provideClassDir(name, permission, title, description=''):
+ return ((name,
+ provideClass,
+ (name, resolve(name), permission, title, description)
+ ),)
+
+
+
=== Removed File Zope3/lib/python/Zope/App/ZMI/metaConfigure.py ===