From 40176c12f94044527e82972cbb72cce8caa5ce2b Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 23 Apr 2008 22:13:57 +0000
Subject: * Implement full grid mode Trash empty * Now, emptying the trash
should remove folders and the items they contain as well as items which were
not in a subfolder. * This will only work once both the region and grid
servers have reached this revision. * You may also need to clear your cache
before this will work * Refactoring to follow.
---
.../Grid/InventoryServer/GridInventoryService.cs | 24 ++++++++++++++--------
OpenSim/Grid/InventoryServer/Main.cs | 4 ++++
2 files changed, 19 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Grid/InventoryServer')
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
index 016ecff..efa6a6e 100644
--- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs
+++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
@@ -198,6 +198,11 @@ namespace OpenSim.Grid.InventoryServer
{
MoveFolder(folder);
}
+
+ public override void PurgeInventoryFolder(LLUUID userID, InventoryFolderBase folder)
+ {
+ PurgeFolder(folder);
+ }
public override void AddNewInventoryItem(LLUUID userID, InventoryItemBase item)
{
@@ -207,7 +212,8 @@ namespace OpenSim.Grid.InventoryServer
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);
+ 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;
@@ -215,20 +221,20 @@ namespace OpenSim.Grid.InventoryServer
public bool MoveInventoryFolder(InventoryFolderBase folder)
{
- m_log.InfoFormat("[GRID AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
+ m_log.InfoFormat(
+ "[GRID AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
MoveExistingInventoryFolder(folder);
return true;
}
- ///
- ///
- ///
- ///
- ///
- public override void PurgeInventoryFolder(LLUUID userID, InventoryFolderBase folder)
+ public bool PurgeInventoryFolder(InventoryFolderBase folder)
{
- // XXX No implementation yet (temporarily)!
+ 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)
diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs
index 85d9ba5..870997b 100644
--- a/OpenSim/Grid/InventoryServer/Main.cs
+++ b/OpenSim/Grid/InventoryServer/Main.cs
@@ -100,6 +100,10 @@ namespace OpenSim.Grid.InventoryServer
m_httpServer.AddStreamHandler(
new RestDeserialisehandler(
"POST", "/MoveFolder/", m_inventoryService.MoveInventoryFolder));
+
+ m_httpServer.AddStreamHandler(
+ new RestDeserialisehandler(
+ "POST", "/PurgeFolder/", m_inventoryService.PurgeInventoryFolder));
m_httpServer.AddStreamHandler(
new RestDeserialisehandler(
--
cgit v1.1