Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.media.type
Class MediaWatchInfoProvider

java.lang.Object
  extended by com.jivesoftware.community.media.type.MediaWatchInfoProvider
All Implemented Interfaces:
WatchInfoProvider

public abstract class MediaWatchInfoProvider
extends Object
implements WatchInfoProvider

Default behavior for the watch subsystem to determine which media items are watched and by whom


Constructor Summary
MediaWatchInfoProvider()
           
 
Method Summary
 boolean eventsHandledExclusivelyByCustomListener()
          This method should return true if a listener has been registered to handle events exclusively, bypassing the generic activity event listener in the core code.
 List<User> getAuthorsToWatchFor(JiveObject object, Map<String,Object> objectProperties)
          Returns a list of authors of the jive object for which watches may be retrieved and converted into mails.
 Map<String,Object> getEmailTemplateContextParams(JiveObject object)
          This method returns a map of objects with which to populate the email template context.
 String getExpirationDatesQuery()
          A SQL select statement which must return objectID,expirationDate in the SELECT clause.
protected
<T extends Media>
T
getMediaObject(ContentEvent ev)
           
 NotificationTargetStrategy getNotificationTargetStrategy()
          Returns a strategy for computing which object is the target of notification on a watch event.
 WatchCreationStrategy getWatchCreationStrategy()
          Returns a strategy for deciding whether or not a watch should be created for a given event.
 boolean isEnabledByDefault()
          If true, watch preferences for this type are always set to true for all users.
 boolean isNotifyOnEvent(ContentEvent event)
          Returns true if the event triggers a notify.
 boolean isUserProfileConfigurable()
          If true, watch preferences for this type may be configured per user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jivesoftware.community.WatchInfoProvider
canUserWatchObject
 

Constructor Detail

MediaWatchInfoProvider

public MediaWatchInfoProvider()
Method Detail

isUserProfileConfigurable

public boolean isUserProfileConfigurable()
Description copied from interface: WatchInfoProvider
If true, watch preferences for this type may be configured per user.

Specified by:
isUserProfileConfigurable in interface WatchInfoProvider
Returns:
whether or not watch preferences for this type may be configured per user.

isEnabledByDefault

public boolean isEnabledByDefault()
Description copied from interface: WatchInfoProvider
If true, watch preferences for this type are always set to true for all users.

Specified by:
isEnabledByDefault in interface WatchInfoProvider
Returns:
whether or not watch preferences for this type are always set to true for all users.

getAuthorsToWatchFor

public List<User> getAuthorsToWatchFor(JiveObject object,
                                       Map<String,Object> objectProperties)
Description copied from interface: WatchInfoProvider
Returns a list of authors of the jive object for which watches may be retrieved and converted into mails.

Specified by:
getAuthorsToWatchFor in interface WatchInfoProvider
Parameters:
object - the jive object to get authors of.
objectProperties - hash of properties that may be used to provide more context, if needed.
Returns:
a list of authors of the jive object for which watches may be retrieved and converted into mails.

getExpirationDatesQuery

public String getExpirationDatesQuery()
Description copied from interface: WatchInfoProvider
A SQL select statement which must return objectID,expirationDate in the SELECT clause. For example: SELECT internaldocid objectID, expirationDate FROM jiveDocument; Used for determining whether or not watches on those objects should expire also. If returns null or empty string, then watch expiration will not be activated for the type.

Specified by:
getExpirationDatesQuery in interface WatchInfoProvider
Returns:
a SQL select statement used for determining whether or not watches on those objects should expire also.

getWatchCreationStrategy

public WatchCreationStrategy getWatchCreationStrategy()
Description copied from interface: WatchInfoProvider
Returns a strategy for deciding whether or not a watch should be created for a given event. May return null if the default strategy is to be used.

Specified by:
getWatchCreationStrategy in interface WatchInfoProvider
Returns:
a strategy for deciding whether or not a watch should be created for a given event.

getNotificationTargetStrategy

public NotificationTargetStrategy getNotificationTargetStrategy()
Description copied from interface: WatchInfoProvider
Returns a strategy for computing which object is the target of notification on a watch event. May return null if the default strategy is to be used.

Specified by:
getNotificationTargetStrategy in interface WatchInfoProvider
Returns:
a strategy for computing which object is the target of notification on a watch event.

getEmailTemplateContextParams

public Map<String,Object> getEmailTemplateContextParams(JiveObject object)
Description copied from interface: WatchInfoProvider
This method returns a map of objects with which to populate the email template context. Use this if your email templates require special objects not included by default in com.jivesoftware.community.impl.EmailWatchUpdateTask. May return null or empty map if no objects are required.

Specified by:
getEmailTemplateContextParams in interface WatchInfoProvider
Parameters:
object - the jive object
Returns:
a map of objects with which to populate the email template context.

isNotifyOnEvent

public boolean isNotifyOnEvent(ContentEvent event)
Description copied from interface: WatchInfoProvider
Returns true if the event triggers a notify.

Specified by:
isNotifyOnEvent in interface WatchInfoProvider
Parameters:
event - the content-event.
Returns:
true if the event triggers a notify.

getMediaObject

protected <T extends Media> T getMediaObject(ContentEvent ev)

eventsHandledExclusivelyByCustomListener

public boolean eventsHandledExclusivelyByCustomListener()
This method should return true if a listener has been registered to handle events exclusively, bypassing the generic activity event listener in the core code.

Specified by:
eventsHandledExclusivelyByCustomListener in interface WatchInfoProvider
Returns:

Jive Product Page

Copyright © 1999-2007 Jive Software.