Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community
Class AvatarManagerFactory

java.lang.Object
  extended by com.jivesoftware.community.AvatarManagerFactory

public final class AvatarManagerFactory
extends java.lang.Object

A factory that returns a concrete instance of an AvatarManager. Also used for enabling or disabling avatar feature, and for cache management. Diract access of the caches is discouraged - it's best to use the available methods for adding/removing items from an avatar cache.


Field Summary
static com.jivesoftware.community.cache.Cache<java.lang.Object,java.lang.Object> activeAvatarCache
           
static java.lang.String AVATAR_ENABLE_PROPERTY
           
static com.jivesoftware.community.cache.Cache<java.lang.Object,java.lang.Object> avatarCache
           
static com.jivesoftware.community.cache.Cache<java.lang.Object,java.lang.Object> reverseActiveAvatarCache
           
 
Method Summary
static void addActiveAvatarToCache(Avatar avatar, User user)
          Adds an avatar to the active avatar caches for a specific user
static void clearAvatarFromCache(Avatar avatar)
          Clears an avatar from all the caches
 void destroy()
           
static void doInitialize()
           
static AvatarManager getInstance()
          Returns a concrete instance of the Avatar interface.
 void initialize(JiveContext jiveContext)
           
static boolean isAvatarsEnabled()
           
static void setAvatarsEnabled(boolean enabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AVATAR_ENABLE_PROPERTY

public static final java.lang.String AVATAR_ENABLE_PROPERTY
See Also:
Constant Field Values

avatarCache

public static com.jivesoftware.community.cache.Cache<java.lang.Object,java.lang.Object> avatarCache

activeAvatarCache

public static com.jivesoftware.community.cache.Cache<java.lang.Object,java.lang.Object> activeAvatarCache

reverseActiveAvatarCache

public static com.jivesoftware.community.cache.Cache<java.lang.Object,java.lang.Object> reverseActiveAvatarCache
Method Detail

getInstance

public static AvatarManager getInstance()
Returns a concrete instance of the Avatar interface.

Note: in general this method intended to be called only by the JiveContext.

Returns:
a concrete implementation of avatar manager.

initialize

public void initialize(JiveContext jiveContext)

destroy

public void destroy()

doInitialize

public static void doInitialize()

setAvatarsEnabled

public static void setAvatarsEnabled(boolean enabled)

isAvatarsEnabled

public static boolean isAvatarsEnabled()

addActiveAvatarToCache

public static void addActiveAvatarToCache(Avatar avatar,
                                          User user)
Adds an avatar to the active avatar caches for a specific user

Parameters:
avatar - active avatar
user - user key for avatar

clearAvatarFromCache

public static void clearAvatarFromCache(Avatar avatar)
Clears an avatar from all the caches

Parameters:
avatar - avatar to clear from caches

Clearspace Project Page

Copyright © 1999-2007 Jive Software.