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 CreatorIdconnector_plugin
parent
2aa58c5843
commit
392e84e554
|
@ -2314,7 +2314,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
destinationItem.Description = item.Description;
|
destinationItem.Description = item.Description;
|
||||||
destinationItem.InvType = item.InvType;
|
destinationItem.InvType = item.InvType;
|
||||||
destinationItem.CreatorId = item.CreatorId;
|
destinationItem.CreatorId = item.CreatorId;
|
||||||
destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid;
|
|
||||||
destinationItem.CreatorData = item.CreatorData;
|
destinationItem.CreatorData = item.CreatorData;
|
||||||
destinationItem.NextPermissions = item.NextPermissions;
|
destinationItem.NextPermissions = item.NextPermissions;
|
||||||
destinationItem.CurrentPermissions = item.CurrentPermissions;
|
destinationItem.CurrentPermissions = item.CurrentPermissions;
|
||||||
|
@ -2369,7 +2368,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
destinationItem.Description = item.Description;
|
destinationItem.Description = item.Description;
|
||||||
destinationItem.InvType = item.InvType;
|
destinationItem.InvType = item.InvType;
|
||||||
destinationItem.CreatorId = item.CreatorId;
|
destinationItem.CreatorId = item.CreatorId;
|
||||||
destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid;
|
|
||||||
destinationItem.CreatorData = item.CreatorData;
|
destinationItem.CreatorData = item.CreatorData;
|
||||||
destinationItem.NextPermissions = item.NextPermissions;
|
destinationItem.NextPermissions = item.NextPermissions;
|
||||||
destinationItem.CurrentPermissions = item.CurrentPermissions;
|
destinationItem.CurrentPermissions = item.CurrentPermissions;
|
||||||
|
@ -2482,7 +2480,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
destinationItem.Description = item.Description;
|
destinationItem.Description = item.Description;
|
||||||
destinationItem.InvType = item.InvType;
|
destinationItem.InvType = item.InvType;
|
||||||
destinationItem.CreatorId = item.CreatorId;
|
destinationItem.CreatorId = item.CreatorId;
|
||||||
destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid;
|
|
||||||
destinationItem.CreatorData = item.CreatorData;
|
destinationItem.CreatorData = item.CreatorData;
|
||||||
destinationItem.NextPermissions = item.NextPermissions;
|
destinationItem.NextPermissions = item.NextPermissions;
|
||||||
destinationItem.CurrentPermissions = item.CurrentPermissions;
|
destinationItem.CurrentPermissions = item.CurrentPermissions;
|
||||||
|
@ -2788,7 +2785,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
inventoryItem.Description = GetStringAttribute(item,"desc","");
|
inventoryItem.Description = GetStringAttribute(item,"desc","");
|
||||||
inventoryItem.InvType = GetIntegerAttribute(item,"invtype",-1);
|
inventoryItem.InvType = GetIntegerAttribute(item,"invtype",-1);
|
||||||
inventoryItem.CreatorId = GetStringAttribute(item,"creatorid","");
|
inventoryItem.CreatorId = GetStringAttribute(item,"creatorid","");
|
||||||
inventoryItem.CreatorIdAsUuid = (UUID)GetStringAttribute(item,"creatoruuid","");
|
|
||||||
inventoryItem.CreatorData = GetStringAttribute(item, "creatordata", "");
|
inventoryItem.CreatorData = GetStringAttribute(item, "creatordata", "");
|
||||||
inventoryItem.NextPermissions = GetUnsignedAttribute(perms, "next", 0x7fffffff);
|
inventoryItem.NextPermissions = GetUnsignedAttribute(perms, "next", 0x7fffffff);
|
||||||
inventoryItem.CurrentPermissions = GetUnsignedAttribute(perms,"current",0x7fffffff);
|
inventoryItem.CurrentPermissions = GetUnsignedAttribute(perms,"current",0x7fffffff);
|
||||||
|
|
|
@ -87,16 +87,7 @@ namespace OpenSim.Framework
|
||||||
protected string m_creatorId;
|
protected string m_creatorId;
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The UUID for the creator. This may be different from the canonical CreatorId. This property is used
|
/// The CreatorId expressed as a UUID.tely
|
||||||
/// 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.
|
|
||||||
/// </value>
|
/// </value>
|
||||||
public UUID CreatorIdAsUuid
|
public UUID CreatorIdAsUuid
|
||||||
{
|
{
|
||||||
|
@ -109,20 +100,18 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
return m_creatorIdAsUuid;
|
return m_creatorIdAsUuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
m_creatorIdAsUuid = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
protected UUID m_creatorIdAsUuid = UUID.Zero;
|
protected UUID m_creatorIdAsUuid = UUID.Zero;
|
||||||
|
|
||||||
protected string m_creatorData = string.Empty;
|
/// <summary>
|
||||||
|
/// Extended creator information of the form <profile url>;<name>
|
||||||
|
/// </summary>
|
||||||
public string CreatorData // = <profile url>;<name>
|
public string CreatorData // = <profile url>;<name>
|
||||||
{
|
{
|
||||||
get { return m_creatorData; }
|
get { return m_creatorData; }
|
||||||
set { m_creatorData = value; }
|
set { m_creatorData = value; }
|
||||||
}
|
}
|
||||||
|
protected string m_creatorData = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used by the DB layer to retrieve / store the entire user identification.
|
/// Used by the DB layer to retrieve / store the entire user identification.
|
||||||
|
@ -162,7 +151,6 @@ namespace OpenSim.Framework
|
||||||
name = parts[2];
|
name = parts[2];
|
||||||
|
|
||||||
m_creatorData += ';' + name;
|
m_creatorData += ';' + name;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -411,18 +411,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[INVENTORY ARCHIVER]: Found creator {0} via OSPA resolution", ospResolvedId);
|
// 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
|
// Don't preserve the OSPA in the creator id (which actually gets persisted to the
|
||||||
// database). Instead, replace with the UUID that we found.
|
// database). Instead, replace with the UUID that we found.
|
||||||
item.CreatorId = ospResolvedId.ToString();
|
item.CreatorId = ospResolvedId.ToString();
|
||||||
|
|
||||||
item.CreatorData = string.Empty;
|
item.CreatorData = string.Empty;
|
||||||
}
|
}
|
||||||
else if (item.CreatorData == null || item.CreatorData == String.Empty)
|
else if (item.CreatorData == null || item.CreatorData == String.Empty)
|
||||||
{
|
{
|
||||||
item.CreatorId = m_userInfo.PrincipalID.ToString();
|
item.CreatorId = m_userInfo.PrincipalID.ToString();
|
||||||
item.CreatorIdAsUuid = new UUID(item.CreatorId);
|
// item.CreatorIdAsUuid = new UUID(item.CreatorId);
|
||||||
}
|
}
|
||||||
|
|
||||||
item.Owner = m_userInfo.PrincipalID;
|
item.Owner = m_userInfo.PrincipalID;
|
||||||
|
|
|
@ -134,7 +134,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020");
|
item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020");
|
||||||
item1.AssetID = asset1.FullID;
|
item1.AssetID = asset1.FullID;
|
||||||
item1.GroupID = UUID.Random();
|
item1.GroupID = UUID.Random();
|
||||||
item1.CreatorIdAsUuid = m_uaLL1.PrincipalID;
|
item1.CreatorId = m_uaLL1.PrincipalID.ToString();
|
||||||
item1.Owner = m_uaLL1.PrincipalID;
|
item1.Owner = m_uaLL1.PrincipalID;
|
||||||
item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
|
item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
|
||||||
scene.AddInventoryItem(item1);
|
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.ID = UUID.Parse("00000000-0000-0000-0000-000000000180");
|
||||||
coaItem.AssetID = coaAsset.FullID;
|
coaItem.AssetID = coaAsset.FullID;
|
||||||
coaItem.GroupID = UUID.Random();
|
coaItem.GroupID = UUID.Random();
|
||||||
coaItem.CreatorIdAsUuid = m_uaLL1.PrincipalID;
|
coaItem.CreatorId = m_uaLL1.PrincipalID.ToString();
|
||||||
coaItem.Owner = m_uaLL1.PrincipalID;
|
coaItem.Owner = m_uaLL1.PrincipalID;
|
||||||
coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
|
coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
|
||||||
scene.AddInventoryItem(coaItem);
|
scene.AddInventoryItem(coaItem);
|
||||||
|
|
|
@ -781,7 +781,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
invItem.CreationDate = item["CreationDate"].AsInteger();
|
invItem.CreationDate = item["CreationDate"].AsInteger();
|
||||||
invItem.CreatorId = item["CreatorID"].AsString();
|
invItem.CreatorId = item["CreatorID"].AsString();
|
||||||
invItem.CreatorData = item["CreatorData"].AsString();
|
invItem.CreatorData = item["CreatorData"].AsString();
|
||||||
invItem.CreatorIdAsUuid = item["CreatorID"].AsUUID();
|
|
||||||
invItem.Description = item["Description"].AsString();
|
invItem.Description = item["Description"].AsString();
|
||||||
invItem.Folder = item["ParentID"].AsUUID();
|
invItem.Folder = item["ParentID"].AsUUID();
|
||||||
invItem.ID = item["ID"].AsUUID();
|
invItem.ID = item["ID"].AsUUID();
|
||||||
|
|
Loading…
Reference in New Issue