[Erp5-report] r15683 - /erp5/trunk/products/ERP5/Document/ExternalSource.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Aug 16 02:40:10 CEST 2007
Author: jp
Date: Thu Aug 16 02:40:09 2007
New Revision: 15683
URL: http://svn.erp5.org?rev=15683&view=rev
Log:
Support of index page detection.
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=15683&r1=15682&r2=15683&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/ExternalSource.py (original)
+++ erp5/trunk/products/ERP5/Document/ExternalSource.py Thu Aug 16 02:40:09 2007
@@ -139,6 +139,24 @@
"""
return None
+ security.declareProtected(Permissions.View, 'isIndexContent')
+ def isIndexContent(self, content=None):
+ """
+ This method is able to answer a content object if it is an index or a
+ "real" content. Sometimes (though not often) we want to define a content
+ as index (e.g. if it is only a list of mailing list messages), so that we
+ do not index it for searching etc). Default implementation returns
+ False.
+ """
+ if content is None:
+ # this means that we are called directly, and external source
+ # is an index by definition
+ return True
+ method = self._getTypeBasedMethod('isIndexContent')
+ if method is None:
+ return False
+ return method(content)
+
# Search API
security.declareProtected(Permissions.SearchCatalog, 'searchResults')
def searchResults(self, **kw):
More information about the Erp5-report
mailing list