public PreValidationOrchestrationSfService( IPopulationService preValidationPopulationService, IErrorLookupPopulationService errorLookupPopulationService, ILearnerPerActorProviderService learnerPerActorProviderService, ILearnerDPPerActorProviderService learnerDPPerActorProviderService, IJsonSerializationService jsonSerializationService, IInternalDataCache internalDataCache, IExternalDataCache externalDataCache, IFileDataCache fileDataCache, IValidationErrorCache <U> validationErrorCache, IValidationOutputService validationOutputService, IRuleSetOrchestrationService <IMessage, U> ruleSetOrchestrationService, ILogger logger) { _preValidationPopulationService = preValidationPopulationService; _errorLookupPopulationService = errorLookupPopulationService; _learnerPerActorProviderService = learnerPerActorProviderService; _learnerDPPerActorProviderService = learnerDPPerActorProviderService; _jsonSerializationService = jsonSerializationService; _internalDataCache = internalDataCache; _externalDataCache = externalDataCache; _fileDataCache = fileDataCache; _validationErrorCache = validationErrorCache; _validationOutputService = validationOutputService; _ruleSetOrchestrationService = ruleSetOrchestrationService; _logger = logger; }
public PreValidationOrchestrationSfService( IPopulationService preValidationPopulationService, ICache <IMessage> messageCache, ILearnerPerActorService learnerPerActorService, IJsonSerializationService jsonSerializationService, IInternalDataCache internalDataCache, IExternalDataCache externalDataCache, IFileDataCache fileDataCache, IValidationErrorCache <U> validationErrorCache, IValidationOutputService <U> validationOutputService, IValidationItemProviderService <IEnumerable <IMessage> > validationItemProviderService, IRuleSetOrchestrationService <IMessage, U> ruleSetOrchestrationService, ILogger logger, IValidateXMLSchemaService validateXMLSchemaService) { _preValidationPopulationService = preValidationPopulationService; _learnerPerActorService = learnerPerActorService; _messageCache = messageCache; _jsonSerializationService = jsonSerializationService; _internalDataCache = internalDataCache; _externalDataCache = externalDataCache; _fileDataCache = fileDataCache; _validationErrorCache = validationErrorCache; _validationOutputService = validationOutputService; _validationItemProviderService = validationItemProviderService; _ruleSetOrchestrationService = ruleSetOrchestrationService; _logger = logger; _validateXmlSchemaService = validateXMLSchemaService; }
/// <summary> /// Конструктор класса. /// </summary> /// <param name="rowChecker">Логика анализа данных файлов по индексу.</param> /// <param name="fileDataCache">Интерфейс, предоставляющий данные из файлов.</param> /// <param name="filesInformationByIndexCacheFactory">Фабрика для IFilesInformationByIndexCache.</param> /// <param name="filesForIndexCacheFactory">Фабрика для IFilesForIndexCache.</param> public IndexedCache( IRowChecker rowChecker, IFileDataCache fileDataCache, IFilesInformationByIndexCacheFactory filesInformationByIndexCacheFactory, IFilesForIndexCacheFactory filesForIndexCacheFactory) { this.rowChecker = rowChecker; this.fileDataCache = fileDataCache; this.filesInformationByIndexCacheFactory = filesInformationByIndexCacheFactory; this.filesForIndexCacheFactory = filesForIndexCacheFactory; this.filesInfoByIndexes = new ConcurrentDictionary<Index, IFilesInformationByIndexCache>(); this.filesForByIndexes = new ConcurrentDictionary<Index, IFilesForIndexCache>(); }
public ConsolePreValidationOrchestrationService( IPopulationService preValidationPopulationService, IRuleSetOrchestrationService <ILearner, U> learnerRuleSetOrchestrationService, IRuleSetOrchestrationService <IMessage, U> messageRuleSetOrchestrationService, IValidationOutputService validationOutputService, IFileDataCache fileDataCache) { _preValidationPopulationService = preValidationPopulationService; _learnerRuleSetOrchestrationService = learnerRuleSetOrchestrationService; _messageRuleSetOrchestrationService = messageRuleSetOrchestrationService; _validationOutputService = validationOutputService; _fileDataCache = fileDataCache; }
public async Task ExecuteAsync(IEasJobContext easJobContext, CancellationToken cancellationToken) { _logger.LogInfo("Reporting Task is called."); try { IEnumerable <ValidationErrorModel> validationErrorModels; IEnumerable <EasCsvRecord> easCsvRecords; IFileDataCache fileDataCache = await _fileDataCacheService.GetFileDataCacheAsync(easJobContext.Ukprn, cancellationToken); if (fileDataCache == null) { List <PaymentType> allPaymentTypes = await _easPaymentService.GetAllPaymentTypes(cancellationToken); List <EasSubmissionValue> easSubmissionValues = await _easSubmissionService.GetEasSubmissionValuesAsync(easJobContext.Ukprn, cancellationToken); var validationErrors = await _validationErrorService.GetValidationErrorsAsync(easJobContext.Ukprn, cancellationToken); easCsvRecords = BuildEasCsvRecords(allPaymentTypes, easSubmissionValues); validationErrorModels = BuildValidationErrorModels(validationErrors); if (easCsvRecords.Any() || validationErrorModels.Any()) { await _reportingController.ProduceReportsAsync(easJobContext, easCsvRecords, validationErrorModels, cancellationToken); } } if (fileDataCache != null && !fileDataCache.FailedFileValidation) { easCsvRecords = fileDataCache.AllEasCsvRecords; validationErrorModels = fileDataCache.ValidationErrors; await _reportingController.ProduceReportsAsync(easJobContext, easCsvRecords, validationErrorModels, cancellationToken); } if (fileDataCache != null && fileDataCache.FailedFileValidation) { _logger.LogError($"Reports are not generated as File- {easJobContext.FileReference} failed file Validation"); } } catch (System.Exception ex) { _logger.LogError("Reporting Task failed", ex); throw; } }
public ActorValidationExecutionProvider( ILearnerPerActorProviderService learnerPerActorProviderService, ILearnerDPPerActorProviderService learnerDPPerActorProviderService, IJsonSerializationService jsonSerializationService, IInternalDataCache internalDataCache, IExternalDataCache externalDataCache, IFileDataCache fileDataCache, IValidationErrorCache validationErrorCache, ILogger logger) { _learnerPerActorProviderService = learnerPerActorProviderService; _learnerDPPerActorProviderService = learnerDPPerActorProviderService; _jsonSerializationService = jsonSerializationService; _internalDataCache = internalDataCache; _externalDataCache = externalDataCache; _fileDataCache = fileDataCache; _validationErrorCache = validationErrorCache; _logger = logger; }
public PreFundingSFOrchestrationService( IJsonSerializationService jsonSerializationService, IIlrFileProviderService ilrFileProviderService, IFundingServiceDto fundingServiceDto, IPopulationService populationService, IActorTask <IALBActor, ALBGlobal> albActorTask, IActorTask <IFM81Actor, FM81Global> fm81ActorTask, IActorTask <IFM70Actor, FM70Global> fm70ActorTask, IActorTask <IFM35Actor, FM35Global> fm35ActorTask, IActorTask <IFM36Actor, FM36Global> fm36ActorTask, IActorTask <IFM25Actor, FM25Global> fm25ActorTask, IKeyValuePersistenceService keyValuePersistenceService, IPagingService <ILearner> learnerPagingService, IExternalDataCache externalDataCache, IInternalDataCache internalDataCache, IFileDataCache fileDataCache, ITopicAndTaskSectionConfig topicAndTaskSectionConfig, ILogger logger) { _jsonSerializationService = jsonSerializationService; _ilrFileProviderService = ilrFileProviderService; _fundingServiceDto = fundingServiceDto; _populationService = populationService; _albActorTask = albActorTask; _fm81ActorTask = fm81ActorTask; _fm70ActorTask = fm70ActorTask; _fm35ActorTask = fm35ActorTask; _fm36ActorTask = fm36ActorTask; _fm25ActorTask = fm25ActorTask; _keyValuePersistenceService = keyValuePersistenceService; _externalDataCache = externalDataCache; _internalDataCache = internalDataCache; _fileDataCache = fileDataCache; _learnerPagingService = learnerPagingService; _topicAndTaskSectionConfig = topicAndTaskSectionConfig; _logger = logger; }
public FileDataCachePopulationService(IFileDataCache fileDataCache, ICache <IMessage> messageCache) { _fileDataCache = fileDataCache; _messageCache = messageCache; }
private FileDataCachePopulationService NewService(IFileDataCache fileDataCache = null, IFileDataRetrievalService ukprnDataRetrievalService = null) { return(new FileDataCachePopulationService(fileDataCache, ukprnDataRetrievalService)); }
public FileDataService NewService(IFileDataCache fileDataCache = null) { return(new FileDataService(fileDataCache)); }
public FileDataCachePopulationService(IFileDataCache fileDataCache) { _fileDataCache = fileDataCache; }
public FileDataService(IFileDataCache fileDataCache) { _fileDataCache = fileDataCache; }
public async Task PopulateFileDataCacheAsync(IFileDataCache fileDataCache, CancellationToken cancellationToken) { string key = string.Format(FILEDATA_BY_UKPRN_KEY, fileDataCache.UkPrn); var fileDataSerialized = _jsonSerializationService.Serialize(fileDataCache); await _keyValuePersistenceService.SaveAsync(key, fileDataSerialized, cancellationToken); }
/// <summary> /// Конструктор класса. /// </summary> /// <param name="cache">Интерфейс, предоставляющий данные из файлов.</param> public SafetyFileDataCache(IFileDataCache cache) { this.cache = cache; this.filesByDates = new ConcurrentDictionary<string, object>(); }
public FileDataCachePopulationService(IFileDataCache fileDataCache, IFileDataRetrievalService ukprnDataRetrievalService) { _fileDataCache = fileDataCache; _fileDataRetrievalService = ukprnDataRetrievalService; }
private CampId_02Rule NewRule(IValidationErrorHandler validationErrorHandler = null, IOrganisationDataService organisationDataService = null, IFileDataCache fileDataCache = null) { return(new CampId_02Rule(organisationDataService: organisationDataService, validationErrorHandler: validationErrorHandler, fileDataCache: fileDataCache)); }
public CampId_02Rule(IOrganisationDataService organisationDataService, IValidationErrorHandler validationErrorHandler, IFileDataCache fileDataCache) : base(validationErrorHandler, RuleNameConstants.CampId_02) { _organisationDataService = organisationDataService; _fileDataCache = fileDataCache; }