Esempio n. 1
0
        //todo: commands only in context and create context using ActivatorUtilities.CreateInstance

        public MergeGraphSyncer(
            IEnumerable <IContentItemGraphSyncer> itemSyncers,
            IGraphSyncPartGraphSyncer graphSyncPartGraphSyncer,
            ISyncNameProvider syncNameProvider,
            IMergeNodeCommand mergeNodeCommand,
            IReplaceRelationshipsCommand replaceRelationshipsCommand,
            IContentItemVersionFactory contentItemVersionFactory,
            IPublishedContentItemVersion publishedContentItemVersion,
            IPreviewContentItemVersion previewContentItemVersion,
            IServiceProvider serviceProvider,
            IGraphCluster graphCluster,
            IContentItemsService contentItemsService,
            ILogger <MergeGraphSyncer> logger)
        {
            _itemSyncers = itemSyncers.OrderByDescending(s => s.Priority);
            _graphSyncPartGraphSyncer    = graphSyncPartGraphSyncer;
            _syncNameProvider            = syncNameProvider;
            MergeNodeCommand             = mergeNodeCommand;
            _replaceRelationshipsCommand = replaceRelationshipsCommand;
            _contentItemVersionFactory   = contentItemVersionFactory;
            _publishedContentItemVersion = publishedContentItemVersion;
            _previewContentItemVersion   = previewContentItemVersion;
            _serviceProvider             = serviceProvider;
            _graphCluster        = graphCluster;
            _contentItemsService = contentItemsService;
            _logger = logger;

            _graphMergeContext = null;
            _incomingPreviewContentPickerRelationships = null;
        }
Esempio n. 2
0
        public GraphMergeContext(
            IMergeGraphSyncer mergeGraphSyncer,
            ISyncNameProvider syncNameProvider,
            IGraphReplicaSet graphReplicaSet,
            IMergeNodeCommand mergeNodeCommand,
            IReplaceRelationshipsCommand replaceRelationshipsCommand,
            ContentItem contentItem,
            IContentManager contentManager,
            IContentItemVersionFactory contentItemVersionFactory,
            IGraphMergeContext?parentGraphMergeContext,
            IServiceProvider serviceProvider)
            : base(
                contentItem,
                syncNameProvider,
                contentManager,
                contentItemVersionFactory.Get(graphReplicaSet.Name),
                parentGraphMergeContext,
                serviceProvider.GetRequiredService <ILogger <GraphMergeContext> >())
        {
            MergeGraphSyncer            = mergeGraphSyncer;
            GraphReplicaSet             = graphReplicaSet;
            MergeNodeCommand            = mergeNodeCommand;
            ReplaceRelationshipsCommand = replaceRelationshipsCommand;

            ExtraCommands = new List <ICommand>();
        }
Esempio n. 3
0
        public ValidateAndRepairGraph(IEnumerable <IContentItemGraphSyncer> itemSyncers,
                                      IContentDefinitionManager contentDefinitionManager,
                                      IContentManager contentManager,
                                      ISession session,
                                      IServiceProvider serviceProvider,
                                      ISyncNameProvider syncNameProvider,
                                      IGraphValidationHelper graphValidationHelper,
                                      IContentItemVersionFactory contentItemVersionFactory,
                                      IContentItemsService contentItemsService,
                                      ILogger <ValidateAndRepairGraph> logger)
        {
            _itemSyncers = itemSyncers.OrderByDescending(s => s.Priority);
            _contentDefinitionManager = contentDefinitionManager;
            _contentManager           = contentManager;
            _session                   = session;
            _serviceProvider           = serviceProvider;
            _syncNameProvider          = syncNameProvider;
            _graphValidationHelper     = graphValidationHelper;
            _contentItemVersionFactory = contentItemVersionFactory;
            _contentItemsService       = contentItemsService;
            _logger       = logger;
            _currentGraph = default;

            _graphClusterLowLevel = _serviceProvider.GetRequiredService <IGraphClusterLowLevel>();
        }
Esempio n. 4
0
 public NodeContentItemLookup(
     IContentItemVersionFactory contentItemVersionFactory,
     ISyncNameProvider syncNameProvider,
     ISuperpositionContentItemVersion superpositionContentItemVersion,
     IEscoContentItemVersion escoContentItemVersion,
     ISession session)
 {
     _contentItemVersionFactory       = contentItemVersionFactory;
     _syncNameProvider                = syncNameProvider;
     _superpositionContentItemVersion = superpositionContentItemVersion;
     _escoContentItemVersion          = escoContentItemVersion;
     _session = session;
 }
 public VisualiseController(
     IContentDefinitionManager contentDefinitionManager,
     INeo4JToOwlGeneratorService neo4jToOwlGeneratorService,
     IOrchardToOwlGeneratorService orchardToOwlGeneratorService,
     IVisualiseGraphSyncer visualiseGraphSyncer,
     IContentItemVersionFactory contentItemVersionFactory,
     INodeContentItemLookup nodeContentItemLookup)
 {
     _contentDefinitionManager     = contentDefinitionManager ?? throw new ArgumentNullException(nameof(contentDefinitionManager));
     _neo4JToOwlGeneratorService   = neo4jToOwlGeneratorService ?? throw new ArgumentNullException(nameof(neo4jToOwlGeneratorService));
     _orchardToOwlGeneratorService = orchardToOwlGeneratorService ?? throw new ArgumentNullException(nameof(orchardToOwlGeneratorService));
     _visualiseGraphSyncer         = visualiseGraphSyncer;
     _contentItemVersionFactory    = contentItemVersionFactory;
     _nodeContentItemLookup        = nodeContentItemLookup;
 }
 public CypherCommandStep(
     IGraphCluster graphCluster,
     IServiceProvider serviceProvider,
     IPublishedContentItemVersion publishedContentItemVersion,
     IPreviewContentItemVersion previewContentItemVersion,
     IContentItemVersionFactory contentItemVersionFactory,
     ILogger <CypherCommandStep> logger)
 {
     _graphCluster                = graphCluster;
     _serviceProvider             = serviceProvider;
     _publishedContentItemVersion = publishedContentItemVersion;
     _previewContentItemVersion   = previewContentItemVersion;
     _contentItemVersionFactory   = contentItemVersionFactory;
     _logger = logger;
 }