* refactor: rename UserServiceAdmin to UserAdminService

0.6.1-post-fixes
Justin Clarke Casey 2008-11-28 16:04:01 +00:00
parent 63851f1441
commit 18974b7766
10 changed files with 19 additions and 17 deletions

View File

@ -474,7 +474,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
m_log.InfoFormat("master avatar does not exist, creating it"); m_log.InfoFormat("master avatar does not exist, creating it");
// ...or create new user // ...or create new user
userID = m_app.CommunicationsManager.UserServiceAdmin.AddUser( userID = m_app.CommunicationsManager.UserAdminService.AddUser(
masterFirst, masterLast, masterPassword, "", region.RegionLocX, region.RegionLocY); masterFirst, masterLast, masterPassword, "", region.RegionLocX, region.RegionLocY);
if (userID == UUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}", if (userID == UUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}",
@ -671,7 +671,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname)); throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname));
UUID userID UUID userID
= m_app.CommunicationsManager.UserServiceAdmin.AddUser( = m_app.CommunicationsManager.UserAdminService.AddUser(
firstname, lastname, passwd, email, regX, regY); firstname, lastname, passwd, email, regX, regY);
if (userID == UUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}", if (userID == UUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}",
@ -769,7 +769,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname)); throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname));
UUID userID UUID userID
= m_app.CommunicationsManager.UserServiceAdmin.AddUser( = m_app.CommunicationsManager.UserAdminService.AddUser(
firstname, lastname, passwd, email, regX, regY); firstname, lastname, passwd, email, regX, regY);
if (userID == UUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}", if (userID == UUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}",

View File

@ -108,11 +108,11 @@ namespace OpenSim.Framework.Communications
/// <summary> /// <summary>
/// Interface to user service for administrating users. /// Interface to user service for administrating users.
/// </summary> /// </summary>
public IUserServiceAdmin UserServiceAdmin public IUserAdminService UserAdminService
{ {
get { return m_userServiceAdmin; } get { return m_userAdminService; }
} }
protected IUserServiceAdmin m_userServiceAdmin; protected IUserAdminService m_userAdminService;
public BaseHttpServer HttpServer public BaseHttpServer HttpServer
{ {

View File

@ -29,7 +29,10 @@ using OpenMetaverse;
namespace OpenSim.Framework.Communications namespace OpenSim.Framework.Communications
{ {
public interface IUserServiceAdmin /// <summary>
/// Interface for the service for administrating users
/// </summary>
public interface IUserAdminService
{ {
/// <summary> /// <summary>
/// Add a new user /// Add a new user

View File

@ -43,7 +43,7 @@ namespace OpenSim.Framework.Communications
/// <summary> /// <summary>
/// Base class for user management (create, read, etc) /// Base class for user management (create, read, etc)
/// </summary> /// </summary>
public abstract class UserManagerBase : IUserService, IUserServiceAdmin, IAvatarService, IMessagingService public abstract class UserManagerBase : IUserService, IUserAdminService, IAvatarService, IMessagingService
{ {
private static readonly ILog m_log private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

View File

@ -800,7 +800,7 @@ namespace OpenSim
if (null == m_commsManager.UserService.GetUserProfile(firstName, lastName)) if (null == m_commsManager.UserService.GetUserProfile(firstName, lastName))
{ {
m_commsManager.UserServiceAdmin.AddUser(firstName, lastName, password, email, regX, regY); m_commsManager.UserAdminService.AddUser(firstName, lastName, password, email, regX, regY);
} }
else else
{ {
@ -830,7 +830,7 @@ namespace OpenSim
newPassword = MainConsole.Instance.PasswdPrompt("New password"); newPassword = MainConsole.Instance.PasswdPrompt("New password");
else newPassword = cmdparams[4]; else newPassword = cmdparams[4];
m_commsManager.UserServiceAdmin.ResetUserPassword(firstName, lastName, newPassword); m_commsManager.UserAdminService.ResetUserPassword(firstName, lastName, newPassword);
} }
protected void SaveXml(string[] cmdparams) protected void SaveXml(string[] cmdparams)

View File

@ -42,7 +42,7 @@ namespace OpenSim.Region.Communications.Hypergrid
BaseHttpServer httpServer, BaseHttpServer httpServer,
AssetCache assetCache, AssetCache assetCache,
IUserService userService, IUserService userService,
IUserServiceAdmin userServiceAdmin, IUserAdminService userServiceAdmin,
LocalInventoryService inventoryService, LocalInventoryService inventoryService,
IInterRegionCommunications interRegionService, IInterRegionCommunications interRegionService,
HGGridServices gridService, IMessagingService messageService, LibraryRootFolder libraryRootFolder, bool dumpAssetsToFile) HGGridServices gridService, IMessagingService messageService, LibraryRootFolder libraryRootFolder, bool dumpAssetsToFile)
@ -54,6 +54,5 @@ namespace OpenSim.Region.Communications.Hypergrid
AddSecureInventoryService((ISecureInventoryService)inventoryService); AddSecureInventoryService((ISecureInventoryService)inventoryService);
m_inventoryServices = null; m_inventoryServices = null;
} }
} }
} }

View File

@ -39,7 +39,7 @@ namespace OpenSim.Region.Communications.Local
BaseHttpServer httpServer, BaseHttpServer httpServer,
AssetCache assetCache, AssetCache assetCache,
IUserService userService, IUserService userService,
IUserServiceAdmin userServiceAdmin, IUserAdminService userServiceAdmin,
LocalInventoryService inventoryService, LocalInventoryService inventoryService,
IInterRegionCommunications interRegionService, IInterRegionCommunications interRegionService,
IGridServices gridService, IMessagingService messageService, IGridServices gridService, IMessagingService messageService,
@ -50,7 +50,7 @@ namespace OpenSim.Region.Communications.Local
m_defaultInventoryHost = inventoryService.Host; m_defaultInventoryHost = inventoryService.Host;
m_interServiceInventoryService = inventoryService; m_interServiceInventoryService = inventoryService;
m_userService = userService; m_userService = userService;
m_userServiceAdmin = userServiceAdmin; m_userAdminService = userServiceAdmin;
m_avatarService = (IAvatarService)userService; m_avatarService = (IAvatarService)userService;
m_gridService = gridService; m_gridService = gridService;
m_interRegion = interRegionService; m_interRegion = interRegionService;

View File

@ -530,7 +530,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
// get seed capagentData.firstname = FirstName;agentData.lastname = LastName; // get seed capagentData.firstname = FirstName;agentData.lastname = LastName;
if (homeScene.CommsManager.UserService.GetUserProfile(agentData.AgentID) == null && !GridMode) if (homeScene.CommsManager.UserService.GetUserProfile(agentData.AgentID) == null && !GridMode)
{ {
homeScene.CommsManager.UserServiceAdmin.AddUser( homeScene.CommsManager.UserAdminService.AddUser(
agentData.firstname, agentData.lastname, CreateRandomStr(7), "", agentData.firstname, agentData.lastname, CreateRandomStr(7), "",
homeScene.RegionInfo.RegionLocX, homeScene.RegionInfo.RegionLocY, agentData.AgentID); homeScene.RegionInfo.RegionLocX, homeScene.RegionInfo.RegionLocY, agentData.AgentID);

View File

@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests
((LocalInventoryService)scene.CommsManager.InventoryService).AddPlugin(new TestInventoryDataPlugin()); ((LocalInventoryService)scene.CommsManager.InventoryService).AddPlugin(new TestInventoryDataPlugin());
Assert.That( Assert.That(
scene.CommsManager.UserServiceAdmin.AddUser( scene.CommsManager.UserAdminService.AddUser(
"Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId), "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId),
Is.EqualTo(agentId)); Is.EqualTo(agentId));

View File

@ -44,7 +44,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests
LocalUserServices lus = new LocalUserServices(991, 992, lis); LocalUserServices lus = new LocalUserServices(991, 992, lis);
m_userService = lus; m_userService = lus;
m_userServiceAdmin = lus; m_userAdminService = lus;
} }
} }
} }