Esempio n. 1
0
 private static void AddAdditionalFoldersForCalendarVersionSearch(List <StoreId> folderScope, DefaultFolderContext context)
 {
     if (CalendarVersionStoreValidation.IsIncludeSeriesMeetingMessagesInCVSEnabled(context) && context[DefaultFolderType.ParkedMessages] != null)
     {
         folderScope.Add(context[DefaultFolderType.ParkedMessages]);
     }
 }
Esempio n. 2
0
        protected override void SetPropertiesInternal(DefaultFolderContext context, Folder folder)
        {
            base.SetPropertiesInternal(context, folder);
            SearchFolder searchFolder = (SearchFolder)folder;

            searchFolder.Save();
            searchFolder.ApplyContinuousSearch(CalendarVersionStoreValidation.CreateCalendarVersionSearchCriteria(context));
            searchFolder.Load();
        }
Esempio n. 3
0
        internal static SearchFolderCriteria CreateCalendarVersionSearchCriteria(DefaultFolderContext context)
        {
            List <StoreId> list = new List <StoreId>();

            list.Add(context[DefaultFolderType.Root]);
            if (context[DefaultFolderType.RecoverableItemsRoot] != null)
            {
                list.Add(context[DefaultFolderType.RecoverableItemsRoot]);
            }
            CalendarVersionStoreValidation.AddAdditionalFoldersForCalendarVersionSearch(list, context);
            return(new SearchFolderCriteria(CalendarVersionStoreValidation.GetCalendarVersionQueryFilter(context), list.ToArray())
            {
                DeepTraversal = true
            });
        }
Esempio n. 4
0
        internal override bool EnsureIsValid(DefaultFolderContext context, Folder folder)
        {
            if (!base.EnsureIsValid(context, folder) || !(folder is SearchFolder))
            {
                return(false);
            }
            SearchFolder         searchFolder         = (SearchFolder)folder;
            SearchFolderCriteria searchFolderCriteria = CalendarVersionStoreValidation.CreateCalendarVersionSearchCriteria(context);
            SearchFolderCriteria searchCriteria       = searchFolder.GetSearchCriteria();

            if (!SearchFolderValidation.MatchSearchFolderCriteria(searchCriteria, searchFolderCriteria))
            {
                searchFolder.ApplyContinuousSearch(searchFolderCriteria);
            }
            return(true);
        }
Esempio n. 5
0
        private static QueryFilter GetCalendarVersionQueryFilter(DefaultFolderContext context)
        {
            List <string> list = new List <string>
            {
                "IPM.Appointment",
                "IPM.Schedule.Meeting",
                "IPM.Schedule.Inquiry",
                "IPM.Notification.Meeting",
                "IPM.OLE.CLASS.{00061055-0000-0000-C000-000000000046}"
            };

            if (CalendarVersionStoreValidation.IsIncludeSeriesMeetingMessagesInCVSEnabled(context))
            {
                list.Add("IPM.AppointmentSeries");
                list.Add("IPM.MeetingMessageSeries");
                list.Add("IPM.Parked.MeetingMessage");
            }
            return(new OrFilter(CalendarVersionStoreValidation.GetItemSubClassQueryFilter(list)));
        }