From 392e84e55402166f5b4ec708d3338efe70a94c2e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 17 Nov 2012 01:23:29 +0000
Subject: Remove unnecessary ability to directly set
InventoryItemBase.CreatorIdAsUuid
This was necessary historically but hasn't been for many years.
Can still get CreatorIdAsUuid, which is really just a UUID cached version of the string CreatorId
---
.../RemoteController/RemoteAdminPlugin.cs | 4 ----
OpenSim/Framework/InventoryItemBase.cs | 22 +++++-----------------
.../Archiver/InventoryArchiveReadRequest.cs | 5 ++---
.../Archiver/Tests/InventoryArchiveTestCase.cs | 4 ++--
.../SimianGrid/SimianInventoryServiceConnector.cs | 1 -
5 files changed, 9 insertions(+), 27 deletions(-)
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 15fbddd..a75d10d 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -2314,7 +2314,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
destinationItem.Description = item.Description;
destinationItem.InvType = item.InvType;
destinationItem.CreatorId = item.CreatorId;
- destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid;
destinationItem.CreatorData = item.CreatorData;
destinationItem.NextPermissions = item.NextPermissions;
destinationItem.CurrentPermissions = item.CurrentPermissions;
@@ -2369,7 +2368,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
destinationItem.Description = item.Description;
destinationItem.InvType = item.InvType;
destinationItem.CreatorId = item.CreatorId;
- destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid;
destinationItem.CreatorData = item.CreatorData;
destinationItem.NextPermissions = item.NextPermissions;
destinationItem.CurrentPermissions = item.CurrentPermissions;
@@ -2482,7 +2480,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
destinationItem.Description = item.Description;
destinationItem.InvType = item.InvType;
destinationItem.CreatorId = item.CreatorId;
- destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid;
destinationItem.CreatorData = item.CreatorData;
destinationItem.NextPermissions = item.NextPermissions;
destinationItem.CurrentPermissions = item.CurrentPermissions;
@@ -2788,7 +2785,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
inventoryItem.Description = GetStringAttribute(item,"desc","");
inventoryItem.InvType = GetIntegerAttribute(item,"invtype",-1);
inventoryItem.CreatorId = GetStringAttribute(item,"creatorid","");
- inventoryItem.CreatorIdAsUuid = (UUID)GetStringAttribute(item,"creatoruuid","");
inventoryItem.CreatorData = GetStringAttribute(item, "creatordata", "");
inventoryItem.NextPermissions = GetUnsignedAttribute(perms, "next", 0x7fffffff);
inventoryItem.CurrentPermissions = GetUnsignedAttribute(perms,"current",0x7fffffff);
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index a663680..3d45e76 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -87,16 +87,7 @@ namespace OpenSim.Framework
protected string m_creatorId;
///
- /// The UUID for the creator. This may be different from the canonical CreatorId. This property is used
- /// for communication with the client over the Second Life protocol, since that protocol can only understand
- /// UUIDs. As this is a basic framework class, this means that both the string creator id and the uuid
- /// reference have to be settable separately
- ///
- /// Database plugins don't need to set this, it will be set by
- /// upstream code (or set by the get accessor if left unset).
- ///
- /// XXX: An alternative to having a separate uuid property would be to hash the CreatorId appropriately
- /// every time there was communication with a UUID-only client. This may be much more expensive.
+ /// The CreatorId expressed as a UUID.tely
///
public UUID CreatorIdAsUuid
{
@@ -109,20 +100,18 @@ namespace OpenSim.Framework
return m_creatorIdAsUuid;
}
-
- set
- {
- m_creatorIdAsUuid = value;
- }
}
protected UUID m_creatorIdAsUuid = UUID.Zero;
- protected string m_creatorData = string.Empty;
+ ///
+ /// Extended creator information of the form ;
+ ///
public string CreatorData // = ;
{
get { return m_creatorData; }
set { m_creatorData = value; }
}
+ protected string m_creatorData = string.Empty;
///
/// Used by the DB layer to retrieve / store the entire user identification.
@@ -162,7 +151,6 @@ namespace OpenSim.Framework
name = parts[2];
m_creatorData += ';' + name;
-
}
}
}
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index ee10d04..5069803 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -411,18 +411,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
{
// m_log.DebugFormat("[INVENTORY ARCHIVER]: Found creator {0} via OSPA resolution", ospResolvedId);
- item.CreatorIdAsUuid = ospResolvedId;
+// item.CreatorIdAsUuid = ospResolvedId;
// Don't preserve the OSPA in the creator id (which actually gets persisted to the
// database). Instead, replace with the UUID that we found.
item.CreatorId = ospResolvedId.ToString();
-
item.CreatorData = string.Empty;
}
else if (item.CreatorData == null || item.CreatorData == String.Empty)
{
item.CreatorId = m_userInfo.PrincipalID.ToString();
- item.CreatorIdAsUuid = new UUID(item.CreatorId);
+// item.CreatorIdAsUuid = new UUID(item.CreatorId);
}
item.Owner = m_userInfo.PrincipalID;
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
index 00727a4..db78da9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
@@ -134,7 +134,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020");
item1.AssetID = asset1.FullID;
item1.GroupID = UUID.Random();
- item1.CreatorIdAsUuid = m_uaLL1.PrincipalID;
+ item1.CreatorId = m_uaLL1.PrincipalID.ToString();
item1.Owner = m_uaLL1.PrincipalID;
item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
scene.AddInventoryItem(item1);
@@ -157,7 +157,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180");
coaItem.AssetID = coaAsset.FullID;
coaItem.GroupID = UUID.Random();
- coaItem.CreatorIdAsUuid = m_uaLL1.PrincipalID;
+ coaItem.CreatorId = m_uaLL1.PrincipalID.ToString();
coaItem.Owner = m_uaLL1.PrincipalID;
coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
scene.AddInventoryItem(coaItem);
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
index 4d7841b..a391275 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
@@ -781,7 +781,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
invItem.CreationDate = item["CreationDate"].AsInteger();
invItem.CreatorId = item["CreatorID"].AsString();
invItem.CreatorData = item["CreatorData"].AsString();
- invItem.CreatorIdAsUuid = item["CreatorID"].AsUUID();
invItem.Description = item["Description"].AsString();
invItem.Folder = item["ParentID"].AsUUID();
invItem.ID = item["ID"].AsUUID();
--
cgit v1.1