Clearspace API (1.10.16) Core Javadocs

com.jivesoftware.base
Class UserManagerFactory

java.lang.Object
  extended by com.jivesoftware.base.UserManagerFactory

public class UserManagerFactory
extends java.lang.Object

A factory that returns a concrete instance of a UserManager. Note that the UserManager returned is not wrapped by a protection proxy. Therefore, it's critical that any code that implements end-user functionality does not use this class directly. Instead, the product-specific methods to retrieve a UserManager should be used instead, such as the method available in the JiveContext class.


Field Summary
static com.jivesoftware.community.cache.Cache<java.lang.Long,User> userCache
          A cache for user objects.
static com.jivesoftware.community.cache.Cache<java.lang.String,java.lang.Long> userEmailCache
          A cache the maps email addresses to user ids.
static com.jivesoftware.community.cache.Cache<java.lang.String,java.lang.Long> userIDCache
          A cache that maps user names to ID's.
 
Method Summary
static void addListener(UserListener listener)
          Method used internally by Jive.
static void dispatchEvent(JiveEvent event)
          Method used internally by Jive.
static void doDestroy()
          Method used internally by Jive.
static void doInitialize()
          Initializes the UserManagerFactory: creates internal cache structures, (optionally) loads up a custom user manager if the UserManager.className jiveProperty has been set or by default loads a DbUserManager.
static UserManager getInstance()
          Returns a concrete instance of the user manager interface.
static void initCaches()
          Creates internal cache structures.
static void removeListener(UserListener listener)
          Method used internally by Jive.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userIDCache

public static com.jivesoftware.community.cache.Cache<java.lang.String,java.lang.Long> userIDCache
A cache that maps user names to ID's. This cache is not instantiated until after this factory is initialized.


userCache

public static com.jivesoftware.community.cache.Cache<java.lang.Long,User> userCache
A cache for user objects. This cache is not instantiated until after this factory is initialized.


userEmailCache

public static com.jivesoftware.community.cache.Cache<java.lang.String,java.lang.Long> userEmailCache
A cache the maps email addresses to user ids.

Method Detail

getInstance

public static UserManager getInstance()
Returns a concrete instance of the user manager interface. This method will return null until this class has been initialized.

Note: in general, this method is not intended to be called by outside users of the API. Doing so is dangerous since the UserManager implementation returned will not be secured by a protection proxy.

Returns:
a concrete implementation of a user manager.

doDestroy

public static void doDestroy()
Method used internally by Jive. Do NOT use this method. Allows the class to be re-initialized.


doInitialize

public static void doInitialize()
Initializes the UserManagerFactory: creates internal cache structures, (optionally) loads up a custom user manager if the UserManager.className jiveProperty has been set or by default loads a DbUserManager.


initCaches

public static void initCaches()
Creates internal cache structures.


addListener

public static void addListener(UserListener listener)
Method used internally by Jive. Do NOT use this method to register a listener for user events - use the UserEventDispatcher to do that.


removeListener

public static void removeListener(UserListener listener)
Method used internally by Jive. Do NOT use this method to unregister a listener for user events - use the UserEventDispatcher to do that.


dispatchEvent

public static void dispatchEvent(JiveEvent event)
Method used internally by Jive.


Clearspace Project Page

Copyright © 1999-2007 Jive Software.