From 4122caa16d925bd1754b3bea7df66360d47997e3 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Tue, 24 Feb 2015 23:17:49 -0800 Subject: [PATCH] webdav portal config refactoring --- .../EnterpriseServerElement.cs | 16 + ...DavExplorerConfigurationSettingsSection.cs | 8 + .../Config/WebDavAppConfigManager.cs | 5 + .../Managers/Users/IUserSettingsManager.cs | 3 +- .../Interfaces/Storages/ITtlStorage.cs | 4 +- .../Managers/Users/UserSettingsManager.cs | 3 +- .../WebsitePanel.WebDav.Core.csproj | 16 +- .../Wsp/Framework/WSP.cs | 3 +- .../App_Data/Countries.config | 249 ------ .../App_Data/CountryStates.config | 411 ---------- .../ESModule_ControlsHierarchy.config | 144 ---- .../App_Data/Ecommerce_Modules.config | 137 ---- .../App_Data/Ecommerce_Pages.config | 226 ----- .../App_Data/ModulesData.config | 143 ---- .../App_Data/SiteSettings.config | 43 - .../App_Data/SupportedLocales.config | 4 - .../App_Data/SupportedThemes.config | 4 - .../App_Data/WebsitePanel_Modules.config | 664 --------------- .../App_Data/WebsitePanel_Pages.config | 774 ------------------ .../WebsitePanel.WebDavPortal/Web.config | 4 +- .../WebsitePanel.WebDavPortal.csproj | 19 - 21 files changed, 39 insertions(+), 2841 deletions(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/EnterpriseServerElement.cs delete mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Countries.config delete mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/CountryStates.config delete mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ESModule_ControlsHierarchy.config delete mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Modules.config delete mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Pages.config delete mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ModulesData.config delete mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SiteSettings.config delete mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedLocales.config delete mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedThemes.config delete mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Modules.config delete mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Pages.config diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/EnterpriseServerElement.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/EnterpriseServerElement.cs new file mode 100644 index 00000000..e58704b6 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/EnterpriseServerElement.cs @@ -0,0 +1,16 @@ +using System.Configuration; + +namespace WebsitePanel.WebDav.Core.Config.WebConfigSections +{ + public class EnterpriseServerElement : ConfigurationElement + { + private const string ValueKey = "url"; + + [ConfigurationProperty(ValueKey, IsKey = true, IsRequired = true)] + public string Value + { + get { return (string)this[ValueKey]; } + set { this[ValueKey] = value; } + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs index 029e3565..46c9aa48 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs @@ -9,6 +9,7 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections private const string WebdavRootKey = "webdavRoot"; private const string AuthTimeoutCookieNameKey = "authTimeoutCookieName"; private const string AppName = "applicationName"; + private const string EnterpriseServerUrlNameKey = "enterpriseServer"; private const string WebsitePanelConstantUserKey = "websitePanelConstantUser"; private const string ElementsRenderingKey = "elementsRendering"; private const string Rfc2898CryptographyKey = "rfc2898Cryptography"; @@ -28,6 +29,13 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections set { this[AuthTimeoutCookieNameKey] = value; } } + [ConfigurationProperty(EnterpriseServerUrlNameKey, IsRequired = true)] + public EnterpriseServerElement EnterpriseServerUrl + { + get { return (EnterpriseServerElement)this[EnterpriseServerUrlNameKey]; } + set { this[EnterpriseServerUrlNameKey] = value; } + } + [ConfigurationProperty(WebdavRootKey, IsRequired = true)] public WebdavRootElement WebdavRoot { diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs index 1e5852a4..6256228d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs @@ -47,6 +47,11 @@ namespace WebsitePanel.WebDav.Core.Config get { return _configSection.AuthTimeoutCookieName.Value; } } + public string EnterpriseServerUrl + { + get { return _configSection.EnterpriseServerUrl.Value; } + } + public ElementsRendering ElementsRendering { get; private set; } public WebsitePanelConstantUserParameters WebsitePanelConstantUserParameters { get; private set; } public SessionKeysCollection SessionKeys { get; private set; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/Users/IUserSettingsManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/Users/IUserSettingsManager.cs index 43d8a123..cad99315 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/Users/IUserSettingsManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/Users/IUserSettingsManager.cs @@ -1,5 +1,4 @@ -using WebsitePanel.EnterpriseServer; -using WebsitePanel.WebDav.Core.Entities.Account; +using WebsitePanel.WebDav.Core.Entities.Account; using WebsitePanel.WebDav.Core.Entities.Account.Enums; namespace WebsitePanel.WebDav.Core.Interfaces.Managers.Users diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Storages/ITtlStorage.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Storages/ITtlStorage.cs index f41dfa9f..315792de 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Storages/ITtlStorage.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Storages/ITtlStorage.cs @@ -1,6 +1,4 @@ -using WebsitePanel.Ecommerce.EnterpriseServer; - -namespace WebsitePanel.WebDav.Core.Interfaces.Storages +namespace WebsitePanel.WebDav.Core.Interfaces.Storages { public interface ITtlStorage : IKeyValueStorage { diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/Users/UserSettingsManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/Users/UserSettingsManager.cs index e8fdb29f..5099997d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/Users/UserSettingsManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/Users/UserSettingsManager.cs @@ -1,5 +1,4 @@ -using WebsitePanel.EnterpriseServer; -using WebsitePanel.WebDav.Core.Entities.Account; +using WebsitePanel.WebDav.Core.Entities.Account; using WebsitePanel.WebDav.Core.Entities.Account.Enums; using WebsitePanel.WebDav.Core.Helper; using WebsitePanel.WebDav.Core.Interfaces.Managers.Users; diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj index b2b5e806..da6f7c89 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj @@ -44,8 +44,7 @@ False - ..\..\..\..\Scheduler Domains\WebsitePanel\Bin\Microsoft.Web.Services3.dll - True + ..\..\Bin\Microsoft.Web.Services3.dll @@ -89,13 +88,13 @@ - ..\WebsitePanel.WebPortal\Bin\WebsitePanel.EnterpriseServer.Base.dll + ..\..\Bin\WebsitePanel.EnterpriseServer.Base.dll - ..\WebsitePanel.WebPortal\Bin\WebsitePanel.EnterpriseServer.Client.dll + ..\..\Bin\WebsitePanel.EnterpriseServer.Client.dll - ..\WebsitePanel.WebPortal\Bin\WebsitePanel.Providers.Base.dll + ..\..\Bin\WebsitePanel.Providers.Base.dll @@ -113,6 +112,7 @@ + @@ -196,12 +196,6 @@ - - - {C99EFB18-FFE7-45BB-8CA8-29336F3E8C68} - WebsitePanel.WebPortal - - ResXFileCodeGenerator diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Wsp/Framework/WSP.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Wsp/Framework/WSP.cs index bb91b65d..1a62f030 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Wsp/Framework/WSP.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Wsp/Framework/WSP.cs @@ -34,7 +34,6 @@ using WebsitePanel.EnterpriseServer; using WebsitePanel.EnterpriseServer.HostedSolution; using WebsitePanel.WebDav.Core.Config; using WebsitePanel.WebDav.Core.Security.Cryptography; -using WebsitePanel.WebPortal; namespace WebsitePanel.WebDav.Core.Wsp.Framework { @@ -268,7 +267,7 @@ namespace WebsitePanel.WebDav.Core.Wsp.Framework public void ConfigureEnterpriseServerProxy(WebServicesClientProtocol proxy, bool applyPolicy) { // load ES properties - string serverUrl = PortalConfiguration.SiteSettings["EnterpriseServer"]; + string serverUrl = WebDavAppConfigManager.Instance.EnterpriseServerUrl; EnterpriseServerProxyConfigurator cnfg = new EnterpriseServerProxyConfigurator(); cnfg.EnterpriseServerUrl = serverUrl; diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Countries.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Countries.config deleted file mode 100644 index efcb98ee..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Countries.config +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/CountryStates.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/CountryStates.config deleted file mode 100644 index 8202f271..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/CountryStates.config +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ESModule_ControlsHierarchy.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ESModule_ControlsHierarchy.config deleted file mode 100644 index f2f41087..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ESModule_ControlsHierarchy.config +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Modules.config deleted file mode 100644 index 9a80329a..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Modules.config +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Pages.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Pages.config deleted file mode 100644 index 08a8c928..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Pages.config +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ModulesData.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ModulesData.config deleted file mode 100644 index 54627906..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ModulesData.config +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SiteSettings.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SiteSettings.config deleted file mode 100644 index 4fc71ff6..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SiteSettings.config +++ /dev/null @@ -1,43 +0,0 @@ - - - - WebsitePanel - - http://localhost:9002 - - UserCulture - UserTheme - - - - - - - - - - - - - - - Home - Login - Home - UserCustomers - SpaceHome - NestedSpaces - SearchUsers - SearchSpaces - LoggedUserDetails - - Browse2.ascx - Browse.ascx - Edit.ascx - Edit.ascx - - false - false - false - - diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedLocales.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedLocales.config deleted file mode 100644 index aec48dea..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedLocales.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedThemes.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedThemes.config deleted file mode 100644 index 1c602e46..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedThemes.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Modules.config deleted file mode 100644 index b43e286a..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Modules.config +++ /dev/null @@ -1,664 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Pages.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Pages.config deleted file mode 100644 index e10593c1..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Pages.config +++ /dev/null @@ -1,774 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config index 72d02e2b..886aca09 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config @@ -42,6 +42,7 @@ + @@ -125,9 +126,6 @@ - - - diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj index 306c7c9b..9327be8f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj @@ -367,25 +367,6 @@ - - Designer - - - - - - - - Designer - - - - - Designer - - - Designer -