further refactor and rename of InventoryFolderBase properties

to reflect what they really are.
0.6.0-stable
Sean Dague 2008-04-08 23:26:31 +00:00
parent 8c82117207
commit a6d27e0929
12 changed files with 45 additions and 45 deletions

View File

@ -370,7 +370,7 @@ namespace OpenSim.Data.MSSQL
try
{
InventoryFolderBase folder = new InventoryFolderBase();
folder.AgentID = new LLUUID((string) reader["agentID"]);
folder.Owner = new LLUUID((string) reader["agentID"]);
folder.ParentID = new LLUUID((string) reader["parentFolderID"]);
folder.ID = new LLUUID((string) reader["folderID"]);
folder.Name = (string) reader["folderName"];
@ -558,7 +558,7 @@ namespace OpenSim.Data.MSSQL
Dictionary<string, string> param = new Dictionary<string, string>();
param["folderID"] = folder.ID.ToString();
param["agentID"] = folder.AgentID.ToString();
param["agentID"] = folder.Owner.ToString();
param["parentFolderID"] = folder.ParentID.ToString();
param["folderName"] = folder.Name;
param["type"] = Convert.ToString(folder.Type);
@ -590,7 +590,7 @@ namespace OpenSim.Data.MSSQL
"version = @version where " +
"folderID = @keyFolderID;", database.getConnection());
SqlParameter param1 = new SqlParameter("@folderID", folder.ID.ToString());
SqlParameter param2 = new SqlParameter("@agentID", folder.AgentID.ToString());
SqlParameter param2 = new SqlParameter("@agentID", folder.Owner.ToString());
SqlParameter param3 = new SqlParameter("@parentFolderID", folder.ParentID.ToString());
SqlParameter param4 = new SqlParameter("@folderName", folder.Name);
SqlParameter param5 = new SqlParameter("@type", folder.Type);

View File

@ -381,7 +381,7 @@ namespace OpenSim.Data.MySQL
try
{
InventoryFolderBase folder = new InventoryFolderBase();
folder.AgentID = new LLUUID((string) reader["agentID"]);
folder.Owner = new LLUUID((string) reader["agentID"]);
folder.ParentID = new LLUUID((string) reader["parentFolderID"]);
folder.ID = new LLUUID((string) reader["folderID"]);
folder.Name = (string) reader["folderName"];
@ -508,7 +508,7 @@ namespace OpenSim.Data.MySQL
MySqlCommand cmd = new MySqlCommand(sql, database.Connection);
cmd.Parameters.AddWithValue("?folderID", folder.ID.ToString());
cmd.Parameters.AddWithValue("?agentID", folder.AgentID.ToString());
cmd.Parameters.AddWithValue("?agentID", folder.Owner.ToString());
cmd.Parameters.AddWithValue("?parentFolderID", folder.ParentID.ToString());
cmd.Parameters.AddWithValue("?folderName", folder.Name);
cmd.Parameters.AddWithValue("?type", (short) folder.Type);

View File

@ -73,11 +73,11 @@ namespace OpenSim.Data.NHibernate
cfg.AddAssembly("OpenSim.Data.NHibernate");
HbmSerializer.Default.Validate = true;
// using ( System.IO.MemoryStream stream =
// HbmSerializer.Default.Serialize(System.Reflection.Assembly.GetExecutingAssembly()))
// cfg.AddInputStream(stream);
using ( System.IO.MemoryStream stream =
HbmSerializer.Default.Serialize(System.Reflection.Assembly.GetExecutingAssembly()))
cfg.AddInputStream(stream);
// new SchemaExport(cfg).Create(true, true);
new SchemaExport(cfg).Create(true, true);
factory = cfg.BuildSessionFactory();
}

View File

@ -592,7 +592,7 @@ namespace OpenSim.Data.SQLite
InventoryFolderBase folder = new InventoryFolderBase();
folder.ID = new LLUUID((string) row["UUID"]);
folder.Name = (string) row["name"];
folder.AgentID = new LLUUID((string) row["agentID"]);
folder.Owner = new LLUUID((string) row["agentID"]);
folder.ParentID = new LLUUID((string) row["parentID"]);
folder.Type = Convert.ToInt16(row["type"]);
folder.Version = Convert.ToUInt16(row["version"]);
@ -603,7 +603,7 @@ namespace OpenSim.Data.SQLite
{
row["UUID"] = Util.ToRawUuidString(folder.ID);
row["name"] = folder.Name;
row["agentID"] = Util.ToRawUuidString(folder.AgentID);
row["agentID"] = Util.ToRawUuidString(folder.Owner);
row["parentID"] = Util.ToRawUuidString(folder.ParentID);
row["type"] = folder.Type;
row["version"] = folder.Version;

View File

@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications.Cache
// Constructors
public InventoryFolderImpl(InventoryFolderBase folderbase)
{
AgentID = folderbase.AgentID;
Owner = folderbase.Owner;
ID = folderbase.ID;
Name = folderbase.Name;
ParentID = folderbase.ParentID;
@ -67,7 +67,7 @@ namespace OpenSim.Framework.Communications.Cache
subFold.ID = folderID;
subFold.Type = (short) type;
subFold.ParentID = this.ID;
subFold.AgentID = AgentID;
subFold.Owner = Owner;
SubFolders.Add(subFold.ID, subFold);
return subFold;
}

View File

@ -56,7 +56,7 @@ namespace OpenSim.Framework.Communications.Cache
{
m_log.Info("[LIBRARY INVENTORY]: Loading library inventory");
AgentID = libOwner;
Owner = libOwner;
ID = new LLUUID("00000112-000f-0000-0000-000100bba000");
Name = "OpenSim Library";
ParentID = LLUUID.Zero;
@ -177,7 +177,7 @@ namespace OpenSim.Framework.Communications.Cache
folderInfo.ParentID = new LLUUID(config.GetString("parentFolderID", ID.ToString()));
folderInfo.Type = (short)config.GetInt("type", 8);
folderInfo.AgentID = libOwner;
folderInfo.Owner = libOwner;
folderInfo.Version = 1;
if (libraryFolders.ContainsKey(folderInfo.ParentID))

View File

@ -113,7 +113,7 @@ namespace OpenSim.Framework.Communications.Cache
if (createdFolder != null)
{
InventoryFolderBase createdBaseFolder = new InventoryFolderBase();
createdBaseFolder.AgentID = createdFolder.AgentID;
createdBaseFolder.Owner = createdFolder.Owner;
createdBaseFolder.ID = createdFolder.ID;
createdBaseFolder.Name = createdFolder.Name;
createdBaseFolder.ParentID = createdFolder.ParentID;
@ -156,7 +156,7 @@ namespace OpenSim.Framework.Communications.Cache
if (userProfile.RootFolder != null)
{
InventoryFolderBase baseFolder = new InventoryFolderBase();
baseFolder.AgentID = remoteClient.AgentId;
baseFolder.Owner = remoteClient.AgentId;
baseFolder.ID = folderID;
baseFolder.Name = name;
baseFolder.ParentID = parentID;
@ -176,7 +176,7 @@ namespace OpenSim.Framework.Communications.Cache
if (userProfile.RootFolder != null)
{
InventoryFolderBase baseFolder = new InventoryFolderBase();
baseFolder.AgentID = remoteClient.AgentId;
baseFolder.Owner = remoteClient.AgentId;
baseFolder.ID = folderID;
baseFolder.ParentID = parentID;
m_parent.InventoryService.MoveInventoryFolder(remoteClient.AgentId, baseFolder);
@ -202,7 +202,7 @@ namespace OpenSim.Framework.Communications.Cache
if (folderID == libraryRoot.ID)
{
remoteClient.SendInventoryFolderDetails(
libraryRoot.AgentID, libraryRoot.ID, libraryRoot.RequestListOfItems(),
libraryRoot.Owner, libraryRoot.ID, libraryRoot.RequestListOfItems(),
libraryRoot.RequestListOfFolders(), fetchFolders, fetchItems);
return;
@ -211,7 +211,7 @@ namespace OpenSim.Framework.Communications.Cache
if ((fold = libraryRoot.HasSubFolder(folderID)) != null)
{
remoteClient.SendInventoryFolderDetails(
libraryRoot.AgentID, folderID, fold.RequestListOfItems(),
libraryRoot.Owner, folderID, fold.RequestListOfItems(),
fold.RequestListOfFolders(), fetchFolders, fetchItems);
return;
@ -379,7 +379,7 @@ namespace OpenSim.Framework.Communications.Cache
public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID)
{
if (ownerID == libraryRoot.AgentID)
if (ownerID == libraryRoot.Owner)
{
//Console.WriteLine("request info for library item");

View File

@ -240,7 +240,7 @@ namespace OpenSim.Framework.Communications
public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client)
{
if (uuid == m_userProfileCacheService.libraryRoot.AgentID)
if (uuid == m_userProfileCacheService.libraryRoot.Owner)
{
remote_client.SendNameReply(uuid, "Mr", "OpenSim");
}

View File

@ -240,7 +240,7 @@ namespace OpenSim.Framework.Communications
InventoryFolderBase folder = new InventoryFolderBase();
folder.ParentID = LLUUID.Zero;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "My Inventory";
folder.Type = (short)AssetType.Folder;
@ -251,7 +251,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Animations";
folder.Type = (short)AssetType.Animation;
@ -260,7 +260,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Body Parts";
folder.Type = (short)AssetType.Bodypart;
@ -269,7 +269,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Calling Cards";
folder.Type = (short)AssetType.CallingCard;
@ -278,7 +278,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Clothing";
folder.Type = (short)AssetType.Clothing;
@ -287,7 +287,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Gestures";
folder.Type = (short)AssetType.Gesture;
@ -296,7 +296,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Landmarks";
folder.Type = (short)AssetType.Landmark;
@ -305,7 +305,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Lost And Found";
folder.Type = (short)AssetType.LostAndFoundFolder;
@ -314,7 +314,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Notecards";
folder.Type = (short)AssetType.Notecard;
@ -323,7 +323,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Objects";
folder.Type = (short)AssetType.Object;
@ -332,7 +332,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Photo Album";
folder.Type = (short)AssetType.SnapshotFolder;
@ -341,7 +341,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Scripts";
folder.Type = (short)AssetType.LSLText;
@ -350,7 +350,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Sounds";
folder.Type = (short)AssetType.Sound;
@ -359,7 +359,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Textures";
folder.Type = (short)AssetType.Texture;
@ -368,7 +368,7 @@ namespace OpenSim.Framework.Communications
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.AgentID = user;
folder.Owner = user;
folder.ID = LLUUID.Random();
folder.Name = "Trash";
folder.Type = (short)AssetType.TrashFolder;

View File

@ -45,7 +45,7 @@ namespace OpenSim.Framework
/// <summary>
/// The agent who's inventory this is contained by
/// </summary>
private LLUUID _agentID;
private LLUUID _owner;
/// <summary>
/// The folder this folder is contained in
@ -76,12 +76,12 @@ namespace OpenSim.Framework
}
}
public LLUUID AgentID {
public LLUUID Owner {
get {
return _agentID;
return _owner;
}
set {
_agentID = value;
_owner = value;
}
}

View File

@ -169,7 +169,7 @@ namespace OpenSim.Grid.InventoryServer
"Updating in " + folder.ParentID.ToString()
+ ", folder " + folder.Name);
AddNewInventoryFolder(folder.AgentID, folder);
AddNewInventoryFolder(folder.Owner, folder);
return true;
}

View File

@ -111,12 +111,12 @@ namespace OpenSim.Grid.InventoryServer
}
// ensure we have valid agent id
if (f.AgentID == LLUUID.Zero)
if (f.Owner == LLUUID.Zero)
{
if (parent != null)
f.AgentID = parent.AgentID;
f.Owner = parent.Owner;
else
f.AgentID = f.ID;
f.Owner = f.ID;
modified = true;
}