public static void SaveProvider(ExtensionUrlProviderInfo provider) { provider.ExtensionUrlProviderId = DataProvider.Instance().AddExtensionUrlProvider( provider.ExtensionUrlProviderId, provider.DesktopModuleId, provider.ProviderName, provider.ProviderType, provider.SettingsControlSrc, provider.IsActive, provider.RewriteAllUrls, provider.RedirectAllUrls, provider.ReplaceAllUrls); }
/// ----------------------------------------------------------------------------- /// <summary> /// The Install method installs the UrlProvider component /// </summary> /// ----------------------------------------------------------------------------- public override void Install() { try { //Ensure DesktopModule Cache is cleared DataCache.RemoveCache(String.Format(DataCache.DesktopModuleCacheKey, Null.NullInteger)); var desktopModule = DesktopModuleController.GetDesktopModuleByModuleName(_desktopModuleName, Null.NullInteger); if (desktopModule != null) { _extensionUrlProvider.DesktopModuleId = desktopModule.DesktopModuleID; } //Attempt to get the Desktop Module _installedExtensionUrlProvider = ExtensionUrlProviderController.GetProviders(Null.NullInteger) .SingleOrDefault(p => p.ProviderType == _extensionUrlProvider.ProviderType); if (_installedExtensionUrlProvider != null) { _extensionUrlProvider.ExtensionUrlProviderId = _installedExtensionUrlProvider.ExtensionUrlProviderId; } ExtensionUrlProviderController.SaveProvider(_extensionUrlProvider); Completed = true; Log.AddInfo(string.Format(Util.URLPROVIDER_Registered, _extensionUrlProvider.ProviderName)); } catch (Exception ex) { Log.AddFailure(ex); } }
/// ----------------------------------------------------------------------------- /// <summary> /// The ReadManifest method reads the manifest file for the compoent. /// </summary> /// ----------------------------------------------------------------------------- public override void ReadManifest(XPathNavigator manifestNav) { _extensionUrlProvider = new ExtensionUrlProviderInfo { ProviderName = Util.ReadElement(manifestNav, "urlProvider/name", Log, Util.URLPROVIDER_NameMissing), ProviderType = Util.ReadElement(manifestNav, "urlProvider/type", Log, Util.URLPROVIDER_TypeMissing), SettingsControlSrc = Util.ReadElement(manifestNav, "urlProvider/settingsControlSrc"), IsActive = true, RedirectAllUrls = Convert.ToBoolean(Util.ReadElement(manifestNav, "urlProvider/redirectAllUrls", "false")), ReplaceAllUrls = Convert.ToBoolean(Util.ReadElement(manifestNav, "urlProvider/replaceAllUrls", "false")), RewriteAllUrls = Convert.ToBoolean(Util.ReadElement(manifestNav, "urlProvider/rewriteAllUrls", "false")) }; _desktopModuleName = Util.ReadElement(manifestNav, "urlProvider/desktopModule"); if (Log.Valid) { Log.AddInfo(Util.URLPROVIDER_ReadSuccess); } }
public static void SaveProvider(ExtensionUrlProviderInfo provider) { provider.ExtensionUrlProviderId = DataProvider.Instance().AddExtensionUrlProvider( provider.ExtensionUrlProviderId, provider.DesktopModuleId, provider.ProviderName, provider.ProviderType, provider.SettingsControlSrc, provider.IsActive, provider.RewriteAllUrls, provider.RedirectAllUrls, provider.ReplaceAllUrls); }
public static void DeleteProvider(ExtensionUrlProviderInfo urlProvider) { DataProvider.Instance().DeleteExtensionUrlProvider(urlProvider.ExtensionUrlProviderId); ClearCache(); }
public static void DeleteProvider(ExtensionUrlProviderInfo urlProvider) { DataProvider.Instance().DeleteExtensionUrlProvider(urlProvider.ExtensionUrlProviderId); ClearCache(); }