__init__.py 1.76 KB
Newer Older
Jean-Paul Smets's avatar
Jean-Paul Smets committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
##############################################################################
#
# 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
#
##############################################################################

"""ZCatalog product"""

Jean-Paul Smets's avatar
Jean-Paul Smets committed
16
import ZSQLCatalog, SQLCatalog
Jean-Paul Smets's avatar
Jean-Paul Smets committed
17 18 19
from ZClasses import createZClassForBase

createZClassForBase( ZSQLCatalog.ZCatalog , globals()
20 21 22
                   , 'ZSQLCatalogBase', 'ZSQLCatalog' )
createZClassForBase( SQLCatalog.Catalog , globals()
                   , 'SQLCatalogBase', 'SQLCatalog' )
Jean-Paul Smets's avatar
Jean-Paul Smets committed
23 24 25 26 27

def initialize(context):
    context.registerClass(
        ZSQLCatalog.ZCatalog,
        permission='Add ZCatalogs',
28 29 30 31 32 33 34 35 36 37
        constructors=(ZSQLCatalog.manage_addZSQLCatalogForm,
                      ZSQLCatalog.manage_addZSQLCatalog),
        icon='www/ZCatalog.gif',
        )

    context.registerClass(
        SQLCatalog.Catalog,
        permission='Add ZCatalogs',
        constructors=(SQLCatalog.manage_addSQLCatalogForm,
                      SQLCatalog.manage_addSQLCatalog),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
38 39 40 41 42 43
        icon='www/ZCatalog.gif',
        )

    context.registerHelp()
    context.registerHelpTitle('Zope Help')

44
from AccessControl import ModuleSecurityInfo, ClassSecurityInfo
45
ModuleSecurityInfo('Products.ZSQLCatalog.SQLCatalog').declarePublic(
Ivan Tyagov's avatar
Ivan Tyagov committed
46
            'ComplexQuery', 'Query', 'NegatedQuery',)
47 48 49

from Query import Query, SimpleQuery
from SearchKey import SearchKey