finished removing the UserBackend interface - now all handled through

PropertyProvider, saveMRU is deprecated for the moment (needs to be done
at a lower level really)
This commit is contained in:
Eric J. Bowersox 2002-05-27 07:40:54 +00:00
parent e7857d5501
commit 86d9a90f54
4 changed files with 3 additions and 50 deletions

View File

@ -18,7 +18,6 @@
package com.silverwrist.venice.core.impl; package com.silverwrist.venice.core.impl;
import com.silverwrist.util.*; import com.silverwrist.util.*;
import com.silverwrist.venice.core.internals.UserBackend;
import com.silverwrist.venice.except.*; import com.silverwrist.venice.except.*;
import com.silverwrist.venice.svc.internal.GlobalSite; import com.silverwrist.venice.svc.internal.GlobalSite;
import com.silverwrist.venice.util.MailSend; import com.silverwrist.venice.util.MailSend;

View File

@ -31,7 +31,7 @@ import com.silverwrist.venice.svc.ServiceControl;
import com.silverwrist.venice.svc.internal.GlobalSite; import com.silverwrist.venice.svc.internal.GlobalSite;
import com.silverwrist.venice.util.*; import com.silverwrist.venice.util.*;
class UserContextImpl implements UserContext, ServiceProvider, PropertyProvider, UserBackend class UserContextImpl implements UserContext, ServiceProvider, PropertyProvider
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Static data members * Static data members
@ -87,7 +87,7 @@ class UserContextImpl implements UserContext, ServiceProvider, PropertyProvider,
UserContextImpl(GlobalSite globalsite, EnvEngine env) UserContextImpl(GlobalSite globalsite, EnvEngine env)
{ {
this.globalsite = globalsite; this.globalsite = globalsite;
this.env = new EnvUser(env,this,this); this.env = new EnvUser(env,this);
} // end constructor } // end constructor
@ -1710,17 +1710,6 @@ class UserContextImpl implements UserContext, ServiceProvider, PropertyProvider,
} // end propGetBoolean } // end propGetBoolean
/*--------------------------------------------------------------------------------
* Implementations from interface UserBackend
*--------------------------------------------------------------------------------
*/
public void saveMRU(String tag, Object data)
{
mru_cache.put(tag,data);
} // end saveMRU
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Operations private to implementation package * Operations private to implementation package
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------

View File

@ -52,7 +52,6 @@ public class EnvUser extends EnvEngine
private ServiceProvider usersvc; // the user service provider private ServiceProvider usersvc; // the user service provider
private PropertyProvider userprops; // the user property provider private PropertyProvider userprops; // the user property provider
private UserBackend user; // the user backend object
private SecurityMonitor sm; // security monitor at this level private SecurityMonitor sm; // security monitor at this level
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
@ -60,12 +59,11 @@ public class EnvUser extends EnvEngine
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public EnvUser(EnvEngine parent, ServiceProvider usersvc, UserBackend user) public EnvUser(EnvEngine parent, ServiceProvider usersvc)
{ {
super(parent); super(parent);
this.usersvc = usersvc; this.usersvc = usersvc;
this.userprops = (PropertyProvider)(usersvc.queryService(PropertyProvider.class)); this.userprops = (PropertyProvider)(usersvc.queryService(PropertyProvider.class));
this.user = user;
this.sm = (SecurityMonitor)(getGlobalSite().queryService(SecurityMonitor.class)); this.sm = (SecurityMonitor)(getGlobalSite().queryService(SecurityMonitor.class));
} // end constructor } // end constructor
@ -75,7 +73,6 @@ public class EnvUser extends EnvEngine
super(other); super(other);
this.usersvc = other.usersvc; this.usersvc = other.usersvc;
this.userprops = other.userprops; this.userprops = other.userprops;
this.user = other.user;
this.sm = other.sm; this.sm = other.sm;
} // end constructor } // end constructor
@ -204,12 +201,6 @@ public class EnvUser extends EnvEngine
} // end getProps } // end getProps
public final UserBackend getUser()
{
return user;
} // end getUser
public final int getUserID() public final int getUserID()
{ {
return userprops.propGetInt("id"); return userprops.propGetInt("id");

View File

@ -1,26 +0,0 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.venice.core.internals;
import com.silverwrist.venice.except.DataException;
public interface UserBackend
{
public abstract void saveMRU(String tag, Object data);
} // end interface UserBackend