[Zope-Checkins] CVS: Zope3/lib/python/Zope/ComponentArchitecture - IFactoryService.py:1.1.2.1
Jim Fulton
jim@zope.com
Sun, 6 Jan 2002 18:38:47 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/ComponentArchitecture
In directory cvs.zope.org:/tmp/cvs-serv8418
Added Files:
Tag: Zope-3x-branch
IFactoryService.py
Log Message:
Factored IComponentArchitecture into service interfaces
=== Added File Zope3/lib/python/Zope/ComponentArchitecture/IFactoryService.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: IFactoryService.py,v 1.1.2.1 2002/01/06 23:38:47 jim Exp $
"""
from Interface import Interface
class IFactoryService(Interface):
def provideFactory(name, factory):
"""Provide a factory for the given name.
"""
def createObject(object, name):
"""Create a new object using the factory with the given name
The object provides a place to look for placeful views.
A Zope.ComponentArchitecture.ComponentLookupError will be
raised if the factory component can't be found.
"""