protected override void StampChangesOn(IConfigurable dataObject) { RuleStorage ruleStorage = (RuleStorage)dataObject; ruleStorage.ResetChangeTracking(true); base.PsRulePresentationObject = new PsHoldRule(ruleStorage); PsHoldRule psHoldRule = (PsHoldRule)base.PsRulePresentationObject; base.PsRulePresentationObject.PopulateTaskProperties(this, base.DataSession as IConfigurationSession); if (base.PsRulePresentationObject.ReadOnly) { throw new TaskRuleIsTooAdvancedToModifyException(base.PsRulePresentationObject.Name); } if (ruleStorage.Mode == Mode.PendingDeletion) { base.WriteError(new ErrorCommonComplianceRuleIsDeletedException(ruleStorage.Name), ErrorCategory.InvalidOperation, null); } base.StampChangesOn(dataObject); this.CopyExplicitParameters(); if (!Utils.ValidateContentDateParameter(psHoldRule.ContentDateFrom, psHoldRule.ContentDateTo)) { throw new InvalidContentDateFromAndContentDateToPredicateException(); } if (!psHoldRule.GetTaskActions().Any <PsComplianceRuleActionBase>()) { base.WriteError(new RuleContainsNoActionsException(psHoldRule.Name), ErrorCategory.InvalidData, psHoldRule); } psHoldRule.UpdateStorageProperties(this, base.DataSession as IConfigurationSession, false); }
protected override void StampChangesOn(IConfigurable dataObject) { RuleStorage ruleStorage = (RuleStorage)dataObject; ruleStorage.ResetChangeTracking(true); AuditConfigurationRule auditConfigurationRule = new AuditConfigurationRule(dataObject as RuleStorage); auditConfigurationRule.PopulateTaskProperties(); if (ruleStorage.Mode == Mode.PendingDeletion) { base.WriteError(new ErrorCommonComplianceRuleIsDeletedException(ruleStorage.Name), ErrorCategory.InvalidOperation, null); } base.StampChangesOn(dataObject); auditConfigurationRule.CopyChangesFrom(base.DynamicParametersInstance); auditConfigurationRule.AuditOperation = this.AuditOperation; auditConfigurationRule.UpdateStorageProperties(); }