[Erp5-report] r26792 - /erp5/trunk/products/ERP5/Document/ExternalSource.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon May 4 23:49:28 CEST 2009
Author: jp
Date: Mon May 4 23:49:27 2009
New Revision: 26792
URL: http://svn.erp5.org?rev=26792&view=rev
Log:
Quick implementation of crawler API (until well defined by interfaces)
Modified:
erp5/trunk/products/ERP5/Document/ExternalSource.py
Modified: erp5/trunk/products/ERP5/Document/ExternalSource.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/ExternalSource.py?rev=26792&r1=26791&r2=26792&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/ExternalSource.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/ExternalSource.py [utf8] Mon May 4 23:49:27 2009
@@ -30,6 +30,7 @@
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.Document.Url import UrlMixIn
+from Products.ERP5.Document.Document import UpdateMixIn
import mimetypes
import re
@@ -37,7 +38,7 @@
from htmlentitydefs import name2codepoint
from DateTime import DateTime
-class ExternalSource(XMLObject, UrlMixIn):
+class ExternalSource(XMLObject, UrlMixIn, UpdateMixIn):
"""
An External Source consists of single URL which defines the
root of a collection of documents, each of which can be accessed
@@ -156,6 +157,14 @@
return False
return method(content)
+ security.declareProtected(Permissions.AccessContentsInformation, 'isExternalDocument')
+ def isExternalDocument(self):
+ """
+ Return true if this document was obtained from an external source
+ XXX - is this really the right place ?
+ """
+ return 1
+
# Search API
security.declareProtected(Permissions.SearchCatalog, 'searchResults')
def searchResults(self, **kw):
More information about the Erp5-report
mailing list