* 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.0.6.0-stable
parent
e108133d91
commit
40176c12f9
|
@ -523,14 +523,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
purgedBaseFolder.Type = purgedFolder.Type;
|
||||
purgedBaseFolder.Version = purgedFolder.Version;
|
||||
|
||||
m_commsManager.InventoryService.PurgeInventoryFolder(remoteClient.AgentId, purgedBaseFolder);
|
||||
|
||||
// XXX Remains temporarily so that we still delete items in the grid case.
|
||||
List<InventoryItemBase> items = purgedFolder.RequestListOfItems();
|
||||
foreach (InventoryItemBase item in items)
|
||||
{
|
||||
userProfile.DeleteItem(remoteClient.AgentId, item);
|
||||
}
|
||||
m_commsManager.InventoryService.PurgeInventoryFolder(remoteClient.AgentId, purgedBaseFolder);
|
||||
|
||||
purgedFolder.Purge();
|
||||
}
|
||||
|
|
|
@ -259,13 +259,12 @@ namespace OpenSim.Framework.Communications
|
|||
}
|
||||
}
|
||||
|
||||
// XXX Temporarily don't delete the items since UserProfileCacheService is still doing this
|
||||
// List<InventoryItemBase> items = RequestFolderItems(folder.ID);
|
||||
//
|
||||
// foreach (InventoryItemBase item : items)
|
||||
// {
|
||||
// DeleteItem(item);
|
||||
// }
|
||||
List<InventoryItemBase> items = RequestFolderItems(folder.ID);
|
||||
|
||||
foreach (InventoryItemBase item in items)
|
||||
{
|
||||
DeleteItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddNewInventorySet(UsersInventory inventory)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <param name="folder"></param>
|
||||
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)
|
||||
|
|
|
@ -100,6 +100,10 @@ namespace OpenSim.Grid.InventoryServer
|
|||
m_httpServer.AddStreamHandler(
|
||||
new RestDeserialisehandler<InventoryFolderBase, bool>(
|
||||
"POST", "/MoveFolder/", m_inventoryService.MoveInventoryFolder));
|
||||
|
||||
m_httpServer.AddStreamHandler(
|
||||
new RestDeserialisehandler<InventoryFolderBase, bool>(
|
||||
"POST", "/PurgeFolder/", m_inventoryService.PurgeInventoryFolder));
|
||||
|
||||
m_httpServer.AddStreamHandler(
|
||||
new RestDeserialisehandler<InventoryItemBase, bool>(
|
||||
|
|
|
@ -53,7 +53,11 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
|
||||
#region IInventoryServices Members
|
||||
|
||||
// See IInventoryServices
|
||||
/// <summary>
|
||||
/// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <param name="callback"></param>
|
||||
public void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback)
|
||||
{
|
||||
if (!m_RequestingInventory.ContainsKey(userID))
|
||||
|
@ -148,6 +152,11 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <param name="folder"></param>
|
||||
public void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder)
|
||||
{
|
||||
try
|
||||
|
@ -162,6 +171,11 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <param name="folder"></param>
|
||||
public void MoveInventoryFolder(LLUUID userID, InventoryFolderBase folder)
|
||||
{
|
||||
try
|
||||
|
@ -181,11 +195,26 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <param name="folder"></param>
|
||||
/// <returns></returns>
|
||||
public void PurgeInventoryFolder(LLUUID userID, InventoryFolderBase folder)
|
||||
{
|
||||
// XXX No implementation yet (temporarily)!
|
||||
try
|
||||
{
|
||||
SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, bool>(
|
||||
"POST", _inventoryServerUrl + "/PurgeFolder/", folder);
|
||||
}
|
||||
catch (WebException e)
|
||||
{
|
||||
m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Move inventory folder operation failed, {0} {1}",
|
||||
e.Source, e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <param name="folder"></param>
|
||||
public void AddNewInventoryItem(LLUUID userID, InventoryItemBase item)
|
||||
{
|
||||
try
|
||||
|
@ -200,6 +229,11 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <param name="folder"></param>
|
||||
public void DeleteInventoryItem(LLUUID userID, InventoryItemBase item)
|
||||
{
|
||||
try
|
||||
|
|
Loading…
Reference in New Issue