test item data storage impementation (unused as of yet)

arthursv
Justin Clark-Casey (justincc) 2009-08-05 20:04:27 +01:00
parent eeb7fda62a
commit 1f7466e5c3
1 changed files with 31 additions and 14 deletions

View File

@ -41,10 +41,15 @@ namespace OpenSim.Tests.Common.Mock
public class TestInventoryDataPlugin : IInventoryDataPlugin
{
/// <value>
/// Known inventory folders
/// Inventory folders
/// </value>
private Dictionary<UUID, InventoryFolderBase> m_folders = new Dictionary<UUID, InventoryFolderBase>();
//// <value>
/// Inventory items
/// </value>
private Dictionary<UUID, InventoryItemBase> m_items = new Dictionary<UUID, InventoryItemBase>();
/// <value>
/// User root folders
/// </value>
@ -101,8 +106,6 @@ namespace OpenSim.Tests.Common.Mock
return folders;
}
public InventoryItemBase getInventoryItem(UUID item) { return null; }
public InventoryFolderBase getInventoryFolder(UUID folderId)
{
InventoryFolderBase folder = null;
@ -111,15 +114,6 @@ namespace OpenSim.Tests.Common.Mock
return folder;
}
public void addInventoryItem(InventoryItemBase item) {}
public void updateInventoryItem(InventoryItemBase item) {}
public void deleteInventoryItem(UUID item) {}
public InventoryItemBase queryInventoryItem(UUID item)
{
return null;
}
public InventoryFolderBase queryInventoryFolder(UUID folderID)
{
return getInventoryFolder(folderID);
@ -150,6 +144,29 @@ namespace OpenSim.Tests.Common.Mock
m_folders.Remove(folderId);
}
public void addInventoryItem(InventoryItemBase item) { m_items[item.ID] = item; }
public void updateInventoryItem(InventoryItemBase item) { addInventoryItem(item); }
public void deleteInventoryItem(UUID itemId)
{
if (m_items.ContainsKey(itemId))
m_items.Remove(itemId);
}
public InventoryItemBase getInventoryItem(UUID itemId)
{
if (m_items.ContainsKey(itemId))
return m_items[itemId];
else
return null;
}
public InventoryItemBase queryInventoryItem(UUID item)
{
return null;
}
public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) { return null; }
}
}