Beispiel #1
0
        protected override void SaveObjectToStore(AuditLogSearchBase searchBase)
        {
            AdminAuditLogSearch adminAuditLogSearch = (AdminAuditLogSearch)searchBase;

            using (AdminAuditLogSearchItem adminAuditLogSearchItem = new AdminAuditLogSearchItem(base.MailboxSession, base.Folder))
            {
                Guid guid = ((AuditLogSearchId)adminAuditLogSearch.Identity).Guid;
                adminAuditLogSearchItem.Identity               = guid;
                adminAuditLogSearchItem.Name                   = adminAuditLogSearch.Name;
                adminAuditLogSearchItem.StartDate              = new ExDateTime(ExTimeZone.UtcTimeZone, adminAuditLogSearch.StartDateUtc.Value);
                adminAuditLogSearchItem.EndDate                = new ExDateTime(ExTimeZone.UtcTimeZone, adminAuditLogSearch.EndDateUtc.Value);
                adminAuditLogSearchItem.StatusMailRecipients   = adminAuditLogSearch.StatusMailRecipients;
                adminAuditLogSearchItem.CreatedBy              = adminAuditLogSearch.CreatedBy;
                adminAuditLogSearchItem.CreatedByEx            = adminAuditLogSearch.CreatedByEx;
                adminAuditLogSearchItem.Cmdlets                = adminAuditLogSearch.Cmdlets;
                adminAuditLogSearchItem.Parameters             = adminAuditLogSearch.Parameters;
                adminAuditLogSearchItem.ObjectIds              = adminAuditLogSearch.ObjectIds;
                adminAuditLogSearchItem.ExternalAccess         = adminAuditLogSearch.ExternalAccess;
                adminAuditLogSearchItem.RawUserIds             = adminAuditLogSearch.UserIds;
                adminAuditLogSearchItem.ResolvedUsers          = adminAuditLogSearch.ResolvedUsers;
                adminAuditLogSearchItem.RedactDatacenterAdmins = adminAuditLogSearch.RedactDatacenterAdmins;
                adminAuditLogSearchItem.Save(SaveMode.ResolveConflicts);
                AuditQueuesOpticsLogData auditQueuesOpticsLogData = new AuditQueuesOpticsLogData
                {
                    QueueType      = AuditQueueType.AsyncAdminSearch,
                    EventType      = QueueEventType.Queue,
                    CorrelationId  = guid.ToString(),
                    OrganizationId = base.MailboxSession.OrganizationId,
                    QueueLength    = base.Folder.ItemCount + 1
                };
                auditQueuesOpticsLogData.Log();
            }
        }
        protected override void SaveObjectToStore(AuditLogSearchBase searchBase)
        {
            MailboxAuditLogSearch mailboxAuditLogSearch = (MailboxAuditLogSearch)searchBase;

            using (MailboxAuditLogSearchItem mailboxAuditLogSearchItem = new MailboxAuditLogSearchItem(base.MailboxSession, base.Folder))
            {
                Guid guid = ((AuditLogSearchId)mailboxAuditLogSearch.Identity).Guid;
                mailboxAuditLogSearchItem.Identity             = guid;
                mailboxAuditLogSearchItem.Name                 = mailboxAuditLogSearch.Name;
                mailboxAuditLogSearchItem.StartDate            = new ExDateTime(ExTimeZone.UtcTimeZone, mailboxAuditLogSearch.StartDateUtc.Value);
                mailboxAuditLogSearchItem.EndDate              = new ExDateTime(ExTimeZone.UtcTimeZone, mailboxAuditLogSearch.EndDateUtc.Value);
                mailboxAuditLogSearchItem.StatusMailRecipients = mailboxAuditLogSearch.StatusMailRecipients;
                mailboxAuditLogSearchItem.CreatedBy            = mailboxAuditLogSearch.CreatedBy;
                mailboxAuditLogSearchItem.CreatedByEx          = mailboxAuditLogSearch.CreatedByEx;
                mailboxAuditLogSearchItem.MailboxIds           = mailboxAuditLogSearch.Mailboxes;
                mailboxAuditLogSearchItem.LogonTypeStrings     = mailboxAuditLogSearch.LogonTypes;
                mailboxAuditLogSearchItem.Operations           = mailboxAuditLogSearch.Operations;
                mailboxAuditLogSearchItem.ShowDetails          = mailboxAuditLogSearch.ShowDetails;
                mailboxAuditLogSearchItem.ExternalAccess       = mailboxAuditLogSearch.ExternalAccess;
                mailboxAuditLogSearchItem.Save(SaveMode.ResolveConflicts);
                AuditQueuesOpticsLogData auditQueuesOpticsLogData = new AuditQueuesOpticsLogData
                {
                    QueueType      = AuditQueueType.AsyncMailboxSearch,
                    EventType      = QueueEventType.Queue,
                    CorrelationId  = guid.ToString(),
                    OrganizationId = base.MailboxSession.OrganizationId,
                    QueueLength    = base.Folder.ItemCount + 1
                };
                auditQueuesOpticsLogData.Log();
            }
        }
Beispiel #3
0
        internal override void Initialize(AuditLogSearchBase item)
        {
            MailboxAuditLogSearch mailboxAuditLogSearch = (MailboxAuditLogSearch)item;

            base.Initialize(item);
            this.Mailboxes   = mailboxAuditLogSearch.Mailboxes;
            this.LogonTypes  = mailboxAuditLogSearch.LogonTypes;
            this.Operations  = mailboxAuditLogSearch.Operations;
            this.ShowDetails = (mailboxAuditLogSearch.ShowDetails ?? false);
        }
Beispiel #4
0
        public override string ToString()
        {
            StringBuilder stringBuilder = new StringBuilder(base.ToString());

            stringBuilder.AppendLine();
            AuditLogSearchBase.AppendStringSearchTerm(stringBuilder, "LogonTypes", this.LogonTypes);
            AuditLogSearchBase.AppendStringSearchTerm(stringBuilder, "Operations", this.Operations);
            stringBuilder.AppendLine();
            stringBuilder.AppendFormat("ShowDetails={0}", this.ShowDetails);
            return(stringBuilder.ToString());
        }
Beispiel #5
0
 internal virtual void Initialize(AuditLogSearchBase item)
 {
     this.SetId(item.Identity);
     this.Name                 = item.Name;
     this.StartDateUtc         = item.StartDateUtc;
     this.EndDateUtc           = item.EndDateUtc;
     this.StatusMailRecipients = AuditLogSearchBase.ConvertToSmtpAddressMVP(item.StatusMailRecipients);
     this.CreatedBy            = item.CreatedBy;
     this.CreatedByEx          = item.CreatedByEx;
     this.ExternalAccess       = (string.IsNullOrEmpty(item.ExternalAccess) ? null : new bool?(bool.Parse(item.ExternalAccess)));
     this.CreationTime         = item.CreationTime;
 }
Beispiel #6
0
 protected override IEnumerable <T> InternalFindPaged <T>(QueryFilter filter, ObjectId rootId, bool deepSearch, SortBy sortBy, int pageSize)
 {
     foreach (VersionedId messageId in this.FindMessageIds(rootId, sortBy, true))
     {
         using (AuditLogSearchItemBase requestItem = this.GetItemFromStore(messageId))
         {
             AuditLogSearchBase request = (AuditLogSearchBase)((object)((default(T) == null) ? Activator.CreateInstance <T>() : default(T)));
             request.Initialize(requestItem);
             yield return((T)((object)request));
         }
     }
     yield break;
 }
Beispiel #7
0
        internal override void Initialize(AuditLogSearchBase item)
        {
            AdminAuditLogSearch adminAuditLogSearch = (AdminAuditLogSearch)item;

            base.Initialize(item);
            this.Cmdlets                = adminAuditLogSearch.Cmdlets;
            this.Parameters             = adminAuditLogSearch.Parameters;
            this.ObjectIds              = adminAuditLogSearch.ObjectIds;
            this.UserIds                = adminAuditLogSearch.UserIds;
            this.ResolvedUsers          = adminAuditLogSearch.ResolvedUsers;
            this.RedactDatacenterAdmins = adminAuditLogSearch.RedactDatacenterAdmins;
            this.Succeeded              = null;
            this.StartIndex             = 0;
            this.ResultSize             = 50000;
        }
Beispiel #8
0
        public override string ToString()
        {
            StringBuilder stringBuilder = new StringBuilder(base.ToString());

            stringBuilder.AppendLine();
            AuditLogSearchBase.AppendStringSearchTerm(stringBuilder, "Cmdlets", this.Cmdlets);
            stringBuilder.AppendLine();
            AuditLogSearchBase.AppendStringSearchTerm(stringBuilder, "Parameters", this.Parameters);
            stringBuilder.AppendLine();
            AuditLogSearchBase.AppendStringSearchTerm(stringBuilder, "ObjectIds", this.ObjectIds);
            stringBuilder.AppendLine();
            AuditLogSearchBase.AppendStringSearchTerm(stringBuilder, "UserIds", this.UserIds);
            stringBuilder.AppendLine();
            stringBuilder.AppendFormat("Succeeded={0}", this.Succeeded);
            return(stringBuilder.ToString());
        }
Beispiel #9
0
 protected virtual void SaveObjectToStore(AuditLogSearchBase search)
 {
     throw new NotImplementedException();
 }
Beispiel #10
0
 private void SaveRequest(AuditLogSearchBase search)
 {
     throw new NotImplementedException();
 }