From 3525195bc9b5fdfd9799411edd452981ef1f4ebd Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 11 Jun 2010 21:52:43 +0100 Subject: Allow IInventoryService.GetFolder(folderId, userId) as well as GetFolder(InventoryFolderBase folder) This involves no wire changes since the methods often just construct an InventoryFolderBase under the hood. This is in line with other methods that alraedy allow requests via uuid --- OpenSim/Services/InventoryService/InventoryService.cs | 17 +++++++++++------ OpenSim/Services/InventoryService/XInventoryService.cs | 5 +++++ 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'OpenSim/Services/InventoryService') diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index fbcd663..9f1c4a4 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs @@ -439,15 +439,20 @@ namespace OpenSim.Services.InventoryService m_log.DebugFormat("[INVENTORY SERVICE]: GetItem failed to find item {0}", item.ID); return null; } - - public virtual InventoryFolderBase GetFolder(InventoryFolderBase folder) - { - InventoryFolderBase result = m_Database.getInventoryFolder(folder.ID); + + public virtual InventoryFolderBase GetFolder(UUID folderId, UUID userId) + { + InventoryFolderBase result = m_Database.getInventoryFolder(folderId); if (result != null) return result; - m_log.DebugFormat("[INVENTORY SERVICE]: GetFolder failed to find folder {0}", folder.ID); - return null; + m_log.DebugFormat("[INVENTORY SERVICE]: GetFolder failed to find folder {0}", folderId); + return null; + } + + public virtual InventoryFolderBase GetFolder(InventoryFolderBase folder) + { + return GetFolder(folder.ID, folder.Owner); } public virtual bool DeleteFolders(UUID ownerID, List folderIDs) diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index af831fd..00aadc5 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs @@ -368,6 +368,11 @@ namespace OpenSim.Services.InventoryService return ConvertToOpenSim(items[0]); } + + public virtual InventoryFolderBase GetFolder(UUID folderId, UUID userId) + { + return GetFolder(new InventoryFolderBase(folderId, userId)); + } public virtual InventoryFolderBase GetFolder(InventoryFolderBase folder) { -- cgit v1.1