Пример #1
0
        public override void Init()
        {
            base.Init();

            _service        = _container.Resolve <IFieldIndexService>();
            _contentManager = _container.Resolve <IContentManager>();
        }
        public OsmImportController(IContentManager contentManager, IFieldIndexService fieldIndexService, IRepository <DecimalFieldIndexRecord> decimalFieldIndexRecord
                                   , IRepository <FieldIndexPartRecord> fieldIndexRecord, Lazy <IAutorouteService> autorouteService)
        {
            _contentManager          = contentManager;
            _fieldIndexService       = fieldIndexService;
            _decimalFieldIndexRecord = decimalFieldIndexRecord;
            _fieldIndexRecord        = fieldIndexRecord;
            _autorouteService        = autorouteService;

            Log = NullLogger.Instance;
        }
Пример #3
0
        public HiddenStringFieldValueUpdateTaskHandler(
            IContentManager contentMananger,
            IFieldIndexService fieldIndexService,
            ITokenizer tokenizer,
            ISweepGenerator sweepGenerator)
        {
            _contentManager    = contentMananger;
            _fieldIndexService = fieldIndexService;
            _tokenizer         = tokenizer;
            _sweepGenerator    = sweepGenerator;

            Logger = NullLogger.Instance;
        }
Пример #4
0
        public FieldIndexPartHandler(
            IContentDefinitionManager contentDefinitionManager,
            IRepository<FieldIndexPartRecord> repository,
            IFieldIndexService fieldIndexService,
            IFieldStorageProvider fieldStorageProvider,
            IEnumerable<IContentFieldDriver> contentFieldDrivers) {
            Filters.Add(StorageFilter.For(repository));
            _contentDefinitionManager = contentDefinitionManager;
            _fieldIndexService = fieldIndexService;
            _fieldStorageProvider = fieldStorageProvider;
            _contentFieldDrivers = contentFieldDrivers;

            OnPublishing<FieldIndexPart>(Publishing);
        }
Пример #5
0
        public AmiImportController(IContentManager contentManager, IFieldIndexService fieldIndexService, ITaxonomyService taxonomyService,
                                   IMediaLibraryService mediaLibraryService, IRepository <DecimalFieldIndexRecord> decimalFieldIndexRecord,
                                   IRepository <FieldIndexPartRecord> fieldIndexRecord, Lazy <IAutorouteService> autorouteService)
        {
            _contentManager          = contentManager;
            _fieldIndexService       = fieldIndexService;
            _mediaLibraryService     = mediaLibraryService;
            _decimalFieldIndexRecord = decimalFieldIndexRecord;
            _fieldIndexRecord        = fieldIndexRecord;
            _taxonomyService         = taxonomyService;
            _autorouteService        = autorouteService;

            Log = NullLogger.Instance;
        }
        public override void Init()
        {
            base.Init();

            _fieldIndexService = _container.Resolve <IFieldIndexService>();
            _contentManager    = _container.Resolve <IContentManager>();
            _provider          = _container.Resolve <IFieldStorageProvider>();
            _events            = _container.Resolve <IEnumerable <IFieldStorageEvents> >();

            _part = CreateContentItemPart();
            var partFieldDefinition = _part.PartDefinition.Fields.Single();
            var storage             = _provider.BindStorage(_part, partFieldDefinition);

            _storage = new FieldStorageEventStorage(storage, partFieldDefinition, _part, _events);
        }
 public FieldIndexPartHandler(
     IContentDefinitionManager contentDefinitionManager,
     IRepository <FieldIndexPartRecord> repository,
     IFieldIndexService fieldIndexService,
     IFieldStorageProvider fieldStorageProvider,
     IEnumerable <IContentFieldDriver> contentFieldDrivers)
 {
     Filters.Add(StorageFilter.For(repository));
     _contentDefinitionManager = contentDefinitionManager;
     _fieldIndexService        = fieldIndexService;
     _fieldStorageProvider     = fieldStorageProvider;
     _contentFieldDrivers      = contentFieldDrivers;
     OnUpdated <FieldIndexPart>(Updated);
     OnPublishing <FieldIndexPart>(Publishing);
 }
Пример #8
0
        public HiddenStringFieldUpdateProcessor(
            IContentManager contentManager,
            IProcessingEngine processingEngine,
            ShellSettings shellSettings,
            IShellDescriptorManager shellDescriptionManager,
            IContentDefinitionManager contentDefinitionManager,
            IFieldIndexService fieldIndexService,
            ITokenizer tokenizer)
        {
            _contentManager           = contentManager;
            _processingEngine         = processingEngine;
            _shellSettings            = shellSettings;
            _shellDescriptorManager   = shellDescriptionManager;
            _contentDefinitionManager = contentDefinitionManager;
            _fieldIndexService        = fieldIndexService;
            _tokenizer = tokenizer;

            T = NullLocalizer.Instance;

            //dictionaries to handle task definitions
            _variantDescriptions = new Dictionary <HiddenStringFieldUpdateProcessVariant, string>()
            {
                { HiddenStringFieldUpdateProcessVariant.None, T("None").Text },
                { HiddenStringFieldUpdateProcessVariant.All, T("All fields").Text },
                { HiddenStringFieldUpdateProcessVariant.Empty, T("Empty fields").Text }
            };
            _partsEnumerableFilters = new Dictionary <HiddenStringFieldUpdateProcessVariant,
                                                      Func <ContentPartFieldDefinitionBuilder, Func <ContentPart, bool> > >()
            {
                { HiddenStringFieldUpdateProcessVariant.None, (builder) => pa => false },
                { HiddenStringFieldUpdateProcessVariant.All, (builder) => {
                      return(pa => pa.PartDefinition.Name == builder.PartName);
                  } },
                { HiddenStringFieldUpdateProcessVariant.Empty, (builder) => {
                      return(pa => pa.PartDefinition.Name == builder.PartName &&
                             string.IsNullOrWhiteSpace(
                                 (pa.Fields.First(fi => fi.Name == builder.Name) as HiddenStringField).Value));
                  } }
            };
        }
Пример #9
0
        public CommunicationService(
            ITaxonomyService taxonomyService,
            IRepository <CommunicationEmailRecord> repositoryCommunicationEmailRecord,
            INotifier notifier,
            IModuleService moduleService,
            IOrchardServices orchardServices,
            IShortLinksService shortLinksService,
            IContentExtensionsServices contentExtensionsServices,
            ISessionLocator session,
            ICultureManager cultureManager,
            IRepository <CommunicationSmsRecord> repositoryCommunicationSmsRecord,
            IContactRelatedEventHandler contactRelatedEventHandler,
            ITransactionManager transactionManager,
            IFieldIndexService fieldIndexService,
            IAutorouteService autorouteService,
            IRepository <CommunicationRetryRecord> repositoryCommunicationRetryRecord,
            IContentDefinitionManager contentDefinitionManager,
            IUtilsServices utilsServices)
        {
            _orchardServices           = orchardServices;
            _shortLinksService         = shortLinksService;
            _contentExtensionsServices = contentExtensionsServices;
            _moduleService             = moduleService;
            _notifier = notifier;
            _repositoryCommunicationEmailRecord = repositoryCommunicationEmailRecord;
            _repositoryCommunicationSmsRecord   = repositoryCommunicationSmsRecord;
            _repositoryCommunicationRetryRecord = repositoryCommunicationRetryRecord;
            _taxonomyService            = taxonomyService;
            _cultureManager             = cultureManager;
            _contactRelatedEventHandler = contactRelatedEventHandler;
            _transactionManager         = transactionManager;
            _fieldIndexService          = fieldIndexService;
            _autorouteService           = autorouteService;
            _contentDefinitionManager   = contentDefinitionManager;
            _utilsServices = utilsServices;

            T = NullLocalizer.Instance;
        }