Commit 1d4b4e1d authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added updateContentFromURL method

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29823 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6b65acb4
......@@ -28,6 +28,7 @@
##############################################################################
from zope.interface import Interface
MAX_REPEAT = 0 # XXX - this variable should be put somewhere else
class IUploadable(Interface):
"""
......@@ -92,3 +93,22 @@ class IUploadable(Interface):
where format is an extension (ex. 'png') which can be
passed to IConvertable.convert or to IDownloadable.index_html
"""
def updateContentFromURL(url=None, repeat=MAX_REPEAT, crawling_depth=0):
"""
Download and update content of this document from the specified URL.
If no url is specified, Document which support the IUrlGetter
interface use the Url of the document itself.
url -- optional URL to download the updated content from.
required whenever document does not implement IUrlGetter
repeat -- optional max number of retries for download
crawling_depth -- optional crawling depth for documents which
implement ICrawlable
NOTE: implementation is normally delegated to ContributionTool.
XXX - it is unclear whether MAX_REPEAT should be part of signature
"""
\ No newline at end of file
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