From 720e2bc5d9c0d28f5bd5a1d3ec07edda809bdef5 Mon Sep 17 00:00:00 2001 From: diva Date: Sun, 17 May 2009 15:37:50 +0000 Subject: Renaming [ServiceConnectors] back to [Modules]. --- OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs | 3 +-- .../CoreModules/ServiceConnectors/Asset/HGAssetBroker.cs | 2 +- .../ServiceConnectors/Asset/LocalAssetServiceConnector.cs | 2 +- .../Asset/RemoteAssetServiceConnector.cs | 2 +- .../ServiceConnectors/User/LocalUserServiceConnector.cs | 2 +- .../ServiceConnectors/User/RemoteUserServiceConnector.cs | 2 +- OpenSim/Services/AssetService/HGAssetService.cs | 15 +++++++++++---- OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 4 ++-- 8 files changed, 19 insertions(+), 13 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs index bc6a239..cd475bd 100644 --- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs @@ -56,8 +56,7 @@ namespace OpenSim.Region.CoreModules.Asset public void Initialise(IConfigSource source) { - IConfig moduleConfig = source.Configs["ServiceConnectors"]; - m_log.DebugFormat("[XXX] moduleConfig null? {0}", ((moduleConfig == null) ? "yes" : "no")); + IConfig moduleConfig = source.Configs["Modules"]; if (moduleConfig != null) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Asset/HGAssetBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Asset/HGAssetBroker.cs index c3a878e..54451fd 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Asset/HGAssetBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Asset/HGAssetBroker.cs @@ -59,7 +59,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset public void Initialise(IConfigSource source) { - IConfig moduleConfig = source.Configs["ServiceConnectors"]; + IConfig moduleConfig = source.Configs["Modules"]; if (moduleConfig != null) { string name = moduleConfig.GetString("AssetServices", ""); diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs index 11c857f..19a41ec 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs @@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset public void Initialise(IConfigSource source) { - IConfig moduleConfig = source.Configs["ServiceConnectors"]; + IConfig moduleConfig = source.Configs["Modules"]; if (moduleConfig != null) { string name = moduleConfig.GetString("AssetServices", ""); diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Asset/RemoteAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Asset/RemoteAssetServiceConnector.cs index 5bbd181..ec982e5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Asset/RemoteAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Asset/RemoteAssetServiceConnector.cs @@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset public override void Initialise(IConfigSource source) { - IConfig moduleConfig = source.Configs["ServiceConnectors"]; + IConfig moduleConfig = source.Configs["Modules"]; if (moduleConfig != null) { string name = moduleConfig.GetString("AssetServices", ""); diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs index c34ade9..37286bd 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs @@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.User public void Initialise(IConfigSource source) { - IConfig moduleConfig = source.Configs["ServiceConnectors"]; + IConfig moduleConfig = source.Configs["Modules"]; if (moduleConfig != null) { string name = moduleConfig.GetString("UserServices", ""); diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/User/RemoteUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/User/RemoteUserServiceConnector.cs index fcfc4fa..e56aac5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/User/RemoteUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/User/RemoteUserServiceConnector.cs @@ -43,7 +43,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.User public void Initialise(IConfigSource source) { - IConfig moduleConfig = source.Configs["ServiceConnectors"]; + IConfig moduleConfig = source.Configs["Modules"]; if (moduleConfig != null) { string name = moduleConfig.GetString("UserServices", ""); diff --git a/OpenSim/Services/AssetService/HGAssetService.cs b/OpenSim/Services/AssetService/HGAssetService.cs index 0b6389f..195c69f 100644 --- a/OpenSim/Services/AssetService/HGAssetService.cs +++ b/OpenSim/Services/AssetService/HGAssetService.cs @@ -46,7 +46,7 @@ namespace OpenSim.Services.AssetService public HGAssetService(IConfigSource source) { - IConfig moduleConfig = source.Configs["ServiceConnectors"]; + IConfig moduleConfig = source.Configs["Modules"]; if (moduleConfig != null) { string name = moduleConfig.GetString("AssetServices", ""); @@ -95,9 +95,7 @@ namespace OpenSim.Services.AssetService // work in general, because the remote grid may be running // an asset server that has a different protocol. // Eventually we will want a piece of meta-protocol asking - // the remote server about its kind, and even asking it - // to send its own connector, which we would instantiate - // dynamically. Definitely coo, thing to do! + // the remote server about its kind. Definitely cool thing to do! connector = new AssetServicesConnector(url); m_connectors.Add(url, connector); } @@ -121,6 +119,15 @@ namespace OpenSim.Services.AssetService public AssetMetadata GetMetadata(string id) { + string url = string.Empty; + string assetID = string.Empty; + + if (StringToUrlAndAssetID(id, out url, out assetID)) + { + IAssetService connector = GetConnector(url); + return connector.GetMetadata(assetID); + } + return null; } diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index 5eb8e0f..258c444 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs @@ -127,9 +127,9 @@ namespace OpenSim.Tests.Common.Setup ISharedRegionModule assetService = new LocalAssetServicesConnector(); IniConfigSource config = new IniConfigSource(); - config.AddConfig("ServiceConnectors"); + config.AddConfig("Modules"); config.AddConfig("AssetService"); - config.Configs["ServiceConnectors"].Set("AssetServices", "LocalAssetServicesConnector"); + config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector"); config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService"); config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); assetService.Initialise(config); -- cgit v1.1