Beispiel #1
0
 protected override void InternalValidate()
 {
     base.InternalValidate();
     try
     {
         ForeignConnectorTaskUtil.CheckTopology();
     }
     catch (LocalizedException exception)
     {
         base.WriteError(exception, ErrorCategory.InvalidOperation, base.DataObject);
     }
 }
Beispiel #2
0
 protected override void InternalValidate()
 {
     base.InternalValidate();
     try
     {
         ForeignConnectorTaskUtil.CheckTopology();
         ForeignConnectorTaskUtil.ValidateObject(this.DataObject, (IConfigurationSession)base.DataSession, this);
     }
     catch (MultiSiteSourceServersException ex)
     {
         base.WriteWarning(ex.Message);
     }
     catch (LocalizedException exception)
     {
         base.WriteError(exception, ErrorCategory.InvalidOperation, this.DataObject);
     }
 }
Beispiel #3
0
        protected override IConfigurable PrepareDataObject()
        {
            ForeignConnector foreignConnector = (ForeignConnector)base.PrepareDataObject();

            if (!MultiValuedPropertyBase.IsNullOrEmpty(this.SourceTransportServers))
            {
                foreignConnector.SourceTransportServers = base.ResolveIdParameterCollection <ServerIdParameter, Server, ADObjectId>(this.SourceTransportServers, base.DataSession, this.RootId, null, (ExchangeErrorCategory)0, new Func <IIdentityParameter, LocalizedString>(Strings.ErrorServerNotFound), new Func <IIdentityParameter, LocalizedString>(Strings.ErrorServerNotUnique), null, null);
            }
            else
            {
                Server server = null;
                try
                {
                    server = ((ITopologyConfigurationSession)base.DataSession).ReadLocalServer();
                }
                catch (TransientException exception)
                {
                    base.WriteError(exception, ErrorCategory.ResourceUnavailable, this.DataObject);
                }
                if (ForeignConnectorTaskUtil.IsHubServer(server))
                {
                    foreignConnector.SourceTransportServers = new MultiValuedProperty <ADObjectId>(false, SendConnectorSchema.SourceTransportServers, new ADObjectId[]
                    {
                        server.Id
                    });
                }
            }
            if (!MultiValuedPropertyBase.IsNullOrEmpty(foreignConnector.SourceTransportServers))
            {
                ManageSendConnectors.SetConnectorHomeMta(foreignConnector, (IConfigurationSession)base.DataSession);
            }
            if (string.IsNullOrEmpty(foreignConnector.DropDirectory))
            {
                foreignConnector.DropDirectory = foreignConnector.Name;
            }
            ManageSendConnectors.SetConnectorId(foreignConnector, ((ITopologyConfigurationSession)base.DataSession).GetRoutingGroupId());
            return(foreignConnector);
        }
 public static void ValidateObject(ForeignConnector connector, IConfigurationSession session, Task task)
 {
     ForeignConnectorTaskUtil.ValidateSourceServers(connector, session, task);
     ForeignConnectorTaskUtil.ValidateDropDirectory(connector);
 }