File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed
src/Libraries/SmartStore.Services Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1818
1919namespace SmartStore . Services . Catalog . Importer
2020{
21- public class CategoryImporter : EntityImporterBase , IEntityImporter
21+ public class CategoryImporter : EntityImporterBase
2222 {
2323 private readonly IRepository < Category > _categoryRepository ;
2424 private readonly IRepository < UrlRecord > _urlRecordRepository ;
@@ -416,7 +416,7 @@ public static string[] DefaultKeyFields
416416 }
417417 }
418418
419- public void Execute ( IImportExecuteContext context )
419+ protected override void Import ( IImportExecuteContext context )
420420 {
421421 var srcToDestId = new Dictionary < int , ImportCategoryMapping > ( ) ;
422422
Original file line number Diff line number Diff line change 1818
1919namespace SmartStore . Services . Catalog . Importer
2020{
21- public class ProductImporter : EntityImporterBase , IEntityImporter
21+ public class ProductImporter : EntityImporterBase
2222 {
2323 private readonly IRepository < ProductPicture > _productPictureRepository ;
2424 private readonly IRepository < ProductManufacturer > _productManufacturerRepository ;
@@ -733,7 +733,7 @@ public static string[] DefaultKeyFields
733733 }
734734 }
735735
736- public void Execute ( IImportExecuteContext context )
736+ protected override void Import ( IImportExecuteContext context )
737737 {
738738 var srcToDestId = new Dictionary < int , ImportProductMapping > ( ) ;
739739
Original file line number Diff line number Diff line change 2020
2121namespace SmartStore . Services . Customers . Importer
2222{
23- public class CustomerImporter : EntityImporterBase , IEntityImporter
23+ public class CustomerImporter : EntityImporterBase
2424 {
2525 private const string _attributeKeyGroup = "Customer" ;
2626
@@ -373,7 +373,7 @@ public static string[] DefaultKeyFields
373373 }
374374 }
375375
376- public void Execute ( IImportExecuteContext context )
376+ protected override void Import ( IImportExecuteContext context )
377377 {
378378 var customer = _services . WorkContext . CurrentCustomer ;
379379 var allowManagingCustomerRoles = _services . Permissions . Authorize ( StandardPermissionProvider . ManageCustomerRoles , customer ) ;
Original file line number Diff line number Diff line change 88
99namespace SmartStore . Services . DataExchange . Import
1010{
11- public abstract class EntityImporterBase
11+ public abstract class EntityImporterBase : IEntityImporter
1212 {
1313 private const string _imageDownloadFolder = @"Content\DownloadedImages" ;
1414
@@ -22,6 +22,13 @@ public abstract class EntityImporterBase
2222
2323 public FileDownloadManagerContext DownloaderContext { get ; private set ; }
2424
25+ protected abstract void Import ( IImportExecuteContext context ) ;
26+
27+ public void Execute ( IImportExecuteContext context )
28+ {
29+ Import ( context ) ;
30+ }
31+
2532 public void Init ( IImportExecuteContext context , DataExchangeSettings dataExchangeSettings )
2633 {
2734 UtcNow = DateTime . UtcNow ;
You can’t perform that action at this time.
0 commit comments