internal MigrationJob GetAndValidateMigrationJob(bool skipCorrupt) { MigrationBatchDataProvider batchProvider = (MigrationBatchDataProvider)base.DataSession; return(MigrationObjectTaskBase <TIdentityParameter> .GetAndValidateMigrationJob(this, batchProvider, (MigrationBatchIdParameter)((object)this.Identity), skipCorrupt, true)); }
protected override void InternalValidate() { MigrationBatchDataProvider migrationBatchDataProvider = (MigrationBatchDataProvider)base.DataSession; bool flag = migrationBatchDataProvider.MigrationSession.Config.IsSupported(MigrationFeature.PAW); migrationBatchDataProvider.MigrationJob = MigrationObjectTaskBase <MigrationBatchIdParameter> .GetAndValidateMigrationJob(this, (MigrationBatchDataProvider)base.DataSession, this.Identity, true, true); if (migrationBatchDataProvider.MigrationJob == null) { MigrationObjectTaskBase <MigrationBatchIdParameter> .WriteJobNotFoundError(this, this.Identity.RawIdentity); } LocalizedString?localizedString; if (!migrationBatchDataProvider.MigrationJob.SupportsSetting(out localizedString)) { if (localizedString == null) { localizedString = new LocalizedString?(Strings.MigrationOperationFailed); } base.WriteError(new MigrationPermanentException(localizedString.Value)); migrationBatchDataProvider.MigrationJob = null; } if (this.CSVData != null && !migrationBatchDataProvider.MigrationJob.SupportsAppendingUsers(out localizedString)) { if (localizedString == null) { localizedString = new LocalizedString?(Strings.MigrationOperationFailed); } base.WriteError(new MigrationPermanentException(localizedString.Value)); migrationBatchDataProvider.MigrationJob = null; } if (this.AllowIncrementalSyncs != null) { if (migrationBatchDataProvider.MigrationJob.Status == MigrationJobStatus.Stopped && !migrationBatchDataProvider.MigrationJob.AutoStop && this.AllowIncrementalSyncs.Value) { base.WriteError(new MigrationPermanentException(Strings.MigrationPleaseUseStartForReenablingIncremental)); } else if (migrationBatchDataProvider.MigrationJob.Status == MigrationJobStatus.SyncCompleted && !this.AllowIncrementalSyncs.Value) { base.WriteError(new MigrationPermanentException(Strings.MigrationPleaseUseStopForDisablingIncremental)); } if (migrationBatchDataProvider.MigrationJob.Status != MigrationJobStatus.Created && !MigrationJobStage.Sync.IsStatusSupported(migrationBatchDataProvider.MigrationJob.Status) && !MigrationJobStage.Incremental.IsStatusSupported(migrationBatchDataProvider.MigrationJob.Status)) { base.WriteError(new MigrationPermanentException(Strings.MigrationAutoStopForInProgressOnly)); } if (this.AllowIncrementalSyncs.Value != migrationBatchDataProvider.MigrationJob.AutoStop) { base.WriteError(new MigrationPermanentException(Strings.MigrationAutoStopAlreadySet)); } } if (migrationBatchDataProvider.MigrationJob.MigrationType == MigrationType.ExchangeLocalMove && base.IsFieldSet("LargeItemLimit")) { base.WriteError(new MigrationPermanentException(Strings.MigrationNoLargeItemLimitForLocalBatches)); } if (this.ReportInterval != null && !flag) { base.WriteError(new MigrationPermanentException(Strings.MigrationReportIntervalParameterInvalid)); } if (base.IsFieldSet("SourcePublicFolderDatabase")) { this.ValidateSourcePublicFolderDatabase(migrationBatchDataProvider.MigrationJob); } this.ValidateSchedulingParameters(migrationBatchDataProvider.MigrationJob); base.InternalValidate(); }