/// <summary> /// returns a single ExternalService object from an ObjectId string passed in. /// </summary> /// <param name="pConnectionServer"> /// Connection server that the service is homed on. /// </param> /// <param name="pObjectId"> /// The ObjectId of the service to load /// </param> /// <param name="pExternalService"> /// The out param that the filled out instance of the ExternalService class is returned on. /// </param> /// <param name="pDisplayName"> /// Optional display name /// </param> /// <returns> /// Instance of the WebCallResults class containing details of the items sent and recieved from the CUPI interface. /// </returns> public static WebCallResult GetExternalService(out ExternalService pExternalService, ConnectionServerRest pConnectionServer, string pObjectId, string pDisplayName = "") { WebCallResult res = new WebCallResult { Success = false }; pExternalService = null; if (pConnectionServer == null) { res.ErrorText = "Null Connection server object passed to GetExternalService"; return(res); } if (string.IsNullOrEmpty(pObjectId) & string.IsNullOrEmpty(pDisplayName)) { res.ErrorText = "Empty objectId and DisplayName passed to GetExternalService"; return(res); } //create a new ExternalService instance passing the ObjectId (or display name) which fills out the data automatically try { pExternalService = new ExternalService(pConnectionServer, pObjectId, pDisplayName); res.Success = true; } catch (UnityConnectionRestException ex) { return(ex.WebCallResult); } catch (Exception ex) { res.ErrorText = "Failed to fetch external service in GetExternalService:" + ex.Message; } return(res); }
/// <summary> /// Adds a new Office 365 service account /// </summary> /// <param name="pConnectionServer"> /// The Connection server to add the service to /// </param> /// <param name="pDisplayName"> /// Name of the service to add. Display name should be unique among external services. /// </param> /// <param name="pServiceAlias"></param> /// <param name="pServicePassword"></param> /// <param name="pServerName"></param> /// <param name="oNewSerive"></param> /// <returns> /// Instance of the WebCallResults class containing details of the items sent and recieved from the CUPI interface. /// </returns> public static WebCallResult AddOffice365ExternalService(ConnectionServerRest pConnectionServer, string pDisplayName, string pServiceAlias, string pServicePassword, string pServerName, out ExternalService oNewSerive) { oNewSerive = null; var res = AddOffice365ExternalService(pConnectionServer, pDisplayName, pServiceAlias, pServicePassword, pServerName); if (res.Success) { return(GetExternalService(out oNewSerive, pConnectionServer, res.ReturnedObjectId)); } return(res); }
/// <summary> /// Adds a new Exchange service account /// </summary> /// <param name="pConnectionServer"> /// The Connection server to add the service to /// </param> /// <param name="pDisplayName"> /// Name of the service to add. Display name should be unique among external services. /// </param> /// <param name="pServiceAlias"></param> /// <param name="pServicePassword"></param> /// <param name="pServerName"></param> /// <param name="pAuthenticationMode"></param> /// <param name="pExchangeServerType"></param> /// <param name="pSecurityTransportType"></param> /// <param name="oNewSerive"></param> /// <returns> /// Instance of the WebCallResults class containing details of the items sent and recieved from the CUPI interface. /// </returns> public static WebCallResult AddExchangeExternalService(ConnectionServerRest pConnectionServer, string pDisplayName, string pServiceAlias, string pServicePassword, string pServerName, AuthenticationMode pAuthenticationMode, ExchServerType pExchangeServerType, SecurityTransportType pSecurityTransportType, out ExternalService oNewSerive) { oNewSerive = null; var res = AddExchangeExternalService(pConnectionServer, pDisplayName, pServiceAlias, pServicePassword, pServerName, pAuthenticationMode, pExchangeServerType, pSecurityTransportType); if (res.Success) { return(GetExternalService(out oNewSerive, pConnectionServer, res.ReturnedObjectId)); } return(res); }
/// <summary> /// Adds a new Meeting Place service account /// </summary> /// <param name="pConnectionServer"> /// The Connection server to add the service to /// </param> /// <param name="pDisplayName"> /// Name of the service to add. Display name should be unique among external services. /// </param> /// <param name="pServiceAlias"></param> /// <param name="pServicePassword"></param> /// <param name="pServerName"></param> /// <param name="pTransferExtensionDialString"></param> /// <param name="oNewSerive"></param> /// <returns> /// Instance of the WebCallResults class containing details of the items sent and recieved from the CUPI interface. /// </returns> public static WebCallResult AddMeetingPlaceExternalService(ConnectionServerRest pConnectionServer, string pDisplayName, string pServiceAlias, string pServicePassword, string pServerName, string pTransferExtensionDialString, out ExternalService oNewSerive) { oNewSerive = null; var res = AddMeetingPlaceExternalService(pConnectionServer, pDisplayName, pServiceAlias, pServicePassword, pServerName, pTransferExtensionDialString); if (res.Success) { return(GetExternalService(out oNewSerive, pConnectionServer, res.ReturnedObjectId)); } return(res); }