28 using System.Collections.Generic;
29 using System.Reflection;
31 using OpenSim.Framework;
33 using OpenSim.Services.Interfaces;
38 namespace OpenSim.
Region.CoreModules.Framework.Library
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
68 inv.OwnerID = m_Library.Owner;
70 if (folderID != m_Library.ID)
72 folder = m_Library.FindFolder(folderID);
75 inv.Folders =
new List<InventoryFolderBase>();
76 inv.Items =
new List<InventoryItemBase>();
83 inv.Folders = folder.RequestListOfFolders();
84 inv.Items = folder.RequestListOfItems();
86 m_log.DebugFormat(
"[LIBRARY MODULE]: Got content for folder {0}", folder.Name);
94 foreach (UUID fid
in folderIDs)
96 invColl[i++] = GetFolderContent(principalID, fid);
107 item.Owner = principalID;
108 foreach (UUID fid
in itemIDs)
111 itemColl[i++] = GetItem(item);
127 if (m_Library.ID != folder.
ParentID)
128 parent = m_Library.FindFolder(folder.ParentID);
132 m_log.DebugFormat(
"[LIBRARY MODULE]: could not add folder {0} because parent folder {1} not found", folder.Name, folder.ParentID);
136 parent.CreateChildFolder(folder.ID, folder.Name, (ushort)folder.
Type);
150 if (m_Library.ID != item.
Folder)
151 folder = m_Library.FindFolder(item.Folder);
155 m_log.DebugFormat(
"[LIBRARY MODULE]: could not add item {0} because folder {1} not found", item.Name, item.Folder);
159 folder.Items.Add(item.ID, item);
187 public List<InventoryItemBase>
GetFolderItems(UUID userID, UUID folderID) {
return null; }
210 public bool DeleteFolders(UUID userID, List<UUID> folderIDs) {
return false; }
227 public bool MoveItems(UUID ownerID, List<InventoryItemBase> items) {
return false; }
235 public bool DeleteItems(UUID userID, List<UUID> itemIDs) {
return false; }
List< InventoryFolderBase > GetInventorySkeleton(UUID userId)
Gets the skeleton of the inventory – folders only
List< InventoryItemBase > GetActiveGestures(UUID userId)
Get the active gestures of the agent.
bool AddFolder(InventoryFolderBase folder)
Add a new folder to the user's inventory
bool MoveFolder(InventoryFolderBase folder)
Move an inventory folder to a new location
LocalInventoryService(InventoryFolderImpl lib)
bool HasInventoryForUser(UUID userID)
Does the given user have an inventory structure?
virtual InventoryCollection[] GetMultipleFoldersContent(UUID principalID, UUID[] folderIDs)
Gets everything (folders and items) inside a folder
bool CreateUserInventory(UUID user)
Create the entire inventory for a given user
bool UpdateItem(InventoryItemBase item)
Update an item in the user's inventory
virtual InventoryItemBase[] GetMultipleItems(UUID principalID, UUID[] itemIDs)
Get multiple items, given by their UUIDs
InventoryItemBase GetItem(InventoryItemBase item)
Get an item, given by its UUID
bool DeleteFolders(UUID userID, List< UUID > folderIDs)
Delete an item from the user's inventory
bool PurgeFolder(InventoryFolderBase folder)
Purge an inventory folder of all its items and subfolders.
InventoryFolderBase GetRootFolder(UUID userID)
Retrieve the root inventory folder for the given user.
Inventory Item - contains all the properties associated with an individual inventory piece...
InventoryCollection GetFolderContent(UUID userID, UUID folderID)
Gets everything (folders and items) inside a folder
int GetAssetPermissions(UUID userID, UUID assetID)
Get the union of permissions of all inventory items that hold the given assetID.
bool DeleteItems(UUID userID, List< UUID > itemIDs)
Delete an item from the user's inventory
bool AddItem(InventoryItemBase item)
Add a new item to the user's inventory
InventoryFolderBase GetFolderForType(UUID userID, FolderType type)
Gets the user folder for the given folder-type
InventoryFolderBase GetFolder(InventoryFolderBase folder)
Get a folder, given by its UUID
bool UpdateFolder(InventoryFolderBase folder)
Update a folder in the user's inventory
List< InventoryItemBase > GetFolderItems(UUID userID, UUID folderID)
Gets the items inside a folder
bool MoveItems(UUID ownerID, List< InventoryItemBase > items)
Used to serialize a whole inventory for transfer over the network.