Ejemplo n.º 1
0
 protected override void InternalProcessRecord()
 {
     TaskLogger.LogEnter();
     base.InternalProcessRecord();
     FfoDualWriter.SaveToFfo <DomainContentConfig>(this, this.DataObject, null);
     TaskLogger.LogExit();
 }
Ejemplo n.º 2
0
 protected override void InternalProcessRecord()
 {
     TaskLogger.LogEnter();
     base.InternalProcessRecord();
     FfoDualWriter.SaveToFfo <TenantInboundConnector>(this, this.DataObject, null);
     TaskLogger.LogExit();
 }
        protected override void InternalProcessRecord()
        {
            HostedContentFilterRule hostedContentFilterRule = new HostedContentFilterRule(null, base.Name, base.Priority, base.Enabled ? RuleState.Enabled : RuleState.Disabled, base.Comments, base.Conditions, base.Exceptions, new HostedContentFilterPolicyIdParameter(this.policyObject.Name));

            if (this.policyObject.EnableEndUserSpamNotifications && !hostedContentFilterRule.IsEsnCompatible)
            {
                base.WriteError(new OperationNotAllowedException(Strings.ErrorCannotScopeEsnPolicy(this.policyObject.Name)), ErrorCategory.InvalidOperation, null);
            }
            int           priority      = base.Fields.IsModified("Priority") ? hostedContentFilterRule.Priority : -1;
            TransportRule transportRule = null;

            try
            {
                TransportRule        rule = hostedContentFilterRule.ToInternalRule();
                ADRuleStorageManager adruleStorageManager = new ADRuleStorageManager(this.ruleCollectionName, base.DataSession);
                adruleStorageManager.LoadRuleCollection();
                adruleStorageManager.NewRule(rule, this.ResolveCurrentOrganization(), ref priority, out transportRule);
                FfoDualWriter.SaveToFfo <TransportRule>(this, transportRule, TenantSettingSyncLogType.DUALSYNCTR, null);
            }
            catch (RulesValidationException exception)
            {
                base.WriteError(exception, ErrorCategory.InvalidArgument, base.Name);
            }
            catch (InvalidPriorityException exception2)
            {
                base.WriteError(exception2, ErrorCategory.InvalidArgument, null);
            }
            catch (ParserException exception3)
            {
                base.WriteError(exception3, ErrorCategory.InvalidData, null);
            }
            hostedContentFilterRule.Priority = priority;
            hostedContentFilterRule.SetTransportRule(transportRule);
            base.WriteObject(hostedContentFilterRule);
        }
 protected override void InternalProcessRecord()
 {
     TaskLogger.LogEnter();
     if (SharedConfiguration.IsSharedConfiguration(this.DataObject.OrganizationId) && !base.ShouldContinue(Strings.ConfirmSharedConfiguration(this.DataObject.OrganizationId.OrganizationalUnit.Name)))
     {
         TaskLogger.LogExit();
         return;
     }
     base.CreateParentContainerIfNeeded(this.DataObject);
     base.InternalProcessRecord();
     FfoDualWriter.SaveToFfo <HostedContentFilterPolicy>(this, this.DataObject, null);
     TaskLogger.LogExit();
 }
        protected override void InternalProcessRecord()
        {
            TaskLogger.LogEnter();
            if (SharedConfiguration.IsSharedConfiguration(this.DataObject.OrganizationId) && !base.ShouldContinue(Strings.ConfirmSharedConfiguration(this.DataObject.OrganizationId.OrganizationalUnit.Name)))
            {
                TaskLogger.LogExit();
                return;
            }
            HostedContentFilterPolicy hostedContentFilterPolicy = null;

            if (this.MakeDefault && !this.DataObject.IsDefault)
            {
                this.DataObject.IsDefault = true;
                hostedContentFilterPolicy = ((ITenantConfigurationSession)base.DataSession).GetDefaultFilteringConfiguration <HostedContentFilterPolicy>();
                if (hostedContentFilterPolicy != null && hostedContentFilterPolicy.IsDefault)
                {
                    hostedContentFilterPolicy.IsDefault = false;
                    base.DataSession.Save(hostedContentFilterPolicy);
                    FfoDualWriter.SaveToFfo <HostedContentFilterPolicy>(this, hostedContentFilterPolicy, null);
                }
            }
            else if (base.Fields.Contains("MakeDefault") && !this.MakeDefault && this.DataObject.IsDefault)
            {
                base.WriteError(new OperationNotAllowedException(Strings.OperationNotAllowed), ErrorCategory.InvalidOperation, this.MakeDefault);
            }
            try
            {
                base.InternalProcessRecord();
                FfoDualWriter.SaveToFfo <HostedContentFilterPolicy>(this, this.DataObject, null);
                hostedContentFilterPolicy = null;
            }
            finally
            {
                if (hostedContentFilterPolicy != null)
                {
                    hostedContentFilterPolicy.IsDefault = true;
                    base.DataSession.Save(hostedContentFilterPolicy);
                    FfoDualWriter.SaveToFfo <HostedContentFilterPolicy>(this, hostedContentFilterPolicy, null);
                }
            }
            TaskLogger.LogExit();
        }
Ejemplo n.º 6
0
 protected override void InternalProcessRecord()
 {
     base.InternalProcessRecord();
     FfoDualWriter.SaveToFfo <TransportRule>(this, this.DataObject, TenantSettingSyncLogType.DUALSYNCTR, null);
 }
Ejemplo n.º 7
0
 public static void SaveToFfo <T>(Task task, T adObject, string oldName = null) where T : ADObject, new()
 {
     FfoDualWriter.SaveToFfo <T>(task, adObject, TenantSettingSyncLogGenerator.Instance.GetLogType(adObject), oldName);
 }
Ejemplo n.º 8
0
 public void Save <T>(Task task, T adObject) where T : ADObject, new()
 {
     FfoDualWriter.SaveToFfo <T>(task, adObject, this.oldName);
 }
Ejemplo n.º 9
0
        protected override void InternalProcessRecord()
        {
            TaskLogger.LogEnter();
            if (this.makeDefault && !this.DataObject.Default)
            {
                this.DataObject.Default = true;
                ADPagedReader <AcceptedDomain> adpagedReader = ((IConfigurationSession)base.DataSession).FindPaged <AcceptedDomain>(this.DataObject.Id.Parent, QueryScope.OneLevel, null, null, 0);
                foreach (AcceptedDomain acceptedDomain in adpagedReader)
                {
                    if (acceptedDomain.Default)
                    {
                        acceptedDomain.Default = false;
                        base.DataSession.Save(acceptedDomain);
                    }
                }
            }
            if (base.Fields.IsModified(AcceptedDomainSchema.IsCoexistenceDomain) && this.DataObject.IsCoexistenceDomain != this.IsCoexistenceDomain)
            {
                if (!this.IsCoexistenceDomain)
                {
                    try
                    {
                        AcceptedDomainUtility.DeregisterCoexistenceDomain(this.DataObject.DomainName.Domain);
                        goto IL_162;
                    }
                    catch (TimeoutException exception)
                    {
                        base.WriteError(exception, ErrorCategory.InvalidArgument, null);
                        goto IL_162;
                    }
                    catch (InvalidOperationException exception2)
                    {
                        base.WriteError(exception2, ErrorCategory.InvalidArgument, null);
                        goto IL_162;
                    }
                    catch (SecurityAccessDeniedException exception3)
                    {
                        base.WriteError(exception3, ErrorCategory.InvalidArgument, null);
                        goto IL_162;
                    }
                    catch (CommunicationException exception4)
                    {
                        base.WriteError(exception4, ErrorCategory.InvalidArgument, null);
                        goto IL_162;
                    }
                }
                try
                {
                    AcceptedDomainUtility.RegisterCoexistenceDomain(this.DataObject.DomainName.Domain);
                }
                catch (TimeoutException exception5)
                {
                    base.WriteError(exception5, ErrorCategory.InvalidArgument, null);
                }
                catch (InvalidOperationException exception6)
                {
                    base.WriteError(exception6, ErrorCategory.InvalidArgument, null);
                }
                catch (SecurityAccessDeniedException exception7)
                {
                    base.WriteError(exception7, ErrorCategory.InvalidArgument, null);
                }
                catch (CommunicationException exception8)
                {
                    base.WriteError(exception8, ErrorCategory.InvalidArgument, null);
                }
IL_162:
                this.DataObject.IsCoexistenceDomain = this.IsCoexistenceDomain;
            }
            if (base.Fields.IsModified(AcceptedDomainSchema.RawAuthenticationType))
            {
                this.DataObject.RawAuthenticationType = this.AuthenticationType;
            }
            if (base.Fields.IsModified(AcceptedDomainSchema.InitialDomain))
            {
                this.DataObject.InitialDomain = this.InitialDomain;
            }
            if (base.Fields.IsModified(AcceptedDomainSchema.RawLiveIdInstanceType))
            {
                this.DataObject.RawLiveIdInstanceType = this.LiveIdInstanceType;
            }
            if (base.Fields.IsModified(AcceptedDomainSchema.EnableNego2Authentication))
            {
                this.DataObject.EnableNego2Authentication = this.EnableNego2Authentication;
                if (ManagementEndpointBase.IsGlobalDirectoryConfigured())
                {
                    IGlobalDirectorySession globalSession = DirectorySessionFactory.GetGlobalSession(null);
                    globalSession.SetDomainFlag(this.DataObject.Name, GlsDomainFlags.Nego2Enabled, this.EnableNego2Authentication);
                }
            }
            if (base.Fields.IsModified(AcceptedDomainSchema.CatchAllRecipient))
            {
                if (this.resolvedCatchAllRecipient != null)
                {
                    this.DataObject.CatchAllRecipientID = this.resolvedCatchAllRecipient.OriginalId;
                }
                else
                {
                    this.DataObject.CatchAllRecipientID = null;
                }
            }
            if (base.Fields.IsModified(AcceptedDomainSchema.MatchSubDomains))
            {
                this.DataObject.MatchSubDomains = this.MatchSubDomains;
            }
            base.InternalProcessRecord();
            FfoDualWriter.SaveToFfo <AcceptedDomain>(this, this.DataObject, TenantSettingSyncLogType.SYNCACCEPTEDDOM, null);
            TaskLogger.LogExit();
        }