1010from ckan import model , types
1111
1212from ckanext .search_autocomplete .interfaces import ISearchAutocomplete
13- from ckanext .xloader .plugin import xloaderPlugin
13+ from ckanext .datapusher_plus .plugin import DatapusherPlusPlugin
1414
1515from ckanext .datavic_odp_theme .logic import auth_functions , actions , get_validators
1616from ckanext .datavic_odp_theme .views import get_blueprints
@@ -183,7 +183,7 @@ class DatavicODPThemeAuth(p.SingletonPlugin):
183183 pass
184184
185185
186- class DatavicXLoaderPlugin ( xloaderPlugin , p .SingletonPlugin ):
186+ class DatavicDatapusherPlusPlugin ( DatapusherPlusPlugin , p .SingletonPlugin ):
187187 p .implements (p .IPackageController , inherit = True )
188188
189189 # IPackageController
@@ -212,11 +212,11 @@ def after_dataset_update(self, context, pkg_dict):
212212 group .add_package_by_name (pkg_dict .get ('name' ))
213213
214214 def _submit_new_resources_only (self , pkg_dict ):
215- """Submit only newly added resources to xloader during dataset update.
215+ """Submit only newly added resources to datapusher during dataset update.
216216
217217 Compares current resource IDs against the previous activity snapshot
218218 to detect new resources. URL changes for existing resources are
219- handled by the parent xloaderPlugin via ``notify()``.
219+ handled by the parent DatapusherPlusPlugin via ``notify()``.
220220
221221 Falls back to submitting all resources if no activity data is
222222 available (e.g. activity plugin disabled, data migration).
@@ -289,7 +289,7 @@ def _infer_format_and_submit(self, resource):
289289 resource ["format" ] = (
290290 url_without_params .split ("." )[- 1 ].lower ()
291291 )
292- self ._submit_to_xloader (resource )
292+ self ._submit_to_datapusher (resource )
293293
294294 def _trigger_after_resource_create (self , pkg_dict ):
295295 """Submit all resources after dataset creation.
@@ -300,15 +300,15 @@ def _trigger_after_resource_create(self, pkg_dict):
300300 for resource in pkg_dict .get ("resources" , []):
301301 self ._infer_format_and_submit (resource )
302302
303- def _submit_to_xloader (self , resource_dict ):
303+ def _submit_to_datapusher (self , resource_dict ):
304304 """Wrapper that ensures ``url_type`` and ``format`` are present
305305 before calling the parent, as they may be missing for resources
306306 created inline via ``package_create``/``package_update``.
307307 """
308- resource_dict .setdefault ("url_type" , "datavic_xloader " )
308+ resource_dict .setdefault ("url_type" , "datavic_datapusher " )
309309 resource_dict .setdefault ("format" , "" )
310310
311- super ()._submit_to_xloader (resource_dict )
311+ super ()._submit_to_datapusher (resource_dict )
312312
313- if resource_dict ["url_type" ] == "datavic_xloader " :
313+ if resource_dict ["url_type" ] == "datavic_datapusher " :
314314 resource_dict .pop ("url_type" )
0 commit comments