[Checkins] SVN: z3ext.product/tags/1.4.0/ release tag
Nikolay Kim
fafhrd91 at gmail.com
Tue Aug 11 05:25:23 EDT 2009
Log message for revision 102659:
release tag
Changed:
A z3ext.product/tags/1.4.0/
D z3ext.product/tags/1.4.0/CHANGES.txt
A z3ext.product/tags/1.4.0/CHANGES.txt
D z3ext.product/tags/1.4.0/bootstrap.py
A z3ext.product/tags/1.4.0/bootstrap.py
D z3ext.product/tags/1.4.0/setup.py
A z3ext.product/tags/1.4.0/setup.py
D z3ext.product/tags/1.4.0/src/z3ext/product/installer.py
A z3ext.product/tags/1.4.0/src/z3ext/product/installer.py
D z3ext.product/tags/1.4.0/src/z3ext/product/interfaces.py
A z3ext.product/tags/1.4.0/src/z3ext/product/interfaces.py
D z3ext.product/tags/1.4.0/src/z3ext/product/locales/nl/LC_MESSAGES/z3ext.product.po
A z3ext.product/tags/1.4.0/src/z3ext/product/locales/nl/LC_MESSAGES/z3ext.product.po
D z3ext.product/tags/1.4.0/src/z3ext/product/locales/ru/LC_MESSAGES/z3ext.product.po
A z3ext.product/tags/1.4.0/src/z3ext/product/locales/ru/LC_MESSAGES/z3ext.product.po
D z3ext.product/tags/1.4.0/src/z3ext/product/locales/z3ext.product.pot
A z3ext.product/tags/1.4.0/src/z3ext/product/locales/z3ext.product.pot
D z3ext.product/tags/1.4.0/src/z3ext/product/product.py
A z3ext.product/tags/1.4.0/src/z3ext/product/product.py
D z3ext.product/tags/1.4.0/src/z3ext/product/registry.py
A z3ext.product/tags/1.4.0/src/z3ext/product/registry.py
D z3ext.product/tags/1.4.0/src/z3ext/product/tests.py
A z3ext.product/tags/1.4.0/src/z3ext/product/tests.py
D z3ext.product/tags/1.4.0/src/z3ext/product/utils.py
A z3ext.product/tags/1.4.0/src/z3ext/product/utils.py
D z3ext.product/tags/1.4.0/src/z3ext/product/view.py
A z3ext.product/tags/1.4.0/src/z3ext/product/view.py
D z3ext.product/tags/1.4.0/src/z3ext/product/zcml.py
A z3ext.product/tags/1.4.0/src/z3ext/product/zcml.py
-=-
Deleted: z3ext.product/tags/1.4.0/CHANGES.txt
===================================================================
--- z3ext.product/trunk/CHANGES.txt 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/CHANGES.txt 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,109 +0,0 @@
-=======
-CHANGES
-=======
-
-1.3.2 (2009-04-??)
-------------------
-
-- Do not use z3c.autoinclude
-
-
-1.3.1 (2009-02-03)
-------------------
-
-- Send ObjectModifiedEvent for site on product install/uninstall.
-
-
-1.3.0 (2008-11-21)
-------------------
-
-- Install product registry after base registries
-
-- Removed product extension system
-
-
-1.2.2 (2008-10-28)
-------------------
-
-- Added translations: nl, ru
-
-
-1.2.1 (2008-09-30)
-------------------
-
-- Fixed bug with enclosed sites.
-
-
-1.2.0 (2008-09-04)
-------------------
-
-- Added product dependencies (require attribute)
-
-
-1.1.2 (2008-08-13)
-------------------
-
-- Calculate installed status
-
-
-1.1.0 (2008-08-05)
-------------------
-
-- Implemented product management for enclosed site objects
-
-
-1.0.2 (2008-05-26)
-------------------
-
-- During product instalation, first install CA registry, then call update
-
-
-1.0.1 (2008-05-15)
-------------------
-
-- Compatibility with z3ext.controlpanel >= 1.2.3
-
-
-1.0.0 (2008-03-26)
-------------------
-
-- Tests added
-
-- Code moved to svn.zope.org
-
-
-0.11.1 (2008-03-04)
--------------------
-
-- Added 'broken' base registry in case product not available.
-
-
-0.11 (2008-02-28)
------------------
-
-- Use z3c.baseregistry
-
-- Use z3c.autoinclude
-
-- Create components registry for each product.
- now it's possible to use <registerIn registry="z3ext.product.productName'/>
- for registering product adapters and utulities.
-
-
-0.10.2 (2008-02-18)
-------------------
-
-- Don't show 'Products Management' configlet
- if there are no installable products
-
-
-0.10.1 (2008-02-01)
-------------------
-
-- Removed `grant` directives
-
-
-0.10 (2008-02-01)
-------------------
-
-- Initial release
Copied: z3ext.product/tags/1.4.0/CHANGES.txt (from rev 102658, z3ext.product/trunk/CHANGES.txt)
===================================================================
--- z3ext.product/tags/1.4.0/CHANGES.txt (rev 0)
+++ z3ext.product/tags/1.4.0/CHANGES.txt 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,111 @@
+=======
+CHANGES
+=======
+
+1.4.0 (2009-08-11)
+------------------
+
+- Do not use z3c.autoinclude
+
+- Copyright holder changed
+
+
+1.3.1 (2009-02-03)
+------------------
+
+- Send ObjectModifiedEvent for site on product install/uninstall.
+
+
+1.3.0 (2008-11-21)
+------------------
+
+- Install product registry after base registries
+
+- Removed product extension system
+
+
+1.2.2 (2008-10-28)
+------------------
+
+- Added translations: nl, ru
+
+
+1.2.1 (2008-09-30)
+------------------
+
+- Fixed bug with enclosed sites.
+
+
+1.2.0 (2008-09-04)
+------------------
+
+- Added product dependencies (require attribute)
+
+
+1.1.2 (2008-08-13)
+------------------
+
+- Calculate installed status
+
+
+1.1.0 (2008-08-05)
+------------------
+
+- Implemented product management for enclosed site objects
+
+
+1.0.2 (2008-05-26)
+------------------
+
+- During product instalation, first install CA registry, then call update
+
+
+1.0.1 (2008-05-15)
+------------------
+
+- Compatibility with z3ext.controlpanel >= 1.2.3
+
+
+1.0.0 (2008-03-26)
+------------------
+
+- Tests added
+
+- Code moved to svn.zope.org
+
+
+0.11.1 (2008-03-04)
+-------------------
+
+- Added 'broken' base registry in case product not available.
+
+
+0.11 (2008-02-28)
+-----------------
+
+- Use z3c.baseregistry
+
+- Use z3c.autoinclude
+
+- Create components registry for each product.
+ now it's possible to use <registerIn registry="z3ext.product.productName'/>
+ for registering product adapters and utulities.
+
+
+0.10.2 (2008-02-18)
+------------------
+
+- Don't show 'Products Management' configlet
+ if there are no installable products
+
+
+0.10.1 (2008-02-01)
+------------------
+
+- Removed `grant` directives
+
+
+0.10 (2008-02-01)
+------------------
+
+- Initial release
Deleted: z3ext.product/tags/1.4.0/bootstrap.py
===================================================================
--- z3ext.product/trunk/bootstrap.py 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/bootstrap.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,52 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2006 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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.
-#
-##############################################################################
-"""Bootstrap a buildout-based project
-
-Simply run this script in a directory containing a buildout.cfg.
-The script accepts buildout command-line options, so you can
-use the -c option to specify an alternate configuration file.
-
-$Id: bootstrap.py 1839 2008-03-25 13:28:26Z fafhrd91 $
-"""
-
-import os, shutil, sys, tempfile, urllib2
-
-tmpeggs = tempfile.mkdtemp()
-
-ez = {}
-exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
- ).read() in ez
-ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
-
-import pkg_resources
-
-cmd = 'from setuptools.command.easy_install import main; main()'
-if sys.platform == 'win32':
- cmd = '"%s"' % cmd # work around spawn lamosity on windows
-
-ws = pkg_resources.working_set
-assert os.spawnle(
- os.P_WAIT, sys.executable, sys.executable,
- '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
- dict(os.environ,
- PYTHONPATH=
- ws.find(pkg_resources.Requirement.parse('setuptools')).location
- ),
- ) == 0
-
-ws.add_entry(tmpeggs)
-ws.require('zc.buildout')
-import zc.buildout.buildout
-zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
-shutil.rmtree(tmpeggs)
Copied: z3ext.product/tags/1.4.0/bootstrap.py (from rev 102658, z3ext.product/trunk/bootstrap.py)
===================================================================
--- z3ext.product/tags/1.4.0/bootstrap.py (rev 0)
+++ z3ext.product/tags/1.4.0/bootstrap.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id: bootstrap.py 1839 2008-03-25 13:28:26Z fafhrd91 $
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+ez = {}
+exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+import pkg_resources
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+if sys.platform == 'win32':
+ cmd = '"%s"' % cmd # work around spawn lamosity on windows
+
+ws = pkg_resources.working_set
+assert os.spawnle(
+ os.P_WAIT, sys.executable, sys.executable,
+ '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)
Deleted: z3ext.product/tags/1.4.0/setup.py
===================================================================
--- z3ext.product/trunk/setup.py 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/setup.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,77 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2008 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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.
-#
-##############################################################################
-"""Setup for z3ext.product package
-
-$Id: setup.py 1842 2008-03-25 16:41:22Z fafhrd91 $
-"""
-import sys, os
-from setuptools import setup, find_packages
-
-def read(*rnames):
- return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
-
-version = '1.3.2dev'
-
-
-setup(name='z3ext.product',
- version=version,
- description="Implementation of product (add-on) concept.",
- long_description=(
- 'Detailed Documentation\n' +
- '======================\n'
- + '\n\n' +
- read('src', 'z3ext', 'product', 'README.txt')
- + '\n\n' +
- read('CHANGES.txt')
- ),
- classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Environment :: Web Environment',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: Zope Public License',
- 'Programming Language :: Python',
- 'Natural Language :: English',
- 'Operating System :: OS Independent',
- 'Topic :: Internet :: WWW/HTTP',
- 'Framework :: Zope3'],
- author='Nikolay Kim',
- author_email='fafhrd91 at gmail.com',
- url='http://z3ext.net/',
- license='ZPL 2.1',
- packages=find_packages('src'),
- package_dir = {'':'src'},
- namespace_packages=['z3ext'],
- install_requires = ['setuptools',
- 'ZODB3',
- 'zope.schema',
- 'zope.component',
- 'zope.interface',
- 'zope.security',
- 'zope.i18n',
- 'zope.i18nmessageid',
- 'zope.lifecycleevent',
- 'zope.configuration',
- 'zope.app.component',
- 'z3c.baseregistry',
- 'z3c.configurator',
- 'z3ext.layout',
- 'z3ext.controlpanel',
- 'z3ext.statusmessage',
- ],
- extras_require = dict(test=['zope.app.testing',
- 'zope.testing',
- ]),
- include_package_data = True,
- zip_safe = False
- )
Copied: z3ext.product/tags/1.4.0/setup.py (from rev 102658, z3ext.product/trunk/setup.py)
===================================================================
--- z3ext.product/tags/1.4.0/setup.py (rev 0)
+++ z3ext.product/tags/1.4.0/setup.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,77 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+"""Setup for z3ext.product package
+
+$Id: setup.py 1842 2008-03-25 16:41:22Z fafhrd91 $
+"""
+import sys, os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+version = '1.4.0'
+
+
+setup(name='z3ext.product',
+ version=version,
+ description="Implementation of product (add-on) concept.",
+ long_description=(
+ 'Detailed Documentation\n' +
+ '======================\n'
+ + '\n\n' +
+ read('src', 'z3ext', 'product', 'README.txt')
+ + '\n\n' +
+ read('CHANGES.txt')
+ ),
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: Zope Public License',
+ 'Programming Language :: Python',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ 'Topic :: Internet :: WWW/HTTP',
+ 'Framework :: Zope3'],
+ author='Nikolay Kim',
+ author_email='fafhrd91 at gmail.com',
+ url='http://z3ext.net/',
+ license='ZPL 2.1',
+ packages=find_packages('src'),
+ package_dir = {'':'src'},
+ namespace_packages=['z3ext'],
+ install_requires = ['setuptools',
+ 'ZODB3',
+ 'zope.schema',
+ 'zope.component',
+ 'zope.interface',
+ 'zope.security',
+ 'zope.i18n',
+ 'zope.i18nmessageid',
+ 'zope.lifecycleevent',
+ 'zope.configuration',
+ 'zope.app.component',
+ 'z3c.baseregistry',
+ 'z3c.configurator',
+ 'z3ext.layout',
+ 'z3ext.controlpanel',
+ 'z3ext.statusmessage',
+ ],
+ extras_require = dict(test=['zope.app.testing',
+ 'zope.testing',
+ ]),
+ include_package_data = True,
+ zip_safe = False
+ )
Deleted: z3ext.product/tags/1.4.0/src/z3ext/product/installer.py
===================================================================
--- z3ext.product/trunk/src/z3ext/product/installer.py 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/installer.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,28 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2008 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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: installer.py 1472 2008-02-18 11:35:13Z fafhrd91 $
-"""
-from zope import interface
-from z3ext.controlpanel.interfaces import IConfiglet
-
-
-class ProductsInstaller(object):
-
- def isAvailable(self):
- if not len(self):
- return False
-
- return super(ProductsInstaller, self).isAvailable()
Copied: z3ext.product/tags/1.4.0/src/z3ext/product/installer.py (from rev 102658, z3ext.product/trunk/src/z3ext/product/installer.py)
===================================================================
--- z3ext.product/tags/1.4.0/src/z3ext/product/installer.py (rev 0)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/installer.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,28 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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: installer.py 1472 2008-02-18 11:35:13Z fafhrd91 $
+"""
+from zope import interface
+from z3ext.controlpanel.interfaces import IConfiglet
+
+
+class ProductsInstaller(object):
+
+ def isAvailable(self):
+ if not len(self):
+ return False
+
+ return super(ProductsInstaller, self).isAvailable()
Deleted: z3ext.product/tags/1.4.0/src/z3ext/product/interfaces.py
===================================================================
--- z3ext.product/trunk/src/z3ext/product/interfaces.py 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/interfaces.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,117 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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.
-#
-##############################################################################
-""" z3ext.product interfaces
-
-$Id: interfaces.py 1843 2008-03-25 18:39:00Z fafhrd91 $
-"""
-from zope import schema, interface
-from zope.i18nmessageid import MessageFactory
-
-_ = MessageFactory('z3ext.product')
-
-
-class ProductError(Exception):
- """ base error class for product management """
-
-
-class ProductNotInstalledError(ProductError):
- """ """
-
-
-class ProductAlreadyInstalledError(ProductError):
- """ """
-
-
-class InvalidProduct(ProductError):
- """ """
-
-
-class ProductWarningError(ProductError):
- """ dependencies error """
-
-
-class RequiredProductNotFound(ProductError):
- """ """
-
-
-class IProduct(interface.Interface):
- """ product information """
-
- __product_name__ = schema.TextLine(
- title = u'Product name',
- required = True)
-
- __require__ = interface.Attribute(u'Require products.')
-
- __installed__ = interface.Attribute(u'Is product installed.')
-
- def install():
- """ install and configure product """
-
- def uninstall():
- """ uninstall product """
-
- def update():
- """ update product """
-
- def isInstalled():
- """ is product installed """
-
- def isUninstallable():
- """ is product uninstallable """
-
-
-class IProductInstaller(interface.Interface):
- """ installer for external products """
-
-
-class IAbstractProductEvent(interface.Interface):
- """ base event interface """
-
- id = schema.TextLine(
- title = u'Product id',
- required = True)
-
- product = interface.Attribute('IProduct object')
-
-
-class IProductInstalledEvent(IAbstractProductEvent):
- """ new product installed """
-
-
-class IProductUninstalledEvent(IAbstractProductEvent):
- """ product uninstalled """
-
-
-class IProductUpdatedEvent(IAbstractProductEvent):
- """ product updated """
-
-
-class AbstractProductEvent(object):
-
- def __init__(self, id, product):
- self.id = id
- self.product = product
-
-
-class ProductInstalledEvent(AbstractProductEvent):
- interface.implements(IProductInstalledEvent)
-
-
-class ProductUninstalledEvent(AbstractProductEvent):
- interface.implements(IProductUninstalledEvent)
-
-
-class ProductUpdatedEvent(AbstractProductEvent):
- interface.implements(IProductUpdatedEvent)
Copied: z3ext.product/tags/1.4.0/src/z3ext/product/interfaces.py (from rev 102658, z3ext.product/trunk/src/z3ext/product/interfaces.py)
===================================================================
--- z3ext.product/tags/1.4.0/src/z3ext/product/interfaces.py (rev 0)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/interfaces.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,117 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+""" z3ext.product interfaces
+
+$Id: interfaces.py 1843 2008-03-25 18:39:00Z fafhrd91 $
+"""
+from zope import schema, interface
+from zope.i18nmessageid import MessageFactory
+
+_ = MessageFactory('z3ext.product')
+
+
+class ProductError(Exception):
+ """ base error class for product management """
+
+
+class ProductNotInstalledError(ProductError):
+ """ """
+
+
+class ProductAlreadyInstalledError(ProductError):
+ """ """
+
+
+class InvalidProduct(ProductError):
+ """ """
+
+
+class ProductWarningError(ProductError):
+ """ dependencies error """
+
+
+class RequiredProductNotFound(ProductError):
+ """ """
+
+
+class IProduct(interface.Interface):
+ """ product information """
+
+ __product_name__ = schema.TextLine(
+ title = u'Product name',
+ required = True)
+
+ __require__ = interface.Attribute(u'Require products.')
+
+ __installed__ = interface.Attribute(u'Is product installed.')
+
+ def install():
+ """ install and configure product """
+
+ def uninstall():
+ """ uninstall product """
+
+ def update():
+ """ update product """
+
+ def isInstalled():
+ """ is product installed """
+
+ def isUninstallable():
+ """ is product uninstallable """
+
+
+class IProductInstaller(interface.Interface):
+ """ installer for external products """
+
+
+class IAbstractProductEvent(interface.Interface):
+ """ base event interface """
+
+ id = schema.TextLine(
+ title = u'Product id',
+ required = True)
+
+ product = interface.Attribute('IProduct object')
+
+
+class IProductInstalledEvent(IAbstractProductEvent):
+ """ new product installed """
+
+
+class IProductUninstalledEvent(IAbstractProductEvent):
+ """ product uninstalled """
+
+
+class IProductUpdatedEvent(IAbstractProductEvent):
+ """ product updated """
+
+
+class AbstractProductEvent(object):
+
+ def __init__(self, id, product):
+ self.id = id
+ self.product = product
+
+
+class ProductInstalledEvent(AbstractProductEvent):
+ interface.implements(IProductInstalledEvent)
+
+
+class ProductUninstalledEvent(AbstractProductEvent):
+ interface.implements(IProductUninstalledEvent)
+
+
+class ProductUpdatedEvent(AbstractProductEvent):
+ interface.implements(IProductUpdatedEvent)
Deleted: z3ext.product/tags/1.4.0/src/z3ext/product/locales/nl/LC_MESSAGES/z3ext.product.po
===================================================================
--- z3ext.product/trunk/src/z3ext/product/locales/nl/LC_MESSAGES/z3ext.product.po 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/locales/nl/LC_MESSAGES/z3ext.product.po 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,123 +0,0 @@
-# #############################################################################
-#
-# Copyright (c) 2003-2004 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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.
-#
-# #############################################################################
-msgid ""
-msgstr ""
-"Project-Id-Version: Development/Unknown\n"
-"POT-Creation-Date: Fri Nov 21 17:10:38 2008\n"
-"PO-Revision-Date: 2008-10-23 10:18+0100\n"
-"Last-Translator: F. Kooman <fkooman at tuxed.net>\n"
-"Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: zope/app/locales/extract.py\n"
-
-#: src/z3ext/product/browser.zcml:7
-msgid "Product"
-msgstr "Product"
-
-#: src/z3ext/product/configure.zcml:13
-msgid "This is the Add-on Products install section."
-msgstr "Dit is de product installatiemodule."
-
-#: src/z3ext/product/configure.zcml:13 src/z3ext/product/browser.zcml:13
-#: src/z3ext/product/browser.zcml:26
-msgid "Products management"
-msgstr "Productbeheer"
-
-#: src/z3ext/product/configure.zcml:9
-msgid "Manage products"
-msgstr "Beheer producten"
-
-#: src/z3ext/product/product.py:50 src/z3ext/product/product.py:59
-msgid "Required product is not found."
-msgstr "Vereist product is niet gevonden."
-
-#: src/z3ext/product/product.py:70
-msgid "Product already installed."
-msgstr "Product is al geïnstalleerd."
-
-#: src/z3ext/product/product.py:88 src/z3ext/product/product.py:99
-msgid "Product is not installed."
-msgstr "Product is niet geïnstalleerd."
-
-#: src/z3ext/product/registry.py:60
-msgid "Product: Broken product!!!"
-msgstr "Dit product is beschadigd!!!"
-
-#: src/z3ext/product/utils.py:33
-msgid "Can't create utility."
-msgstr "Kan utility niet aanmaken."
-
-#: src/z3ext/product/view.pt:27
-msgid "Update"
-msgstr "Bijwerken"
-
-#: src/z3ext/product/view.pt:29
-msgid "Uninstall"
-msgstr "Verwijderen"
-
-#: src/z3ext/product/view.pt:3
-msgid "Installed Products"
-msgstr "Geïnstalleerde producten"
-
-#: src/z3ext/product/view.pt:37
-msgid "Products available for install"
-msgstr "Producten beschikbaar voor installatie"
-
-#: src/z3ext/product/view.pt:38
-msgid ""
-"This is the Add-on Products install section, you can add products in the "
-"lists below."
-msgstr ""
-"Dit is de product installatiemodule, u kunt producten selecteren in de "
-"onderstaande lijst."
-
-#: src/z3ext/product/view.pt:56
-msgid "Install"
-msgstr "Installeren"
-
-#: src/z3ext/product/view.py:107
-msgid "Select one or more products to uninstall."
-msgstr "Selecteer één of meer producten om te verwijderen."
-
-#: src/z3ext/product/view.py:114
-msgid "Selected products has been uninstalled."
-msgstr "Geselecteerde producten zijn verwijderd."
-
-#: src/z3ext/product/view.py:72
-msgid "Select one or more products to install."
-msgstr "Selecteer één of meer producten om te installeren."
-
-#: src/z3ext/product/view.py:79
-msgid "Selected products has been installed."
-msgstr "Geselecteerde producten zijn geïnstalleerd."
-
-#: src/z3ext/product/view.py:91
-msgid "Select one or more products to update."
-msgstr "Selecteer één of meer producten om bij te werken."
-
-#: src/z3ext/product/view.py:98
-#, fuzzy
-msgid "Selected products has been updated."
-msgstr "Geselecteerde producten zijn verwijderd."
-
-#~ msgid "Product extension"
-#~ msgstr "Productuitbreiding"
-
-#~ msgid "(Installed)"
-#~ msgstr "(Geïnstalleerd)"
-
-#~ msgid "(Not installed)"
-#~ msgstr "(Niet geïnstalleerd)"
Copied: z3ext.product/tags/1.4.0/src/z3ext/product/locales/nl/LC_MESSAGES/z3ext.product.po (from rev 102658, z3ext.product/trunk/src/z3ext/product/locales/nl/LC_MESSAGES/z3ext.product.po)
===================================================================
--- z3ext.product/tags/1.4.0/src/z3ext/product/locales/nl/LC_MESSAGES/z3ext.product.po (rev 0)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/locales/nl/LC_MESSAGES/z3ext.product.po 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,123 @@
+# #############################################################################
+#
+# Copyright (c) 2003-2004 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+# #############################################################################
+msgid ""
+msgstr ""
+"Project-Id-Version: Development/Unknown\n"
+"POT-Creation-Date: Fri Nov 21 17:10:38 2008\n"
+"PO-Revision-Date: 2008-10-23 10:18+0100\n"
+"Last-Translator: F. Kooman <fkooman at tuxed.net>\n"
+"Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: zope/app/locales/extract.py\n"
+
+#: src/z3ext/product/browser.zcml:7
+msgid "Product"
+msgstr "Product"
+
+#: src/z3ext/product/configure.zcml:13
+msgid "This is the Add-on Products install section."
+msgstr "Dit is de product installatiemodule."
+
+#: src/z3ext/product/configure.zcml:13 src/z3ext/product/browser.zcml:13
+#: src/z3ext/product/browser.zcml:26
+msgid "Products management"
+msgstr "Productbeheer"
+
+#: src/z3ext/product/configure.zcml:9
+msgid "Manage products"
+msgstr "Beheer producten"
+
+#: src/z3ext/product/product.py:50 src/z3ext/product/product.py:59
+msgid "Required product is not found."
+msgstr "Vereist product is niet gevonden."
+
+#: src/z3ext/product/product.py:70
+msgid "Product already installed."
+msgstr "Product is al geïnstalleerd."
+
+#: src/z3ext/product/product.py:88 src/z3ext/product/product.py:99
+msgid "Product is not installed."
+msgstr "Product is niet geïnstalleerd."
+
+#: src/z3ext/product/registry.py:60
+msgid "Product: Broken product!!!"
+msgstr "Dit product is beschadigd!!!"
+
+#: src/z3ext/product/utils.py:33
+msgid "Can't create utility."
+msgstr "Kan utility niet aanmaken."
+
+#: src/z3ext/product/view.pt:27
+msgid "Update"
+msgstr "Bijwerken"
+
+#: src/z3ext/product/view.pt:29
+msgid "Uninstall"
+msgstr "Verwijderen"
+
+#: src/z3ext/product/view.pt:3
+msgid "Installed Products"
+msgstr "Geïnstalleerde producten"
+
+#: src/z3ext/product/view.pt:37
+msgid "Products available for install"
+msgstr "Producten beschikbaar voor installatie"
+
+#: src/z3ext/product/view.pt:38
+msgid ""
+"This is the Add-on Products install section, you can add products in the "
+"lists below."
+msgstr ""
+"Dit is de product installatiemodule, u kunt producten selecteren in de "
+"onderstaande lijst."
+
+#: src/z3ext/product/view.pt:56
+msgid "Install"
+msgstr "Installeren"
+
+#: src/z3ext/product/view.py:107
+msgid "Select one or more products to uninstall."
+msgstr "Selecteer één of meer producten om te verwijderen."
+
+#: src/z3ext/product/view.py:114
+msgid "Selected products has been uninstalled."
+msgstr "Geselecteerde producten zijn verwijderd."
+
+#: src/z3ext/product/view.py:72
+msgid "Select one or more products to install."
+msgstr "Selecteer één of meer producten om te installeren."
+
+#: src/z3ext/product/view.py:79
+msgid "Selected products has been installed."
+msgstr "Geselecteerde producten zijn geïnstalleerd."
+
+#: src/z3ext/product/view.py:91
+msgid "Select one or more products to update."
+msgstr "Selecteer één of meer producten om bij te werken."
+
+#: src/z3ext/product/view.py:98
+#, fuzzy
+msgid "Selected products has been updated."
+msgstr "Geselecteerde producten zijn verwijderd."
+
+#~ msgid "Product extension"
+#~ msgstr "Productuitbreiding"
+
+#~ msgid "(Installed)"
+#~ msgstr "(Geïnstalleerd)"
+
+#~ msgid "(Not installed)"
+#~ msgstr "(Niet geïnstalleerd)"
Deleted: z3ext.product/tags/1.4.0/src/z3ext/product/locales/ru/LC_MESSAGES/z3ext.product.po
===================================================================
--- z3ext.product/trunk/src/z3ext/product/locales/ru/LC_MESSAGES/z3ext.product.po 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/locales/ru/LC_MESSAGES/z3ext.product.po 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,120 +0,0 @@
-# #############################################################################
-#
-# Copyright (c) 2003-2004 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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.
-#
-# #############################################################################
-msgid ""
-msgstr ""
-"Project-Id-Version: Development/Unknown\n"
-"POT-Creation-Date: Fri Nov 21 17:10:38 2008\n"
-"PO-Revision-Date: 2008-11-21 17:12+0600\n"
-"Last-Translator: Nikolay Kim <fafhrd91 at gmail.com>\n"
-"Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: zope/app/locales/extract.py\n"
-
-#: src/z3ext/product/browser.zcml:7
-msgid "Product"
-msgstr "ÐÑодÑкÑ"
-
-#: src/z3ext/product/configure.zcml:13
-msgid "This is the Add-on Products install section."
-msgstr "ÐÐ°Ð½ÐµÐ»Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸ÑелÑнÑми пÑодÑкÑами."
-
-#: src/z3ext/product/configure.zcml:13 src/z3ext/product/browser.zcml:13
-#: src/z3ext/product/browser.zcml:26
-msgid "Products management"
-msgstr "УпÑавление пÑодÑкÑами"
-
-#: src/z3ext/product/configure.zcml:9
-msgid "Manage products"
-msgstr "УпÑавление пÑодÑкÑами"
-
-#: src/z3ext/product/product.py:50 src/z3ext/product/product.py:59
-msgid "Required product is not found."
-msgstr "ÐеобÑ
одимÑй пÑодÑÐºÑ Ð½Ðµ найден."
-
-#: src/z3ext/product/product.py:70
-msgid "Product already installed."
-msgstr "ÐÑодÑÐºÑ Ñже ÑÑÑановлен."
-
-#: src/z3ext/product/product.py:88 src/z3ext/product/product.py:99
-msgid "Product is not installed."
-msgstr "ÐÑодÑÐºÑ Ð½Ðµ ÑÑÑановлен."
-
-#: src/z3ext/product/registry.py:60
-msgid "Product: Broken product!!!"
-msgstr "ÐÑодÑкÑ: Ðе ÑабоÑаÑÑий пÑодÑкÑ!!!"
-
-#: src/z3ext/product/utils.py:33
-msgid "Can't create utility."
-msgstr "Ðевозможно ÑоздаÑÑ ÑÑилиÑÑ."
-
-#: src/z3ext/product/view.pt:27
-msgid "Update"
-msgstr "ÐбновиÑÑ"
-
-#: src/z3ext/product/view.pt:29
-msgid "Uninstall"
-msgstr "ÐеинÑÑаллиÑоваÑÑ"
-
-#: src/z3ext/product/view.pt:3
-msgid "Installed Products"
-msgstr "УÑÑановленнÑе пÑодÑкÑÑ"
-
-#: src/z3ext/product/view.pt:37
-msgid "Products available for install"
-msgstr "ÐоÑÑÑпнÑе пÑодÑкÑÑ"
-
-#: src/z3ext/product/view.pt:38
-msgid ""
-"This is the Add-on Products install section, you can add products in the "
-"lists below."
-msgstr "ÐÑ Ð¼Ð¾Ð¶ÐµÑе ÑÑÑановиÑÑ Ð¿ÑодÑкÑÑ Ð¸Ð· поÑледÑÑÑего ÑпиÑка."
-
-#: src/z3ext/product/view.pt:56
-msgid "Install"
-msgstr "УÑÑановиÑÑ"
-
-#: src/z3ext/product/view.py:107
-msgid "Select one or more products to uninstall."
-msgstr "ÐÑбиÑиÑе один или более пÑодÑкÑов Ð´Ð»Ñ Ð´ÐµÐ¸Ð½ÑÑаллиÑованиÑ.\""
-
-#: src/z3ext/product/view.py:114
-msgid "Selected products has been uninstalled."
-msgstr "ÐÑбÑаннÑе пÑодÑкÑÑ Ð±Ñли деинÑÑаллиÑованÑ."
-
-#: src/z3ext/product/view.py:72
-msgid "Select one or more products to install."
-msgstr "ÐÑбиÑиÑе один или более пÑодÑкÑов Ð´Ð»Ñ ÑÑÑановки."
-
-#: src/z3ext/product/view.py:79
-msgid "Selected products has been installed."
-msgstr "ÐÑбÑаннÑе пÑодÑкÑÑ Ð±Ñли ÑÑÑановленÑ."
-
-#: src/z3ext/product/view.py:91
-msgid "Select one or more products to update."
-msgstr "ÐÑбиÑиÑе один или более пÑодÑкÑов Ð´Ð»Ñ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ."
-
-#: src/z3ext/product/view.py:98
-msgid "Selected products has been updated."
-msgstr "ÐÑбÑаннÑе пÑодÑкÑÑ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ñ."
-
-#~ msgid "Product extension"
-#~ msgstr "РаÑÑиÑение пÑодÑкÑа"
-
-#~ msgid "(Installed)"
-#~ msgstr "(УÑÑановленнÑй)"
-
-#~ msgid "(Not installed)"
-#~ msgstr "(Ðе ÑÑÑановленнÑй)"
Copied: z3ext.product/tags/1.4.0/src/z3ext/product/locales/ru/LC_MESSAGES/z3ext.product.po (from rev 102658, z3ext.product/trunk/src/z3ext/product/locales/ru/LC_MESSAGES/z3ext.product.po)
===================================================================
--- z3ext.product/tags/1.4.0/src/z3ext/product/locales/ru/LC_MESSAGES/z3ext.product.po (rev 0)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/locales/ru/LC_MESSAGES/z3ext.product.po 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,120 @@
+# #############################################################################
+#
+# Copyright (c) 2003-2004 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+# #############################################################################
+msgid ""
+msgstr ""
+"Project-Id-Version: Development/Unknown\n"
+"POT-Creation-Date: Fri Nov 21 17:10:38 2008\n"
+"PO-Revision-Date: 2008-11-21 17:12+0600\n"
+"Last-Translator: Nikolay Kim <fafhrd91 at gmail.com>\n"
+"Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: zope/app/locales/extract.py\n"
+
+#: src/z3ext/product/browser.zcml:7
+msgid "Product"
+msgstr "ÐÑодÑкÑ"
+
+#: src/z3ext/product/configure.zcml:13
+msgid "This is the Add-on Products install section."
+msgstr "ÐÐ°Ð½ÐµÐ»Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸ÑелÑнÑми пÑодÑкÑами."
+
+#: src/z3ext/product/configure.zcml:13 src/z3ext/product/browser.zcml:13
+#: src/z3ext/product/browser.zcml:26
+msgid "Products management"
+msgstr "УпÑавление пÑодÑкÑами"
+
+#: src/z3ext/product/configure.zcml:9
+msgid "Manage products"
+msgstr "УпÑавление пÑодÑкÑами"
+
+#: src/z3ext/product/product.py:50 src/z3ext/product/product.py:59
+msgid "Required product is not found."
+msgstr "ÐеобÑ
одимÑй пÑодÑÐºÑ Ð½Ðµ найден."
+
+#: src/z3ext/product/product.py:70
+msgid "Product already installed."
+msgstr "ÐÑодÑÐºÑ Ñже ÑÑÑановлен."
+
+#: src/z3ext/product/product.py:88 src/z3ext/product/product.py:99
+msgid "Product is not installed."
+msgstr "ÐÑодÑÐºÑ Ð½Ðµ ÑÑÑановлен."
+
+#: src/z3ext/product/registry.py:60
+msgid "Product: Broken product!!!"
+msgstr "ÐÑодÑкÑ: Ðе ÑабоÑаÑÑий пÑодÑкÑ!!!"
+
+#: src/z3ext/product/utils.py:33
+msgid "Can't create utility."
+msgstr "Ðевозможно ÑоздаÑÑ ÑÑилиÑÑ."
+
+#: src/z3ext/product/view.pt:27
+msgid "Update"
+msgstr "ÐбновиÑÑ"
+
+#: src/z3ext/product/view.pt:29
+msgid "Uninstall"
+msgstr "ÐеинÑÑаллиÑоваÑÑ"
+
+#: src/z3ext/product/view.pt:3
+msgid "Installed Products"
+msgstr "УÑÑановленнÑе пÑодÑкÑÑ"
+
+#: src/z3ext/product/view.pt:37
+msgid "Products available for install"
+msgstr "ÐоÑÑÑпнÑе пÑодÑкÑÑ"
+
+#: src/z3ext/product/view.pt:38
+msgid ""
+"This is the Add-on Products install section, you can add products in the "
+"lists below."
+msgstr "ÐÑ Ð¼Ð¾Ð¶ÐµÑе ÑÑÑановиÑÑ Ð¿ÑодÑкÑÑ Ð¸Ð· поÑледÑÑÑего ÑпиÑка."
+
+#: src/z3ext/product/view.pt:56
+msgid "Install"
+msgstr "УÑÑановиÑÑ"
+
+#: src/z3ext/product/view.py:107
+msgid "Select one or more products to uninstall."
+msgstr "ÐÑбиÑиÑе один или более пÑодÑкÑов Ð´Ð»Ñ Ð´ÐµÐ¸Ð½ÑÑаллиÑованиÑ.\""
+
+#: src/z3ext/product/view.py:114
+msgid "Selected products has been uninstalled."
+msgstr "ÐÑбÑаннÑе пÑодÑкÑÑ Ð±Ñли деинÑÑаллиÑованÑ."
+
+#: src/z3ext/product/view.py:72
+msgid "Select one or more products to install."
+msgstr "ÐÑбиÑиÑе один или более пÑодÑкÑов Ð´Ð»Ñ ÑÑÑановки."
+
+#: src/z3ext/product/view.py:79
+msgid "Selected products has been installed."
+msgstr "ÐÑбÑаннÑе пÑодÑкÑÑ Ð±Ñли ÑÑÑановленÑ."
+
+#: src/z3ext/product/view.py:91
+msgid "Select one or more products to update."
+msgstr "ÐÑбиÑиÑе один или более пÑодÑкÑов Ð´Ð»Ñ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ."
+
+#: src/z3ext/product/view.py:98
+msgid "Selected products has been updated."
+msgstr "ÐÑбÑаннÑе пÑодÑкÑÑ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ñ."
+
+#~ msgid "Product extension"
+#~ msgstr "РаÑÑиÑение пÑодÑкÑа"
+
+#~ msgid "(Installed)"
+#~ msgstr "(УÑÑановленнÑй)"
+
+#~ msgid "(Not installed)"
+#~ msgstr "(Ðе ÑÑÑановленнÑй)"
Deleted: z3ext.product/tags/1.4.0/src/z3ext/product/locales/z3ext.product.pot
===================================================================
--- z3ext.product/trunk/src/z3ext/product/locales/z3ext.product.pot 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/locales/z3ext.product.pot 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,113 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2003-2004 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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.
-#
-##############################################################################
-msgid ""
-msgstr ""
-"Project-Id-Version: Development/Unknown\n"
-"POT-Creation-Date: Fri Nov 21 17:10:38 2008\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: zope/app/locales/extract.py\n"
-
-#: src/z3ext/product/browser.zcml:7
-msgid "Product"
-msgstr ""
-
-#: src/z3ext/product/configure.zcml:13
-msgid "This is the Add-on Products install section."
-msgstr ""
-
-#: src/z3ext/product/configure.zcml:13
-#: src/z3ext/product/browser.zcml:13
-#: src/z3ext/product/browser.zcml:26
-msgid "Products management"
-msgstr ""
-
-#: src/z3ext/product/configure.zcml:9
-msgid "Manage products"
-msgstr ""
-
-#: src/z3ext/product/product.py:50
-#: src/z3ext/product/product.py:59
-msgid "Required product is not found."
-msgstr ""
-
-#: src/z3ext/product/product.py:70
-msgid "Product already installed."
-msgstr ""
-
-#: src/z3ext/product/product.py:88
-#: src/z3ext/product/product.py:99
-msgid "Product is not installed."
-msgstr ""
-
-#: src/z3ext/product/registry.py:60
-msgid "Product: Broken product!!!"
-msgstr ""
-
-#: src/z3ext/product/utils.py:33
-msgid "Can't create utility."
-msgstr ""
-
-#: src/z3ext/product/view.pt:27
-msgid "Update"
-msgstr ""
-
-#: src/z3ext/product/view.pt:29
-msgid "Uninstall"
-msgstr ""
-
-#: src/z3ext/product/view.pt:3
-msgid "Installed Products"
-msgstr ""
-
-#: src/z3ext/product/view.pt:37
-msgid "Products available for install"
-msgstr ""
-
-#: src/z3ext/product/view.pt:38
-msgid "This is the Add-on Products install section, you can add products in the lists below."
-msgstr ""
-
-#: src/z3ext/product/view.pt:56
-msgid "Install"
-msgstr ""
-
-#: src/z3ext/product/view.py:107
-msgid "Select one or more products to uninstall."
-msgstr ""
-
-#: src/z3ext/product/view.py:114
-msgid "Selected products has been uninstalled."
-msgstr ""
-
-#: src/z3ext/product/view.py:72
-msgid "Select one or more products to install."
-msgstr ""
-
-#: src/z3ext/product/view.py:79
-msgid "Selected products has been installed."
-msgstr ""
-
-#: src/z3ext/product/view.py:91
-msgid "Select one or more products to update."
-msgstr ""
-
-#: src/z3ext/product/view.py:98
-msgid "Selected products has been updated."
-msgstr ""
-
Copied: z3ext.product/tags/1.4.0/src/z3ext/product/locales/z3ext.product.pot (from rev 102658, z3ext.product/trunk/src/z3ext/product/locales/z3ext.product.pot)
===================================================================
--- z3ext.product/tags/1.4.0/src/z3ext/product/locales/z3ext.product.pot (rev 0)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/locales/z3ext.product.pot 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,113 @@
+##############################################################################
+#
+# Copyright (c) 2003-2004 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+msgid ""
+msgstr ""
+"Project-Id-Version: Development/Unknown\n"
+"POT-Creation-Date: Fri Nov 21 17:10:38 2008\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: zope/app/locales/extract.py\n"
+
+#: src/z3ext/product/browser.zcml:7
+msgid "Product"
+msgstr ""
+
+#: src/z3ext/product/configure.zcml:13
+msgid "This is the Add-on Products install section."
+msgstr ""
+
+#: src/z3ext/product/configure.zcml:13
+#: src/z3ext/product/browser.zcml:13
+#: src/z3ext/product/browser.zcml:26
+msgid "Products management"
+msgstr ""
+
+#: src/z3ext/product/configure.zcml:9
+msgid "Manage products"
+msgstr ""
+
+#: src/z3ext/product/product.py:50
+#: src/z3ext/product/product.py:59
+msgid "Required product is not found."
+msgstr ""
+
+#: src/z3ext/product/product.py:70
+msgid "Product already installed."
+msgstr ""
+
+#: src/z3ext/product/product.py:88
+#: src/z3ext/product/product.py:99
+msgid "Product is not installed."
+msgstr ""
+
+#: src/z3ext/product/registry.py:60
+msgid "Product: Broken product!!!"
+msgstr ""
+
+#: src/z3ext/product/utils.py:33
+msgid "Can't create utility."
+msgstr ""
+
+#: src/z3ext/product/view.pt:27
+msgid "Update"
+msgstr ""
+
+#: src/z3ext/product/view.pt:29
+msgid "Uninstall"
+msgstr ""
+
+#: src/z3ext/product/view.pt:3
+msgid "Installed Products"
+msgstr ""
+
+#: src/z3ext/product/view.pt:37
+msgid "Products available for install"
+msgstr ""
+
+#: src/z3ext/product/view.pt:38
+msgid "This is the Add-on Products install section, you can add products in the lists below."
+msgstr ""
+
+#: src/z3ext/product/view.pt:56
+msgid "Install"
+msgstr ""
+
+#: src/z3ext/product/view.py:107
+msgid "Select one or more products to uninstall."
+msgstr ""
+
+#: src/z3ext/product/view.py:114
+msgid "Selected products has been uninstalled."
+msgstr ""
+
+#: src/z3ext/product/view.py:72
+msgid "Select one or more products to install."
+msgstr ""
+
+#: src/z3ext/product/view.py:79
+msgid "Selected products has been installed."
+msgstr ""
+
+#: src/z3ext/product/view.py:91
+msgid "Select one or more products to update."
+msgstr ""
+
+#: src/z3ext/product/view.py:98
+msgid "Selected products has been updated."
+msgstr ""
+
Deleted: z3ext.product/tags/1.4.0/src/z3ext/product/product.py
===================================================================
--- z3ext.product/trunk/src/z3ext/product/product.py 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/product.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,143 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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: product.py 1843 2008-03-25 18:39:00Z fafhrd91 $
-"""
-from BTrees.OOBTree import OOBTree
-
-from zope import interface, event
-from zope.component import getSiteManager
-from zope.component import getUtility, queryUtility, getUtilitiesFor
-from zope.app.component.hooks import getSite
-from zope.app.component.interfaces import ILocalSiteManager
-from zope.lifecycleevent import ObjectModifiedEvent
-
-from z3c.configurator import configure
-
-import z3ext.product
-from z3ext.controlpanel.configlettype import ConfigletProperty
-
-from z3ext.product import interfaces
-from z3ext.product.interfaces import _, IProduct
-
-
-class Product(object):
- """ base product class """
- interface.implements(IProduct)
-
- @property
- def __installed__(self):
- sm = getSiteManager()
-
- registry = getattr(z3ext.product, self.__product_name__)
- return registry in sm.__bases__
-
- def _checkRequiredInstall(self):
- for productId in self.__require__:
- product = queryUtility(IProduct, productId)
- if product is None:
- raise interfaces.RequiredProductNotFound(
- _('Required product is not found.'))
- if not product.__installed__:
- product.install()
-
- def _checkRequiredUpdate(self):
- for productId in self.__require__:
- product = queryUtility(IProduct, productId)
- if product is None:
- raise interfaces.RequiredProductNotFound(
- _('Required product is not found.'))
- if not product.__installed__:
- product.install()
- else:
- product.update()
-
- def install(self):
- self._checkRequiredInstall()
-
- if self.__installed__:
- raise interfaces.ProductAlreadyInstalledError(
- _('Product already installed.'))
-
- sm = getSiteManager()
-
- registry = getattr(z3ext.product, self.__product_name__)
- sm.__bases__ = (registry,) + sm.__bases__
-
- if ILocalSiteManager.providedBy(sm):
- for subsm in sm.subs:
- subsm.__bases__ = subsm.__bases__
-
- event.notify(interfaces.ProductInstalledEvent(self.__product_name__, self))
- event.notify(ObjectModifiedEvent(getSite()))
-
- self.update()
-
- def update(self):
- if not self.__installed__:
- raise interfaces.ProductNotInstalledError(
- _('Product is not installed.'))
-
- configure(self, {})
- event.notify(
- interfaces.ProductUpdatedEvent(self.__product_name__, self))
- event.notify(ObjectModifiedEvent(getSite()))
-
- self._checkRequiredUpdate()
-
- def uninstall(self):
- if not self.__installed__:
- raise interfaces.ProductNotInstalledError(
- _('Product is not installed.'))
-
- sm = getSiteManager()
- registry = getattr(z3ext.product, self.__product_name__)
-
- bases = list(sm.__bases__)
- bases.remove(registry)
- sm.__bases__ = tuple(bases)
-
- if ILocalSiteManager.providedBy(sm):
- for subsm in sm.subs:
- subsm.__bases__ = subsm.__bases__
-
- event.notify(
- interfaces.ProductUninstalledEvent(self.__product_name__, self))
- event.notify(ObjectModifiedEvent(getSite()))
-
- def _checkInstalled(self, sm, registry, seen):
- if sm in seen:
- return False
- seen.add(sm)
-
- if registry in sm.__bases__:
- return True
-
- for reg in sm.__bases__:
- if self._checkInstalled(reg, registry, seen):
- return True
-
- return False
-
- def isInstalled(self):
- sm = getSiteManager()
- registry = getattr(z3ext.product, self.__product_name__)
- seen = set()
- return self._checkInstalled(sm, registry, seen)
-
- def isUninstallable(self):
- sm = getSiteManager()
- registry = getattr(z3ext.product, self.__product_name__)
- return registry in sm.__bases__
Copied: z3ext.product/tags/1.4.0/src/z3ext/product/product.py (from rev 102658, z3ext.product/trunk/src/z3ext/product/product.py)
===================================================================
--- z3ext.product/tags/1.4.0/src/z3ext/product/product.py (rev 0)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/product.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,143 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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: product.py 1843 2008-03-25 18:39:00Z fafhrd91 $
+"""
+from BTrees.OOBTree import OOBTree
+
+from zope import interface, event
+from zope.component import getSiteManager
+from zope.component import getUtility, queryUtility, getUtilitiesFor
+from zope.app.component.hooks import getSite
+from zope.app.component.interfaces import ILocalSiteManager
+from zope.lifecycleevent import ObjectModifiedEvent
+
+from z3c.configurator import configure
+
+import z3ext.product
+from z3ext.controlpanel.configlettype import ConfigletProperty
+
+from z3ext.product import interfaces
+from z3ext.product.interfaces import _, IProduct
+
+
+class Product(object):
+ """ base product class """
+ interface.implements(IProduct)
+
+ @property
+ def __installed__(self):
+ sm = getSiteManager()
+
+ registry = getattr(z3ext.product, self.__product_name__)
+ return registry in sm.__bases__
+
+ def _checkRequiredInstall(self):
+ for productId in self.__require__:
+ product = queryUtility(IProduct, productId)
+ if product is None:
+ raise interfaces.RequiredProductNotFound(
+ _('Required product is not found.'))
+ if not product.__installed__:
+ product.install()
+
+ def _checkRequiredUpdate(self):
+ for productId in self.__require__:
+ product = queryUtility(IProduct, productId)
+ if product is None:
+ raise interfaces.RequiredProductNotFound(
+ _('Required product is not found.'))
+ if not product.__installed__:
+ product.install()
+ else:
+ product.update()
+
+ def install(self):
+ self._checkRequiredInstall()
+
+ if self.__installed__:
+ raise interfaces.ProductAlreadyInstalledError(
+ _('Product already installed.'))
+
+ sm = getSiteManager()
+
+ registry = getattr(z3ext.product, self.__product_name__)
+ sm.__bases__ = (registry,) + sm.__bases__
+
+ if ILocalSiteManager.providedBy(sm):
+ for subsm in sm.subs:
+ subsm.__bases__ = subsm.__bases__
+
+ event.notify(interfaces.ProductInstalledEvent(self.__product_name__, self))
+ event.notify(ObjectModifiedEvent(getSite()))
+
+ self.update()
+
+ def update(self):
+ if not self.__installed__:
+ raise interfaces.ProductNotInstalledError(
+ _('Product is not installed.'))
+
+ configure(self, {})
+ event.notify(
+ interfaces.ProductUpdatedEvent(self.__product_name__, self))
+ event.notify(ObjectModifiedEvent(getSite()))
+
+ self._checkRequiredUpdate()
+
+ def uninstall(self):
+ if not self.__installed__:
+ raise interfaces.ProductNotInstalledError(
+ _('Product is not installed.'))
+
+ sm = getSiteManager()
+ registry = getattr(z3ext.product, self.__product_name__)
+
+ bases = list(sm.__bases__)
+ bases.remove(registry)
+ sm.__bases__ = tuple(bases)
+
+ if ILocalSiteManager.providedBy(sm):
+ for subsm in sm.subs:
+ subsm.__bases__ = subsm.__bases__
+
+ event.notify(
+ interfaces.ProductUninstalledEvent(self.__product_name__, self))
+ event.notify(ObjectModifiedEvent(getSite()))
+
+ def _checkInstalled(self, sm, registry, seen):
+ if sm in seen:
+ return False
+ seen.add(sm)
+
+ if registry in sm.__bases__:
+ return True
+
+ for reg in sm.__bases__:
+ if self._checkInstalled(reg, registry, seen):
+ return True
+
+ return False
+
+ def isInstalled(self):
+ sm = getSiteManager()
+ registry = getattr(z3ext.product, self.__product_name__)
+ seen = set()
+ return self._checkInstalled(sm, registry, seen)
+
+ def isUninstallable(self):
+ sm = getSiteManager()
+ registry = getattr(z3ext.product, self.__product_name__)
+ return registry in sm.__bases__
Deleted: z3ext.product/tags/1.4.0/src/z3ext/product/registry.py
===================================================================
--- z3ext.product/trunk/src/z3ext/product/registry.py 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/registry.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,63 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2008 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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: 2007-12-12 12:27:02Z fafhrd $
-"""
-from zope.component import queryUtility
-from zope.component.interfaces import IComponents
-from zope.component import globalregistry, globalSiteManager
-
-import z3ext.product
-from z3ext.product.interfaces import _
-
-
-def BC(components, name):
- bc = getattr(z3ext.product, name, None)
- if bc is None:
- return broken
- else:
- return bc
-
-
-class ProductRegistry(globalregistry.BaseGlobalComponents):
-
- def __init__(self, name, title):
- self.title = title
- self.__name__ = name
- self.__parent__ = globalSiteManager
- super(ProductRegistry, self).__init__(name)
-
- def __str__(self):
- return "Product: %s"%self.title
-
- def __repr__(self):
- return "<Product: %s>"%self.title
-
- def __reduce__(self):
- # Global site managers are pickled as global objects
- return BC, (self.__parent__, self.__name__)
-
-
-class BrokenProductRegistry(globalregistry.BaseGlobalComponents):
-
- def __init__(self):
- self.__parent__ = globalSiteManager
- super(BrokenProductRegistry, self).__init__('broken')
-
- def __repr__(self):
- return _("Product: Broken product!!!")
-
-
-broken = BrokenProductRegistry()
Copied: z3ext.product/tags/1.4.0/src/z3ext/product/registry.py (from rev 102658, z3ext.product/trunk/src/z3ext/product/registry.py)
===================================================================
--- z3ext.product/tags/1.4.0/src/z3ext/product/registry.py (rev 0)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/registry.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,63 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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: 2007-12-12 12:27:02Z fafhrd $
+"""
+from zope.component import queryUtility
+from zope.component.interfaces import IComponents
+from zope.component import globalregistry, globalSiteManager
+
+import z3ext.product
+from z3ext.product.interfaces import _
+
+
+def BC(components, name):
+ bc = getattr(z3ext.product, name, None)
+ if bc is None:
+ return broken
+ else:
+ return bc
+
+
+class ProductRegistry(globalregistry.BaseGlobalComponents):
+
+ def __init__(self, name, title):
+ self.title = title
+ self.__name__ = name
+ self.__parent__ = globalSiteManager
+ super(ProductRegistry, self).__init__(name)
+
+ def __str__(self):
+ return "Product: %s"%self.title
+
+ def __repr__(self):
+ return "<Product: %s>"%self.title
+
+ def __reduce__(self):
+ # Global site managers are pickled as global objects
+ return BC, (self.__parent__, self.__name__)
+
+
+class BrokenProductRegistry(globalregistry.BaseGlobalComponents):
+
+ def __init__(self):
+ self.__parent__ = globalSiteManager
+ super(BrokenProductRegistry, self).__init__('broken')
+
+ def __repr__(self):
+ return _("Product: Broken product!!!")
+
+
+broken = BrokenProductRegistry()
Deleted: z3ext.product/tags/1.4.0/src/z3ext/product/tests.py
===================================================================
--- z3ext.product/trunk/src/z3ext/product/tests.py 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/tests.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,42 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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: tests.py 84833 2008-03-21 09:09:54Z fafhrd $
-"""
-import unittest, doctest
-from zope.component import testing
-from zope.app.testing import setup
-from z3ext.controlpanel.testing import setUpControlPanel
-
-def setUp(test):
- setup.placefulSetUp(True)
- setup.setUpTestAsModule(test, 'z3ext.product.README')
- setUpControlPanel()
-
-def tearDown(test):
- setup.placefulTearDown()
- setup.tearDownTestAsModule(test)
-
-def test_suite():
- return unittest.TestSuite((
- doctest.DocFileSuite(
- 'README.txt',
- setUp=setUp, tearDown=tearDown,
- optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
- doctest.DocFileSuite(
- 'enclosed.txt',
- setUp=setUp, tearDown=tearDown,
- optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
- ))
Copied: z3ext.product/tags/1.4.0/src/z3ext/product/tests.py (from rev 102658, z3ext.product/trunk/src/z3ext/product/tests.py)
===================================================================
--- z3ext.product/tags/1.4.0/src/z3ext/product/tests.py (rev 0)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/tests.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,42 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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: tests.py 84833 2008-03-21 09:09:54Z fafhrd $
+"""
+import unittest, doctest
+from zope.component import testing
+from zope.app.testing import setup
+from z3ext.controlpanel.testing import setUpControlPanel
+
+def setUp(test):
+ setup.placefulSetUp(True)
+ setup.setUpTestAsModule(test, 'z3ext.product.README')
+ setUpControlPanel()
+
+def tearDown(test):
+ setup.placefulTearDown()
+ setup.tearDownTestAsModule(test)
+
+def test_suite():
+ return unittest.TestSuite((
+ doctest.DocFileSuite(
+ 'README.txt',
+ setUp=setUp, tearDown=tearDown,
+ optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
+ doctest.DocFileSuite(
+ 'enclosed.txt',
+ setUp=setUp, tearDown=tearDown,
+ optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
+ ))
Deleted: z3ext.product/tags/1.4.0/src/z3ext/product/utils.py
===================================================================
--- z3ext.product/trunk/src/z3ext/product/utils.py 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/utils.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,93 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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: utils.py 1839 2008-03-25 13:28:26Z fafhrd91 $
-"""
-from zope import interface, event, component
-from zope.component import queryUtility
-from zope.lifecycleevent import ObjectCreatedEvent
-from zope.security.proxy import removeSecurityProxy
-
-from zope.app.component.hooks import getSite
-from zope.app.component.site import SiteManagementFolder
-from zope.app.component.interfaces import ISite
-
-from z3ext.product.interfaces import _, IProduct
-
-
-def registerUtility(id, factory, ifaces, container='system'):
- site = getSite()
- if not ISite.providedBy(site):
- raise RuntimeError(_("Can't create utility."))
-
- sm = component.getSiteManager()
-
- if isinstance(container, basestring):
- if container:
- if container not in sm:
- folder = SiteManagementFolder()
- event.notify(ObjectCreatedEvent(folder))
- sm[container] = folder
-
- container = sm[container]
- else:
- container = sm
- elif container is None:
- container = sm
-
- if id not in container:
- if callable(factory):
- utility = factory()
- else:
- utility = component.createObject(factory)
-
- event.notify(ObjectCreatedEvent(utility))
- removeSecurityProxy(container)[id] = utility
-
- for iface, name in ifaces:
- sm.registerUtility(utility, iface, name)
-
- return container[id]
-
-
-def unregisterUtility(id, ifaces, container='system'):
- site = getSite()
- sm = component.getSiteManager()
-
- if container not in sm:
- return
-
- container = sm[container]
-
- if id in container:
- utility = container[id]
-
- for iface, name in ifaces:
- sm.unregisterUtility(utility, iface, name)
-
- del container[id]
-
-
-class ProductTest(object):
-
- def __init__(self, product):
- self.product = product
-
- def __call__(self, *args, **kw):
- product = queryUtility(IProduct, self.product)
- if product is not None:
- return product.__installed__
-
- return False
Copied: z3ext.product/tags/1.4.0/src/z3ext/product/utils.py (from rev 102658, z3ext.product/trunk/src/z3ext/product/utils.py)
===================================================================
--- z3ext.product/tags/1.4.0/src/z3ext/product/utils.py (rev 0)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/utils.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,93 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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: utils.py 1839 2008-03-25 13:28:26Z fafhrd91 $
+"""
+from zope import interface, event, component
+from zope.component import queryUtility
+from zope.lifecycleevent import ObjectCreatedEvent
+from zope.security.proxy import removeSecurityProxy
+
+from zope.app.component.hooks import getSite
+from zope.app.component.site import SiteManagementFolder
+from zope.app.component.interfaces import ISite
+
+from z3ext.product.interfaces import _, IProduct
+
+
+def registerUtility(id, factory, ifaces, container='system'):
+ site = getSite()
+ if not ISite.providedBy(site):
+ raise RuntimeError(_("Can't create utility."))
+
+ sm = component.getSiteManager()
+
+ if isinstance(container, basestring):
+ if container:
+ if container not in sm:
+ folder = SiteManagementFolder()
+ event.notify(ObjectCreatedEvent(folder))
+ sm[container] = folder
+
+ container = sm[container]
+ else:
+ container = sm
+ elif container is None:
+ container = sm
+
+ if id not in container:
+ if callable(factory):
+ utility = factory()
+ else:
+ utility = component.createObject(factory)
+
+ event.notify(ObjectCreatedEvent(utility))
+ removeSecurityProxy(container)[id] = utility
+
+ for iface, name in ifaces:
+ sm.registerUtility(utility, iface, name)
+
+ return container[id]
+
+
+def unregisterUtility(id, ifaces, container='system'):
+ site = getSite()
+ sm = component.getSiteManager()
+
+ if container not in sm:
+ return
+
+ container = sm[container]
+
+ if id in container:
+ utility = container[id]
+
+ for iface, name in ifaces:
+ sm.unregisterUtility(utility, iface, name)
+
+ del container[id]
+
+
+class ProductTest(object):
+
+ def __init__(self, product):
+ self.product = product
+
+ def __call__(self, *args, **kw):
+ product = queryUtility(IProduct, self.product)
+ if product is not None:
+ return product.__installed__
+
+ return False
Deleted: z3ext.product/tags/1.4.0/src/z3ext/product/view.py
===================================================================
--- z3ext.product/trunk/src/z3ext/product/view.py 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/view.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,118 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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.
-#
-##############################################################################
-""" z3ext.product interfaces
-
-$Id: view.py 1839 2008-03-25 13:28:26Z fafhrd91 $
-"""
-import logging, sys
-from transaction import abort
-from zope.component import getUtility, queryUtility, getUtilitiesFor
-from z3ext.statusmessage.interfaces import IStatusMessage
-
-from z3ext.product.interfaces import _, ProductWarningError
-
-def log_exc(msg=''):
- log = logging.getLogger(u'z3ext.product')
- log.log(logging.ERROR, msg, exc_info=sys.exc_info())
-
-
-class InstallerView(object):
-
- def getProducts(self):
- context = self.context
-
- installed = []
- notinstalled = []
- hasUninstallable = False
-
- for name, product in context.items():
- info = {'name': name,
- 'product': product,
- 'title': product.__title__,
- 'description': product.__description__,
- 'uninstallable': product.isUninstallable()}
-
- if product.isInstalled():
- info['configlet'] = product.isAvailable()
- installed.append((product.__title__, info))
- if info['uninstallable']:
- hasUninstallable = True
- else:
- notinstalled.append((product.__title__, info))
-
- installed.sort()
- installed = [info for t, info in installed]
-
- notinstalled.sort()
- notinstalled = [info for t, info in notinstalled]
-
- return {'installed': installed, 'notinstalled': notinstalled,
- 'hasUninstallable': hasUninstallable}
-
- def update(self, *args, **kw):
- request = self.request
- context = self.context
-
- service = IStatusMessage(request)
-
- if request.has_key('install'):
- products = request.get('availproducts', ())
- if not products:
- service.add(_('Select one or more products to install.'), 'warning')
- else:
- try:
- for product_id in products:
- product = context.get(product_id)
- product.install()
-
- service.add(_('Selected products has been installed.'))
- except ProductWarningError, e:
- abort()
- service.add(unicode(e), 'warning')
- except Exception, e:
- abort()
- log_exc(str(e))
- service.add(e, 'error')
-
- elif request.has_key('update'):
- products = request.get('products', ())
- if not products:
- service.add(_('Select one or more products to update.'), 'warning')
- else:
- try:
- for product_id in products:
- product = context.get(product_id)
- product.update()
-
- service.add(_('Selected products has been updated.'))
- except Exception, e:
- abort()
- log_exc(str(e))
- service.add(e, 'error')
-
- elif request.has_key('uninstall'):
- products = request.get('products', ())
- if not products:
- service.add(_('Select one or more products to uninstall.'), 'warning')
- else:
- try:
- for product_id in products:
- product = context.get(product_id)
- product.uninstall()
-
- service.add(_('Selected products has been uninstalled.'))
- except Exception, e:
- abort()
- log_exc(str(e))
- service.add(e, 'error')
Copied: z3ext.product/tags/1.4.0/src/z3ext/product/view.py (from rev 102658, z3ext.product/trunk/src/z3ext/product/view.py)
===================================================================
--- z3ext.product/tags/1.4.0/src/z3ext/product/view.py (rev 0)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/view.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,118 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+""" z3ext.product interfaces
+
+$Id: view.py 1839 2008-03-25 13:28:26Z fafhrd91 $
+"""
+import logging, sys
+from transaction import abort
+from zope.component import getUtility, queryUtility, getUtilitiesFor
+from z3ext.statusmessage.interfaces import IStatusMessage
+
+from z3ext.product.interfaces import _, ProductWarningError
+
+def log_exc(msg=''):
+ log = logging.getLogger(u'z3ext.product')
+ log.log(logging.ERROR, msg, exc_info=sys.exc_info())
+
+
+class InstallerView(object):
+
+ def getProducts(self):
+ context = self.context
+
+ installed = []
+ notinstalled = []
+ hasUninstallable = False
+
+ for name, product in context.items():
+ info = {'name': name,
+ 'product': product,
+ 'title': product.__title__,
+ 'description': product.__description__,
+ 'uninstallable': product.isUninstallable()}
+
+ if product.isInstalled():
+ info['configlet'] = product.isAvailable()
+ installed.append((product.__title__, info))
+ if info['uninstallable']:
+ hasUninstallable = True
+ else:
+ notinstalled.append((product.__title__, info))
+
+ installed.sort()
+ installed = [info for t, info in installed]
+
+ notinstalled.sort()
+ notinstalled = [info for t, info in notinstalled]
+
+ return {'installed': installed, 'notinstalled': notinstalled,
+ 'hasUninstallable': hasUninstallable}
+
+ def update(self, *args, **kw):
+ request = self.request
+ context = self.context
+
+ service = IStatusMessage(request)
+
+ if request.has_key('install'):
+ products = request.get('availproducts', ())
+ if not products:
+ service.add(_('Select one or more products to install.'), 'warning')
+ else:
+ try:
+ for product_id in products:
+ product = context.get(product_id)
+ product.install()
+
+ service.add(_('Selected products has been installed.'))
+ except ProductWarningError, e:
+ abort()
+ service.add(unicode(e), 'warning')
+ except Exception, e:
+ abort()
+ log_exc(str(e))
+ service.add(e, 'error')
+
+ elif request.has_key('update'):
+ products = request.get('products', ())
+ if not products:
+ service.add(_('Select one or more products to update.'), 'warning')
+ else:
+ try:
+ for product_id in products:
+ product = context.get(product_id)
+ product.update()
+
+ service.add(_('Selected products has been updated.'))
+ except Exception, e:
+ abort()
+ log_exc(str(e))
+ service.add(e, 'error')
+
+ elif request.has_key('uninstall'):
+ products = request.get('products', ())
+ if not products:
+ service.add(_('Select one or more products to uninstall.'), 'warning')
+ else:
+ try:
+ for product_id in products:
+ product = context.get(product_id)
+ product.uninstall()
+
+ service.add(_('Selected products has been uninstalled.'))
+ except Exception, e:
+ abort()
+ log_exc(str(e))
+ service.add(e, 'error')
Deleted: z3ext.product/tags/1.4.0/src/z3ext/product/zcml.py
===================================================================
--- z3ext.product/trunk/src/z3ext/product/zcml.py 2009-08-10 15:09:13 UTC (rev 102629)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/zcml.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -1,101 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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.
-#
-##############################################################################
-""" z3ext:product directive
-
-$Id: interfaces.py 802 2007-12-28 11:25:55Z fafhrd91 $
-"""
-from zope import schema
-from zope.configuration import fields
-from zope.component.zcml import utility
-from zope.component import globalSiteManager
-from zope.component.interfaces import IComponents
-from zope.security.checker import CheckerPublic
-
-import z3ext.product
-from z3ext.controlpanel.zcml import IConfigletDirective, ConfigletDirective
-
-from interfaces import IProduct
-from product import Product
-from registry import ProductRegistry
-
-
-class IProductDirective(IConfigletDirective):
-
- configurable = schema.Bool(
- title = u'Configurable',
- default = False,
- required = False)
-
- require = fields.Tokens(
- title = u'Require',
- value_type = schema.TextLine(),
- required = False)
-
-
-class ProductDirective(ConfigletDirective):
-
- def __init__(self, _context, name, schema, title,
- description='', class_=None, provides=(),
- permission='z3ext.ManageProducts', tests=(),
- configurable=False, require = ()):
-
- product_class = Product
- if class_ is None:
- class_ = product_class
- else:
- class_ = (class_, product_class)
-
- if configurable:
- test = ProductTest()
- tests = (test,) + tuple(tests)
- else:
- tests = (NotConfigurable,)
-
- # create component registry
- registry = ProductRegistry(name, title)
- z3ext.product.registries[name] = registry
- setattr(z3ext.product, name, registry)
- utility(_context, IComponents, registry, name=name)
-
- # register configlet
- productName = name
- name = 'product.' + name
-
- super(ProductDirective, self).__init__(
- _context, name, schema, title,
- description, class_, provides, permission, tests)
-
- self._class.__require__ = require
- self._class.__product_name__ = productName
-
- if configurable:
- test.product = self._configlet
-
- utility(_context, IProduct, self._configlet, name=productName)
-
- self.require(_context, permission, interface=(IProduct,))
- self.require(_context, CheckerPublic,
- attributes=('isInstalled', '__installed__'))
-
-
-class ProductTest(object):
-
- def __init__(self, product=None):
- self.product = product
-
- def __call__(self, *args, **kw):
- return self.product.isInstalled()
-
-def NotConfigurable(configlet):
- return False
Copied: z3ext.product/tags/1.4.0/src/z3ext/product/zcml.py (from rev 102658, z3ext.product/trunk/src/z3ext/product/zcml.py)
===================================================================
--- z3ext.product/tags/1.4.0/src/z3ext/product/zcml.py (rev 0)
+++ z3ext.product/tags/1.4.0/src/z3ext/product/zcml.py 2009-08-11 09:25:23 UTC (rev 102659)
@@ -0,0 +1,101 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+""" z3ext:product directive
+
+$Id: interfaces.py 802 2007-12-28 11:25:55Z fafhrd91 $
+"""
+from zope import schema
+from zope.configuration import fields
+from zope.component.zcml import utility
+from zope.component import globalSiteManager
+from zope.component.interfaces import IComponents
+from zope.security.checker import CheckerPublic
+
+import z3ext.product
+from z3ext.controlpanel.zcml import IConfigletDirective, ConfigletDirective
+
+from interfaces import IProduct
+from product import Product
+from registry import ProductRegistry
+
+
+class IProductDirective(IConfigletDirective):
+
+ configurable = schema.Bool(
+ title = u'Configurable',
+ default = False,
+ required = False)
+
+ require = fields.Tokens(
+ title = u'Require',
+ value_type = schema.TextLine(),
+ required = False)
+
+
+class ProductDirective(ConfigletDirective):
+
+ def __init__(self, _context, name, schema, title,
+ description='', class_=None, provides=(),
+ permission='z3ext.ManageProducts', tests=(),
+ configurable=False, require = ()):
+
+ product_class = Product
+ if class_ is None:
+ class_ = product_class
+ else:
+ class_ = (class_, product_class)
+
+ if configurable:
+ test = ProductTest()
+ tests = (test,) + tuple(tests)
+ else:
+ tests = (NotConfigurable,)
+
+ # create component registry
+ registry = ProductRegistry(name, title)
+ z3ext.product.registries[name] = registry
+ setattr(z3ext.product, name, registry)
+ utility(_context, IComponents, registry, name=name)
+
+ # register configlet
+ productName = name
+ name = 'product.' + name
+
+ super(ProductDirective, self).__init__(
+ _context, name, schema, title,
+ description, class_, provides, permission, tests)
+
+ self._class.__require__ = require
+ self._class.__product_name__ = productName
+
+ if configurable:
+ test.product = self._configlet
+
+ utility(_context, IProduct, self._configlet, name=productName)
+
+ self.require(_context, permission, interface=(IProduct,))
+ self.require(_context, CheckerPublic,
+ attributes=('isInstalled', '__installed__'))
+
+
+class ProductTest(object):
+
+ def __init__(self, product=None):
+ self.product = product
+
+ def __call__(self, *args, **kw):
+ return self.product.isInstalled()
+
+def NotConfigurable(configlet):
+ return False
More information about the Checkins
mailing list