/// <summary> /// Read a library inventory item metadata from a loaded configuration /// </summary> /// <param name="source"></param> private void ReadItemFromConfig(IConfig config, string path) { InventoryItemBase item = new InventoryItemBase(); item.Owner = libOwner; item.CreatorId = libOwner.ToString(); item.ID = new UUID(config.GetString("inventoryID", ID.ToString())); item.AssetID = new UUID(config.GetString("assetID", item.ID.ToString())); item.Folder = new UUID(config.GetString("folderID", ID.ToString())); item.Name = config.GetString("name", String.Empty); item.Description = config.GetString("description", item.Name); item.InvType = config.GetInt("inventoryType", 0); item.AssetType = config.GetInt("assetType", item.InvType); item.BasePermissions = (uint)config.GetLong("basePermissions", (uint)(PermissionMask.All | PermissionMask.Export)); item.CurrentPermissions = (uint)config.GetLong("currentPermissions", (uint)(PermissionMask.All | PermissionMask.Export)); item.GroupPermissions = (uint)config.GetLong("groupPermissions", (uint)PermissionMask.None); item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", (uint)(PermissionMask.All | PermissionMask.Export)); item.NextPermissions = (uint)config.GetLong("nextPermissions", (uint)(PermissionMask.All | PermissionMask.Export)); if (libraryFolders.ContainsKey(item.Folder)) { InventoryFolderImpl parentFolder = libraryFolders[item.Folder]; if (parentFolder.FindItem(item.ID) == null) { parentFolder.Items.Add(item); } else { m_log.WarnFormat("[LIBRARY INVENTORY] Item {1} [{0}] not added, duplicate item", item.ID, item.Name); } } else { m_log.WarnFormat( "[LIBRARY INVENTORY]: Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!", item.Name, item.ID, item.Folder); } }