From 1de6cffa28348975a2492ce1e8a85c365df4dfaf Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 1 May 2008 20:47:33 +0000
Subject: * Refactor: Remove the unused userID parameter that was being passed
into almost every inventory method * This allows lots of redundant inventory
methods with only slightly different names to be eliminated.
---
.../Grid/InventoryServer/GridInventoryService.cs | 84 +---------------------
OpenSim/Grid/InventoryServer/Main.cs | 10 +--
2 files changed, 6 insertions(+), 88 deletions(-)
(limited to 'OpenSim/Grid/InventoryServer')
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
index db9a864..d9510e9 100644
--- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs
+++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
@@ -182,89 +182,7 @@ namespace OpenSim.Grid.InventoryServer
m_log.InfoFormat("[GRID AGENT INVENTORY]: Creating new set of inventory folders for user {0}", userID);
- CreateNewUserInventory(userID);
- return true;
- }
-
-
- public override void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder)
- {
- AddFolder(folder);
- }
-
- public override void MoveExistingInventoryFolder(InventoryFolderBase folder)
- {
- MoveFolder(folder);
- }
-
- public override void PurgeInventoryFolder(LLUUID userID, InventoryFolderBase folder)
- {
- PurgeFolder(folder);
- }
-
- public override void AddNewInventoryItem(LLUUID userID, InventoryItemBase item)
- {
- AddItem(item);
- }
-
- public override void UpdateInventoryItem(LLUUID userID, InventoryItemBase item)
- {
- UpdateItem(item);
- }
-
- public bool AddInventoryFolder(InventoryFolderBase folder)
- {
- // Right now, this actions act more like an update/insert combination than a simple create.
- m_log.InfoFormat(
- "[GRID AGENT INVENTORY]: Creating folder {0} {1} in folder {2}", folder.Name, folder.ID, folder.ParentID);
-
- AddNewInventoryFolder(folder.Owner, folder);
- return true;
- }
-
- public bool MoveInventoryFolder(InventoryFolderBase folder)
- {
- m_log.InfoFormat(
- "[GRID AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
-
- MoveExistingInventoryFolder(folder);
- return true;
- }
-
- public bool PurgeInventoryFolder(InventoryFolderBase folder)
- {
- m_log.InfoFormat(
- "[GRID AGENT INVENTORY]: Purging folder {0} {1} of its contents", folder.Name, folder.ID);
-
- PurgeInventoryFolder(folder.Owner, folder);
- return true;
- }
-
- public bool AddInventoryItem(InventoryItemBase item)
- {
- // Right now, this actions act more like an update/insert combination than a simple create.
- m_log.InfoFormat("[GRID AGENT INVENTORY]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder);
-
- AddNewInventoryItem(item.Owner, item);
- return true;
- }
-
- public override void DeleteInventoryItem(LLUUID userID, InventoryItemBase item)
- {
- m_log.InfoFormat("[GRID AGENT INVENTORY]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder);
-
- DeleteItem(item);
- }
-
- ///
- /// FIXME: Get DeleteInventoryItem to return a bool
- ///
- ///
- ///
- public bool DeleteInvItem(InventoryItemBase item)
- {
- DeleteInventoryItem(item.Owner, item);
- return true;
+ return CreateNewUserInventory(userID);
}
}
}
diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs
index 870997b..4076d21 100644
--- a/OpenSim/Grid/InventoryServer/Main.cs
+++ b/OpenSim/Grid/InventoryServer/Main.cs
@@ -95,23 +95,23 @@ namespace OpenSim.Grid.InventoryServer
m_httpServer.AddStreamHandler(
new RestDeserialisehandler(
- "POST", "/NewFolder/", m_inventoryService.AddInventoryFolder));
+ "POST", "/NewFolder/", m_inventoryService.AddFolder));
m_httpServer.AddStreamHandler(
new RestDeserialisehandler(
- "POST", "/MoveFolder/", m_inventoryService.MoveInventoryFolder));
+ "POST", "/MoveFolder/", m_inventoryService.MoveFolder));
m_httpServer.AddStreamHandler(
new RestDeserialisehandler(
- "POST", "/PurgeFolder/", m_inventoryService.PurgeInventoryFolder));
+ "POST", "/PurgeFolder/", m_inventoryService.PurgeFolder));
m_httpServer.AddStreamHandler(
new RestDeserialisehandler(
- "POST", "/NewItem/", m_inventoryService.AddInventoryItem));
+ "POST", "/NewItem/", m_inventoryService.AddItem));
m_httpServer.AddStreamHandler(
new RestDeserialisehandler(
- "POST", "/DeleteItem/", m_inventoryService.DeleteInvItem));
+ "POST", "/DeleteItem/", m_inventoryService.DeleteItem));
// WARNING: Root folders no longer just delivers the root and immediate child folders (e.g
// system folders such as Objects, Textures), but it now returns the entire inventory skeleton.
--
cgit v1.1