public ContentController(Func<string, IContentBlobStorageProvider> contentStorageProviderFactory, IBlobUrlResolver urlResolver, ISecurityService securityService, IPermissionScopeService permissionScopeService, IStoreService storeService)
     : base(securityService, permissionScopeService)
 {
     _storeService = storeService;
     _contentStorageProviderFactory = contentStorageProviderFactory;
     _urlResolver = urlResolver;
 }
 public BlobStorageMultipartProvider(IBlobStorageProvider blobProvider, IBlobUrlResolver blobUrlResolver, string rootPath)
 {
     _rootPath = rootPath;
     _blobProvider = blobProvider;
     _blobUrlResolver = blobUrlResolver;
     BlobInfos = new List<BlobInfo>();
 }
 public ItemBrowsingService(IItemService itemService, ISearchProvider searchService, IBlobUrlResolver blobUrlResolver = null, ISearchConnection searchConnection = null)
 {
     _searchProvider = searchService;
     _searchConnection = searchConnection;
     _itemService = itemService;
     _blobUrlResolver = blobUrlResolver;
 }
        public static googleModel.Product ToGoogleModel(this moduleModel.CatalogProduct product, IBlobUrlResolver assetUrlResolver, moduleModel.Property[] properties = null)
        {
            var retVal = new googleModel.Product();
            retVal.InjectFrom(product);
            var langCode = product.Catalog.Languages.First().LanguageCode;

            retVal.Link = @"http://virtocommerce-test.azurewebsites.net/";

            retVal.OfferId = product.Id;
            retVal.Title = product.Name;
            retVal.Description = product.Reviews.Any() ? product.Reviews.First(x => x.LanguageCode == langCode).Content : product.Name;
            retVal.Link = @"http://virtocommerce-test.azurewebsites.net/";
            retVal.ImageLink = assetUrlResolver.GetAbsoluteUrl(product.Assets.First().Url).TrimStart('/');
            retVal.ContentLanguage = langCode;
            retVal.TargetCountry = "US";
            retVal.Channel = "online";
            retVal.Availability = "in stock";
            retVal.Condition = "new";
            retVal.GoogleProductCategory = "Media > Books";
            retVal.Gtin = "9780007350896";
            retVal.Taxes = new[] { new googleModel.ProductTax { Country = "US", Rate = 10, Region = "CA" } };
            retVal.Shipping = new[]
            {
                new googleModel.ProductShipping
                {
                    Country = "US",
                    Price = new googleModel.Price { Currency = "USD", Value = "5"}
                }
            };

            return retVal;
        }
		public static moduleModel.CatalogProduct ToModuleModel(this googleModel.Product product, IBlobUrlResolver assetUrlResolver)
        {
            var retVal = new moduleModel.CatalogProduct();
            retVal.InjectFrom(product);
      
            return retVal;
        }
		public VCGoogleProductProvider(IItemService itemService, IPricingService pricingService, IBlobUrlResolver assetUrlResolver, ICatalogSearchService catalogSearchService)
        {
            _itemService = itemService;
            _pricingService = pricingService;
            _assetUrlResolver = assetUrlResolver;
            _catalogSearchService = catalogSearchService;
        }
        //initial version of product converter to amazon product.
        //it should be adopted to the particular customer needs as many Amazon properties (like category) are unique and can't be mapped automatically.
        public static Product ToAmazonModel(this moduleModel.CatalogProduct product, IBlobUrlResolver assetUrlResolver, moduleModel.Property[] properties = null)
        {
            var amazonProduct = new Product();
            amazonProduct.InjectFrom(product);

            amazonProduct.DescriptionData = new ProductDescriptionData
            {
                Brand = "Brand",
                Description = "Product description",

            };

            amazonProduct.Condition = new ConditionInfo { ConditionType = ConditionType.New };
            if (product.Images != null && product.Images.Any())
                amazonProduct.ExternalProductUrl = assetUrlResolver.GetAbsoluteUrl(product.Images.First().Url.TrimStart('/'));
            amazonProduct.SKU = product.Code;
            amazonProduct.StandardProductID = new StandardProductID { Value = amazonProduct.SKU, Type = StandardProductIDType.ASIN };

            //var mainCat = new Home();
            //var subCat = new Kitchen();
            //mainCat.ProductType = new HomeProductType { Item = subCat };

            //amazonProduct.ProductData = new ProductProductData { Item = mainCat };

            return amazonProduct;
        }        
		public PlatformExportImportController(IPlatformExportImportManager platformExportManager, INotifier eventNotifier, IBlobStorageProvider blobStorageProvider, IBlobUrlResolver blobUrlResolver, IPackageService packageService)
		{
			_platformExportManager = platformExportManager;
			_eventNotifier = eventNotifier;
			_blobStorageProvider = blobStorageProvider;
			_blobUrlResolver = blobUrlResolver;
			_packageService = packageService;
		}
        public CatalogModuleCategoriesController(ICatalogSearchService searchService, ICategoryService categoryService,  ICatalogService catalogService, IBlobUrlResolver blobUrlResolver, ISecurityService securityService, IPermissionScopeService permissionScopeService)
            :base(securityService, permissionScopeService)
        {
            _searchService = searchService;
            _categoryService = categoryService;
            _catalogService = catalogService;
			_blobUrlResolver = blobUrlResolver;
        }
		public CatalogModuleProductsController(IItemService itemsService, IPropertyService propertyService, IBlobUrlResolver blobUrlResolver, ICatalogService catalogService, ISkuGenerator skuGenerator)
        {
            _itemsService = itemsService;
            _propertyService = propertyService;
			_blobUrlResolver = blobUrlResolver;
			_catalogService = catalogService;
			_skuGenerator = skuGenerator;
        }
 public PlatformExportImportController(IPlatformExportImportManager platformExportManager, IPushNotificationManager pushNotifier, IBlobStorageProvider blobStorageProvider, IBlobUrlResolver blobUrlResolver, ISettingsManager settingManager)
 {
     _platformExportManager = platformExportManager;
     _pushNotifier = pushNotifier;
     _blobStorageProvider = blobStorageProvider;
     _blobUrlResolver = blobUrlResolver;
     _settingsManager = settingManager;
 }
 public BackupStoreJob(IStoreService storeService, ISettingsManager settingsManager,
                         INotifier notifier, IBlobStorageProvider blobProvider, IBlobUrlResolver blobUrlResolver)
 {
     _storeService = storeService;
     _settingsManager = settingsManager;
     _notifier = notifier;
     _blobStorageProvider = blobProvider;
     _blobUrlResolver = blobUrlResolver;
 }
 public CatalogModuleListEntryController(ICatalogSearchService searchService,
                            ICategoryService categoryService,
                            IItemService itemService, IBlobUrlResolver blobUrlResolver)
 {
     _searchService = searchService;
     _categoryService = categoryService;
     _itemService = itemService;
     _blobUrlResolver = blobUrlResolver;
 }
		public static webModel.Category ToWebModel(this moduleModel.Category category, IBlobUrlResolver blobUrlResolver = null, bool convertProps = true)
		{
			var retVal = new webModel.Category();
			retVal.InjectFrom(category);
			retVal.Catalog = category.Catalog.ToWebModel();
            //Reset properties for size economy
            retVal.Catalog.Properties = null;
			retVal.SeoInfos = category.SeoInfos;
	
			if(category.Parents != null)
			{
				retVal.Parents = category.Parents.ToDictionary(x => x.Id, x => x.Name);
			}
			//For virtual category links not needed
			if (!category.Virtual && category.Links != null)
			{
				retVal.Links = category.Links.Select(x => x.ToWebModel()).ToList();
			}

            //Need add property for each meta info
            retVal.Properties = new List<webModel.Property>();
            if (convertProps)
            {
                foreach (var property in category.Properties)
                {
                    var webModelProperty = property.ToWebModel();
                    //Reset dict values to decrease response size
                    webModelProperty.DictionaryValues = null;
                    webModelProperty.Values = new List<webModel.PropertyValue>();
                    webModelProperty.IsManageable = true;
                    webModelProperty.IsReadOnly = property.Type != moduleModel.PropertyType.Category;
                    retVal.Properties.Add(webModelProperty);
                }

                //Populate property values
                if (category.PropertyValues != null)
                {
                    foreach (var propValue in category.PropertyValues.Select(x => x.ToWebModel()))
                    {
                        var property = retVal.Properties.FirstOrDefault(x => x.Id == propValue.PropertyId);
                        if (property == null)
                        {
                            //Need add dummy property for each value without property
                            property = new webModel.Property(propValue, category.CatalogId, category.Id, moduleModel.PropertyType.Category);
                            retVal.Properties.Add(property);
                        }
                        property.Values.Add(propValue);
                    }
                }
            }
			if (category.Images != null)
			{
				retVal.Images = category.Images.Select(x => x.ToWebModel(blobUrlResolver)).ToList();
			}
			return retVal;
		}
 public CatalogModuleProductsController(IItemService itemsService, IBlobUrlResolver blobUrlResolver,  ICatalogService catalogService, ICategoryService categoryService,
                                        ISkuGenerator skuGenerator, ISecurityService securityService, IPermissionScopeService permissionScopeService)
     :base(securityService, permissionScopeService)
 {
     _itemsService = itemsService;
     _categoryService = categoryService;
     _blobUrlResolver = blobUrlResolver;
     _catalogService = catalogService;
     _skuGenerator = skuGenerator;
 }
 public CatalogModuleExportImportController(ICatalogService catalogService, INotifier notifier, ISettingsManager settingsManager, IBlobStorageProvider blobStorageProvider, IBlobUrlResolver blobUrlResolver, CsvCatalogExporter csvExporter, CsvCatalogImporter csvImporter)
 {
     _catalogService      = catalogService;
     _notifier            = notifier;
     _settingsManager     = settingsManager;
     _blobStorageProvider = blobStorageProvider;
     _csvExporter         = csvExporter;
     _csvImporter         = csvImporter;
     _blobUrlResolver     = blobUrlResolver;
 }
 public CatalogModuleCategoriesController(ICatalogSearchService searchService, ICategoryService categoryService, IPropertyService propertyService,
                                          ICatalogService catalogService, IBlobUrlResolver blobUrlResolver, ISecurityService securityService, IPermissionScopeService permissionScopeService)
     : base(securityService, permissionScopeService)
 {
     _searchService   = searchService;
     _categoryService = categoryService;
     _propertyService = propertyService;
     _catalogService  = catalogService;
     _blobUrlResolver = blobUrlResolver;
 }
 public CustomerDataExporter(ICustomerExportPagedDataSourceFactory customerExportPagedDataSourceFactory, IExportWriterFactory exportWriterFactory, IOptions <PlatformOptions> platformOptions,
                             IDynamicPropertySearchService dynamicPropertySearchService, IBlobStorageProvider blobStorageProvider, IBlobUrlResolver blobUrlResolver)
 {
     _customerExportPagedDataSourceFactory = customerExportPagedDataSourceFactory;
     _exportWriterFactory          = exportWriterFactory;
     _platformOptions              = platformOptions.Value;
     _blobStorageProvider          = blobStorageProvider;
     _dynamicPropertySearchService = dynamicPropertySearchService;
     _blobUrlResolver              = blobUrlResolver;
 }
		public CatalogModuleExportImportController(ICatalogService catalogService, INotifier notifier, ISettingsManager settingsManager, IBlobStorageProvider blobStorageProvider, IBlobUrlResolver blobUrlResolver, CsvCatalogExporter csvExporter, CsvCatalogImporter csvImporter)
		{
			_catalogService = catalogService;
			_notifier = notifier;
			_settingsManager = settingsManager;
			_blobStorageProvider = blobStorageProvider;
			_csvExporter = csvExporter;
			_csvImporter = csvImporter;
			_blobUrlResolver = blobUrlResolver;
		}
        public CatalogModuleCategoriesController(ICatalogSearchService searchService,
                                    ICategoryService categoryService,
									IPropertyService propertyService, ICatalogService catalogService, IBlobUrlResolver blobUrlResolver)
        {
            _searchService = searchService;
            _categoryService = categoryService;
            _propertyService = propertyService;
            _catalogService = catalogService;
			_blobUrlResolver = blobUrlResolver;
        }
 public CatalogModuleCategoriesController(ICatalogSearchService searchService,
                                          ICategoryService categoryService,
                                          IPropertyService propertyService, ICatalogService catalogService, IBlobUrlResolver blobUrlResolver)
 {
     _searchService   = searchService;
     _categoryService = categoryService;
     _propertyService = propertyService;
     _catalogService  = catalogService;
     _blobUrlResolver = blobUrlResolver;
 }
 public CatalogModuleListEntryController(ICatalogSearchService searchService,
                                         ICategoryService categoryService,
                                         IItemService itemService, IBlobUrlResolver blobUrlResolver, ISecurityService securityService, IPermissionScopeService permissionScopeService)
     : base(securityService, permissionScopeService)
 {
     _searchService   = searchService;
     _categoryService = categoryService;
     _itemService     = itemService;
     _blobUrlResolver = blobUrlResolver;
 }
Exemple #23
0
 public PriceExportPagedDataSourceFactory(IPricingSearchService searchService,
                                          IPricingService pricingService,
                                          IItemService itemService,
                                          IBlobUrlResolver blobUrlResolver)
 {
     _searchService   = searchService;
     _pricingService  = pricingService;
     _itemService     = itemService;
     _blobUrlResolver = blobUrlResolver;
 }
Exemple #24
0
 public CatalogModuleProductsController(IItemService itemsService, IPropertyService propertyService, IBlobUrlResolver blobUrlResolver,
                                        ICatalogService catalogService, ISkuGenerator skuGenerator, ISecurityService securityService, IPermissionScopeService permissionScopeService)
     : base(securityService, permissionScopeService)
 {
     _itemsService    = itemsService;
     _propertyService = propertyService;
     _blobUrlResolver = blobUrlResolver;
     _catalogService  = catalogService;
     _skuGenerator    = skuGenerator;
 }
		public CsvCatalogExporter(ICatalogSearchService catalogSearchService,
								  ICategoryService categoryService, IItemService productService,
								  IPricingService pricingService, IInventoryService inventoryService, IBlobUrlResolver blobUrlResolver)
		{
			_searchService = catalogSearchService;
			_categoryService = categoryService;
			_productService = productService;
			_pricingService = pricingService;
			_inventoryService = inventoryService;
			_blobUrlResolver = blobUrlResolver;
		}
Exemple #26
0
 public PricingModuleController(
     IPricingService pricingService
     , IItemService itemService
     , IPricingSearchService pricingSearchService
     , IBlobUrlResolver blobUrlResolver)
 {
     _pricingService       = pricingService;
     _itemService          = itemService;
     _pricingSearchService = pricingSearchService;
     _blobUrlResolver      = blobUrlResolver;
 }
Exemple #27
0
 public CsvCatalogExporter(ICatalogSearchService catalogSearchService,
                           ICategoryService categoryService, IItemService productService,
                           IPricingService pricingService, IInventoryService inventoryService, IBlobUrlResolver blobUrlResolver)
 {
     _searchService    = catalogSearchService;
     _categoryService  = categoryService;
     _productService   = productService;
     _pricingService   = pricingService;
     _inventoryService = inventoryService;
     _blobUrlResolver  = blobUrlResolver;
 }
Exemple #28
0
        public MerchandisingModuleCategoryController(ICatalogSearchService searchService, ICategoryService categoryService,
                                                     IPropertyService propertyService, IStoreService storeService, CacheManager cacheManager, IBlobUrlResolver blobUrlResolver)

        {
            _storeService    = storeService;
            _searchService   = searchService;
            _categoryService = categoryService;
            _propertyService = propertyService;
            _cacheManager    = cacheManager;
            _blobUrlResolver = blobUrlResolver;
        }
 protected CsvPagedDataImporter(IMemberSearchService memberSearchService, ICsvCustomerDataValidator dataValidator
                                , ICustomerImportPagedDataSourceFactory dataSourceFactory, IValidator <ImportRecord <TCsvMember>[]> importRecordsValidator,
                                ICsvCustomerImportReporterFactory importReporterFactory, IBlobUrlResolver blobUrlResolver)
 {
     _memberSearchService    = memberSearchService;
     _dataValidator          = dataValidator;
     _importReporterFactory  = importReporterFactory;
     _dataSourceFactory      = dataSourceFactory;
     _importRecordsValidator = importRecordsValidator;
     _blobUrlResolver        = blobUrlResolver;
 }
Exemple #30
0
 public CategoryBrowsingService(
     ICategoryService categoryService,
     ISearchProvider searchService,
     IBlobUrlResolver blobUrlResolver,
     ISettingsManager settingsManager)
 {
     _searchProvider  = searchService;
     _categoryService = categoryService;
     _blobUrlResolver = blobUrlResolver;
     _settingsManager = settingsManager;
 }
        public MerchandisingModuleCategoryController(ICatalogSearchService searchService, ICategoryService categoryService,
                                  IPropertyService propertyService, IStoreService storeService, CacheManager cacheManager, IBlobUrlResolver blobUrlResolver)

        {
            _storeService = storeService;
            _searchService = searchService;
            _categoryService = categoryService;
            _propertyService = propertyService;
            _cacheManager = cacheManager;
            _blobUrlResolver = blobUrlResolver;
        }
        public static webModel.Image ToWebModel(this coreModel.Image image, IBlobUrlResolver blobUrlResolver)
        {
            var retVal = new webModel.Image();

			retVal.InjectFrom(image);
			if (blobUrlResolver != null)
			{
				retVal.Url = blobUrlResolver.GetAbsoluteUrl(image.Url);
			}
			retVal.RelativeUrl = image.Url;
            return retVal;
        }
Exemple #33
0
        public static webModel.Image ToWebModel(this coreModel.Image image, IBlobUrlResolver blobUrlResolver)
        {
            var retVal = new webModel.Image();

            retVal.InjectFrom(image);
            if (blobUrlResolver != null)
            {
                retVal.Url = blobUrlResolver.GetAbsoluteUrl(image.Url);
            }
            retVal.RelativeUrl = image.Url;
            return(retVal);
        }
      	public static webModel.Image ToWebModel(this moduleModel.Image image, IBlobUrlResolver blobUrlResolver)
        {
            var retVal = new webModel.Image();
			retVal.InjectFrom(image);
			retVal.Src = blobUrlResolver.GetAbsoluteUrl(image.Url);
            retVal.ThumbSrc = retVal.Src;
			if(retVal.Name == null)
			{
				retVal.Name = retVal.Group;
			}
            return retVal;
        }
Exemple #35
0
 public CategoryService(Func <ICatalogRepository> catalogRepositoryFactory, ISeoService seoService, IOutlineService outlineService, ICatalogService catalogService, IPlatformMemoryCache memoryCache,
                        AbstractValidator <IHasProperties> hasPropertyValidator, IEventPublisher eventPublisher, IBlobUrlResolver blobUrlResolver)
 {
     _repositoryFactory    = catalogRepositoryFactory;
     _memoryCache          = memoryCache;
     _hasPropertyValidator = hasPropertyValidator;
     _seoService           = seoService;
     _outlineService       = outlineService;
     _catalogService       = catalogService;
     _eventPublisher       = eventPublisher;
     _blobUrlResolver      = blobUrlResolver;
 }
        public static webModel.Image ToWebModel(this moduleModel.Image image, IBlobUrlResolver blobUrlResolver)
        {
            var retVal = new webModel.Image();

            retVal.InjectFrom(image);
            retVal.Src      = blobUrlResolver.GetAbsoluteUrl(image.Url);
            retVal.ThumbSrc = retVal.Src;
            if (retVal.Name == null)
            {
                retVal.Name = retVal.Group;
            }
            return(retVal);
        }
Exemple #37
0
 public CatalogModuleExportImportController(ICatalogService catalogService, IPushNotificationManager pushNotificationManager, ISettingsManager settingsManager,
                                            IBlobStorageProvider blobStorageProvider, IBlobUrlResolver blobUrlResolver,
                                            CsvCatalogExporter csvExporter, CsvCatalogImporter csvImporter, ISecurityService securityService, IPermissionScopeService permissionScopeService)
     : base(securityService, permissionScopeService)
 {
     _catalogService      = catalogService;
     _notifier            = pushNotificationManager;
     _settingsManager     = settingsManager;
     _blobStorageProvider = blobStorageProvider;
     _csvExporter         = csvExporter;
     _csvImporter         = csvImporter;
     _blobUrlResolver     = blobUrlResolver;
 }
Exemple #38
0
 public CsvPagedPriceDataImporter(IBlobStorageProvider blobStorageProvider, IPricingService pricingService, IPricingSearchService pricingSearchService,
                                  ICsvPriceDataValidator csvPriceDataValidator, ICsvPagedPriceDataSourceFactory dataSourceFactory, IValidator <ImportProductPrice[]> importProductPricesValidator, ICsvPriceImportReporterFactory importReporterFactory
                                  , IBlobUrlResolver blobUrlResolver, ImportConfigurationFactory importConfigurationFactory)
 {
     _pricingService               = pricingService;
     _pricingSearchService         = pricingSearchService;
     _dataSourceFactory            = dataSourceFactory;
     _importProductPricesValidator = importProductPricesValidator;
     _csvPriceDataValidator        = csvPriceDataValidator;
     _importReporterFactory        = importReporterFactory;
     _blobUrlResolver              = blobUrlResolver;
     _importConfigurationFactory   = importConfigurationFactory;
 }
 public CatalogModuleExportImportController(ICatalogService catalogService, IPushNotificationManager pushNotificationManager, ISettingsManager settingsManager,
                                            IBlobStorageProvider blobStorageProvider, IBlobUrlResolver blobUrlResolver,
                                            CsvCatalogExporter csvExporter, CsvCatalogImporter csvImporter, ISecurityService securityService, IPermissionScopeService permissionScopeService)
     : base(securityService, permissionScopeService)
 {
     _catalogService = catalogService;
     _notifier = pushNotificationManager;
     _settingsManager = settingsManager;
     _blobStorageProvider = blobStorageProvider;
     _csvExporter = csvExporter;
     _csvImporter = csvImporter;
     _blobUrlResolver = blobUrlResolver;
 }
 public CustomerReviewExportPagedDataSource(
     ICustomerReviewSearchService searchService,
     ICustomerReviewService customerReviewService,
     IItemService itemService,
     IBlobUrlResolver blobUrlResolver,
     CustomerReviewExportDataQuery dataQuery) : base(dataQuery)
 {
     _searchService         = searchService;
     _customerReviewService = customerReviewService;
     _itemService           = itemService;
     _blobUrlResolver       = blobUrlResolver;
     _dataQuery             = dataQuery;
 }
Exemple #41
0
 public ItemService(Func <ICatalogRepository> catalogRepositoryFactory, ICommerceService commerceService, IOutlineService outlineService, ICatalogService catalogService,
                    ICategoryService categoryService, AbstractValidator <IHasProperties> hasPropertyValidator, IEventPublisher eventPublisher, IBlobUrlResolver blobUrlResolver, ISkuGenerator skuGenerator)
 {
     _catalogService       = catalogService;
     _categoryService      = categoryService;
     _commerceService      = commerceService;
     _outlineService       = outlineService;
     _repositoryFactory    = catalogRepositoryFactory;
     _hasPropertyValidator = hasPropertyValidator;
     _eventPublisher       = eventPublisher;
     _blobUrlResolver      = blobUrlResolver;
     _skuGenerator         = skuGenerator;
 }
 public PriceExportPagedDataSource(
     IPricingSearchService searchService,
     IPricingService pricingService,
     IItemService itemService,
     IBlobUrlResolver blobUrlResolver,
     PriceExportDataQuery dataQuery) : base(dataQuery)
 {
     _searchService   = searchService;
     _pricingService  = pricingService;
     _itemService     = itemService;
     _blobUrlResolver = blobUrlResolver;
     _dataQuery       = dataQuery;
 }
 public static webModel.ProductAssociation ToWebModel(this moduleModel.ProductAssociation association, IBlobUrlResolver blobUrlResolver)
 {
     var retVal = new webModel.ProductAssociation();
     retVal.InjectFrom(association);
     if (association.AssociatedProduct != null)
     {
         var associatedProduct = association.AssociatedProduct.ToWebModel(blobUrlResolver);
         retVal.ProductId = associatedProduct.Id;
         retVal.ProductCode = associatedProduct.Code;
         retVal.ProductImg = associatedProduct.ImgSrc;
         retVal.ProductName = associatedProduct.Name;
     }
     return retVal;
 }
Exemple #44
0
 public MerchandisingModuleProductController(ICatalogSearchService searchService, ICategoryService categoryService,
                                             IStoreService storeService, IItemService itemService, IBlobUrlResolver blobUrlResolver,
                                             IBrowseFilterService browseFilterService, IItemBrowsingService browseService, CacheManager cacheManager, IPropertyService propertyService)
 {
     _itemService         = itemService;
     _storeService        = storeService;
     _searchService       = searchService;
     _categoryService     = categoryService;
     _blobUrlResolver     = blobUrlResolver;
     _browseFilterService = browseFilterService;
     _browseService       = browseService;
     _cacheManager        = cacheManager;
     _propertyService     = propertyService;
 }
        public PlatformExportImportController(IPlatformExportImportManager platformExportManager, IPushNotificationManager pushNotifier, IBlobStorageProvider blobStorageProvider, IBlobUrlResolver blobUrlResolver,
                                              ISettingsManager settingManager, IUserNameResolver userNameResolver, IHostingEnvironment hostingEnvironment, IOptions <PlatformOptions> options)
        {
            _platformExportManager = platformExportManager;
            _pushNotifier          = pushNotifier;
            _blobStorageProvider   = blobStorageProvider;
            _blobUrlResolver       = blobUrlResolver;
            _settingsManager       = settingManager;
            _userNameResolver      = userNameResolver;
            _hostEnv         = hostingEnvironment;
            _platformOptions = options.Value;

            _stringSampleDataUrl = options.Value.SampleDataUrl;
        }
		public MerchandisingModuleProductController(ICatalogSearchService searchService, ICategoryService categoryService,
								 IStoreService storeService, IItemService itemService, IBlobUrlResolver blobUrlResolver,
								 IBrowseFilterService browseFilterService, IItemBrowsingService browseService, CacheManager cacheManager, IPropertyService propertyService)
		{
			_itemService = itemService;
			_storeService = storeService;
			_searchService = searchService;
			_categoryService = categoryService;
			_blobUrlResolver = blobUrlResolver;
			_browseFilterService = browseFilterService;
			_browseService = browseService;
			_cacheManager = cacheManager;
			_propertyService = propertyService;
		}
Exemple #47
0
 public ContentfulController(Func <string, IContentBlobStorageProvider> contentStorageProviderFactory,
                             IBlobUrlResolver urlResolver, ISecurityService securityService,
                             IPermissionScopeService permissionScopeService, IStoreService storeService,
                             IItemService itemService, ICatalogService catalogService, ICatalogSearchService searchService, IProductSearchService productSearchService)
 {
     _itemService  = itemService;
     _storeService = storeService;
     _contentStorageProviderFactory = contentStorageProviderFactory;
     _urlResolver            = urlResolver;
     _securityService        = securityService;
     _permissionScopeService = permissionScopeService;
     _catalogService         = catalogService;
     _searchService          = searchService;
     _productSearchService   = productSearchService;
 }
		public CsvCatalogExportJob(ICatalogSearchService catalogSearchService,
								ICategoryService categoryService, IItemService productService,
								INotifier notifier, CacheManager cacheManager, IBlobStorageProvider blobProvider, IBlobUrlResolver blobUrlResolver,
								IPricingService pricingService, IInventoryService inventoryService)
		{
			_searchService = catalogSearchService;
			_categoryService = categoryService;
			_productService = productService;
			_notifier = notifier;
			_cacheManager = cacheManager;
			_blobStorageProvider = blobProvider;
			_blobUrlResolver = blobUrlResolver;
			_pricingService = pricingService;
			_inventoryService = inventoryService;
		}
Exemple #49
0
 public CsvCatalogExportJob(ICatalogSearchService catalogSearchService,
                            ICategoryService categoryService, IItemService productService,
                            INotifier notifier, CacheManager cacheManager, IBlobStorageProvider blobProvider, IBlobUrlResolver blobUrlResolver,
                            IPricingService pricingService, IInventoryService inventoryService)
 {
     _searchService       = catalogSearchService;
     _categoryService     = categoryService;
     _productService      = productService;
     _notifier            = notifier;
     _cacheManager        = cacheManager;
     _blobStorageProvider = blobProvider;
     _blobUrlResolver     = blobUrlResolver;
     _pricingService      = pricingService;
     _inventoryService    = inventoryService;
 }
		public static webModel.Asset ToWebModel(this moduleModel.Asset asset, IBlobUrlResolver blobUrlResolver)
		{
			var retVal = new webModel.Asset();
			retVal.InjectFrom(asset);
			if (asset.Name == null)
			{
				retVal.Name = HttpUtility.UrlDecode(System.IO.Path.GetFileName(asset.Url));
			}
			if (asset.MimeType == null)
			{
				retVal.MimeType = MimeTypeResolver.ResolveContentType(retVal.Name);
			}

			retVal.Url = blobUrlResolver.GetAbsoluteUrl(asset.Url);
			return retVal;
		}
Exemple #51
0
        public ExportImportController(ICatalogService catalogService, IPushNotificationManager pushNotificationManager, ICommerceService commerceService, IBlobStorageProvider blobStorageProvider, IBlobUrlResolver blobUrlResolver,
                                      ICsvCatalogExporter csvExporter, ICsvCatalogImporter csvImporter, ISecurityService securityService, IPermissionScopeService permissionScopeService, IUserNameResolver userNameResolver)
        {
            _securityService        = securityService;
            _permissionScopeService = permissionScopeService;

            _catalogService      = catalogService;
            _notifier            = pushNotificationManager;
            _commerceService     = commerceService;
            _blobStorageProvider = blobStorageProvider;
            _userNameResolver    = userNameResolver;
            _blobUrlResolver     = blobUrlResolver;

            _csvExporter = csvExporter;
            _csvImporter = csvImporter;
        }
 public ExportJob(IDataExporter dataExporter,
                  IPushNotificationManager pushNotificationManager,
                  IOptions <PlatformOptions> platformOptions,
                  IExportProviderFactory exportProviderFactory,
                  ISettingsManager settingsManager,
                  IBlobStorageProvider blobStorageProvider,
                  IBlobUrlResolver blobUrlResolver)
 {
     _dataExporter            = dataExporter;
     _pushNotificationManager = pushNotificationManager;
     _platformOptions         = platformOptions.Value;
     _exportProviderFactory   = exportProviderFactory;
     _settingsManager         = settingsManager;
     _blobStorageProvider     = blobStorageProvider;
     _blobUrlResolver         = blobUrlResolver;
 }
        public static webModel.ProductAssetBase ToWebModel(this moduleModel.ItemAsset asset, IBlobUrlResolver blobUrlResolver)
        {
            webModel.ProductAssetBase retVal = new webModel.ProductImage();
            if (asset.Type == moduleModel.ItemAssetType.File)
            {
                var productAsset  = new webModel.ProductAsset();

				productAsset.Name = HttpUtility.UrlDecode(System.IO.Path.GetFileName(asset.Url));
				productAsset.MimeType = MimeTypeResolver.ResolveContentType(productAsset.Name);		

				retVal = productAsset;
            }
            retVal.InjectFrom(asset);
			retVal.Url = blobUrlResolver.GetAbsoluteUrl(asset.Url);
			retVal.RelativeUrl = asset.Url;
            return retVal;
        }
 public CatalogExportPagedDataSourceFactory(
     IPropertyService propertyService
     , IProperyDictionaryItemSearchService propertyDictionaryItemSearchService
     , IBlobStorageProvider blobStorageProvider
     , IItemService itemService
     , ICatalogSearchService catalogSearchService
     , IBlobUrlResolver blobUrlResolver
     , ICategoryService categoryService)
 {
     _propertyService = propertyService;
     _propertyDictionaryItemSearchService = propertyDictionaryItemSearchService;
     _blobStorageProvider  = blobStorageProvider;
     _itemService          = itemService;
     _catalogSearchService = catalogSearchService;
     _blobUrlResolver      = blobUrlResolver;
     _categoryService      = categoryService;
 }
        public static webModel.Asset ToWebModel(this moduleModel.Asset asset, IBlobUrlResolver blobUrlResolver)
        {
            var retVal = new webModel.Asset();

            retVal.InjectFrom(asset);
            if (asset.Name == null)
            {
                retVal.Name = HttpUtility.UrlDecode(System.IO.Path.GetFileName(asset.Url));
            }
            if (asset.MimeType == null)
            {
                retVal.MimeType = MimeTypeResolver.ResolveContentType(retVal.Name);
            }

            retVal.Url = blobUrlResolver.GetAbsoluteUrl(asset.Url);
            return(retVal);
        }
 public SearchModuleController(ISearchProvider searchProvider, ISearchConnection searchConnection, SearchIndexJobsScheduler scheduler,
     IStoreService storeService, ISecurityService securityService, IPermissionScopeService permissionScopeService,
     IPropertyService propertyService, IBrowseFilterService browseFilterService, IItemBrowsingService browseService,
     IInventoryService inventoryService, IBlobUrlResolver blobUrlResolver, ICatalogSearchService catalogSearchService)
 {
     _searchProvider = searchProvider;
     _searchConnection = searchConnection;
     _scheduler = scheduler;
     _storeService = storeService;
     _securityService = securityService;
     _permissionScopeService = permissionScopeService;
     _propertyService = propertyService;
     _browseFilterService = browseFilterService;
     _browseService = browseService;
     _inventoryService = inventoryService;
     _blobUrlResolver = blobUrlResolver;
     _catalogSearchService = catalogSearchService;
 }
Exemple #57
0
 public SearchModuleController(ISearchProvider searchProvider, ISearchConnection searchConnection, SearchIndexJobsScheduler scheduler,
                               IStoreService storeService, ISecurityService securityService, IPermissionScopeService permissionScopeService,
                               IPropertyService propertyService, IBrowseFilterService browseFilterService, IItemBrowsingService browseService,
                               IInventoryService inventoryService, IBlobUrlResolver blobUrlResolver, ICatalogSearchService catalogSearchService)
 {
     _searchProvider         = searchProvider;
     _searchConnection       = searchConnection;
     _scheduler              = scheduler;
     _storeService           = storeService;
     _securityService        = securityService;
     _permissionScopeService = permissionScopeService;
     _propertyService        = propertyService;
     _browseFilterService    = browseFilterService;
     _browseService          = browseService;
     _inventoryService       = inventoryService;
     _blobUrlResolver        = blobUrlResolver;
     _catalogSearchService   = catalogSearchService;
 }
Exemple #58
0
 public SyncController(IMemberService memberService, IMemberSearchService meberSearchService,
                       ICustomerOrderService custemerOrderService, IStoreService storeService,
                       ICatalogSearchService searchService,
                       IItemService itemService, IBlobUrlResolver blobUrlResolver,
                       IPricingSearchService priceSearchService, ISyncSettingsService syncSettingsService,
                       ICommerceService commerceService)
 {
     _memberSearchService  = meberSearchService;
     _memberService        = memberService;
     _customerOrderService = custemerOrderService;
     _storeService         = storeService;
     _catalogSearchService = searchService;
     _itemService          = itemService;
     _blobUrlResolver      = blobUrlResolver;
     _priceSearchService   = priceSearchService;
     _syncSettingsService  = syncSettingsService;
     _commerceService      = commerceService;
 }
		public static webModel.Category ToWebModel(this moduleModel.Category category, IBlobUrlResolver blobUrlResolver)
        {
            var retVal = new webModel.Category();
            retVal.InjectFrom(category);

            if (category.Parents != null && category.Parents.Any())
            {
                //retVal.Parents = category.Parents.Select(x => x.ToWebModel(keywords != null ? keywords.Where(k => k.KeywordValue == x.Id) : null));
				retVal.Parents = category.Parents.Select(x => x.ToWebModel(blobUrlResolver));
            }

            if (category.SeoInfos != null)
            {
                retVal.Seo = category.SeoInfos.Select(x => x.ToWebModel());
            }

			if(category.Images != null && category.Images.Any())
			{
				retVal.Image = category.Images.First().ToWebModel(blobUrlResolver);
			}
            return retVal;
        }
        public static webModel.CatalogSearchResult ToWebModel(this coreModel.SearchResult result, IBlobUrlResolver blobUrlResolver)
        {
            var retVal = new webModel.CatalogSearchResult();
            retVal.InjectFrom(result);

            if (result.Products != null)
            {
                retVal.Products = result.Products.Select(x => x.ToWebModel(blobUrlResolver)).ToArray();
            }

            if (result.Categories != null)
            {
                retVal.Categories = result.Categories.Select(x => x.ToWebModel(blobUrlResolver)).ToArray();
            }

            if (result.Aggregations != null)
            {
                retVal.Aggregations = result.Aggregations.Select(a => a.ToWebModel()).ToArray();
            }

            return retVal;
        }