Esempio n. 1
0
        public bool SkipItemOperation(COWSettings settings, IDumpsterItemOperations dumpster, COWTriggerAction operation, COWTriggerActionState state, StoreSession session, StoreObjectId itemId, CoreItem item, bool onBeforeNotification, bool onDumpster, bool success, CallbackContext callbackContext)
        {
            Util.ThrowOnNullArgument(settings, "settings");
            Util.ThrowOnNullArgument(session, "session");
            EnumValidator.ThrowIfInvalid <COWTriggerAction>(operation, "operation");
            EnumValidator.ThrowIfInvalid <COWTriggerActionState>(state, "state");
            if (onDumpster)
            {
                return(true);
            }
            if (COWSettings.IsImapPoisonMessage(onBeforeNotification, operation, session, item))
            {
                return(true);
            }
            switch (operation)
            {
            case COWTriggerAction.Create:
            case COWTriggerAction.ItemBind:
            case COWTriggerAction.Submit:
                break;

            case COWTriggerAction.Update:
                return(!settings.LegalHoldEnabled());

            default:
                if (operation != COWTriggerAction.FolderBind)
                {
                    return(true);
                }
                break;
            }
            return(true);
        }
Esempio n. 2
0
 public bool SkipItemOperation(COWSettings settings, IDumpsterItemOperations dumpster, COWTriggerAction operation, COWTriggerActionState state, StoreSession session, StoreObjectId itemId, CoreItem item, bool onBeforeNotification, bool onDumpster, bool success, CallbackContext callbackContext)
 {
     Util.ThrowOnNullArgument(settings, "settings");
     Util.ThrowOnNullArgument(session, "session");
     Util.ThrowOnNullArgument(dumpster, "dumpster");
     EnumValidator.ThrowIfInvalid <COWTriggerAction>(operation, "operation");
     EnumValidator.ThrowIfInvalid <COWTriggerActionState>(state, "state");
     if (onDumpster)
     {
         ExTraceGlobals.CalendarLoggingTracer.Information <string>((long)session.GetHashCode(), "Skipping calendar COW item operation for user {0}, since the operation is on dumpster", session.UserLegacyDN);
         return(true);
     }
     if (!CalendarLoggingHelper.ShouldLog(operation))
     {
         ExTraceGlobals.CalendarLoggingTracer.Information <string, COWTriggerAction>((long)session.GetHashCode(), "Skipping calendar COW item operation for user {0}, since the trigger action {1} is not interesting", session.UserLegacyDN, operation);
         return(true);
     }
     if (!onBeforeNotification && operation != COWTriggerAction.Update)
     {
         ExTraceGlobals.CalendarLoggingTracer.Information <string>((long)session.GetHashCode(), "Skipping calendar COW item operation for user {0}, since we are only interested in on-before notifications and update trigger actions", session.UserLegacyDN);
         return(true);
     }
     if (COWSettings.IsImapPoisonMessage(onBeforeNotification, operation, session, item))
     {
         ExTraceGlobals.CalendarLoggingTracer.Information <string>((long)session.GetHashCode(), "Skipping calendar COW item operation for user {0}, since the items is marked as IMAP poison message", session.UserLegacyDN);
         return(true);
     }
     if (!settings.IsCalendarLoggingEnabled())
     {
         ExTraceGlobals.CalendarLoggingTracer.Information <string>((long)session.GetHashCode(), "Skipping calendar COW item operation for user {0}, since calendar logging is disabled for this user", session.UserLegacyDN);
         return(true);
     }
     return(false);
 }