29 using System.Reflection;
33 namespace OpenSim.Framework
45 private const uint FULL_MASK_PERMISSIONS_GENERAL = 2147483647;
47 private UUID _assetID = UUID.Zero;
49 private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL;
50 private uint _creationDate = 0;
51 private UUID _creatorID = UUID.Zero;
52 private string _creatorData = String.Empty;
53 private string _description = String.Empty;
54 private uint _everyoneMask = FULL_MASK_PERMISSIONS_GENERAL;
55 private uint _flags = 0;
56 private UUID _groupID = UUID.Zero;
57 private uint _groupMask = FULL_MASK_PERMISSIONS_GENERAL;
59 private int _invType = 0;
60 private UUID _itemID = UUID.Zero;
61 private UUID _lastOwnerID = UUID.Zero;
62 private string _name = String.Empty;
63 private uint _nextOwnerMask = FULL_MASK_PERMISSIONS_GENERAL;
64 private UUID _ownerID = UUID.Zero;
65 private uint _ownerMask = FULL_MASK_PERMISSIONS_GENERAL;
66 private UUID _parentID = UUID.Zero;
67 private UUID _parentPartID = UUID.Zero;
68 private UUID _permsGranter;
69 private int _permsMask;
70 private int _type = 0;
72 private UUID _loadedID = UUID.Zero;
74 private bool _ownerChanged =
false;
85 public uint BasePermissions {
94 public uint CreationDate {
99 _creationDate = value;
103 public UUID CreatorID {
112 public string CreatorData
114 get {
return _creatorData; }
115 set { _creatorData = value; }
123 public string CreatorIdentification
127 if (!
string.IsNullOrEmpty(_creatorData))
128 return _creatorID.ToString() +
';' + _creatorData;
130 return _creatorID.ToString();
134 if ((value == null) || (value != null && value == string.Empty))
136 _creatorData = string.Empty;
140 if (!value.Contains(
";"))
142 UUID uuid = UUID.Zero;
143 UUID.TryParse(value, out uuid);
148 string name =
"Unknown User";
149 string[] parts = value.Split(
';');
150 if (parts.Length >= 1)
152 UUID uuid = UUID.Zero;
153 UUID.TryParse(parts[0], out uuid);
156 if (parts.Length >= 2)
157 _creatorData = parts[1];
158 if (parts.Length >= 3)
161 _creatorData +=
';' + name;
167 public string Description {
172 _description = value;
176 public uint EveryonePermissions {
178 return _everyoneMask;
181 _everyoneMask = value;
194 public UUID GroupID {
203 public uint GroupPermissions {
230 public UUID OldItemID {
239 public UUID LoadedItemID {
248 public UUID LastOwnerID {
253 _lastOwnerID = value;
266 public uint NextPermissions {
268 return _nextOwnerMask;
271 _nextOwnerMask = value;
275 public UUID OwnerID {
284 public uint CurrentPermissions {
302 public UUID ParentPartID {
304 return _parentPartID;
307 _parentPartID = value;
311 public UUID PermsGranter {
313 return _permsGranter;
316 _permsGranter = value;
320 public int PermsMask {
338 public bool OwnerChanged
342 return _ownerChanged;
346 _ownerChanged = value;
359 public bool ScriptRunning {
get; set; }
363 #region ICloneable Members
367 return MemberwiseClone();
378 LoadedItemID = OldItemID;
380 ItemID = UUID.Random();
381 ParentPartID = partID;
387 ScriptRunning =
true;
388 CreationDate = (uint)(DateTime.UtcNow -
new DateTime(1970, 1, 1)).TotalSeconds;
void ResetIDs(UUID partID)
Reset the UUIDs for this item.
Represents an item in a task inventory