Commit 2e4e5cc0 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Use mixin.CachedConvertableMixin. getConvertedSize removed from Document class...

Use mixin.CachedConvertableMixin. getConvertedSize removed from Document class (redundant with getConversionSize). docstring put again where it belongs (ie. Document class). Preparing the removal of document interface.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29844 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3146edb0
This diff is collapsed.
......@@ -35,13 +35,15 @@ from Products.ERP5Type.Base import WorkflowMethod
from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5.Document.Document import Document
from Products.ERP5.Document.Document import ConversionCacheMixin
from Products.ERP5.Document.Document import ConversionError
from Products.ERP5Type.Base import Base
from Products.CMFDefault.File import File as CMFFile
from zLOG import LOG
from DateTime import DateTime
# Mixin Import
from Products.ERP5.mixin.cached_convertable import CachedConvertableMixin
mimetypes.init()
def _unpackData(data):
......@@ -51,7 +53,7 @@ def _unpackData(data):
"""
return str(data)
class File(Document, CMFFile, ConversionCacheMixin):
class File(Document, CMFFile, CachedConvertableMixin):
"""
A File can contain raw data which can be uploaded and downloaded.
It is the root class of Image, OOoDocument (ERP5OOo product),
......
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
......@@ -34,11 +35,12 @@ from Products.CMFCore.utils import getToolByName, _setCacheHeaders,\
from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5.Document.Image import Image
from Products.ERP5.Document.Document import ConversionCacheMixin, ConversionError
from Products.ERP5.Document.Document import ConversionError
from Products.ERP5.mixin.cached_convertable import CachedConvertableMixin
from zLOG import LOG, WARNING
class PDFDocument(Image, ConversionCacheMixin):
class PDFDocument(Image, CachedConvertableMixin):
"""
PDFDocument is a subclass of Image which is able to
extract text content from a PDF file either as text
......
......@@ -47,11 +47,13 @@ from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from Products.ERP5.Document.File import File
from Products.ERP5.Document.Document import PermanentURLMixIn
from Products.ERP5.Document.Document import ConversionCacheMixin
from Products.ERP5.Document.Document import ConversionError
from Products.ERP5.Document.Document import NotConvertedError
from zLOG import LOG, ERROR
# Mixin Import
from Products.ERP5.mixin.cached_convertable import CachedConvertableMixin
enc=base64.encodestring
dec=base64.decodestring
......@@ -80,7 +82,7 @@ class TimeoutTransport(SafeTransport):
return SafeTransport.make_connection(self, h)
class OOoDocument(PermanentURLMixIn, File, ConversionCacheMixin):
class OOoDocument(PermanentURLMixIn, File, CachedConvertableMixin):
"""
A file document able to convert OOo compatible files to
any OOo supported format, to capture metadata and to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment