From 2c5ca01c09a375e9fb4ff559393ccca64421b55c Mon Sep 17 00:00:00 2001
From: Yusei Tahara <yusei@nexedi.com>
Date: Thu, 29 May 2008 15:26:18 +0000
Subject: [PATCH] implement getMimeTypeAndContent method.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21226 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/TextDocument.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/product/ERP5/Document/TextDocument.py b/product/ERP5/Document/TextDocument.py
index fe02e4e4d3..7a96f257ad 100644
--- a/product/ERP5/Document/TextDocument.py
+++ b/product/ERP5/Document/TextDocument.py
@@ -201,3 +201,8 @@ class TextDocument(Document, TextContent):
         is equivalent to having some text_content.
       """
       return self.hasTextContent()
+
+    security.declareProtected(Permissions.AccessContentsInformation, 'getMimeTypeAndContent')
+    def getMimeTypeAndContent(self):
+      """This method returns a tuple which contains mimetype and content."""
+      return (self.getTextFormat(), self.getTextContent())
-- 
2.30.9