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

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


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

Added Files:
	Document.py 
Log Message:
added document interfaces (based on CMFonFive code)


=== Products/CMFDefault/interfaces/Document.py 1.1 => 1.2 ===
--- /dev/null	Thu May 26 11:30:30 2005
+++ Products/CMFDefault/interfaces/Document.py	Thu May 26 11:30:30 2005
@@ -0,0 +1,46 @@
+##############################################################################
+#
+# 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$
+"""
+
+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