Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum
Class AvatarManagerFactory

java.lang.Object
  extended by com.jivesoftware.forum.AvatarManagerFactory
All Implemented Interfaces:
JiveManager

public final class AvatarManagerFactory
extends java.lang.Object
implements JiveManager

Used to create Managers for Avatar feature. Also used for enabling disabling avatar feature, and for cache management.

Please use method for managing adding/removing items from the caches


Field Summary
static Cache activeAvatarCache
           
static java.lang.String AVATAR_ENABLE_PROPERTY
           
static Cache avatarCache
           
static Cache 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()
          Notifies the manager to release any resources that may be holding on too.
static void doInitialize()
           
static AvatarManager getInstance()
          Returns a concrete instance of the Avatar interface.
 void initialize()
          Initialize the manager.
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 Cache avatarCache

activeAvatarCache

public static Cache activeAvatarCache

reverseActiveAvatarCache

public static Cache 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 DbForumFactory.

Returns:
a concrete implementation of avatar manager.

initialize

public void initialize()
Description copied from interface: JiveManager
Initialize the manager. It is within this method that it is ok to create, access and/or otherwise use external classes (including caches). Until this method is called implementation should not access any external classes that could possibly either access one of the main Factory classes or any caches since doing so can cause deadlocks and possible clustering issues during startup.

This method is used internally by Jive during application startup and should not be called during normal usage of the class.

Specified by:
initialize in interface JiveManager

destroy

public void destroy()
Description copied from interface: JiveManager
Notifies the manager to release any resources that may be holding on too. This could also be used to clear out the managers caches, etc.

This method is used internally by Jive during application startup and should not be called during normal usage of the class.

Specified by:
destroy in interface JiveManager

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

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.