server/sources/datafeed.py
changeset 10914 fed8bd56f223
parent 10805 de4403644b1c
child 11042 079b32f4cd0d
--- a/server/sources/datafeed.py	Mon Nov 23 14:37:37 2015 +0100
+++ b/server/sources/datafeed.py	Tue Jun 30 10:06:00 2015 +0200
@@ -31,6 +31,8 @@
 
 from lxml import etree
 
+from logilab.common.deprecation import deprecated
+
 from cubicweb import RegistryNotFound, ObjectNotFound, ValidationError, UnknownEid
 from cubicweb.server.repository import preprocess_inlined_relations
 from cubicweb.server.sources import AbstractSource
@@ -247,6 +249,7 @@
                 error = True
         return error
 
+    @deprecated('[3.21] use the new store API')
     def before_entity_insertion(self, cnx, lid, etype, eid, sourceparams):
         """called by the repository when an eid has been attributed for an
         entity stored here but the entity has not been inserted in the system
@@ -262,6 +265,7 @@
         sourceparams['parser'].before_entity_copy(entity, sourceparams)
         return entity
 
+    @deprecated('[3.21] use the new store API')
     def after_entity_insertion(self, cnx, lid, entity, sourceparams):
         """called by the repository after an entity stored here has been
         inserted in the system table.
@@ -373,6 +377,7 @@
         msg = schemacfg._cw._("this parser doesn't use a mapping")
         raise ValidationError(schemacfg.eid, {None: msg})
 
+    @deprecated('[3.21] use the new store API')
     def extid2entity(self, uri, etype, **sourceparams):
         """Return an entity for the given uri. May return None if it should be
         skipped.
@@ -422,9 +427,11 @@
         """main callback: process the url"""
         raise NotImplementedError
 
+    @deprecated('[3.21] use the new store API')
     def before_entity_copy(self, entity, sourceparams):
         raise NotImplementedError
 
+    @deprecated('[3.21] use the new store API')
     def after_entity_copy(self, entity, sourceparams):
         self.stats['created'].add(entity.eid)
 
@@ -475,6 +482,7 @@
 
 class DataFeedXMLParser(DataFeedParser):
 
+    @deprecated()
     def process(self, url, raise_on_error=False):
         """IDataFeedParser main entry point"""
         try: