Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community
Class TagManagerFactory

java.lang.Object
  extended by com.jivesoftware.community.TagManagerFactory
All Implemented Interfaces:
BlogPostListener, DocumentListener, ThreadListener, JiveManager

public class TagManagerFactory
extends java.lang.Object
implements JiveManager, ThreadListener, DocumentListener, BlogPostListener

A factory that returns a concrete instance of a TagManager


Field Summary
static com.jivesoftware.community.cache.Cache<java.lang.Long,ContentTag> tagCache
          A cache for tag objects.
static com.jivesoftware.community.cache.Cache<java.lang.String,com.jivesoftware.util.LongList> tagContentCache
          A cache for content object to tagID list
static com.jivesoftware.community.cache.Cache<java.lang.String,java.lang.Long> tagIDCache
          A cache that maps tag names to ID's.
 
Method Summary
 void binaryBodyDownloaded(DocumentEvent event)
          Fied when a document's binary body is downloaded
 void destroy()
          Notifies the manager to release any resources that may be holding on too.
 void documentAdded(DocumentEvent event)
          Fired when a document is added.
 void documentDeleted(DocumentEvent event)
          Fired when a document is deleted.
 void documentExpired(DocumentEvent event)
          Fired when a document expires.
 void documentExpireWarning(DocumentEvent event)
          Fired when a document is about to expire.
 void documentModified(DocumentEvent event)
          Fired when a document is modified.
 void documentMoved(DocumentEvent event)
          Fired when a document is moved.
 void documentRated(DocumentEvent event)
          Fired when a document is rated.
 void documentRelatedObjectAdded(DocumentEvent event)
          Fired when a related document is added to a document.
 void documentRelatedObjectDeleted(DocumentEvent event)
          Fired when a related document is deleted from a document.
 void documentUndeleted(DocumentEvent event)
          Fired when a document is un-deleted in the admin console.
 void documentViewed(DocumentEvent event)
          Fired when a document is marked as read.
static void doInitialize()
           
static java.lang.String getCacheKey(JiveObject contentObject)
          Returns a tag content cache key.
static TagManager getInstance()
          Returns a concrete instance of the tag manager interface.
 void initialize(JiveContext jiveContext)
          Initialize the manager.
 void postCreated(BlogPostEvent event)
          Fired when a post has been added to the system.
 void postDeleting(BlogPostEvent event)
          Fired when a post is about to be deleted from the system.
 void postModified(BlogPostEvent event)
          Fired when a post has been modified in the system.
 void postViewed(BlogPostEvent event)
          Fired when a post has been viewed in the system.
 void threadAdded(ThreadEvent event)
          Fired when a thread has been added to the system.
 void threadDeleted(ThreadEvent event)
          Fired when a thread is about to be deleted from the system.
 void threadModerationModified(ThreadEvent event)
          Fired when the moderation value of a thread has been changed.
 void threadMoved(ThreadEvent event)
          Fired when a thread is moved from one foru to another.
 void threadRated(ThreadEvent event)
          Fired when the thread has been rated.
 void threadViewed(ThreadEvent event)
          Fired when the thread has been viewed.
 void versionAdded(DocumentEvent event)
          Fied when a new version is added to a document.
 void versionDeleting(DocumentEvent event)
          Fied when a version is about to be deleted from a document.
 void versionModified(DocumentEvent event)
          Fied when a version is modified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tagIDCache

public static com.jivesoftware.community.cache.Cache<java.lang.String,java.lang.Long> tagIDCache
A cache that maps tag names to ID's.


tagCache

public static com.jivesoftware.community.cache.Cache<java.lang.Long,ContentTag> tagCache
A cache for tag objects.


tagContentCache

public static com.jivesoftware.community.cache.Cache<java.lang.String,com.jivesoftware.util.LongList> tagContentCache
A cache for content object to tagID list

Method Detail

getInstance

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

Returns:
a concrete implementation of a TagManager.

initialize

public void initialize(JiveContext jiveContext)
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) with the possible exception of other JiveManagers. 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. Attempting to access other JiveManager's may or may not work depending on the initialization order of the managers.

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
Parameters:
jiveContext - the context to use during initialization

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()

getCacheKey

public static java.lang.String getCacheKey(JiveObject contentObject)
Returns a tag content cache key.

Parameters:
contentObject - the contentObject.
Returns:
a cache key.

threadAdded

public void threadAdded(ThreadEvent event)
Description copied from interface: ThreadListener
Fired when a thread has been added to the system.

Specified by:
threadAdded in interface ThreadListener
Parameters:
event - the event object.

threadDeleted

public void threadDeleted(ThreadEvent event)
Description copied from interface: ThreadListener
Fired when a thread is about to be deleted from the system. This event will only be fired when an individual thread is deleted; it is not fired when the community that contains the thread is deleted. Because various code pieces may depend on this event for performing cleanup tasks, it's guaranteed that this method will be called before the thread is deleted from the database.

Specified by:
threadDeleted in interface ThreadListener
Parameters:
event - the event object.

threadMoved

public void threadMoved(ThreadEvent event)
Description copied from interface: ThreadListener
Fired when a thread is moved from one foru to another.

Specified by:
threadMoved in interface ThreadListener
Parameters:
event - the event object.

threadModerationModified

public void threadModerationModified(ThreadEvent event)
Description copied from interface: ThreadListener
Fired when the moderation value of a thread has been changed.

Specified by:
threadModerationModified in interface ThreadListener
Parameters:
event - the event object.

threadRated

public void threadRated(ThreadEvent event)
Description copied from interface: ThreadListener
Fired when the thread has been rated.

Specified by:
threadRated in interface ThreadListener
Parameters:
event - the event object.

threadViewed

public void threadViewed(ThreadEvent event)
Description copied from interface: ThreadListener
Fired when the thread has been viewed.

Specified by:
threadViewed in interface ThreadListener
Parameters:
event - the event object.

documentAdded

public void documentAdded(DocumentEvent event)
Description copied from interface: DocumentListener
Fired when a document is added.

Specified by:
documentAdded in interface DocumentListener
Parameters:
event - the DocumentEvent

documentDeleted

public void documentDeleted(DocumentEvent event)
Description copied from interface: DocumentListener
Fired when a document is deleted. Note: This is usually a rare case. In most cases, when a document is deleted, the state of the document is simply changed to deleted. This means that you will need to use the document modified method, and check the document state for deleted.

Specified by:
documentDeleted in interface DocumentListener
Parameters:
event - the DocumentEvent

documentMoved

public void documentMoved(DocumentEvent event)
Description copied from interface: DocumentListener
Fired when a document is moved.

Specified by:
documentMoved in interface DocumentListener
Parameters:
event - the DocumentEvent

documentModified

public void documentModified(DocumentEvent event)
Description copied from interface: DocumentListener
Fired when a document is modified.

Specified by:
documentModified in interface DocumentListener
Parameters:
event - the DocumentEvent

documentUndeleted

public void documentUndeleted(DocumentEvent event)
Description copied from interface: DocumentListener
Fired when a document is un-deleted in the admin console. Actually the document is modified.

Specified by:
documentUndeleted in interface DocumentListener
Parameters:
event - the DocumentEvent

documentExpireWarning

public void documentExpireWarning(DocumentEvent event)
Description copied from interface: DocumentListener
Fired when a document is about to expire.

Specified by:
documentExpireWarning in interface DocumentListener
Parameters:
event - the DocumentEvent

documentExpired

public void documentExpired(DocumentEvent event)
Description copied from interface: DocumentListener
Fired when a document expires.

Specified by:
documentExpired in interface DocumentListener
Parameters:
event - the DocumentEvent

documentRelatedObjectAdded

public void documentRelatedObjectAdded(DocumentEvent event)
Description copied from interface: DocumentListener
Fired when a related document is added to a document.

Specified by:
documentRelatedObjectAdded in interface DocumentListener
Parameters:
event - the DocumentEvent

documentRelatedObjectDeleted

public void documentRelatedObjectDeleted(DocumentEvent event)
Description copied from interface: DocumentListener
Fired when a related document is deleted from a document.

Specified by:
documentRelatedObjectDeleted in interface DocumentListener
Parameters:
event - the DocumentEvent

documentRated

public void documentRated(DocumentEvent event)
Description copied from interface: DocumentListener
Fired when a document is rated.

Specified by:
documentRated in interface DocumentListener
Parameters:
event - the DocumentEvent

documentViewed

public void documentViewed(DocumentEvent event)
Description copied from interface: DocumentListener
Fired when a document is marked as read.

Specified by:
documentViewed in interface DocumentListener
Parameters:
event - the DocumentEvent

versionAdded

public void versionAdded(DocumentEvent event)
Description copied from interface: DocumentListener
Fied when a new version is added to a document.

Specified by:
versionAdded in interface DocumentListener
Parameters:
event - the DocumentEvent

versionModified

public void versionModified(DocumentEvent event)
Description copied from interface: DocumentListener
Fied when a version is modified.

Specified by:
versionModified in interface DocumentListener
Parameters:
event - the DocumentEvent

versionDeleting

public void versionDeleting(DocumentEvent event)
Description copied from interface: DocumentListener
Fied when a version is about to be deleted from a document.

Specified by:
versionDeleting in interface DocumentListener
Parameters:
event - the DocumentEvent

binaryBodyDownloaded

public void binaryBodyDownloaded(DocumentEvent event)
Description copied from interface: DocumentListener
Fied when a document's binary body is downloaded

Specified by:
binaryBodyDownloaded in interface DocumentListener
Parameters:
event - the DocumentEvent

postCreated

public void postCreated(BlogPostEvent event)
Description copied from interface: BlogPostListener
Fired when a post has been added to the system.

Specified by:
postCreated in interface BlogPostListener
Parameters:
event - the event object.

postDeleting

public void postDeleting(BlogPostEvent event)
Description copied from interface: BlogPostListener
Fired when a post is about to be deleted from the system. Because various code pieces may depend on this event for performing cleanup tasks, it's guaranteed that this method will be called before the message is deleted from the database.

Specified by:
postDeleting in interface BlogPostListener
Parameters:
event - the event object.

postModified

public void postModified(BlogPostEvent event)
Description copied from interface: BlogPostListener
Fired when a post has been modified in the system.

Specified by:
postModified in interface BlogPostListener
Parameters:
event - the event object

postViewed

public void postViewed(BlogPostEvent event)
Description copied from interface: BlogPostListener
Fired when a post has been viewed in the system.

Specified by:
postViewed in interface BlogPostListener
Parameters:
event - the event object

Clearspace Project Page

Copyright © 1999-2007 Jive Software.