Logo Search packages:      
Sourcecode: zope-atcontenttypes version File versions

IATTopic.py

#  ATContentTypes http://sf.net/projects/collective/
#  Archetypes reimplementation of the CMF core types
#  Copyright (c) 2003-2004 AT Content Types development team
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
"""Topic and criterion interface

$Id: IATTopic.py,v 1.7 2004/07/13 13:12:55 dreamcatcher Exp $
"""
__author__  = 'Christian Heimes'
__docformat__ = 'restructuredtext'

from Interface import Interface, Attribute
from Products.ATContentTypes.interfaces.IATContentType import IATContentType

00029 class IATTopic(IATContentType):
    """AT Topic marker interface
    """

00033     def listCriteriaTypes():
        """List available criteria types as dict
        """

00037     def listCriteriaMetaTypes():
        """List available criteria
        """

00041     def listSearchCriteriaTypes():
        """List available search criteria types as dict
        """

00045     def listSearchCriteriaMetaTypes():
        """List available search criteria
        """

00049     def listSortCriteriaTypes():
        """List available sort criteria types as dict
        """

00053     def listSortCriteriaMetaTypes():
        """List available sort criteria
        """

00057     def listCriteria():
        """Return a list of our criteria objects.
        """

00061     def listSearchCriteria():
        """Return a list of our search criteria objects.
        """

00065     def hasSortCriterion():
        """Tells if a sort criterai is already setup.
        """

00069     def getSortCriterion():
        """Return the Sort criterion if setup.
        """

00073     def removeSortCriterion():
        """remove the Sort criterion.
        """

00077     def setSortCriterion(field, reversed):
        """Set the Sort criterion.
        """

00081     def listAvailableFields():
        """Return a list of available fields for new criteria.
        """

00085     def listSubtopics():
        """Return a list of our subtopics.
        """

00089     def buildQuery():
        """Construct a catalog query using our criterion objects.
        """

00093     def queryCatalog(REQUEST=None, **kw):
        """Invoke the catalog using our criteria to augment any passed
            in query before calling the catalog.
        """

00098     def addCriterion(field, criterion_type):
        """Add a new search criterion.
        """

00102     def deleteCriterion(criterion_id):
        """Delete selected criterion.
        """

00106     def getCriterion(criterion_id):
        """Get the criterion object.
        """

00110     def addSubtopic(id):
        """Add a new subtopic.
        """


00115 class IATTopicCriterion(Interface):
    """AT Topic Criterion interface
    """

    typeDescription = Attribute('''A short description used for the edit screen''')
    typeDescMsgId = Attribute('''The i18n msgid of the type description''')

00122     def widget(field_name, mode="view", field=None, **kwargs):
        """redefine widget() to allow seperate field_names from field
        """

00126     def getId():
        """get the objects id
        """

00130     def Type():
        """
        """

00134     def Description():
        """
        """

00138     def getCriteriaItems():
        """Return a sequence of items to be used to build the catalog query.
        """

00142 class IATTopicSearchCriterion(IATTopicCriterion):
    """Interface for criteria used for searching
    """

00146 class IATTopicSortCriterion(IATTopicCriterion):
    """Interface for criteria used for sorting
    """

Generated by  Doxygen 1.6.0   Back to index