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 uuidsoprefactor
parent
8531da37d4
commit
3525195bc9
|
@ -575,9 +575,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID),
|
||||
new Dictionary<string, InventoryFolderBase>(), new List<InventoryNodeBase>());
|
||||
|
||||
InventoryFolderBase folder1Post
|
||||
= InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName);
|
||||
InventoryFolderBase folder1Post = scene.InventoryService.GetFolder(folder1.ID, ua1.PrincipalID);
|
||||
Assert.That(folder1Post.ID, Is.EqualTo(folder1.ID));
|
||||
|
||||
/*
|
||||
InventoryFolderBase folder2
|
||||
= InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1Post, "b");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
|
@ -229,6 +229,8 @@ namespace OpenSim.Region.CoreModules.Framework.Library
|
|||
/// <returns></returns>
|
||||
public InventoryItemBase GetItem(InventoryItemBase item) { return null; }
|
||||
|
||||
public InventoryFolderBase GetFolder(UUID folderId, UUID userId) { return null; }
|
||||
|
||||
/// <summary>
|
||||
/// Get a folder, given by its UUID
|
||||
/// </summary>
|
||||
|
|
|
@ -205,6 +205,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
|
||||
public abstract InventoryItemBase GetItem(InventoryItemBase item);
|
||||
|
||||
public abstract InventoryFolderBase GetFolder(UUID folderId, UUID userId);
|
||||
|
||||
public abstract InventoryFolderBase GetFolder(InventoryFolderBase folder);
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
|
@ -486,6 +486,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
return connector.GetItem(item);
|
||||
}
|
||||
|
||||
public InventoryFolderBase GetFolder(UUID folderId, UUID userId)
|
||||
{
|
||||
return GetFolder(new InventoryFolderBase(folderId, userId));
|
||||
}
|
||||
|
||||
public InventoryFolderBase GetFolder(InventoryFolderBase folder)
|
||||
{
|
||||
if (folder == null)
|
||||
|
|
|
@ -267,6 +267,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
return item;
|
||||
}
|
||||
|
||||
public InventoryFolderBase GetFolder(UUID folderId, UUID userId)
|
||||
{
|
||||
return GetFolder(new InventoryFolderBase(folderId, userId));
|
||||
}
|
||||
|
||||
public InventoryFolderBase GetFolder(InventoryFolderBase folder)
|
||||
{
|
||||
return m_InventoryService.GetFolder(folder);
|
||||
|
|
|
@ -307,6 +307,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
return m_RemoteConnector.QueryItem(item.Owner.ToString(), item, sessionID);
|
||||
}
|
||||
|
||||
public override InventoryFolderBase GetFolder(UUID folderId, UUID userId)
|
||||
{
|
||||
return GetFolder(new InventoryFolderBase(folderId, userId));
|
||||
}
|
||||
|
||||
public override InventoryFolderBase GetFolder(InventoryFolderBase folder)
|
||||
{
|
||||
if (folder == null)
|
||||
|
|
|
@ -271,6 +271,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
return m_RemoteConnector.GetItem(item);
|
||||
}
|
||||
|
||||
public InventoryFolderBase GetFolder(UUID folderId, UUID userId)
|
||||
{
|
||||
return GetFolder(new InventoryFolderBase(folderId, userId));
|
||||
}
|
||||
|
||||
public InventoryFolderBase GetFolder(InventoryFolderBase folder)
|
||||
{
|
||||
m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetFolder {0}", folder.ID);
|
||||
|
|
|
@ -172,6 +172,11 @@ namespace OpenSim.Services.Connectors
|
|||
return null;
|
||||
}
|
||||
|
||||
public InventoryFolderBase GetFolder(UUID folderId, UUID userId)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public InventoryFolderBase GetFolder(InventoryFolderBase folder)
|
||||
{
|
||||
return null;
|
||||
|
|
|
@ -431,6 +431,11 @@ namespace OpenSim.Services.Connectors
|
|||
return null;
|
||||
}
|
||||
|
||||
public InventoryFolderBase GetFolder(UUID folderId, UUID userId)
|
||||
{
|
||||
return GetFolder(new InventoryFolderBase(folderId, userId));
|
||||
}
|
||||
|
||||
public InventoryFolderBase GetFolder(InventoryFolderBase folder)
|
||||
{
|
||||
try
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
|
@ -315,6 +315,11 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
return null;
|
||||
}
|
||||
|
||||
public InventoryFolderBase GetFolder(UUID folderId, UUID userId)
|
||||
{
|
||||
return GetFolder(new InventoryFolderBase(folderId, userId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a folder, given by its UUID
|
||||
/// </summary>
|
||||
|
|
|
@ -169,6 +169,14 @@ namespace OpenSim.Services.Interfaces
|
|||
/// <returns></returns>
|
||||
InventoryItemBase GetItem(InventoryItemBase item);
|
||||
|
||||
/// <summary>
|
||||
/// Get a folder.
|
||||
/// </summary>
|
||||
/// <param name="folderId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
InventoryFolderBase GetFolder(UUID folderId, UUID userId);
|
||||
|
||||
/// <summary>
|
||||
/// Get a folder, given by its UUID
|
||||
/// </summary>
|
||||
|
|
|
@ -440,16 +440,21 @@ namespace OpenSim.Services.InventoryService
|
|||
return null;
|
||||
}
|
||||
|
||||
public virtual InventoryFolderBase GetFolder(InventoryFolderBase folder)
|
||||
public virtual InventoryFolderBase GetFolder(UUID folderId, UUID userId)
|
||||
{
|
||||
InventoryFolderBase result = m_Database.getInventoryFolder(folder.ID);
|
||||
InventoryFolderBase result = m_Database.getInventoryFolder(folderId);
|
||||
if (result != null)
|
||||
return result;
|
||||
|
||||
m_log.DebugFormat("[INVENTORY SERVICE]: GetFolder failed to find folder {0}", folder.ID);
|
||||
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<UUID> folderIDs)
|
||||
{
|
||||
m_log.InfoFormat("[INVENTORY SERVICE]: Deleting {0} folders from user {1}", folderIDs.Count, ownerID);
|
||||
|
|
|
@ -369,6 +369,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)
|
||||
{
|
||||
XInventoryFolder[] folders = m_Database.GetFolders(
|
||||
|
|
|
@ -163,6 +163,11 @@ namespace OpenSim.Tests.Common.Mock
|
|||
return null;
|
||||
}
|
||||
|
||||
public InventoryFolderBase GetFolder(UUID folderId, UUID userId)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public InventoryFolderBase GetFolder(InventoryFolderBase folder)
|
||||
{
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue