aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMike Mazur2009-02-16 02:26:01 +0000
committerMike Mazur2009-02-16 02:26:01 +0000
commit98b5e5062e73727111d40700dcc1acf87887949a (patch)
treecd0d0ae49146e2a2f87ea107917f600dde47dcc0
parentAssetInventoryServer plugins can't be a dependency for the OpenSim.Data.MySQL... (diff)
downloadopensim-SC-98b5e5062e73727111d40700dcc1acf87887949a.zip
opensim-SC-98b5e5062e73727111d40700dcc1acf87887949a.tar.gz
opensim-SC-98b5e5062e73727111d40700dcc1acf87887949a.tar.bz2
opensim-SC-98b5e5062e73727111d40700dcc1acf87887949a.tar.xz
- IAssetProviderPlugin was changed to IAssetDataPlugin
- Use OpenSim.Data.DataPluginFactory to load data plugins
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs17
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml6
-rw-r--r--prebuild.xml1
3 files changed, 9 insertions, 15 deletions
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs
index a5e4c95..40959a4 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs
@@ -38,6 +38,7 @@ using OpenMetaverse;
38using OpenMetaverse.StructuredData; 38using OpenMetaverse.StructuredData;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Grid.AssetInventoryServer.Extensions; 40using OpenSim.Grid.AssetInventoryServer.Extensions;
41using OpenSim.Data;
41 42
42namespace OpenSim.Grid.AssetInventoryServer.Plugins 43namespace OpenSim.Grid.AssetInventoryServer.Plugins
43{ 44{
@@ -46,7 +47,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
46 const string EXTENSION_NAME = "OpenSimAssetStorage"; // Used in metrics reporting 47 const string EXTENSION_NAME = "OpenSimAssetStorage"; // Used in metrics reporting
47 48
48 private AssetInventoryServer server; 49 private AssetInventoryServer server;
49 private IAssetProviderPlugin m_assetProvider; 50 private IAssetDataPlugin m_assetProvider;
50 51
51 public OpenSimAssetStoragePlugin() 52 public OpenSimAssetStoragePlugin()
52 { 53 {
@@ -315,7 +316,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
315 316
316 try 317 try
317 { 318 {
318 m_assetProvider = LoadDatabasePlugin("OpenSim.Data.MySQL.dll", server.ConfigFile.Configs["MySQL"].GetString("database_connect", null)); 319 m_assetProvider = DataPluginFactory.LoadAssetDataPlugin("OpenSim.Data.MySQL.dll", server.ConfigFile.Configs["MySQL"].GetString("database_connect", null));
319 if (m_assetProvider == null) 320 if (m_assetProvider == null)
320 { 321 {
321 Logger.Log.Error("[ASSET]: Failed to load a database plugin, server halting."); 322 Logger.Log.Error("[ASSET]: Failed to load a database plugin, server halting.");
@@ -354,17 +355,5 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
354 } 355 }
355 356
356 #endregion IPlugin implementation 357 #endregion IPlugin implementation
357
358 private IAssetProviderPlugin LoadDatabasePlugin(string provider, string connect)
359 {
360 PluginLoader<IAssetProviderPlugin> loader = new PluginLoader<IAssetProviderPlugin>(new AssetDataInitialiser(connect));
361
362 // Loader will try to load all providers (MySQL, MSSQL, etc)
363 // unless it is constrainted to the correct "Provider" entry in the addin.xml
364 loader.Add("/OpenSim/AssetData", new PluginProviderFilter (provider));
365 loader.Load();
366
367 return loader.Plugin;
368 }
369 } 358 }
370} 359}
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml
index a7e5dec..0fe2f48 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml
@@ -1,13 +1,17 @@
1<Addin id="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim" version="0.1"> 1<Addin id="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim" version="0.1">
2 <Runtime> 2 <Runtime>
3 <Import assembly="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll" /> 3 <Import assembly="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll" />
4 <Import assembly="OpenSim.Data.dll" />
4 </Runtime> 5 </Runtime>
6
5 <Dependencies> 7 <Dependencies>
6 <Addin id="OpenSim.Grid.AssetInventoryServer" version="0.1" /> 8 <Addin id="OpenSim.Grid.AssetInventoryServer" version="0.1" />
7 </Dependencies> 9 </Dependencies>
10
8 <ExtensionPoint path = "/OpenSim/AssetData"> 11 <ExtensionPoint path = "/OpenSim/AssetData">
9 <ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IAssetProviderPlugin" /> 12 <ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Data.IAssetDataPlugin" />
10 </ExtensionPoint> 13 </ExtensionPoint>
14
11 <Extension path="/OpenSim/AssetInventoryServer/StorageProvider"> 15 <Extension path="/OpenSim/AssetInventoryServer/StorageProvider">
12 <Plugin id="OpenSimAssetStorage" provider="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSimAssetStoragePlugin" /> 16 <Plugin id="OpenSimAssetStorage" provider="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSimAssetStoragePlugin" />
13 </Extension> 17 </Extension>
diff --git a/prebuild.xml b/prebuild.xml
index f215c9f..4d5434d 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -799,6 +799,7 @@
799 <Reference name="System" /> 799 <Reference name="System" />
800 <Reference name="System.Data" /> 800 <Reference name="System.Data" />
801 <Reference name="OpenSim.Framework" /> 801 <Reference name="OpenSim.Framework" />
802 <Reference name="OpenSim.Data" />
802 <Reference name="OpenSim.Grid.AssetInventoryServer" /> 803 <Reference name="OpenSim.Grid.AssetInventoryServer" />
803 <Reference name="OpenMetaverseTypes"/> 804 <Reference name="OpenMetaverseTypes"/>
804 <Reference name="OpenMetaverse.StructuredData2" /> 805 <Reference name="OpenMetaverse.StructuredData2" />