[Erp5-report] r35341 nicolas - /erp5/trunk/products/ERP5/interfaces/
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri May 14 14:49:54 CEST 2010
Author: nicolas
Date: Fri May 14 14:49:48 2010
New Revision: 35341
URL: http://svn.erp5.org?rev=35341&view=rev
Log:
Move generateCacheId method from IDocument interface to ICachedConvertable
then remove all duplicated method declared in other interfaces
Modified:
erp5/trunk/products/ERP5/interfaces/cached_convertable.py
erp5/trunk/products/ERP5/interfaces/document.py
Modified: erp5/trunk/products/ERP5/interfaces/cached_convertable.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/interfaces/cached_convertable.py?rev=35341&r1=35340&r2=35341&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/cached_convertable.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/cached_convertable.py [utf8] Fri May 14 14:49:48 2010
@@ -36,6 +36,11 @@
The conversion of documents which implement the ICachedConvertable
interface can be cached efficiently and querried.
"""
+
+ def generateCacheId(**kw):
+ """Return string to identify Document in cache pool with
+ all arguments used to convert the document
+ """
def hasConversion(**kw):
"""
Modified: erp5/trunk/products/ERP5/interfaces/document.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/interfaces/document.py?rev=35341&r1=35340&r2=35341&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/document.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/document.py [utf8] Fri May 14 14:49:48 2010
@@ -194,48 +194,6 @@
**kw can be various things - e.g. resolution
"""
- def generateCacheId(**kw):
- """Return string to identify Document in cache pool with
- all arguments used to convert the document
- """
-
- def convertToBaseFormat(**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.)
- """
-
- def hasConversion(**kw):
- """Return a boolean if conversion is cached
- """
-
- def setConversion(data, mime=None, calculation_time=None, **kw):
- """Saves a version of the document in a given format; records mime type
- and conversion time (which is right now).
- """
-
- def getConversion(**kw):
- """Returns version of the document in a given format, if it has it; otherwise
- returns empty string (the caller should check hasConversion before calling
- this function.
- """
-
- def getConversionSize(**kw):
- """Returns the size of the converted document.
- """
-
def isSupportBaseDataConversion():
"""This is a public interface to check a document that is support conversion
to base format and can be overridden in subclasses.
More information about the Erp5-report
mailing list