public HGAssetService(IConfigSource config) : base(config) { m_log.Debug("[HGAsset Service]: Starting"); IConfig assetConfig = config.Configs["HGAssetService"]; if (assetConfig == null) { throw new Exception("No HGAssetService configuration"); } string userAccountsDll = assetConfig.GetString("UserAccountsService", string.Empty); if (userAccountsDll == string.Empty) { throw new Exception("Please specify UserAccountsService in HGAssetService configuration"); } Object[] args = new Object[] { config }; m_UserAccountService = ServerUtils.LoadPlugin <IUserAccountService>(userAccountsDll, args); if (m_UserAccountService == null) { throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); } m_ProfileServiceURL = assetConfig.GetString("ProfileServerURI", string.Empty); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); }
public HGAssetService(IConfigSource config, string configName) : base(config, configName) { m_log.Debug("[HGAsset Service]: Starting"); IConfig assetConfig = config.Configs[configName]; if (assetConfig == null) throw new Exception("No HGAssetService configuration"); string userAccountsDll = assetConfig.GetString("UserAccountsService", string.Empty); if (userAccountsDll == string.Empty) throw new Exception("Please specify UserAccountsService in HGAssetService configuration"); Object[] args = new Object[] { config }; m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(userAccountsDll, args); if (m_UserAccountService == null) throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI", new string[] { "Startup", "Hypergrid", configName }, string.Empty); if (m_HomeURL == string.Empty) throw new Exception("[HGAssetService] No HomeURI specified"); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); // Permissions m_AssetPerms = new AssetPermissions(assetConfig); }
public HGAssetService(IConfigSource config, string configName) : base(config, configName) { m_log.Debug("[HGAsset Service]: Starting"); IConfig assetConfig = config.Configs[configName]; if (assetConfig == null) { throw new Exception("No HGAssetService configuration"); } string userAccountsDll = assetConfig.GetString("UserAccountsService", string.Empty); if (userAccountsDll == string.Empty) { throw new Exception("Please specify UserAccountsService in HGAssetService configuration"); } Object[] args = new Object[] { config }; m_UserAccountService = ServerUtils.LoadPlugin <IUserAccountService>(userAccountsDll, args); if (m_UserAccountService == null) { throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); } // legacy configuration [obsolete] m_HomeURL = assetConfig.GetString("ProfileServerURI", string.Empty); // Preferred m_HomeURL = assetConfig.GetString("HomeURI", m_HomeURL); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); // Permissions m_AssetPerms = new AssetPermissions(assetConfig); }
public HGInventoryService(IConfigSource config, string configName) : base(config, configName) { m_log.Debug("[HGInventory Service]: Starting"); if (configName != string.Empty) m_ConfigName = configName; // // Try reading the [InventoryService] section, if it exists // IConfig invConfig = config.Configs[m_ConfigName]; if (invConfig != null) { // realm = authConfig.GetString("Realm", realm); string userAccountsDll = invConfig.GetString("UserAccountsService", string.Empty); if (userAccountsDll == string.Empty) throw new Exception("Please specify UserAccountsService in HGInventoryService configuration"); Object[] args = new Object[] { config }; m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(userAccountsDll, args); if (m_UserAccountService == null) throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI", new string[] { "Startup", "Hypergrid", m_ConfigName }, String.Empty); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); } m_log.Debug("[HG INVENTORY SERVICE]: Starting..."); }
public HGAssetService(IConfigSource config, string configName) : base(config, configName) { m_log.Debug("[HGAsset Service]: Starting"); IConfig assetConfig = config.Configs[configName]; if (assetConfig == null) throw new Exception("No HGAssetService configuration"); string userAccountsDll = assetConfig.GetString("UserAccountsService", string.Empty); if (userAccountsDll == string.Empty) throw new Exception("Please specify UserAccountsService in HGAssetService configuration"); Object[] args = new Object[] { config }; m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(userAccountsDll, args); if (m_UserAccountService == null) throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); // legacy configuration [obsolete] m_HomeURL = assetConfig.GetString("ProfileServerURI", string.Empty); // Preferred m_HomeURL = assetConfig.GetString("HomeURI", m_HomeURL); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); // Permissions m_AssetPerms = new AssetPermissions(assetConfig); }
public static UserAccountCache CreateUserAccountCache(IUserAccountService u) { if (m_Singleton == null) { m_Singleton = new UserAccountCache(u); } return(m_Singleton); }
public HGAssetService(IConfigSource config, string configName) : base(config) { m_log.Debug("[HGAsset Service]: Starting"); IConfig assetConfig = config.Configs[configName]; if (assetConfig == null) { throw new Exception("No HGAssetService configuration"); } string userAccountsDll = assetConfig.GetString("UserAccountsService", string.Empty); if (userAccountsDll == string.Empty) { throw new Exception("Please specify UserAccountsService in HGAssetService configuration"); } Object[] args = new Object[] { config }; m_UserAccountService = ServerUtils.LoadPlugin <IUserAccountService>(userAccountsDll, args); if (m_UserAccountService == null) { throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); } m_HomeURL = Util.GetConfigVarFromSections <string>(config, "HomeURI", new string[] { "Startup", "Hypergrid", configName }, string.Empty); if (m_HomeURL == string.Empty) { throw new Exception("[HGAssetService] No HomeURI specified"); } m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); // Permissions m_AssetPerms = new AssetPermissions(assetConfig); string str = assetConfig.GetString("BackingService", "OpenSim.Services.AssetService.dll:AssetService"); if (str != string.Empty) { args = new object[] { config }; m_assetService = LoadPlugin <IAssetService>(str, args); if (m_assetService != null) { m_log.InfoFormat("[HGASSETS]: Backing service loaded: {0}", str); } else { m_log.ErrorFormat("[HGASSETS]: Failed to load backing service {0}", str); } } }
public HGRemoteAssetService(IConfigSource config, string configName) { m_log.Debug("[HGRemoteAsset Service]: Starting"); IConfig assetConfig = config.Configs[configName]; if (assetConfig == null) { throw new Exception("No HGAssetService configuration"); } Object[] args = new Object[] { config }; string assetConnectorDll = assetConfig.GetString("AssetConnector", String.Empty); if (assetConnectorDll == String.Empty) { throw new Exception("Please specify AssetConnector in HGAssetService configuration"); } m_assetConnector = ServerUtils.LoadPlugin <IAssetService>(assetConnectorDll, args); if (m_assetConnector == null) { throw new Exception(String.Format("Unable to create AssetConnector from {0}", assetConnectorDll)); } string userAccountsDll = assetConfig.GetString("UserAccountsService", string.Empty); if (userAccountsDll == string.Empty) { throw new Exception("Please specify UserAccountsService in HGAssetService configuration"); } m_UserAccountService = ServerUtils.LoadPlugin <IUserAccountService>(userAccountsDll, args); if (m_UserAccountService == null) { throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); } m_HomeURL = Util.GetConfigVarFromSections <string>(config, "HomeURI", new string[] { "Startup", "Hypergrid", configName }, string.Empty); if (m_HomeURL == string.Empty) { throw new Exception("[HGAssetService] No HomeURI specified"); } m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); // Permissions m_AssetPerms = new AssetPermissions(assetConfig); }
public HGInventoryService(IConfigSource config, string configName) : base(config, configName) { m_log.Debug("[HGInventory Service]: Starting"); if (configName != string.Empty) { m_ConfigName = configName; } // // Try reading the [InventoryService] section, if it exists // IConfig invConfig = config.Configs[m_ConfigName]; if (invConfig != null) { // realm = authConfig.GetString("Realm", realm); string userAccountsDll = invConfig.GetString("UserAccountsService", string.Empty); if (userAccountsDll == string.Empty) { throw new Exception("Please specify UserAccountsService in HGInventoryService configuration"); } Object[] args = new Object[] { config }; m_UserAccountService = ServerUtils.LoadPlugin <IUserAccountService>(userAccountsDll, args); if (m_UserAccountService == null) { throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); } m_HomeURL = Util.GetConfigVarFromSections <string>(config, "HomeURI", new string[] { "Startup", "Hypergrid", m_ConfigName }, String.Empty).ToLowerInvariant(); if (!string.IsNullOrEmpty(m_HomeURL) && !m_HomeURL.EndsWith("/")) { m_HomeURL += "/"; } m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); } m_log.Debug("[HG INVENTORY SERVICE]: Starting..."); }
public HGAssetService(IConfigSource config) : base(config) { m_log.Debug("[HGAsset Service]: Starting"); IConfig assetConfig = config.Configs["HGAssetService"]; if (assetConfig == null) throw new Exception("No HGAssetService configuration"); string userAccountsDll = assetConfig.GetString("UserAccountsService", string.Empty); if (userAccountsDll == string.Empty) throw new Exception("Please specify UserAccountsService in HGAssetService configuration"); Object[] args = new Object[] { config }; m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(userAccountsDll, args); if (m_UserAccountService == null) throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); m_ProfileServiceURL = assetConfig.GetString("ProfileServerURI", string.Empty); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); }
public HGInventoryService(IConfigSource config, string configName) : base(config, configName) { m_log.Debug("[HGInventory Service]: Starting"); if (configName != string.Empty) { m_ConfigName = configName; } // // Try reading the [InventoryService] section, if it exists // IConfig invConfig = config.Configs[m_ConfigName]; if (invConfig != null) { // realm = authConfig.GetString("Realm", realm); string userAccountsDll = invConfig.GetString("UserAccountsService", string.Empty); if (userAccountsDll == string.Empty) { throw new Exception("Please specify UserAccountsService in HGInventoryService configuration"); } Object[] args = new Object[] { config }; m_UserAccountService = ServerUtils.LoadPlugin <IUserAccountService>(userAccountsDll, args); if (m_UserAccountService == null) { throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); } // legacy configuration [obsolete] m_HomeURL = invConfig.GetString("ProfileServerURI", string.Empty); // Preferred m_HomeURL = invConfig.GetString("HomeURI", m_HomeURL); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); } m_log.Debug("[HG INVENTORY SERVICE]: Starting..."); }
public HGInventoryService(IConfigSource config) : base(config) { m_log.Debug("[HGInventory Service]: Starting"); string dllName = String.Empty; string connString = String.Empty; //string realm = "Inventory"; // OSG version doesn't use this // // Try reading the [DatabaseService] section, if it exists // IConfig dbConfig = config.Configs["DatabaseService"]; if (dbConfig != null) { if (dllName == String.Empty) { dllName = dbConfig.GetString("StorageProvider", String.Empty); } if (connString == String.Empty) { connString = dbConfig.GetString("ConnectionString", String.Empty); } } // // Try reading the [InventoryService] section, if it exists // IConfig invConfig = config.Configs["HGInventoryService"]; if (invConfig != null) { dllName = invConfig.GetString("StorageProvider", dllName); connString = invConfig.GetString("ConnectionString", connString); // realm = authConfig.GetString("Realm", realm); string userAccountsDll = invConfig.GetString("UserAccountsService", string.Empty); if (userAccountsDll == string.Empty) { throw new Exception("Please specify UserAccountsService in HGInventoryService configuration"); } Object[] args = new Object[] { config }; m_UserAccountService = ServerUtils.LoadPlugin <IUserAccountService>(userAccountsDll, args); if (m_UserAccountService == null) { throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); } // legacy configuration [obsolete] m_HomeURL = invConfig.GetString("ProfileServerURI", string.Empty); // Preferred m_HomeURL = invConfig.GetString("HomeURI", m_HomeURL); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); } // // We tried, but this doesn't exist. We can't proceed. // if (dllName == String.Empty) { throw new Exception("No StorageProvider configured"); } m_Database = LoadPlugin <IXInventoryData>(dllName, new Object[] { connString, String.Empty }); if (m_Database == null) { throw new Exception("Could not find a storage interface in the given module"); } m_log.Debug("[HG INVENTORY SERVICE]: Starting..."); }
public HGInventoryService(IConfigSource config) : base(config) { m_log.Debug("[HGInventory Service]: Starting"); string dllName = String.Empty; string connString = String.Empty; //string realm = "Inventory"; // OSG version doesn't use this // // Try reading the [DatabaseService] section, if it exists // IConfig dbConfig = config.Configs["DatabaseService"]; if (dbConfig != null) { if (dllName == String.Empty) dllName = dbConfig.GetString("StorageProvider", String.Empty); if (connString == String.Empty) connString = dbConfig.GetString("ConnectionString", String.Empty); } // // Try reading the [InventoryService] section, if it exists // IConfig invConfig = config.Configs["HGInventoryService"]; if (invConfig != null) { dllName = invConfig.GetString("StorageProvider", dllName); connString = invConfig.GetString("ConnectionString", connString); // realm = authConfig.GetString("Realm", realm); string userAccountsDll = invConfig.GetString("UserAccountsService", string.Empty); if (userAccountsDll == string.Empty) throw new Exception("Please specify UserAccountsService in HGInventoryService configuration"); Object[] args = new Object[] { config }; m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(userAccountsDll, args); if (m_UserAccountService == null) throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); m_ProfileServiceURL = invConfig.GetString("ProfileServerURI", string.Empty); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); } // // We tried, but this doesn't exist. We can't proceed. // if (dllName == String.Empty) throw new Exception("No StorageProvider configured"); m_Database = LoadPlugin<IXInventoryData>(dllName, new Object[] {connString, String.Empty}); if (m_Database == null) throw new Exception("Could not find a storage interface in the given module"); m_log.Debug("[HG INVENTORY SERVICE]: Starting..."); }
public HGSuitcaseInventoryService(IConfigSource config, string configName) : base(config, configName) { m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Starting with config name {0}", configName); if (configName != string.Empty) m_ConfigName = configName; if (m_Database == null) m_log.WarnFormat("[XXX]: m_Database is null!"); // // Try reading the [InventoryService] section, if it exists // IConfig invConfig = config.Configs[m_ConfigName]; if (invConfig != null) { // realm = authConfig.GetString("Realm", realm); string userAccountsDll = invConfig.GetString("UserAccountsService", string.Empty); if (userAccountsDll == string.Empty) throw new Exception("Please specify UserAccountsService in HGInventoryService configuration"); Object[] args = new Object[] { config }; m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(userAccountsDll, args); if (m_UserAccountService == null) throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); // legacy configuration [obsolete] m_HomeURL = invConfig.GetString("ProfileServerURI", string.Empty); // Preferred m_HomeURL = invConfig.GetString("HomeURI", m_HomeURL); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); } m_log.Debug("[HG SUITCASE INVENTORY SERVICE]: Starting..."); }