Example #1
0
        public void InitializeServices(IServiceContainer analysisServiceContainer)
        {
            m_analysisServiceContainer = analysisServiceContainer;

            m_changeGroupService = (ChangeGroupService)m_analysisServiceContainer.GetService(typeof(ChangeGroupService));
            m_changeGroupService.RegisterDefaultSourceSerializer(new SubversionMigrationItemSerialzier());
        }
Example #2
0
        /// <summary>
        /// Initialize method of the analysis provider - acquire references to the services provided by the platform.
        /// </summary>
        /// <param name="serviceContainer">The service container.</param>
        public override void InitializeServices(IServiceContainer serviceContainer)
        {
            TraceManager.TraceInformation("WSSVC:AP:Initialize");
            this.analysisServiceContainer = serviceContainer;

            supportedContentTypes = new Collection <ContentType>();
            supportedContentTypes.Add(WellKnownContentType.VersionControlledFile);
            supportedContentTypes.Add(WellKnownContentType.VersionControlledFolder);

            SharePointVCChangeActionHandler handler = new SharePointVCChangeActionHandler(this);

            supportedChangeActions = new Dictionary <Guid, ChangeActionHandler>();
            supportedChangeActions.Add(WellKnownChangeActionId.Add, handler.BasicActionHandler);
            supportedChangeActions.Add(WellKnownChangeActionId.Delete, handler.BasicActionHandler);
            supportedChangeActions.Add(WellKnownChangeActionId.Edit, handler.BasicActionHandler);

            configurationService = (ConfigurationService)analysisServiceContainer.GetService(typeof(ConfigurationService));

            highWaterMarkDelta     = new HighWaterMark <DateTime>(Constants.HwmDelta);
            highWaterMarkChangeset = new HighWaterMark <int>("LastChangeSet");
            configurationService.RegisterHighWaterMarkWithSession(highWaterMarkDelta);
            configurationService.RegisterHighWaterMarkWithSession(highWaterMarkChangeset);
            changeGroupService = (ChangeGroupService)analysisServiceContainer.GetService(typeof(ChangeGroupService));
            changeGroupService.RegisterDefaultSourceSerializer(new SharePointVCMigrationItemSerializer());
        }
Example #3
0
        public override void InitializeServices(IServiceContainer analysisServiceContainer)
        {
            TraceManager.TraceInformation("POC:AP:Initialize");
            TraceManager.TraceInformation("Press enter..");
            Console.ReadLine();
            m_analysisServiceContainer = analysisServiceContainer;

            m_supportedContentTypes = new Collection <ContentType>();
            m_supportedContentTypes.Add(WellKnownContentType.VersionControlledFile);
            m_supportedContentTypes.Add(WellKnownContentType.VersionControlledFolder);

            var handler = new BasicChangeActionHandlers(this);

            m_supportedChangeActions = new Dictionary <Guid, ChangeActionHandler>();
            m_supportedChangeActions.Add(WellKnownChangeActionId.Add, handler.BasicActionHandler);
            m_supportedChangeActions.Add(WellKnownChangeActionId.Delete, handler.BasicActionHandler);
            m_supportedChangeActions.Add(WellKnownChangeActionId.Edit, handler.BasicActionHandler);
            m_supportedChangeActions.Add(WellKnownChangeActionId.Rename, handler.BasicActionHandler);

            ConfigurationService = (ConfigurationService)m_analysisServiceContainer.GetService(typeof(ConfigurationService));

            m_hwmDelta     = new HighWaterMark <DateTime>(Constants.HwmDelta);
            m_hwmChangeset = new HighWaterMark <int>("LastChangeSet");
            ConfigurationService.RegisterHighWaterMarkWithSession(m_hwmDelta);
            ConfigurationService.RegisterHighWaterMarkWithSession(m_hwmChangeset);
            m_changeGroupService = (ChangeGroupService)m_analysisServiceContainer.GetService(typeof(ChangeGroupService));
            m_changeGroupService.RegisterDefaultSourceSerializer(new PocVCMigrationItemSerializer());
        }
Example #4
0
        /// <summary>
        /// Initialize TfsVCAdapter
        /// </summary>
        public void InitializeServices(IServiceContainer analysisServiceContainer)
        {
            m_analysisServiceContainer = analysisServiceContainer;

            ConfigurationService = (ConfigurationService)m_analysisServiceContainer.GetService(typeof(ConfigurationService));

            m_hwmDelta = new HighWaterMark <int>(Constants.HwmDelta);
            ConfigurationService.RegisterHighWaterMarkWithSession(m_hwmDelta);
            m_changeGroupService = (ChangeGroupService)m_analysisServiceContainer.GetService(typeof(ChangeGroupService));
            m_changeGroupService.RegisterDefaultSourceSerializer(new TfsMigrationItemSerialzier());
        }
Example #5
0
 public override void InitializeServices(IServiceContainer migrationServiceContainer)
 {
     TraceManager.TraceInformation("POC:MP:InitializevicesSer");
     m_migrationServiceContainer = migrationServiceContainer;
     m_changeGroupService        = (ChangeGroupService)m_migrationServiceContainer.GetService(typeof(ChangeGroupService));
     Debug.Assert(m_changeGroupService != null, "Change group service is not initialized");
     m_configurationService = (ConfigurationService)m_migrationServiceContainer.GetService(typeof(ConfigurationService));
     Debug.Assert(m_configurationService != null, "Configuration service is not initialized");
     m_changeGroupService.RegisterDefaultSourceSerializer(new PocVCMigrationItemSerializer());
     pocUtil = new PocUtil();
 }
 /// <summary>
 /// Initialize method.
 /// </summary>
 public void InitializeServices(IServiceContainer migrationServiceContainer)
 {
     m_migrationServiceContainer = migrationServiceContainer;
     m_changeGroupService        = (ChangeGroupService)m_migrationServiceContainer.GetService(typeof(ChangeGroupService));
     m_changeGroupService.RegisterDefaultSourceSerializer(new TfsFileSystemMigrationItemSerializer());
     Debug.Assert(m_changeGroupService != null, "Change group service is not initialized");
     m_configurationService = (ConfigurationService)m_migrationServiceContainer.GetService(typeof(ConfigurationService));
     Debug.Assert(m_configurationService != null, "Configuration service is not initialized");
     m_eventService             = (EventService)m_migrationServiceContainer.GetService(typeof(EventService));
     m_changeGroupHighWaterMark = new HighWaterMark <long>("LastChangeGroupMigratedHighWaterMark");
     m_configurationService.RegisterHighWaterMarkWithSession(m_changeGroupHighWaterMark);
 }
Example #7
0
        /// <summary>
        /// Initialize method of the analysis provider - acquire references to the services provided by the platform.
        /// </summary>
        /// <param name="analysisServiceContainer"></param>
        public void InitializeServices(IServiceContainer analysisServiceContainer)
        {
            m_analysisServiceContainer = analysisServiceContainer;

            m_configurationService = (ConfigurationService)m_analysisServiceContainer.GetService(typeof(ConfigurationService));
            m_hwmDelta             = new HighWaterMark <DateTime>(Constants.HwmDelta);
            m_configurationService.RegisterHighWaterMarkWithSession(m_hwmDelta);
            m_hwmEventId = new HighWaterMark <long>("HWMCCEventId");
            m_configurationService.RegisterHighWaterMarkWithSession(m_hwmEventId);
            m_changeGroupService = (ChangeGroupService)m_analysisServiceContainer.GetService(typeof(ChangeGroupService));
            m_changeGroupService.RegisterDefaultSourceSerializer(new ClearCaseV6MigrationItemSerialzier());
        }
        public override void InitializeServices(IServiceContainer analysisServiceContainer)
        {
            TraceManager.TraceInformation("WSSWIT:MP:InitializeServices");
            if (analysisServiceContainer == null)
            {
                throw new ArgumentNullException("analysisServiceContainer");
            }

            this.configurationService = (ConfigurationService)analysisServiceContainer.GetService(typeof(ConfigurationService));
            ChangeGroupService changeGroupService = (ChangeGroupService)analysisServiceContainer.GetService(typeof(ChangeGroupService));

            changeGroupService.RegisterDefaultSourceSerializer(new SharePointWITMigrationItemSerializer());
        }
Example #9
0
        /// <summary>
        /// Initialize method.
        /// </summary>
        public void InitializeServices(IServiceContainer migrationServiceContainer)
        {
            m_migrationServiceContainer = migrationServiceContainer;
            m_changeGroupService        = (ChangeGroupService)m_migrationServiceContainer.GetService(typeof(ChangeGroupService));
            if (m_alternativeSerializer == null)
            {
                m_changeGroupService.RegisterDefaultSourceSerializer(new ClearCaseV6MigrationItemSerialzier());
            }
            else
            {
                m_changeGroupService.RegisterDefaultSourceSerializer(m_alternativeSerializer);
            }
            Debug.Assert(m_changeGroupService != null, "Change group service is not initialized");
            m_configurationService = (ConfigurationService)m_migrationServiceContainer.GetService(typeof(ConfigurationService));
            Debug.Assert(m_configurationService != null, "Configuration service is not initialized");
            m_eventService             = (EventService)m_migrationServiceContainer.GetService(typeof(EventService));
            m_commentDecorationService = (ICommentDecorationService)m_migrationServiceContainer.GetService(typeof(ICommentDecorationService));
            Debug.Assert(m_commentDecorationService != null, "Comment decoration service is not initialized");
            m_changeGroupHighWaterMark = new HighWaterMark <long>("LastChangeGroupMigratedHighWaterMark");
            m_configurationService.RegisterHighWaterMarkWithSession(m_changeGroupHighWaterMark);
            if (m_hwmLastSyncedTfsChangeset != null)
            {
                m_configurationService.RegisterHighWaterMarkWithSession(m_hwmLastSyncedTfsChangeset);
            }

            foreach (BusinessModel.VC.Setting setting in m_configurationService.VcCustomSetting.Settings.Setting)
            {
                if (string.Equals(
                        setting.SettingKey, MigrationToolkitResources.VCSetting_DisableTargetAnalysis, StringComparison.OrdinalIgnoreCase))
                {
                    if (string.Equals(setting.SettingValue, "True", StringComparison.OrdinalIgnoreCase))
                    {
                        m_overrideTargetChange = true;
                        break;
                    }
                }
            }
        }
Example #10
0
        /// <summary>
        /// Initialize method of the analysis provider - acquire references to the services provided by the platform.
        /// </summary>
        /// <param name="analysisServiceContainer"></param>
        public void InitializeServices(IServiceContainer analysisServiceContainer)
        {
            m_analysisServiceContainer = analysisServiceContainer;

            m_configurationService = (ConfigurationService)m_analysisServiceContainer.GetService(typeof(ConfigurationService));
            m_hwmDelta             = new HighWaterMark <DateTime>(Constants.HwmDelta);
            m_configurationService.RegisterHighWaterMarkWithSession(m_hwmDelta);
            m_lastTfsChangesetAnalyzed = new HighWaterMark <int>(TFSFileSystemAdapterConstants.HwmLastTfsChangesetAnalyzed);
            m_configurationService.RegisterHighWaterMarkWithSession(m_lastTfsChangesetAnalyzed);
            m_lastHighWaterMarkMigratedToPeer = new HighWaterMark <int>(Constants.HwmMigrated);
            m_configurationService.RegisterHighWaterMarkWithSession(m_lastHighWaterMarkMigratedToPeer, m_configurationService.MigrationPeer);
            m_changeGroupService = (ChangeGroupService)m_analysisServiceContainer.GetService(typeof(ChangeGroupService));
            m_changeGroupService.RegisterDefaultSourceSerializer(new TfsFileSystemMigrationItemSerializer());
            m_branchConfiguration = new TfsFileSystemConfiguration(m_configurationService);
        }
        /// <summary>
        /// Initializes the services.
        /// </summary>
        /// <param name="migrationService">The migration service.</param>
        public override void InitializeServices(IServiceContainer migrationService)
        {
            TraceManager.TraceInformation("WSSVC:MP:InitializevicesSer");
            this.migrationServiceContainer = migrationService;
            changeGroupService             = (ChangeGroupService)this.migrationServiceContainer.GetService(typeof(ChangeGroupService));
            Debug.Assert(changeGroupService != null, "Change group service is not initialized");

            configurationService = (ConfigurationService)this.migrationServiceContainer.GetService(typeof(ConfigurationService));
            Debug.Assert(configurationService != null, "Configuration service is not initialized");
            changeGroupService.RegisterDefaultSourceSerializer(new SharePointVCMigrationItemSerializer());

            sourceIdentifier = configurationService.MigrationSource.SourceIdentifier;

            string username = string.Empty;
            string password = string.Empty;

            foreach (CustomSetting customSetting in configurationService.MigrationSource.CustomSettings.CustomSetting)
            {
                switch (customSetting.SettingKey)
                {
                case "username":
                {
                    username = customSetting.SettingValue;
                    break;
                }

                case "password":
                {
                    password = customSetting.SettingValue;
                    break;
                }
                }
            }

            NetworkCredential credentials = new NetworkCredential(username, password);

            sharePointWriteUtilities = new SharePointWriteUtil(configurationService.MigrationSource.ServerUrl, credentials, configurationService.Workspace);
        }
Example #12
0
        /// <summary>
        /// Initialize the adapter services
        /// </summary>
        /// <param name="analysisServiceContainer"></param>
        public void InitializeServices(IServiceContainer analysisServiceContainer)
        {
            m_analysisServiceContainer = analysisServiceContainer;

            m_changeGroupService = (ChangeGroupService)m_analysisServiceContainer.GetService(typeof(ChangeGroupService));
            Debug.Assert(m_changeGroupService != null, "Change group service is not initialized");

            m_changeGroupService.RegisterDefaultSourceSerializer(new ClearQuestRecordItemSerializer());
            //m_changeGroupService.RegisterSourceSerializer(
            //    WellKnownChangeActionId.SyncContext, new WorkItemContextSyncMigrationItemSerializer());
            m_changeGroupService.RegisterSourceSerializer(
                WellKnownChangeActionId.AddAttachment, new ClearQuestAttachmentItemSerializer());
            m_changeGroupService.RegisterSourceSerializer(
                WellKnownChangeActionId.DelAttachment, new ClearQuestAttachmentItemSerializer());

            m_configurationService = (ConfigurationService)m_analysisServiceContainer.GetService(typeof(ConfigurationService));
            Debug.Assert(m_configurationService != null, "Configuration service is not initialized");

            m_conflictManagerService = m_analysisServiceContainer.GetService(typeof(ConflictManager)) as ConflictManager;

            m_hwmDelta = new HighWaterMark <DateTime>(ClearQuestConstants.CqRecordHwm);
            m_configurationService.RegisterHighWaterMarkWithSession(m_hwmDelta);
        }
        public void InitializeServices(IServiceContainer migrationServiceContainer)
        {
            m_migrationServiceContainer = migrationServiceContainer;

            m_changeGroupService = (ChangeGroupService)m_migrationServiceContainer.GetService(typeof(ChangeGroupService));
            Debug.Assert(m_changeGroupService != null, "Change group service is not initialized");

            m_changeGroupService.RegisterDefaultSourceSerializer(new ClearQuestRecordItemSerializer());
            //m_changeGroupService.RegisterSourceSerializer(
            //    WellKnownChangeActionId.SyncContext, new WorkItemContextSyncMigrationItemSerializer());
            m_changeGroupService.RegisterSourceSerializer(
                WellKnownChangeActionId.AddAttachment, new ClearQuestAttachmentItemSerializer());
            m_changeGroupService.RegisterSourceSerializer(
                WellKnownChangeActionId.DelAttachment, new ClearQuestAttachmentItemSerializer());

            m_configurationService = (ConfigurationService)m_migrationServiceContainer.GetService(typeof(ConfigurationService));
            Debug.Assert(m_configurationService != null, "Configuration service is not initialized");

            m_commentDecorationService = (ICommentDecorationService)m_migrationServiceContainer.GetService(typeof(ICommentDecorationService));
            Debug.Assert(m_commentDecorationService != null, "Comment decoration service is not initialized");

            m_conflictManagerService = migrationServiceContainer.GetService(typeof(ConflictManager)) as ConflictManager;
        }