29 using System.Collections.Generic;
33 using System.Reflection;
34 using OpenSim.Services.Base;
35 using OpenSim.Services.Interfaces;
37 using OpenSim.Framework;
52 string dllName = String.Empty;
53 string connString = String.Empty;
56 IConfig dbConfig = config.Configs[
"DatabaseService"];
59 dllName = dbConfig.GetString(
"StorageProvider", String.Empty);
60 connString = dbConfig.GetString(
"ConnectionString", String.Empty);
61 connString = dbConfig.GetString(
"EstateConnectionString", connString);
65 IConfig estConfig = config.Configs[
"EstateDataStore"];
66 if (estConfig != null)
68 dllName = estConfig.GetString(
"StorageProvider", dllName);
69 connString = estConfig.GetString(
"ConnectionString", connString);
73 if (dllName == String.Empty)
74 throw new Exception(
"No StorageProvider configured");
76 m_database = LoadPlugin<IEstateDataStore>(dllName,
new Object[] { connString });
77 if (m_database == null)
78 throw new Exception(
"Could not find a storage interface in the given module");
83 return m_database.LoadEstateSettings(regionID, create);
88 return m_database.LoadEstateSettings(estateID);
93 return m_database.CreateNewEstate();
98 return m_database.LoadEstateSettingsAll();
103 m_database.StoreEstateSettings(es);
108 return m_database.GetEstates(search);
113 return m_database.GetEstatesAll();
118 return m_database.GetEstatesByOwner(ownerID);
123 return m_database.LinkRegion(regionID, estateID);
128 return m_database.GetRegions(estateID);
133 return m_database.DeleteEstate(estateID);
bool LinkRegion(UUID regionID, int estateID)
Link a region to an estate.
EstateSettings LoadEstateSettings(int estateID)
Load estate settings for an estate ID.
List< int > GetEstates(string search)
Get estate IDs.
List< EstateSettings > LoadEstateSettingsAll()
Load/Get all estate settings.
List< int > GetEstatesByOwner(UUID ownerID)
Get the IDs of all estates owned by the given user.
EstateSettings CreateNewEstate()
Create a new estate.
void StoreEstateSettings(EstateSettings es)
Store estate settings.
List< int > GetEstatesAll()
Get the IDs of all estates.
IEstateDataStore m_database
bool DeleteEstate(int estateID)
Delete an estate
Interactive OpenSim region server
EstateDataService(IConfigSource config)
List< UUID > GetRegions(int estateID)
Get the UUIDs of all the regions in an estate.
EstateSettings LoadEstateSettings(UUID regionID, bool create)
Load estate settings for a region.