diff options
author | Mike Mazur | 2008-07-31 09:24:28 +0000 |
---|---|---|
committer | Mike Mazur | 2008-07-31 09:24:28 +0000 |
commit | 2270b252656146d9d74b84665a7ace6c3139db30 (patch) | |
tree | 7a967ee50349cf4301ed801e0b8c85f5060ffe1d /OpenSim/Data/NHibernate/NHibernateInventoryData.cs | |
parent | dropping intermediate GridInfoPlugin.addin.xml, as it's no longer (diff) | |
download | opensim-SC_OLD-2270b252656146d9d74b84665a7ace6c3139db30.zip opensim-SC_OLD-2270b252656146d9d74b84665a7ace6c3139db30.tar.gz opensim-SC_OLD-2270b252656146d9d74b84665a7ace6c3139db30.tar.bz2 opensim-SC_OLD-2270b252656146d9d74b84665a7ace6c3139db30.tar.xz |
Thanks, sempuki, for a patch that moves all Grid Server's plugins to
PluginLoader. Fix issue 1871.
Diffstat (limited to 'OpenSim/Data/NHibernate/NHibernateInventoryData.cs')
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateInventoryData.cs | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index 153d2d5..657a7b2 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs | |||
@@ -42,7 +42,7 @@ using Environment=NHibernate.Cfg.Environment; | |||
42 | 42 | ||
43 | namespace OpenSim.Data.NHibernate | 43 | namespace OpenSim.Data.NHibernate |
44 | { | 44 | { |
45 | public class NHibernateInventoryData: IInventoryData | 45 | public class NHibernateInventoryData: IInventoryDataPlugin |
46 | { | 46 | { |
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 48 | ||
@@ -50,6 +50,12 @@ namespace OpenSim.Data.NHibernate | |||
50 | private ISessionFactory factory; | 50 | private ISessionFactory factory; |
51 | private ISession session; | 51 | private ISession session; |
52 | 52 | ||
53 | public void Initialise() | ||
54 | { | ||
55 | m_log.Info("[NHibernateInventoryData]: " + Name + " cannot be default-initialized!"); | ||
56 | throw new PluginNotInitialisedException (Name); | ||
57 | } | ||
58 | |||
53 | /// <summary> | 59 | /// <summary> |
54 | /// Initialises the interface | 60 | /// Initialises the interface |
55 | /// </summary> | 61 | /// </summary> |
@@ -257,7 +263,7 @@ namespace OpenSim.Data.NHibernate | |||
257 | /// <summary> | 263 | /// <summary> |
258 | /// Closes the interface | 264 | /// Closes the interface |
259 | /// </summary> | 265 | /// </summary> |
260 | public void Close() | 266 | public void Dispose() |
261 | { | 267 | { |
262 | } | 268 | } |
263 | 269 | ||
@@ -265,25 +271,28 @@ namespace OpenSim.Data.NHibernate | |||
265 | /// The plugin being loaded | 271 | /// The plugin being loaded |
266 | /// </summary> | 272 | /// </summary> |
267 | /// <returns>A string containing the plugin name</returns> | 273 | /// <returns>A string containing the plugin name</returns> |
268 | public string getName() | 274 | public string Name |
269 | { | 275 | { |
270 | return "NHibernate Inventory Data Interface"; | 276 | get { return "NHibernate Inventory Data Interface"; } |
271 | } | 277 | } |
272 | 278 | ||
273 | /// <summary> | 279 | /// <summary> |
274 | /// The plugins version | 280 | /// The plugins version |
275 | /// </summary> | 281 | /// </summary> |
276 | /// <returns>A string containing the plugin version</returns> | 282 | /// <returns>A string containing the plugin version</returns> |
277 | public string getVersion() | 283 | public string Version |
278 | { | 284 | { |
279 | Module module = GetType().Module; | 285 | get |
280 | // string dllName = module.Assembly.ManifestModule.Name; | 286 | { |
281 | Version dllVersion = module.Assembly.GetName().Version; | 287 | Module module = GetType().Module; |
288 | // string dllName = module.Assembly.ManifestModule.Name; | ||
289 | Version dllVersion = module.Assembly.GetName().Version; | ||
282 | 290 | ||
283 | 291 | ||
284 | return | 292 | return |
285 | string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, | 293 | string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, |
286 | dllVersion.Revision); | 294 | dllVersion.Revision); |
295 | } | ||
287 | } | 296 | } |
288 | 297 | ||
289 | // Move seems to be just update | 298 | // Move seems to be just update |
@@ -369,7 +378,7 @@ namespace OpenSim.Data.NHibernate | |||
369 | return folders; | 378 | return folders; |
370 | } | 379 | } |
371 | 380 | ||
372 | // See IInventoryData | 381 | // See IInventoryDataPlugin |
373 | public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) | 382 | public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) |
374 | { | 383 | { |
375 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | 384 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); |