Back to index

plone3  3.1.7
interface.py
Go to the documentation of this file.
00001 from zope.interface import Attribute
00002 from basetool import IPloneBaseTool
00003 
00004 class IInterfaceTool(IPloneBaseTool):
00005     """ This tool exposes the interface package for TTW applications,
00006     by accepting a dotted name of an interface and exporting the
00007     IInterface API """
00008 
00009     id = Attribute('id', 'Must be set to "portal_interface"')
00010 
00011     def objectImplements(obj, dotted_name):
00012         """ Asserts if an object implements a given interface """
00013 
00014     def classImplements(obj, dotted_name):
00015         """ Asserts if an object's class implements a given interface """
00016 
00017     def namesAndDescriptions(dotted_name, all=0):
00018         """ Returns a list of pairs (name, description) for a given
00019         interface"""