From 2873b82b788244852fd1dad3a747f3ba33a73be5 Mon Sep 17 00:00:00 2001 From: mingchen Date: Mon, 16 Jul 2007 19:40:25 +0000 Subject: *Renamed everything Parcels and ParcelData to Land and LandData *Added missing files (I hope) --- .../LocalStorageBerkeleyDB/BDBLocalStorage.cs | 12 +-- .../Storage/LocalStorageDb4o/Db4LocalStorage.cs | 112 ++++++++++----------- .../Storage/LocalStorageDb4o/UUIDLandQuery.cs | 47 +++++++++ .../Storage/LocalStorageDb4o/UUIDParcelQuery.cs | 47 --------- .../LocalStorageSQLite/SQLiteLocalStorage.cs | 12 +-- .../OpenSim.DataStore.NullStorage/NullDataStore.cs | 10 +- 6 files changed, 120 insertions(+), 120 deletions(-) create mode 100644 OpenSim/Region/Storage/LocalStorageDb4o/UUIDLandQuery.cs delete mode 100644 OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs (limited to 'OpenSim/Region/Storage') diff --git a/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs index 0a88594..1c0a4a3 100644 --- a/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs @@ -82,25 +82,25 @@ namespace OpenSim.Region.Storage.LocalStorageBDB } - public void SaveParcels(ParcelData[] parcel_data) + public void SaveLandObjects(LandData[] land_data) { } - public void SaveParcel(ParcelData parcel) + public void SaveLandObject(LandData land) { } - public void RemoveParcel(ParcelData parcel) + public void RemoveLandObject(LandData land) { } - public void RemoveAllParcels() + public void RemoveAllLandObjects() { } - public void LoadParcels(ILocalStorageParcelReceiver recv) + public void LoadLandObjects(ILocalStorageLandObjectReceiver recv) { - recv.NoParcelDataFromStorage(); + recv.NoLandDataFromStorage(); } public void ShutDown() diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs index 8d9f473..5dc5a3b 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs @@ -157,106 +157,106 @@ namespace OpenSim.Region.Storage.LocalStorageDb4o db.Commit(); } - public void SaveParcel(ParcelData parcel) + public void SaveLandObject(LandData landObject) { - IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID)); + IObjectSet result = db.Query(new UUIDLandQuery(landObject.globalID)); if (result.Count > 0) { - //Old Parcel - ParcelData updateParcel = (ParcelData)result.Next(); - updateParcel.AABBMax = parcel.AABBMax; - updateParcel.AABBMin = parcel.AABBMin; - updateParcel.area = parcel.area; - updateParcel.auctionID = parcel.auctionID; - updateParcel.authBuyerID = parcel.authBuyerID; - updateParcel.category = parcel.category; - updateParcel.claimDate = parcel.claimDate; - updateParcel.claimPrice = parcel.claimPrice; - updateParcel.groupID = parcel.groupID; - updateParcel.groupPrims = parcel.groupPrims; - updateParcel.isGroupOwned = parcel.isGroupOwned; - updateParcel.landingType = parcel.landingType; - updateParcel.mediaAutoScale = parcel.mediaAutoScale; - updateParcel.mediaID = parcel.mediaID; - updateParcel.mediaURL = parcel.mediaURL; - updateParcel.musicURL = parcel.musicURL; - updateParcel.localID = parcel.localID; - updateParcel.ownerID = parcel.ownerID; - updateParcel.passHours = parcel.passHours; - updateParcel.passPrice = parcel.passPrice; - updateParcel.parcelBitmapByteArray = (byte[])parcel.parcelBitmapByteArray.Clone(); - updateParcel.parcelDesc = parcel.parcelDesc; - updateParcel.parcelFlags = parcel.parcelFlags; - updateParcel.parcelName = parcel.parcelName; - updateParcel.parcelStatus = parcel.parcelStatus; - updateParcel.salePrice = parcel.salePrice; - updateParcel.snapshotID = parcel.snapshotID; - updateParcel.userLocation = parcel.userLocation; - updateParcel.userLookAt = parcel.userLookAt; + //Old Land + LandData updateLand = (LandData)result.Next(); + updateLand.AABBMax = landObject.AABBMax; + updateLand.AABBMin = landObject.AABBMin; + updateLand.area = landObject.area; + updateLand.auctionID = landObject.auctionID; + updateLand.authBuyerID = landObject.authBuyerID; + updateLand.category = landObject.category; + updateLand.claimDate = landObject.claimDate; + updateLand.claimPrice = landObject.claimPrice; + updateLand.groupID = landObject.groupID; + updateLand.groupPrims = landObject.groupPrims; + updateLand.isGroupOwned = landObject.isGroupOwned; + updateLand.landingType = landObject.landingType; + updateLand.mediaAutoScale = landObject.mediaAutoScale; + updateLand.mediaID = landObject.mediaID; + updateLand.mediaURL = landObject.mediaURL; + updateLand.musicURL = landObject.musicURL; + updateLand.localID = landObject.localID; + updateLand.ownerID = landObject.ownerID; + updateLand.passHours = landObject.passHours; + updateLand.passPrice = landObject.passPrice; + updateLand.landBitmapByteArray = (byte[])landObject.landBitmapByteArray.Clone(); + updateLand.landDesc = landObject.landDesc; + updateLand.landFlags = landObject.landFlags; + updateLand.landName = landObject.landName; + updateLand.landStatus = landObject.landStatus; + updateLand.salePrice = landObject.salePrice; + updateLand.snapshotID = landObject.snapshotID; + updateLand.userLocation = landObject.userLocation; + updateLand.userLookAt = landObject.userLookAt; - db.Set(updateParcel); + db.Set(updateLand); } else { - db.Set(parcel); + db.Set(landObject); } db.Commit(); } - public void SaveParcels(ParcelData[] parcel_data) + public void SaveLandObjects(LandData[] landObject_data) { - MainLog.Instance.Notice("Parcel Backup: Saving Parcels..."); + MainLog.Instance.Notice("Land Backup: Saving Lands..."); int i; - for (i = 0; i < parcel_data.GetLength(0); i++) + for (i = 0; i < landObject_data.GetLength(0); i++) { - SaveParcel(parcel_data[i]); + SaveLandObject(landObject_data[i]); } - MainLog.Instance.Notice("Parcel Backup: Parcel Save Complete"); + MainLog.Instance.Notice("Land Backup: Land Save Complete"); } - public void RemoveParcel(ParcelData parcel) + public void RemoveLandObject(LandData landObject) { - IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID)); + IObjectSet result = db.Query(new UUIDLandQuery(landObject.globalID)); if (result.Count > 0) { db.Delete(result[0]); } db.Commit(); } - public void RemoveAllParcels() + public void RemoveAllLandObjects() { - MainLog.Instance.Notice("Parcel Backup: Removing all parcels..."); - IObjectSet result = db.Get(typeof(ParcelData)); + MainLog.Instance.Notice("Land Backup: Removing all land objects..."); + IObjectSet result = db.Get(typeof(LandData)); if (result.Count > 0) { - foreach (ParcelData parcelData in result) + foreach (LandData landData in result) { - RemoveParcel(parcelData); + RemoveLandObject(landData); } } } - public void LoadParcels(ILocalStorageParcelReceiver recv) + public void LoadLandObjects(ILocalStorageLandObjectReceiver recv) { - MainLog.Instance.Notice("Parcel Backup: Loading Parcels..."); - IObjectSet result = db.Get(typeof(ParcelData)); + MainLog.Instance.Notice("Land Backup: Loading Lands..."); + IObjectSet result = db.Get(typeof(LandData)); if (result.Count > 0) { - MainLog.Instance.Notice("Parcel Backup: Parcels exist in database."); - foreach (ParcelData parcelData in result) + MainLog.Instance.Notice("Land Backup: Lands exist in database."); + foreach (LandData landData in result) { - recv.ParcelFromStorage(parcelData); + recv.LandFromStorage(landData); } } else { - MainLog.Instance.Notice("Parcel Backup: No parcels exist. Creating basic parcel."); - recv.NoParcelDataFromStorage(); + MainLog.Instance.Notice("Land Backup: No landObjects exist. Creating basic landObject."); + recv.NoLandDataFromStorage(); } - MainLog.Instance.Notice("Parcel Backup: Parcels Restored"); + MainLog.Instance.Notice("Land Backup: Lands Restored"); } public void ShutDown() { diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDLandQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDLandQuery.cs new file mode 100644 index 0000000..6c5b2fb --- /dev/null +++ b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDLandQuery.cs @@ -0,0 +1,47 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.org/ +* See CONTRIBUTORS.TXT for a full list of copyright holders. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the OpenSim Project nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +using Db4objects.Db4o.Query; +using libsecondlife; +using OpenSim.Framework.Types; + +namespace OpenSim.Region.Storage.LocalStorageDb4o +{ + public class UUIDLandQuery : Predicate + { + private LLUUID globalIDSearch; + + public UUIDLandQuery(LLUUID find) + { + globalIDSearch = find; + } + public bool Match(LandData land) + { + return (land.globalID == globalIDSearch); + } + } +} diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs deleted file mode 100644 index debaa88..0000000 --- a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs +++ /dev/null @@ -1,47 +0,0 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using Db4objects.Db4o.Query; -using libsecondlife; -using OpenSim.Framework.Types; - -namespace OpenSim.Region.Storage.LocalStorageDb4o -{ - public class UUIDParcelQuery : Predicate - { - private LLUUID globalIDSearch; - - public UUIDParcelQuery(LLUUID find) - { - globalIDSearch = find; - } - public bool Match(ParcelData parcel) - { - return (parcel.globalID == globalIDSearch); - } - } -} diff --git a/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs b/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs index 599ff6c..88c5bde 100644 --- a/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs @@ -167,26 +167,26 @@ namespace OpenSim.Region.Storage.LocalStorageSQLite } - public void SaveParcels(ParcelData[] parcel_manager) + public void SaveLandObjects(LandData[] land_manager) { } - public void SaveParcel(ParcelData parcel) + public void SaveLandObject(LandData land) { } - public void RemoveParcel(ParcelData parcel) + public void RemoveLandObject(LandData land) { } - public void RemoveAllParcels() + public void RemoveAllLandObjects() { } - public void LoadParcels(ILocalStorageParcelReceiver recv) + public void LoadLandObjects(ILocalStorageLandObjectReceiver recv) { - recv.NoParcelDataFromStorage(); + recv.NoLandDataFromStorage(); } public void ShutDown() diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs index 9dc20c3..fc003e8 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Text; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.Environment; +using OpenSim.Region.Environment.LandManagement; using OpenSim.Region.Interfaces; using OpenSim.Framework.Console; using libsecondlife; @@ -43,19 +43,19 @@ namespace OpenSim.DataStore.NullStorage return null; } - public void RemoveParcel(uint id) + public void RemoveLandObject(uint id) { } - public void StoreParcel(OpenSim.Region.Environment.Parcels.Parcel parcel) + public void StoreParcel(Land land) { } - public List LoadParcels() + public List LoadLandObjects() { - return new List(); + return new List(); } public void Shutdown() -- cgit v1.1