Exemplo n.º 1
0
 protected override void InternalValidate()
 {
     base.InternalValidate();
     try
     {
         ForeignConnectorTaskUtil.CheckTopology();
     }
     catch (LocalizedException exception)
     {
         base.WriteError(exception, ErrorCategory.InvalidOperation, base.DataObject);
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
 }