From 1bdbc9dc17a75c24f3292e567a811a51b93d8b97 Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Fri, 28 May 2010 15:44:16 +0000 Subject: [PATCH] moved to base_convertable_mixin git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35746 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/Document.py | 33 ------------------------------- 1 file changed, 33 deletions(-) diff --git a/product/ERP5/Document/Document.py b/product/ERP5/Document/Document.py index 30c830c350..6c6d59acc2 100644 --- a/product/ERP5/Document/Document.py +++ b/product/ERP5/Document/Document.py @@ -1165,39 +1165,6 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, CachedConvertableMixin, result['title'] = title_list[0] return result - # Base format support - security.declareProtected(Permissions.ModifyPortalContent, 'convertToBaseFormat') - def convertToBaseFormat(self, **kw): - """ - Converts the content of the document to a base format - which is later used for all conversions. This method - is common to all kinds of documents and handles - exceptions in a unified way. - - Implementation is delegated to _convertToBaseFormat which - must be overloaded by subclasses of Document which - need a base format. - - convertToBaseFormat is called upon file upload, document - ingestion by the processing_status_workflow. - - NOTE: the data of the base format conversion should be stored - using the base_data property. Refer to Document.py propertysheet. - Use accessors (getBaseData, setBaseData, hasBaseData, etc.) - """ - if getattr(self, 'hasData', None) is not None and not self.hasData(): - # Empty document cannot be converted - return - try: - message = self._convertToBaseFormat() # Call implemetation method - if message is None: - # XXX Need to translate. - message = 'Converted to %s.' % self.getBaseContentType() - self.convertFile(comment=message) # Invoke workflow method - except NotImplementedError: - message = '' - return message - security.declareProtected(Permissions.AccessContentsInformation, 'getMetadataMappingDict') def getMetadataMappingDict(self): -- 2.30.9