[CMF-checkins] CVS: Products/CMFDefault/interfaces - Document.py:1.1.2.1

Yvo Schubbe y.2005- at wcm-solutions.de
Thu May 26 11:27:56 EDT 2005


Update of /cvs-repository/Products/CMFDefault/interfaces
In directory cvs.zope.org:/tmp/cvs-serv14712/CMFDefault/interfaces

Added Files:
      Tag: CMF-1_5-branch
	Document.py 
Log Message:
added document interfaces (based on CMFonFive code)


=== Added File Products/CMFDefault/interfaces/Document.py ===
##############################################################################
#
# Copyright (c) 2005 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.
#
##############################################################################
""" Document content type interfaces.

$Id: Document.py,v 1.1.2.1 2005/05/26 15:27:36 yuppie Exp $
"""

from Interface import Interface


class IDocument(Interface):

    """ Textual content, in one of several formats.

    o Allowed formats include: structured text, HTML, plain text.
    """

    def CookedBody():
        """ Get the "cooked" (ready for presentation) form of the text.
        """

    def EditableBody():
        """ Get the "raw" (as edited) form of the text.
        """

class IMutableDocument(IDocument):

    """ Updatable form of IDocument.
    """

    def edit(text_format, text, file='', safety_belt=''):
        """ Update the document.

        o 'safety_belt', if passed, must match the value issued when the edit
        began.
        """



More information about the CMF-checkins mailing list