Exemple #1
0
        public ExecuteHttpTriggerTests()
        {
            var context = new DefaultHttpContext();

            _request = context.Request;

            _ContentTypeNameMapConfig = A.Fake <IOptionsMonitor <ContentApiOptions> >();
            A.CallTo(() => _ContentTypeNameMapConfig.CurrentValue).Returns(new ContentApiOptions
            {
                ContentTypeNameMap = new Dictionary <string, string>()
                {
                    { "test1", "Test2" }, { "test2", "Test3" }
                }
            });

            _graphCluster = A.Fake <IGraphCluster>();
            var fakeGraphClusterBuilder = A.Fake <IGraphClusterBuilder>();

            A.CallTo(() => fakeGraphClusterBuilder.Build(null)).Returns(_graphCluster);

            _log        = A.Fake <ILogger>();
            _jsonHelper = A.Fake <IJsonFormatHelper>();

            _jsonHelper      = new JsonFormatHelper(_ContentTypeNameMapConfig);
            _executeFunction = new Execute(_ContentTypeNameMapConfig, fakeGraphClusterBuilder, _jsonHelper);
        }
 public CypherToContentStep(
     IGraphCluster graphCluster,
     IServiceProvider serviceProvider,
     IContentItemIdGenerator idGenerator,
     ICypherToContentCSharpScriptGlobals cypherToContentCSharpScriptGlobals,
     ISyncNameProvider syncNameProvider,
     IPublishedContentItemVersion publishedContentItemVersion,
     ISuperpositionContentItemVersion superpositionContentItemVersion,
     IEscoContentItemVersion escoContentItemVersion,
     ISession session,
     IContentManager contentManager,
     IContentManagerSession contentManagerSession,
     ILogger <CypherToContentStep> logger)
 {
     _graphCluster    = graphCluster;
     _serviceProvider = serviceProvider;
     _idGenerator     = idGenerator;
     _cypherToContentCSharpScriptGlobals = cypherToContentCSharpScriptGlobals;
     _syncNameProvider                = syncNameProvider;
     _publishedContentItemVersion     = publishedContentItemVersion;
     _superpositionContentItemVersion = superpositionContentItemVersion;
     _escoContentItemVersion          = escoContentItemVersion;
     _session               = session;
     _contentManager        = contentManager;
     _contentManagerSession = contentManagerSession;
     _logger = logger;
 }
Exemple #3
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;
        }
 public DefaultPageLocationsContentHandler(IServiceProvider serviceProvider, ISession session, IGraphCluster graphCluster, IPreviewContentItemVersion previewContentItemVersion, INotifier notifier, ILogger <DefaultPageLocationsContentHandler> logger)
 {
     _serviceProvider           = serviceProvider;
     _session                   = session;
     _graphCluster              = graphCluster;
     _previewContentItemVersion = previewContentItemVersion;
     _notifier                  = notifier;
     _logger = logger;
 }
 public GraphConnector(
     IGraphCluster graphCluster,
     IServiceProvider serviceProvider,
     GraphOptions graphOptions,
     ICypherQueryBuilderService cypherQueryBuilderService)
 {
     this.graphCluster              = graphCluster;
     this.serviceProvider           = serviceProvider;
     this.graphOptions              = graphOptions;
     this.cypherQueryBuilderService = cypherQueryBuilderService;
 }
 public GraphResyncer(
     IContentItemsService contentItemsService,
     IServiceProvider serviceProvider,
     IGraphCluster graphCluster,
     IContentManager contentManager)
 {
     _contentItemsService = contentItemsService;
     _serviceProvider     = serviceProvider;
     _graphCluster        = graphCluster;
     _contentManager      = contentManager;
 }
Exemple #7
0
 public DeleteTypeGraphSyncer(
     IGraphCluster graphCluster,
     IDeleteNodesByTypeCommand deleteNodesByTypeCommand,
     ISyncNameProvider syncNameProvider,
     ISession session,
     ILogger <DeleteTypeGraphSyncer> logger)
 {
     _graphCluster             = graphCluster;
     _deleteNodesByTypeCommand = deleteNodesByTypeCommand;
     _syncNameProvider         = syncNameProvider;
     _session = session;
     _logger  = logger;
 }
 public VisualiseGraphSyncer(
     IContentManager contentManager,
     ISyncNameProvider syncNameProvider,
     IDescribeContentItemHelper describeContentItemHelper,
     IGraphCluster neoGraphCluster,
     IServiceProvider serviceProvider)
 {
     _contentManager            = contentManager;
     _syncNameProvider          = syncNameProvider;
     _describeContentItemHelper = describeContentItemHelper;
     _neoGraphCluster           = neoGraphCluster;
     _serviceProvider           = serviceProvider;
 }
 public SyncOrchestrator(
     IContentDefinitionManager contentDefinitionManager,
     IGraphSyncNotifier notifier,
     IGraphCluster graphCluster,
     IServiceProvider serviceProvider,
     ILogger <SyncOrchestrator> logger,
     IPublishedContentItemVersion publishedContentItemVersion,
     IEnumerable <IContentOrchestrationHandler> contentOrchestrationHandlers)
     : base(contentDefinitionManager, notifier, serviceProvider, contentOrchestrationHandlers, logger)
 {
     _graphCluster = graphCluster;
     _publishedContentItemVersion = publishedContentItemVersion;
 }
 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;
 }
        public DeleteGraphSyncer(
            IEnumerable <IContentItemGraphSyncer> itemSyncers,
            IGraphCluster graphCluster,
            IDeleteNodeCommand deleteNodeCommand,
            ISyncNameProvider syncNameProvider,
            IContentManager contentManager,
            IServiceProvider serviceProvider,
            ILogger <DeleteGraphSyncer> logger)
        {
            _itemSyncers       = itemSyncers.OrderByDescending(s => s.Priority);
            _graphCluster      = graphCluster;
            _deleteNodeCommand = deleteNodeCommand;
            _syncNameProvider  = syncNameProvider;
            _contentManager    = contentManager;
            _serviceProvider   = serviceProvider;
            _logger            = logger;

            _graphDeleteItemSyncContext = null;
        }
Exemple #12
0
 public GenericGraphQueryService(IGraphClusterBuilder graphClusterBuilder, GraphOptions graphOptions)
 {
     graphCluster      = graphClusterBuilder?.Build() ?? throw new ArgumentNullException(nameof(graphClusterBuilder));
     this.graphOptions = graphOptions;
 }
 public GraphLookupAdminController(IContentDefinitionManager contentDefinitionManager, IGraphCluster neoGraphCluster)
 {
     _contentDefinitionManager = contentDefinitionManager ?? throw new ArgumentNullException(nameof(contentDefinitionManager));
     _neoGraphCluster = neoGraphCluster ?? throw new ArgumentNullException(nameof(neoGraphCluster));
 }
Exemple #14
0
 public SynonymService(IGraphCluster neoGraphCluster, ISyncNameProvider syncNameProvider)
 {
     _neoGraphCluster  = neoGraphCluster ?? throw new ArgumentNullException(nameof(neoGraphCluster));
     _syncNameProvider = syncNameProvider ?? throw new ArgumentNullException(nameof(syncNameProvider));
 }
 public Execute(IOptionsMonitor <ContentApiOptions> contentApiOptions, IGraphClusterBuilder graphClusterBuilder, IJsonFormatHelper jsonFormatHelper)
 {
     _contentApiOptions = contentApiOptions ?? throw new ArgumentNullException(nameof(contentApiOptions));
     _graphCluster      = graphClusterBuilder.Build() ?? throw new ArgumentNullException(nameof(graphClusterBuilder));
     _jsonFormatHelper  = jsonFormatHelper ?? throw new ArgumentNullException(nameof(jsonFormatHelper));
 }
Exemple #16
0
 public CypherQuerySource(IGraphCluster neoGraphCluster)
 {
     _neoGraphCluster = neoGraphCluster ?? throw new ArgumentNullException(nameof(neoGraphCluster));
 }
 public GraphLookupPartDisplayDriver(IGraphCluster graphCluster, IContentDefinitionManager contentDefinitionManager)
 {
     _graphCluster             = graphCluster;
     _contentDefinitionManager = contentDefinitionManager;
 }