From d34c1a101125f3cc720f15950bd0a0c82f2a80c2 Mon Sep 17 00:00:00 2001 From: shaper Date: Wed, 1 May 2002 01:50:05 +0000 Subject: [PATCH] Pass the user repository in to the user manager rather than constructing it so that applications that care to do so can use their own custom user repository. git-svn-id: https://samskivert.googlecode.com/svn/trunk@720 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../samskivert/servlet/user/UserManager.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/servlet/user/UserManager.java b/projects/samskivert/src/java/com/samskivert/servlet/user/UserManager.java index 95959fb4..11496ccf 100644 --- a/projects/samskivert/src/java/com/samskivert/servlet/user/UserManager.java +++ b/projects/samskivert/src/java/com/samskivert/servlet/user/UserManager.java @@ -1,5 +1,5 @@ // -// $Id: UserManager.java,v 1.10 2001/09/21 03:01:46 mdb Exp $ +// $Id: UserManager.java,v 1.11 2002/05/01 01:50:05 shaper Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -39,9 +39,8 @@ import com.samskivert.util.*; public class UserManager { /** - * A user manager creates a user repository through which to load and - * save user records. A connection provider must be supplied via which - * the user repository can obtain its database connection. + * A user manager must be supplied with a {@link UserRepository} + * through which it loads and saves user records. * *

Presently the user manager requires the following configuration * information: @@ -61,16 +60,14 @@ public class UserManager * * * @param config the user manager configuration properties. - * @param provider a database connection provider that will be used by - * the user repository to obtain it's database connection. - * - * @see UserRepository#UserRepository + * @param repository the user repository through which user records + * are loaded and saved. */ - public UserManager (Properties config, ConnectionProvider provider) + public UserManager (Properties config, UserRepository repository) throws PersistenceException { - // open up the user repository - _repository = new UserRepository(provider); + // save off the user repository + _repository = repository; // fetch the login URL from the properties _loginURL = config.getProperty("login_url");