Logo Search packages:      
Sourcecode: zope-pas version File versions  Download package

propertysheets.py

##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights
# Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.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.
#
##############################################################################
""" Interfaces:  IPropertySheet

$Id: propertysheets.py 39343 2005-08-17 20:53:14Z sidnei $
"""

try:
    from zope.interface import Interface
except ImportError:
    from Interface import Interface

00025 class IPropertySheet( Interface ):

    """ Interface for queryable property sheets.
    
    o Objects implementing this interface can play in read-only fashion
      in OFS.PropertySheets' framework.
    """

00033     def getId():

        """ Identify the sheet within a collection.
        """

00038     def hasProperty( id ):

        """ Does the sheet have a property corresponding to 'id'?
        """

00043     def getProperty( id, default=None ):

        """ Return the value of the property corresponding to 'id'.

        o If no such property exists within the sheet, return 'default'.
        """

00050     def getPropertyType( id ):

        """ Return the string identifying the type of property, 'id'.

        o If no such property exists within the sheet, return None.
        """

00057     def propertyInfo( id ):

        """ Return a mapping describing property, 'id'.

        o Keys must include:

          'id'  -- the unique identifier of the property.

          'type' -- the string identifying the property type.

          'meta' -- a mapping containing additional info about the property.
        """

00070     def propertyMap():

        """ Return a tuple of 'propertyInfo' mappings, one per property.
        """

00075     def propertyIds():

        """ Return a sequence of the IDs of the sheet's properties.
        """

00080     def propertyValues():

        """ Return a sequence of the values of the sheet's properties.
        """

00085     def propertyItems():

        """ Return a sequence of ( id, value ) tuples, one per property.
        """

Generated by  Doxygen 1.6.0   Back to index