protected PINInfo ValidateOrGeneratePIN(string pin, Guid umUserMailboxPolicyGuid) { ADUser dataObject = this.DataObject; PINInfo pininfo = null; try { using (IUMUserMailboxStorage umuserMailboxAccessor = InterServerMailboxAccessor.GetUMUserMailboxAccessor(dataObject, false)) { pininfo = umuserMailboxAccessor.ValidateUMPin(pin, umUserMailboxPolicyGuid); } } catch (LocalizedException ex) { base.WriteError(new RecipientTaskException(Strings.ValidateGeneratePINError(dataObject.PrimarySmtpAddress.ToString(), ex.LocalizedString), ex), ErrorCategory.NotSpecified, null); } if (!pininfo.IsValid) { if (string.IsNullOrEmpty(pin)) { base.WriteError(new DefaultPinGenerationException(), ErrorCategory.NotSpecified, null); } else { base.WriteError(this.CreateWeakPinException(dataObject), ErrorCategory.InvalidArgument, null); } } return(pininfo); }
protected override IConfigurable ConvertDataObjectToPresentationObject(IConfigurable dataObject) { PINInfo pininfo = null; ADUser aduser = dataObject as ADUser; this.userObject = aduser; if (UMSubscriber.IsValidSubscriber(aduser)) { this.matchFound = true; try { using (IUMUserMailboxStorage umuserMailboxAccessor = InterServerMailboxAccessor.GetUMUserMailboxAccessor(aduser, false)) { pininfo = umuserMailboxAccessor.GetUMPin(); } goto IL_84; } catch (LocalizedException ex) { throw new InvalidOperationForGetUMMailboxPinException(Strings.GetPINInfoError(aduser.PrimarySmtpAddress.ToString(), ex.LocalizedString), ex); } goto IL_64; IL_84: return(new UMMailboxPin(aduser, pininfo.PinExpired, pininfo.LockedOut, pininfo.FirstTimeUser, base.NeedSuppressingPiiData)); } IL_64: throw new InvalidOperationForGetUMMailboxPinException(Strings.InvalidUMUserName(aduser.PrimarySmtpAddress.ToString())); }
protected override void ProcessMailbox() { try { using (IUMCallDataRecordStorage umcallDataRecordsAcessor = InterServerMailboxAccessor.GetUMCallDataRecordsAcessor(this.DataObject)) { UMReportRawCounters[] umcallSummary = umcallDataRecordsAcessor.GetUMCallSummary(this.dialPlanGuid, this.gatewayGuid, this.GroupBy); if (umcallSummary != null) { this.WriteAsConfigObjects(umcallSummary); } } } catch (StorageTransientException exception) { base.WriteError(exception, ErrorCategory.ReadError, null); } catch (StoragePermanentException exception2) { base.WriteError(exception2, ErrorCategory.ReadError, null); } catch (CDROperationException exception3) { base.WriteError(exception3, ErrorCategory.ReadError, null); } catch (EWSUMMailboxAccessException exception4) { base.WriteError(exception4, ErrorCategory.ReadError, null); } }
protected void ResetUMMailbox(bool keepProperties) { ADUser dataObject = this.DataObject; try { using (IUMUserMailboxStorage umuserMailboxAccessor = InterServerMailboxAccessor.GetUMUserMailboxAccessor(dataObject, false)) { umuserMailboxAccessor.ResetUMMailbox(keepProperties); } } catch (LocalizedException ex) { base.WriteError(new RecipientTaskException(Strings.ResetUMMailboxError(dataObject.PrimarySmtpAddress.ToString(), ex.LocalizedString), ex), ErrorCategory.NotSpecified, null); } }
protected void SavePIN(Guid umUserMailboxPolicyGuid) { ADUser dataObject = this.DataObject; try { using (IUMUserMailboxStorage umuserMailboxAccessor = InterServerMailboxAccessor.GetUMUserMailboxAccessor(dataObject, false)) { umuserMailboxAccessor.SaveUMPin(this.PinInfo, umUserMailboxPolicyGuid); } } catch (LocalizedException ex) { base.WriteError(new RecipientTaskException(Strings.SavePINError(dataObject.PrimarySmtpAddress.ToString(), ex.LocalizedString), ex), ErrorCategory.NotSpecified, null); } }
protected override void ProcessMailbox() { try { using (IUMCallDataRecordStorage umcallDataRecordsAcessor = InterServerMailboxAccessor.GetUMCallDataRecordsAcessor(this.DataObject)) { CDRData[] umcallDataRecordsForUser = umcallDataRecordsAcessor.GetUMCallDataRecordsForUser(this.userMailbox.LegacyExchangeDN); if (umcallDataRecordsForUser != null) { this.WriteAsConfigObjects(umcallDataRecordsForUser); } } } catch (StorageTransientException exception) { base.WriteError(exception, ExchangeErrorCategory.ServerTransient, null); } catch (StoragePermanentException exception2) { base.WriteError(exception2, ExchangeErrorCategory.ServerTransient, null); } catch (ContentIndexingNotEnabledException exception3) { base.WriteError(exception3, ExchangeErrorCategory.ServerTransient, null); } catch (CDROperationException exception4) { base.WriteError(exception4, ErrorCategory.ReadError, null); } catch (EWSUMMailboxAccessException exception5) { base.WriteError(exception5, ErrorCategory.ReadError, null); } catch (UnableToFindUMReportDataException) { } }
protected override void ProcessMailbox() { try { ExDateTime exDateTime = this.Date.ToUtc(); ExDateTime startDateTime = new ExDateTime(ExTimeZone.UtcTimeZone, exDateTime.Year, exDateTime.Month, exDateTime.Day); ExDateTime endDateTime = startDateTime.AddDays(1.0); StreamWriter streamWriter = new StreamWriter(this.ClientStream, Encoding.UTF8); streamWriter.WriteCsvLine(this.csvRow.Keys); using (IUMCallDataRecordStorage umcallDataRecordsAcessor = InterServerMailboxAccessor.GetUMCallDataRecordsAcessor(this.DataObject)) { int num = 0; int numberOfRecordsToRead = 5000; if (Utils.RunningInTestMode) { numberOfRecordsToRead = 1; } bool flag; do { flag = false; CDRData[] umcallDataRecords = umcallDataRecordsAcessor.GetUMCallDataRecords(startDateTime.Subtract(this.TimeDelta), endDateTime.Add(this.TimeDelta), num, numberOfRecordsToRead); if (umcallDataRecords != null && umcallDataRecords.Length > 0) { num += umcallDataRecords.Length; this.WriteToStream(umcallDataRecords, streamWriter, startDateTime, endDateTime); flag = true; } streamWriter.Flush(); }while (flag); } } catch (ArgumentException exception) { base.WriteError(exception, ErrorCategory.InvalidArgument, null); } catch (ObjectDisposedException exception2) { base.WriteError(exception2, ErrorCategory.InvalidArgument, null); } catch (IOException exception3) { base.WriteError(exception3, ErrorCategory.WriteError, null); } catch (UnableToFindUMReportDataException exception4) { base.WriteError(exception4, ErrorCategory.ReadError, null); } catch (StorageTransientException exception5) { base.WriteError(exception5, ErrorCategory.ReadError, null); } catch (StoragePermanentException exception6) { base.WriteError(exception6, ErrorCategory.ReadError, null); } catch (HttpException exception7) { base.WriteError(exception7, ErrorCategory.WriteError, null); } catch (CDROperationException exception8) { base.WriteError(exception8, ErrorCategory.ReadError, null); } catch (EWSUMMailboxAccessException exception9) { base.WriteError(exception9, ErrorCategory.ReadError, null); } }