Back to index

plone3  3.1.7
interfaces.py
Go to the documentation of this file.
00001 #  ATContentTypes http://plone.org/products/atcontenttypes/
00002 #  Archetypes reimplementation of the CMF core types
00003 #  Copyright (c) 2003-2006 AT Content Types development team
00004 #
00005 #  This program is free software; you can redistribute it and/or modify
00006 #  it under the terms of the GNU General Public License as published by
00007 #  the Free Software Foundation; either version 2 of the License, or
00008 #  (at your option) any later version.
00009 #
00010 #  This program is distributed in the hope that it will be useful,
00011 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 #  GNU General Public License for more details.
00014 #
00015 #  You should have received a copy of the GNU General Public License
00016 #  along with this program; if not, write to the Free Software
00017 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 #
00019 """AT Content Types general interface
00020 
00021 """
00022 __author__  = 'Jean-Francois Roche <jfroche@jfroche.be>'
00023 __docformat__ = 'restructuredtext'
00024 
00025 from zope.interface import Interface
00026 from zope.interface import Attribute
00027 
00028 from Products.Archetypes.interfaces import IBaseContent
00029 from Products.Archetypes.interfaces import IBaseFolder
00030 from Products.CMFDynamicViewFTI.interface import ISelectableBrowserDefault
00031 from Products.Archetypes.interfaces import IATHistoryAware
00032 
00033 from Products.CMFPlone.interfaces.constrains import \
00034     ISelectableConstrainTypes
00035 
00036 
00037 class IATContentType(ISelectableBrowserDefault, IBaseContent):
00038     """Marker interface for AT Content Types
00039     """
00040 
00041     default_view = Attribute('''Default view template - used for dynamic view''')
00042     suppl_views = Attribute('''Supplementary views - used for dynamic view''')
00043 
00044     _atct_newTypeFor = Attribute('''XXX''')
00045 
00046     assocMimetypes = Attribute('''A tuple of mimetypes that are associated
00047                                   with this type. Format: ('bar/foo', 'foo/*',)
00048                                ''')
00049 
00050     assocFileExt = Attribute('''A tuple of file extensions that are associated
00051                                 with this type. Format: ('jpeg', 'png',)
00052                              ''')
00053 
00054     cmf_edit_kws = Attribute('''List of keyword names.
00055     
00056     If one of this kw names is used with edit() then the cmf_edit method is
00057     called.
00058     ''')
00059 
00060 class IHistoryAware(IATHistoryAware):
00061     """History awareness marker interface
00062     """
00063 
00064     def getHistorySource():
00065         """get source for HistoryAwareMixin
00066 
00067         Must return a (raw) string
00068         """
00069 
00070     def getLastEditor():
00071         """Returns the user name of the last editor.
00072 
00073         Returns None if no last editor is known.
00074         """
00075 
00076     def getDocumentComparisons(max=10, filterComment=0):
00077         """Get history as unified diff
00078         """
00079 
00080 class ICalendarSupport(Interface):
00081     """Calendar import/export
00082     """
00083 
00084 
00085 class ITextContent(Interface):
00086     """Interface for types containing text
00087     """
00088 
00089     def getText(**kwargs):
00090         """
00091         """
00092 
00093     def setText(value, **kwargs):
00094         """
00095         """
00096         
00097     def CookedBody(stx_level='ignored'):
00098         """
00099         """
00100 
00101     def EditableBody():
00102         """
00103         """
00104 
00105 from Products.ATContentTypes.interface.link import IATLink
00106 class IATFavorite(IATLink):
00107     """AT Favorite marker interface
00108     """
00109 
00110 class IATCTTool(Interface):
00111     """
00112     """
00113