Exemplo n.º 1
0
 public WebWorkContext(
     SmartDbContext db,
     IHttpContextAccessor httpContextAccessor,
     ILanguageResolver languageResolver,
     IStoreContext storeContext,
     ICustomerService customerService,
     ICurrencyService currencyService,
     IGenericAttributeService attrService,
     TaxSettings taxSettings,
     PrivacySettings privacySettings,
     LocalizationSettings localizationSettings,
     Lazy <ITaxService> taxService,
     ICacheManager cache,
     IUserAgent userAgent,
     IWebHelper webHelper,
     IGeoCountryLookup geoCountryLookup)
 {
     // TODO: (core) Implement WebWorkContext
     _db = db;
     _httpContextAccessor  = httpContextAccessor;
     _languageResolver     = languageResolver;
     _storeContext         = storeContext;
     _customerService      = customerService;
     _currencyService      = currencyService;
     _attrService          = attrService;
     _taxSettings          = taxSettings;
     _privacySettings      = privacySettings;
     _taxService           = taxService;
     _localizationSettings = localizationSettings;
     _userAgent            = userAgent;
     _cache            = cache;
     _webHelper        = webHelper;
     _geoCountryLookup = geoCountryLookup;
 }
 public ProductAskQuestionValidator(PrivacySettings privacySettings)
 {
     if (privacySettings.FullNameOnProductRequestRequired)
     {
         RuleFor(x => x.SenderName).NotEmpty();
     }
 }
Exemplo n.º 3
0
 public CustomerImporter(
     IRepository <Customer> customerRepository,
     IRepository <CustomerRole> customerRoleRepository,
     ICommonServices services,
     ICustomerService customerService,
     IGenericAttributeService genericAttributeService,
     IMediaService mediaService,
     IAffiliateService affiliateService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     FileDownloadManager fileDownloadManager,
     CustomerSettings customerSettings,
     DateTimeSettings dateTimeSettings,
     ForumSettings forumSettings,
     TaxSettings taxSettings,
     PrivacySettings privacySettings)
 {
     _customerRepository     = customerRepository;
     _customerRoleRepository = customerRoleRepository;
     _mediaService           = mediaService;
     _services                = services;
     _customerService         = customerService;
     _genericAttributeService = genericAttributeService;
     _affiliateService        = affiliateService;
     _countryService          = countryService;
     _stateProvinceService    = stateProvinceService;
     _fileDownloadManager     = fileDownloadManager;
     _customerSettings        = customerSettings;
     _dateTimeSettings        = dateTimeSettings;
     _forumSettings           = forumSettings;
     _taxSettings             = taxSettings;
     _privacySettings         = privacySettings;
 }
Exemplo n.º 4
0
 public CommonController(
     SmartDbContext db,
     IGeoCountryLookup countryLookup,
     ICookieConsentManager cookieConsentManager,
     Lazy <IMediaService> mediaService,
     ILanguageService languageService,
     UrlPolicy urlPolicy,
     IWebHelper webHelper,
     IThemeContext themeContext,
     IThemeRegistry themeRegistry,
     ThemeSettings themeSettings,
     SeoSettings seoSettings,
     LocalizationSettings localizationSettings,
     PrivacySettings privacySettings)
 {
     _db                   = db;
     _countryLookup        = countryLookup;
     _cookieConsentManager = cookieConsentManager;
     _mediaService         = mediaService;
     _languageService      = languageService;
     _urlPolicy            = urlPolicy;
     _webHelper            = webHelper;
     _themeContext         = themeContext;
     _themeRegistry        = themeRegistry;
     _themeSettings        = themeSettings;
     _seoSettings          = seoSettings;
     _localizationSettings = localizationSettings;
     _privacySettings      = privacySettings;
 }
Exemplo n.º 5
0
 public WebWorkContext(
     ICacheManager cacheManager,
     HttpContextBase httpContext,
     ICustomerService customerService,
     IStoreContext storeContext,
     IAuthenticationService authenticationService,
     ILanguageService languageService,
     ICurrencyService currencyService,
     IGenericAttributeService attrService,
     TaxSettings taxSettings,
     PrivacySettings privacySettings,
     LocalizationSettings localizationSettings,
     Lazy <ITaxService> taxService,
     IUserAgent userAgent,
     IWebHelper webHelper,
     IGeoCountryLookup geoCountryLookup,
     ICountryService countryService)
 {
     _cacheManager          = cacheManager;
     _httpContext           = httpContext;
     _customerService       = customerService;
     _storeContext          = storeContext;
     _authenticationService = authenticationService;
     _languageService       = languageService;
     _attrService           = attrService;
     _currencyService       = currencyService;
     _taxSettings           = taxSettings;
     _privacySettings       = privacySettings;
     _taxService            = taxService;
     _localizationSettings  = localizationSettings;
     _userAgent             = userAgent;
     _webHelper             = webHelper;
     _geoCountryLookup      = geoCountryLookup;
     _countryService        = countryService;
 }
Exemplo n.º 6
0
        public CommonController(
            ICommonServices services,
            ITopicService topicService,
            Lazy <ILanguageService> languageService,
            Lazy <ICurrencyService> currencyService,
            IThemeContext themeContext,
            Lazy <IThemeRegistry> themeRegistry,
            Lazy <IForumService> forumService,
            Lazy <IGenericAttributeService> genericAttributeService,
            Lazy <IMobileDeviceHelper> mobileDeviceHelper,
            Lazy <IUrlRecordService> urlRecordService,
            IPageAssetsBuilder pageAssetsBuilder,
            Lazy <IPictureService> pictureService,
            Lazy <IManufacturerService> manufacturerService,
            CustomerSettings customerSettings,
            PrivacySettings privacySettings,
            TaxSettings taxSettings,
            CatalogSettings catalogSettings,
            ShoppingCartSettings shoppingCartSettings,
            EmailAccountSettings emailAccountSettings,
            CommonSettings commonSettings,
            NewsSettings newsSettings,
            BlogSettings blogSettings,
            ForumSettings forumSettings,
            LocalizationSettings localizationSettings,
            Lazy <SocialSettings> socialSettings,
            ThemeSettings themeSettings,
            IBreadcrumb breadcrumb)
        {
            _services                = services;
            _topicService            = topicService;
            _languageService         = languageService;
            _currencyService         = currencyService;
            _themeContext            = themeContext;
            _themeRegistry           = themeRegistry;
            _forumservice            = forumService;
            _genericAttributeService = genericAttributeService;
            _urlRecordService        = urlRecordService;
            _pageAssetsBuilder       = pageAssetsBuilder;
            _pictureService          = pictureService;
            _manufacturerService     = manufacturerService;

            _customerSettings     = customerSettings;
            _privacySettings      = privacySettings;
            _taxSettings          = taxSettings;
            _catalogSettings      = catalogSettings;
            _shoppingCartSettings = shoppingCartSettings;
            _commonSettings       = commonSettings;
            _newsSettings         = newsSettings;
            _blogSettings         = blogSettings;
            _forumSettings        = forumSettings;
            _localizationSettings = localizationSettings;
            _socialSettings       = socialSettings;
            _themeSettings        = themeSettings;

            _breadcrumb = breadcrumb;
        }
Exemplo n.º 7
0
 protected override void CreateModel()
 {
     _GeneralSettings  = new GeneralSettings();
     _PrivacySettings  = new PrivacySettings();
     _PlaybackSettings = new PlaybackSettings();
     _SubtitleSettings = new SubtitleSettings();
     _FontSettings     = new FontSettings();
     _AppInformation   = new AppInformation();
 }
Exemplo n.º 8
0
 public void UpdatePrivacySettings(PrivacySettings privacySettings)
 {
     UpdatePrivacySettingsCommand.Execute(new
     {
         privacySettings.UserId,
         privacySettings.VisibleProfile,
         privacySettings.VisiblePosts
     });
 }
Exemplo n.º 9
0
        public ContactUsValidator(PrivacySettings privacySettings)
        {
            RuleFor(x => x.Email).NotEmpty().EmailAddress();
            RuleFor(x => x.Enquiry).NotEmpty();

            if (privacySettings.FullNameOnContactUsRequired)
            {
                RuleFor(x => x.FullName).NotEmpty();
            }
        }
        public static bool PrivacySettingsToBool(PrivacySettings privacySettings)
        {
            switch (privacySettings)
            {
            case PrivacySettings.Private:   return(true);

            case PrivacySettings.Public:
            default:                        return(false);
            }
        }
Exemplo n.º 11
0
    public void EditPrivacySettings(PrivacySettings privacySettings)
    {
        bool ownerIsCaller = IsProfileOwnerMatch <bool> .Execute(new { privacySettings.ProfileId });

        if (ownerIsCaller)
        {
            Connector connector = new Connector(credentialManager.PublicKey, credentialManager.PrivateKey);
            return(connector.Call("editPrivacySetting", privacySettings.Id, privacySettings.IsProfileVisible, privacySettings.ArePostsVisible));
        }
    }
Exemplo n.º 12
0
 public ProductCompareService(
     SmartDbContext db,
     IHttpContextAccessor httpContextAccessor,
     ICatalogSearchService catalogSearchService,
     PrivacySettings privacySettings)
 {
     _db = db;
     _httpContextAccessor  = httpContextAccessor;
     _catalogSearchService = catalogSearchService;
 }
        public ProductAskQuestionValidator(PrivacySettings privacySettings)
        {
            RuleFor(x => x.SenderEmail).NotEmpty().EmailAddress();
            RuleFor(x => x.Question).NotEmpty();

            if (privacySettings.FullNameOnProductRequestRequired)
            {
                RuleFor(x => x.SenderName).NotEmpty();
            }
        }
Exemplo n.º 14
0
 public ProductController(
     SmartDbContext db,
     IWebHelper webHelper,
     IProductService productService,
     IProductTagService productTagService,
     IProductAttributeService productAttributeService,
     IRecentlyViewedProductsService recentlyViewedProductsService,
     IProductCompareService productCompareService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     ICatalogSearchService catalogSearchService,
     IMediaService mediaService,
     ICustomerService customerService,
     MediaSettings mediaSettings,
     CatalogSettings catalogSettings,
     CatalogHelper helper,
     IBreadcrumb breadcrumb,
     SeoSettings seoSettings,
     ContactDataSettings contactDataSettings,
     CaptchaSettings captchaSettings,
     LocalizationSettings localizationSettings,
     PrivacySettings privacySettings,
     Lazy <IUrlHelper> urlHelper,
     Lazy <IMessageFactory> messageFactory,
     Lazy <ProductUrlHelper> productUrlHelper,
     Lazy <IProductAttributeFormatter> productAttributeFormatter,
     Lazy <IProductAttributeMaterializer> productAttributeMaterializer)
 {
     _db                            = db;
     _webHelper                     = webHelper;
     _productService                = productService;
     _productTagService             = productTagService;
     _productAttributeService       = productAttributeService;
     _recentlyViewedProductsService = recentlyViewedProductsService;
     _productCompareService         = productCompareService;
     _aclService                    = aclService;
     _storeMappingService           = storeMappingService;
     _catalogSearchService          = catalogSearchService;
     _mediaService                  = mediaService;
     _customerService               = customerService;
     _mediaSettings                 = mediaSettings;
     _catalogSettings               = catalogSettings;
     _helper                        = helper;
     _breadcrumb                    = breadcrumb;
     _seoSettings                   = seoSettings;
     _contactDataSettings           = contactDataSettings;
     _captchaSettings               = captchaSettings;
     _localizationSettings          = localizationSettings;
     _privacySettings               = privacySettings;
     _urlHelper                     = urlHelper;
     _messageFactory                = messageFactory;
     _productUrlHelper              = productUrlHelper;
     _productAttributeFormatter     = productAttributeFormatter;
     _productAttributeMaterializer  = productAttributeMaterializer;
 }
Exemplo n.º 15
0
 public ProductCompareService(
     SmartDbContext db,
     IWebHelper webHelper,
     IHttpContextAccessor httpContextAccessor,
     PrivacySettings privacySettings)
 {
     _db                  = db;
     _webHelper           = webHelper;
     _httpContextAccessor = httpContextAccessor;
     _privacySettings     = privacySettings;
 }
Exemplo n.º 16
0
 public CompareProductsService(
     HttpContextBase httpContext,
     IProductService productService,
     ICatalogSearchService catalogSearchService,
     PrivacySettings privacySettings)
 {
     _httpContext          = httpContext;
     _productService       = productService;
     _catalogSearchService = catalogSearchService;
     _privacySettings      = privacySettings;
 }
Exemplo n.º 17
0
        public ContactUsValidator(ILocalizationService localizationService, PrivacySettings privacySettings)
        {
            RuleFor(x => x.Email).NotEmpty().WithMessage(localizationService.GetResource("ContactUs.Email.Required"));
            RuleFor(x => x.Email).EmailAddress().WithMessage(localizationService.GetResource("Common.WrongEmail"));
            RuleFor(x => x.Enquiry).NotEmpty().WithMessage(localizationService.GetResource("ContactUs.Enquiry.Required"));

            if (privacySettings.FullNameOnContactUsRequired)
            {
                RuleFor(x => x.FullName).NotEmpty().WithMessage(localizationService.GetResource("ContactUs.FullName.Required"));
            }
        }
        public static string PrivacySettingsToString(PrivacySettings privacySettings)
        {
            switch (privacySettings)
            {
            case PrivacySettings.Public: return("public");

            case PrivacySettings.Private: return("private");

            default: return("");
            }
        }
 public CookieConsentFilter(
     IUserAgent userAgent,
     ICommonServices services,
     Lazy <IWidgetProvider> widgetProvider,
     PrivacySettings privacySettings)
 {
     _userAgent       = userAgent;
     _services        = services;
     _widgetProvider  = widgetProvider;
     _privacySettings = privacySettings;
 }
Exemplo n.º 20
0
        public ProductAskQuestionValidator(ILocalizationService localizationService, PrivacySettings privacySettings)
        {
            RuleFor(x => x.SenderEmail).NotEmpty().WithMessage(localizationService.GetResource("Account.Fields.Email.Required"));
            RuleFor(x => x.SenderEmail).EmailAddress().WithMessage(localizationService.GetResource("Common.WrongEmail"));
            RuleFor(x => x.Question).NotEmpty().WithMessage(localizationService.GetResource("Products.AskQuestion.Question.Required"));

            if (privacySettings.FullNameOnProductRequestRequired)
            {
                RuleFor(x => x.SenderName).NotEmpty().WithMessage(localizationService.GetResource("Account.Fields.FullName.Required"));
            }
        }
Exemplo n.º 21
0
 public CookieManager(
     ICommonServices services,
     ITypeFinder typeFinder,
     HttpContextBase httpContext,
     PrivacySettings privacySettings)
 {
     _services        = services;
     _typeFinder      = typeFinder;
     _httpContext     = httpContext;
     _privacySettings = privacySettings;
 }
Exemplo n.º 22
0
 public GdprConsentFilter(
     ICommonServices services,
     IWidgetProvider widgetProvider,
     PrivacySettings privacySettings,
     INotifier notifier)
 {
     _services        = services;
     _widgetProvider  = widgetProvider;
     _privacySettings = privacySettings;
     _notifier        = notifier;
 }
Exemplo n.º 23
0
 public CommonController(
     Lazy <ILanguageService> languageService,
     Lazy <ICurrencyService> currencyService,
     IThemeContext themeContext,
     Lazy <IThemeRegistry> themeRegistry,
     Lazy <IForumService> forumService,
     Lazy <IGenericAttributeService> genericAttributeService,
     Lazy <IUrlRecordService> urlRecordService,
     IPageAssetsBuilder pageAssetsBuilder,
     Lazy <IMediaService> mediaService,
     CustomerSettings customerSettings,
     PrivacySettings privacySettings,
     TaxSettings taxSettings,
     CatalogSettings catalogSettings,
     ShoppingCartSettings shoppingCartSettings,
     CommonSettings commonSettings,
     NewsSettings newsSettings,
     BlogSettings blogSettings,
     ForumSettings forumSettings,
     LocalizationSettings localizationSettings,
     Lazy <SocialSettings> socialSettings,
     ThemeSettings themeSettings,
     ICookieManager cookieManager,
     IGeoCountryLookup geoCountryLookup,
     IWebHelper webHelper,
     ICountryService countryService)
 {
     _languageService         = languageService;
     _currencyService         = currencyService;
     _themeContext            = themeContext;
     _themeRegistry           = themeRegistry;
     _forumService            = forumService;
     _genericAttributeService = genericAttributeService;
     _urlRecordService        = urlRecordService;
     _pageAssetsBuilder       = pageAssetsBuilder;
     _mediaService            = mediaService;
     _customerSettings        = customerSettings;
     _privacySettings         = privacySettings;
     _taxSettings             = taxSettings;
     _catalogSettings         = catalogSettings;
     _shoppingCartSettings    = shoppingCartSettings;
     _commonSettings          = commonSettings;
     _newsSettings            = newsSettings;
     _blogSettings            = blogSettings;
     _forumSettings           = forumSettings;
     _localizationSettings    = localizationSettings;
     _socialSettings          = socialSettings;
     _themeSettings           = themeSettings;
     _cookieManager           = cookieManager;
     _geoCountryLookup        = geoCountryLookup;
     _webHelper      = webHelper;
     _countryService = countryService;
 }
 public FormsAuthenticationService(
     HttpContextBase httpContext,
     ICustomerService customerService,
     CustomerSettings customerSettings,
     PrivacySettings privacySettings)
 {
     _httpContext        = httpContext;
     _customerService    = customerService;
     _customerSettings   = customerSettings;
     _privacySettings    = privacySettings;
     _expirationTimeSpan = FormsAuthentication.Timeout;
 }
Exemplo n.º 25
0
 protected override bool SetSettingItemValue(SettingBase setting, PropertyInfo property)
 {
     if (property.Name == "FeedSendItems")
     {
         PrivacySettings temp = (PrivacySettings)setting;
         temp.FeedSendItems = GetFeedSendItems();
         return(true);
     }
     else
     {
         return(base.SetSettingItemValue(setting, property));
     }
 }
Exemplo n.º 26
0
 public RecentlyViewedProductsService(
     SmartDbContext db,
     IHttpContextAccessor httpContextAccessor,
     IAclService aclService,
     CatalogSettings catalogSettings,
     PrivacySettings privacySettings)
 {
     _db = db;
     _httpContextAccessor = httpContextAccessor;
     _aclService          = aclService;
     _catalogSettings     = catalogSettings;
     _privacySettings     = privacySettings;
 }
Exemplo n.º 27
0
 public NewsletterController(
     SmartDbContext db,
     IWorkContext workContext,
     IMessageFactory messageFactory,
     IStoreContext storeContext,
     PrivacySettings privacySettings)
 {
     _db              = db;
     _workContext     = workContext;
     _messageFactory  = messageFactory;
     _storeContext    = storeContext;
     _privacySettings = privacySettings;
 }
 public RecentlyViewedProductsService(
     SmartDbContext db,
     IWebHelper webHelper,
     IHttpContextAccessor httpContextAccessor,
     CatalogSettings catalogSettings,
     PrivacySettings privacySettings)
 {
     _db                  = db;
     _webHelper           = webHelper;
     _httpContextAccessor = httpContextAccessor;
     _catalogSettings     = catalogSettings;
     _privacySettings     = privacySettings;
 }
Exemplo n.º 29
0
    public void EditPrivacySettings(PrivacySettings privacySettings)
    {
        bool ownerIsCaller = IsProfileOwnerMatch <bool> .Execute(new { privacySettings.ProfileId });

        if (ownerIsCaller)
        {
            EditPrivacySettingsCommand.Execute(new
            {
                privacySettings.ProfileId,
                privacySettings.IsProfileVisible,
                privacySettings.ArePostsVisible
            });
        }
    }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="httpContext">HTTP context</param>
 /// <param name="productService">Product service</param>
 /// <param name="catalogSettings">Catalog settings</param>
 public RecentlyViewedProductsService(
     ICommonServices services,
     HttpContextBase httpContext,
     IProductService productService,
     IAclService aclService,
     CatalogSettings catalogSettings,
     PrivacySettings privacySettings)
 {
     _services        = services;
     _httpContext     = httpContext;
     _productService  = productService;
     _aclService      = aclService;
     _catalogSettings = catalogSettings;
     _privacySettings = privacySettings;
 }