protected override void BeginWork()
        {
            base.BeginWork();

            _reprocessJobParameter =(ConversionReprocessJobBeo)XmlUtility.DeserializeObject(BootParameters, typeof (ConversionReprocessJobBeo));

            var baseConfig = ReconversionDAO.GetJobConfigInfo(Convert.ToInt32(_reprocessJobParameter.OrginialJobId));

            _lawSyncJobParameter =(LawSyncBEO) XmlUtility.DeserializeObject(baseConfig.BootParameters, typeof (LawSyncBEO));

            _dataset = DataSetBO.GetDataSetDetailForDataSetId(_lawSyncJobParameter.DatasetId);
            var field =_dataset.DatasetFieldList.FirstOrDefault(f => f.FieldType.DataTypeId == Constants.DCNFieldTypeId);
            if (field != null) _dcnFieldName = field.Name;
            
            var lawField=_dataset.DatasetFieldList.FirstOrDefault(f => f.Name == EVSystemFields.LawDocumentId);
            if (lawField != null) _lawFieldId = lawField.ID;

            if (_lawSyncJobParameter.IsProduceImage)
            {
                _jobEVImagesDirectory = LawVolumeHelper.GetJobImageFolder(WorkAssignment.JobId,
                    _lawSyncJobParameter.LawCaseId);
                _volumeCount++;
                _volumeFolderName = LawVolumeHelper.CreateVolumeFolder(_jobEVImagesDirectory, _volumeCount);
            }

            _vaultManager = EVUnityContainer.Resolve<IDocumentVaultManager>(Constants.DocumentVaultManager);
        }
Beispiel #2
0
        protected override void BeginWork()
        {
            base.BeginWork();

            _reprocessJobParameter = (ConversionReprocessJobBeo)XmlUtility.DeserializeObject(BootParameters, typeof(ConversionReprocessJobBeo));

            var baseConfig = ReconversionDAO.GetJobConfigInfo(Convert.ToInt32(_reprocessJobParameter.OrginialJobId));

            _lawSyncJobParameter = (LawSyncBEO)XmlUtility.DeserializeObject(baseConfig.BootParameters, typeof(LawSyncBEO));

            _dataset = DataSetBO.GetDataSetDetailForDataSetId(_lawSyncJobParameter.DatasetId);
            var field = _dataset.DatasetFieldList.FirstOrDefault(f => f.FieldType.DataTypeId == Constants.DCNFieldTypeId);

            if (field != null)
            {
                _dcnFieldName = field.Name;
            }

            var lawField = _dataset.DatasetFieldList.FirstOrDefault(f => f.Name == EVSystemFields.LawDocumentId);

            if (lawField != null)
            {
                _lawFieldId = lawField.ID;
            }

            if (_lawSyncJobParameter.IsProduceImage)
            {
                _jobEVImagesDirectory = LawVolumeHelper.GetJobImageFolder(WorkAssignment.JobId,
                                                                          _lawSyncJobParameter.LawCaseId);
                _volumeCount++;
                _volumeFolderName = LawVolumeHelper.CreateVolumeFolder(_jobEVImagesDirectory, _volumeCount);
            }

            _vaultManager = EVUnityContainer.Resolve <IDocumentVaultManager>(Constants.DocumentVaultManager);
        }
 protected override void BeginWork()
 {
     base.BeginWork();
     documentConversionTimeout       = ConversionHelper.GetDocumentConversionTimeout();
     documentGlobalConversionTimeout = ConversionHelper.GetDocumentGlobalConversionTimeout();
     documentVaultMngr = EVUnityContainer.Resolve <IDocumentVaultManager>("DocumentVaultManager");
 }
Beispiel #4
0
        /// <summary>
        /// Begins the work.
        /// </summary>
        protected override void BeginWork()
        {
            base.BeginWork();

            _conversionResultsExportJobParam =
                Utils.SmartXmlDeserializer(BootParameters) as ConversionResultsExportJobParam;

            //Pre conditions
            _conversionResultsExportJobParam.ShouldNotBe(null);
            _conversionResultsExportJobParam.TargetFileName.ShouldNotBeEmpty();
            _conversionResultsExportJobParam.MatterId.ShouldBeGreaterThan(0);
            _conversionResultsExportJobParam.JobId.ShouldBeGreaterThan(0);

            //documentVaultManager = EVUnityContainer.Resolve<IDocumentVaultManager>(Constants.DocumentVaultManager);
            _documentVaultManager = new DocumentVaultManager();
            _documentVaultManager.Init(_conversionResultsExportJobParam.MatterId);

            var fileInfo = new FileInfo(_conversionResultsExportJobParam.TargetFileName);

            fileInfo.ShouldNotBe(null);

            fileInfo.Directory.Create();

            _fileStream = new FileStream(fileInfo.FullName, FileMode.Create, FileAccess.Write, FileShare.Read);


            _textWriter = new StreamWriter(_fileStream);

            const string header =
                "DCN,CrossReferenceId,Status,Reason,ErrorDetails,LastModifiedDate,FileSize,MimeType,Documentset,FilePath";

            _textWriter.WriteLine(header);

            _iterator = ReadConversionResults().GetEnumerator();
        }
        /// <summary>
        /// Begins the work.
        /// </summary>
        protected override void BeginWork()
        {
            base.BeginWork();

            _conversionResultsExportJobParam =
                Utils.SmartXmlDeserializer(BootParameters) as ConversionResultsExportJobParam;

            //Pre conditions
            _conversionResultsExportJobParam.ShouldNotBe(null);
            _conversionResultsExportJobParam.TargetFileName.ShouldNotBeEmpty();
            _conversionResultsExportJobParam.MatterId.ShouldBeGreaterThan(0);
            _conversionResultsExportJobParam.JobId.ShouldBeGreaterThan(0);

            //documentVaultManager = EVUnityContainer.Resolve<IDocumentVaultManager>(Constants.DocumentVaultManager);
            _documentVaultManager = new DocumentVaultManager();
            _documentVaultManager.Init(_conversionResultsExportJobParam.MatterId);

            var fileInfo = new FileInfo(_conversionResultsExportJobParam.TargetFileName);

            fileInfo.ShouldNotBe(null);

            fileInfo.Directory.Create();

            _fileStream = new FileStream(fileInfo.FullName, FileMode.Create, FileAccess.Write, FileShare.Read);

           
            _textWriter = new StreamWriter(_fileStream);

            const string header =
                "DCN,CrossReferenceId,Status,Reason,ErrorDetails,LastModifiedDate,FileSize,MimeType,Documentset,FilePath";
           
            _textWriter.WriteLine(header);

            _iterator = ReadConversionResults().GetEnumerator();
        }
 protected override void BeginWork()
 {
      base.BeginWork();
     _documentConversionTimeout = ConversionHelper.GetDocumentConversionTimeout();
     _documentConverisonGlobalTimeout = ConversionHelper.GetDocumentGlobalConversionTimeout();
     _vaultManager = EVUnityContainer.Resolve<IDocumentVaultManager>(Constants.DocumentVaultManager);
 }
 protected override void BeginWork()
 {
     base.BeginWork();
     _documentConversionTimeout       = ConversionHelper.GetDocumentConversionTimeout();
     _documentConverisonGlobalTimeout = ConversionHelper.GetDocumentGlobalConversionTimeout();
     _vaultManager = EVUnityContainer.Resolve <IDocumentVaultManager>(Constants.DocumentVaultManager);
 }
Beispiel #8
0
 protected override void BeginWork()
 {
     base.BeginWork();
     documentConversionTimeout       = ConversionHelper.GetDocumentConversionTimeout();
     documentConverisonGlobalTimeout = ConversionHelper.GetDocumentGlobalConversionTimeout();
     documentVaultMngr     = EVUnityContainer.Resolve <IDocumentVaultManager>("DocumentVaultManager");
     m_DatasetVaultManager = new DataSetVaultManager();
     m_BootParameters      = Utils.Deserialize <ProductionDetailsBEO>(BootParameters);
 }
        protected override void BeginWork()
        {

            base.BeginWork();
            documentConversionTimeout = ConversionHelper.GetDocumentConversionTimeout();
            documentConverisonGlobalTimeout = ConversionHelper.GetDocumentGlobalConversionTimeout();
            documentVaultMngr = EVUnityContainer.Resolve<IDocumentVaultManager>("DocumentVaultManager"); 
            m_DatasetVaultManager = new DataSetVaultManager();
            m_BootParameters = Utils.Deserialize<ProductionDetailsBEO>(BootParameters);
       }
 protected override void BeginWork()
 {
     base.BeginWork();
     var hostId = ServerConnectivity.GetHostIPAddress();
     _redactitPushUrl = CmgServiceConfigBO.GetServiceConfigurationsforConfig
         (hostId, External.DataAccess.Constants.SystemConfigurationService, Constants.QueueServerUrl);
     _redactitTimeout = ApplicationConfigurationManager.GetValue(Constants.RedactItTimeout, Constants.NearNativeViewerSection);
     var baseServiceUri = new Uri(CmgServiceConfigBO.GetServiceConfigurationsforConfig(Constants.WcfHostUrl));
     var lawServiceUri = new Uri(baseServiceUri, Constants.LawSyncConversionCallBackMethod);
     _redactitCallbackUrl = lawServiceUri.OriginalString;
     _vaultManager = EVUnityContainer.Resolve<IDocumentVaultManager>(Constants.DocumentVaultManager);
 }
        /// <summary>
        /// Begins the worker process.
        /// </summary>
        protected override void BeginWork()
        {
            base.BeginWork();
            int nearNativePriority         = -100;
            var edocsNDcbPipeLineTypeNames = new List <string>()
            {
                Constants.EdocsImport, Constants.ImportDcbPipeLineTypeName
            };
            var loadFilePipeLineTypeNames = new List <string>()
            {
                Constants.ImportLoadFileAppendPipeLineTypeName,
                Constants.ImportLoadFileOverlayPipeLineTypeName
            };

            try
            {
                if (!string.IsNullOrEmpty(PipelineType.Moniker))
                {
                    if (edocsNDcbPipeLineTypeNames.Contains(PipelineType.Moniker))
                    {
                        var importJobParameters = GetJobParameters <ProfileBEO>(BootParameters) as ProfileBEO;
                        importJobParameters.ShouldNotBe(null);
                        nearNativePriority  = importJobParameters.NearNativeConversionPriority;
                        isNativeSetIncluded = true;
                    }
                    else if (PipelineType.Moniker.Contains(Constants.ImportLoadFilePipeLineTypeName) ||
                             loadFilePipeLineTypeNames.Contains(PipelineType.Moniker))
                    {
                        var importJobParameters = GetJobParameters <ImportBEO>(BootParameters) as ImportBEO;
                        importJobParameters.ShouldNotBe(null);
                        nearNativePriority  = importJobParameters.NearNativeConversionPriority;
                        isNativeSetIncluded = importJobParameters.IsImportNativeFiles;
                    }
                    else if (PipelineType.Moniker.Equals(Constants.ImportLawPipeLineTypeName))
                    {
                        var importJobParameters = GetJobParameters <LawImportBEO>(BootParameters) as LawImportBEO;
                        importJobParameters.ShouldNotBe(null);
                        nearNativePriority  = importJobParameters.NearNativeConversionPriority;
                        isNativeSetIncluded = importJobParameters.IsImportNative;
                    }
                }

                vaultManager = EVUnityContainer.Resolve <IDocumentVaultManager>(Worker.Constants.DocumentVaultManager);
            }
            catch (Exception ex)
            {
                ex.AddUsrMsg("Problem in reading the near native conversion priority");
                ex.Trace().Swallow();
                ReportToDirector(ex);
                //LogMessage(false, ex.ToUserString());
            }
            m_Converter = new NearNativeConversionAdapter(true, WorkAssignment.JobId.ToString(CultureInfo.InvariantCulture), nearNativePriority);
        }
Beispiel #12
0
        protected override void BeginWork()
        {
            base.BeginWork();
            var hostId = ServerConnectivity.GetHostIPAddress();

            _redactitPushUrl = CmgServiceConfigBO.GetServiceConfigurationsforConfig
                                   (hostId, External.DataAccess.Constants.SystemConfigurationService, Constants.QueueServerUrl);
            _redactitTimeout = ApplicationConfigurationManager.GetValue(Constants.RedactItTimeout, Constants.NearNativeViewerSection);
            var baseServiceUri = new Uri(CmgServiceConfigBO.GetServiceConfigurationsforConfig(Constants.WcfHostUrl));
            var lawServiceUri  = new Uri(baseServiceUri, Constants.LawSyncConversionCallBackMethod);

            _redactitCallbackUrl = lawServiceUri.OriginalString;
            _vaultManager        = EVUnityContainer.Resolve <IDocumentVaultManager>(Constants.DocumentVaultManager);
        }
Beispiel #13
0
 protected override void BeginWork()
 {
     base.BeginWork();
     try
     {
         _vaultManager = EVUnityContainer.Resolve <IDocumentVaultManager>(Constants.DocumentVaultManager);
         BootObject    = GetBootObject <ConversionReprocessJobBeo>(BootParameters);
         BootObject.ShouldNotBe(null);
         Tracer.Info("Conversion priority {0}", BootObject.NearNativeConversionPriority);
     }
     catch (Exception ex)
     {
         LogMessage(false, "ReconversionStartup worker failed: " + ex.Message);
         throw;
     }
 }
 /// <summary>
 /// Begins the worker process.
 /// </summary>
 protected override void BeginWork()
 {
     base.BeginWork();
     try
     {
         _mDocumentVaultMngr = EVUnityContainer.Resolve <IDocumentVaultManager>("DocumentVaultManager");
         _isReprocessJob     = !string.IsNullOrEmpty(PipelineType.Moniker) &&
                               PipelineType.Moniker.ToLower().Contains("conversionreprocess");
         _conversionPriority = GetConversionPriority();
         Tracer.Info("Conversion priority {0}", _conversionPriority);
     }
     catch (Exception ex)
     {
         ex.Trace().Swallow();
     }
 }
        /// <summary>
        /// Begins the worker process.
        /// </summary>
        protected override void BeginWork()
        {
            base.BeginWork();
            try
            {
                _mDocumentVaultMngr = EVUnityContainer.Resolve<IDocumentVaultManager>("DocumentVaultManager");
                _isReprocessJob = !string.IsNullOrEmpty(PipelineType.Moniker) &&
                                  PipelineType.Moniker.ToLower().Contains("conversionreprocess");
                _conversionPriority = GetConversionPriority();
                Tracer.Info("Conversion priority {0}",_conversionPriority);

            }
            catch (Exception ex)
            {
                ex.Trace().Swallow();
            }
        }
Beispiel #16
0
 protected override void BeginWork()
 {
     base.BeginWork();
     try
     {
         _documentVaultMngr = new DocumentVaultManager();
         var _jobParameter =
             (ProductionDetailsBEO)XmlUtility.DeserializeObject(BootParameters, typeof(ProductionDetailsBEO));
         _jobParameter.ShouldNotBe(null);
         _mMatterId = _jobParameter.MatterId.ToString();
         SetCommiyIndexStatusToInitialized(Convert.ToInt64(_mMatterId));
     }
     catch (Exception ex)
     {
         ex.Trace().Swallow();
     }
 }
 protected override void BeginWork()
 {
     base.BeginWork();
     try
     {
         _documentVaultMngr = new DocumentVaultManager();
         var _jobParameter =
        (ProductionDetailsBEO)XmlUtility.DeserializeObject(BootParameters, typeof(ProductionDetailsBEO));
         _jobParameter.ShouldNotBe(null);
         _mMatterId = _jobParameter.MatterId.ToString();
         SetCommiyIndexStatusToInitialized(Convert.ToInt64(_mMatterId));
         
     }
     catch (Exception ex)
     {
         ex.Trace().Swallow();
     }
 }
        protected override void BeginWork()
        {
            base.BeginWork();
            _jobParameter = (LawSyncBEO)XmlUtility.DeserializeObject(BootParameters, typeof(LawSyncBEO));

            #region "Assertion"
            _jobParameter.DatasetId.ShouldBeGreaterThan(0);
            _jobParameter.MatterId.ShouldBeGreaterThan(0);
            #endregion
            try
            {
                //Get DCN field name
                _dataset = GetDatasetDetails(_jobParameter.DatasetId, _jobParameter.MatterId);
                var field =
                    _dataset.DatasetFieldList.FirstOrDefault(f => f.FieldType.DataTypeId == Constants.DCNFieldTypeId);
                if (field != null)
                {
                    _dcnFieldName = field.Name;
                }

                var lawField = _dataset.DatasetFieldList.FirstOrDefault(f => f.Name == EVSystemFields.LawDocumentId);
                if (lawField != null)
                {
                    _lawFieldId = lawField.ID;
                }

                //Create Volume for Images
                if (_jobParameter.IsProduceImage)
                {
                    _jobEVImagesDirectory = LawVolumeHelper.GetJobImageFolder(WorkAssignment.JobId,
                                                                              _jobParameter.LawCaseId);
                    _volumeCount++;
                    _volumeFolderName = LawVolumeHelper.CreateVolumeFolder(_jobEVImagesDirectory, _volumeCount);
                }
                _vaultManager = EVUnityContainer.Resolve <IDocumentVaultManager>(Constants.DocumentVaultManager);
            }
            catch (Exception ex)
            {
                ex.Trace();
                ReportToDirector(ex);
                ConstructLog(Constants.LawSyncStartupFailureMessage);
                throw;
            }
        }
Beispiel #19
0
 /// <summary>
 /// Begins the work.
 /// Absorb the boot parameters, deserialize and pass on the messages to the Search Worker
 /// </summary>
 protected override void BeginWork()
 {
     base.BeginWork();
     try
     {
         // Deserialize and determine the boot object
         BootObject = GetBootObject <ConversionReprocessJobBeo>(BootParameters);
         BootObject.ShouldNotBe(null);
         vaultManager = EVUnityContainer.Resolve <IDocumentVaultManager>(Constants.DocumentVaultManager);
     }
     catch (ApplicationException apEx)
     {
         LogMessage(false, apEx.Message);
         throw;
     }
     catch (Exception ex)
     {
         LogMessage(false, "ReconversionStartup worker failed: " + ex.Message);
         throw;
     }
 }
        protected override void BeginWork()
        {
            base.BeginWork();
            _jobParameter = (LawSyncBEO) XmlUtility.DeserializeObject(BootParameters, typeof (LawSyncBEO));

            #region "Assertion"
            _jobParameter.DatasetId.ShouldBeGreaterThan(0);
            _jobParameter.MatterId.ShouldBeGreaterThan(0);
            #endregion
            try
            {
                //Get DCN field name
                _dataset = GetDatasetDetails(_jobParameter.DatasetId, _jobParameter.MatterId);
                var field =
                    _dataset.DatasetFieldList.FirstOrDefault(f => f.FieldType.DataTypeId == Constants.DCNFieldTypeId);
                if (field != null) _dcnFieldName = field.Name;

                var lawField = _dataset.DatasetFieldList.FirstOrDefault(f => f.Name == EVSystemFields.LawDocumentId);
                if (lawField != null) _lawFieldId = lawField.ID;

                //Create Volume for Images
                if (_jobParameter.IsProduceImage)
                {
                    _jobEVImagesDirectory = LawVolumeHelper.GetJobImageFolder(WorkAssignment.JobId,
                        _jobParameter.LawCaseId);
                    _volumeCount++;
                    _volumeFolderName = LawVolumeHelper.CreateVolumeFolder(_jobEVImagesDirectory, _volumeCount);
                }
                _vaultManager = EVUnityContainer.Resolve<IDocumentVaultManager>(Constants.DocumentVaultManager);
            }
            catch (Exception ex)
            {
                ex.Trace();
                ReportToDirector(ex);
                ConstructLog(Constants.LawSyncStartupFailureMessage);
                throw;
            }
        }
        /// <summary>
        /// Begins the work.
        /// </summary>
        protected override void BeginWork()
        {
            base.BeginWork();
            _mBootParameters = GetProductionDetailsBusinessEntity(BootParameters);
            _mBootParameters.ShouldNotBe(null);
            _mBootParameters.Profile.ShouldNotBe(null);
            _mBootParameters.Profile.ProductionSetName.ShouldNotBeEmpty();
            if (!Directory.Exists(_mBootParameters.Profile.ProductionSetLocation))
            {
                Tracer.Warning(Constants.ProductionsetStartError);
                LogMessage(false, ConMessageProductionSetLocation);
                throw new Exception(ConMessageProductionSetLocation);
            }
            _vaultManager = EVUnityContainer.Resolve<IDocumentVaultManager>(Constants.DocumentVaultManager);
            _mProductionDocumentDetail = ProductionStartupHelper.ConstructProductionModelDocument(_mBootParameters);
            _batesPrefix = _mProductionDocumentDetail.Profile.ProductionPrefix ?? string.Empty;
            _dpnPrefix = _mProductionDocumentDetail.Profile.DpnPrefix ?? string.Empty;
            _mCreatedBy = _mBootParameters.CreatedBy;
            _mDatasetId = _mBootParameters.SearchCriteria.SelectedDatasets[0];
            _isPathValid = true;
            GetVolumeSettings(_mProductionDocumentDetail.ExtractionLocation);

            var dataset = DataSetBO.GetDataSetDetailForDataSetId(Convert.ToInt64(_mDatasetId));
            var field = dataset.DatasetFieldList.FirstOrDefault(f => f.FieldType.DataTypeId == Constants.DCNFieldTypeId);
            if (field != null) _dcnField = field.Name;

            MockSession();
            //CNEV3.1 - Design Specification - Production update - Call Production BO methods for creating the production tags 
            //CNEV3.1 - Design Specification - Production update - Refactor the worker such a way that worker is just a shim and it just calls the respective business methods 
           

            ReadProductionBatchSize();
        }
 protected override void BeginWork()
 {
     base.BeginWork();
     _vaultManager = EVUnityContainer.Resolve<IDocumentVaultManager>(Constants.DocumentVaultManager);
 }
Beispiel #23
0
 protected override void BeginWork()
 {
     base.BeginWork();
     _vaultManager = EVUnityContainer.Resolve <IDocumentVaultManager>(Constants.DocumentVaultManager);
 }