[Zope-CVS] CVS: Products/AdaptableStorage/zodb/interfaces - .cvsignore:1.1 IOIDEncoder.py:1.1 IResourceAccess.py:1.1 __init__.py:1.1 public.py:1.1
Shane Hathaway
shane@zope.com
Wed, 27 Nov 2002 13:37:09 -0500
Update of /cvs-repository/Products/AdaptableStorage/zodb/interfaces
In directory cvs.zope.org:/tmp/cvs-serv12157/zodb/interfaces
Added Files:
.cvsignore IOIDEncoder.py IResourceAccess.py __init__.py
public.py
Log Message:
Moved the latest AdaptableStorage work out of the private repository.
It took a long time, but I moved it as soon as all the unit tests
passed and I felt that all the interface names and conventions were
good enough.
Documentation is still minimal, but now I think the system is finally
straight enough in my head to write down. :-) If you want a sneak
peek, the interfaces have some docstrings, if you're looking for a
"tree" view, while the OpenOffice diagram presents something of a
"forest" view.
Also note that I'm trying a new coding convention. The "public"
module in each package defines exactly which objects should be
exported from the package. This solves a few problems with imports
such as doubling of names and shadowing of modules. Overall, the
"public" module makes it easier to tell which classes are supposed to
be used by other packages, and makes it easier for other packages to
use the public classes. See what you think.
=== Added File Products/AdaptableStorage/zodb/interfaces/.cvsignore ===
*.pyc
=== Added File Products/AdaptableStorage/zodb/interfaces/IOIDEncoder.py ===
##############################################################################
#
# 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.
#
##############################################################################
"""OID encoder interface
$Id: IOIDEncoder.py,v 1.1 2002/11/27 18:37:08 shane Exp $
"""
from Interface import Interface
class IOIDEncoder (Interface):
def decode(oid):
""
def encode(mapper_name, key):
""
=== Added File Products/AdaptableStorage/zodb/interfaces/IResourceAccess.py ===
##############################################################################
#
# 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.
#
##############################################################################
"""Database model access interface
$Id: IResourceAccess.py,v 1.1 2002/11/27 18:37:08 shane Exp $
"""
from Interface import Interface
class IResourceAccess (Interface):
"""Provides access to a resource that needs periodic updates.
"""
def access(consumer):
"""Returns the resource.
"""
def release(consumer):
"""Indicates the given consumer is finished with the resource.
The implementation may take an opportunity to update the resource.
"""
=== Added File Products/AdaptableStorage/zodb/interfaces/__init__.py ===
##############################################################################
#
# 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.
#
##############################################################################
"""ZODB/AdaptableStorage interfaces
$Id: __init__.py,v 1.1 2002/11/27 18:37:08 shane Exp $
"""
=== Added File Products/AdaptableStorage/zodb/interfaces/public.py ===
##############################################################################
#
# 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.
#
##############################################################################
"""Public interfaces
$Id: public.py,v 1.1 2002/11/27 18:37:08 shane Exp $
"""
from IResourceAccess import IResourceAccess
from IOIDEncoder import IOIDEncoder