Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.impl
Class BaseRecentActivityInfoProvider

java.lang.Object
  extended by com.jivesoftware.community.impl.BaseRecentActivityInfoProvider
All Implemented Interfaces:
RecentActivityInfoProvider

public abstract class BaseRecentActivityInfoProvider
extends Object
implements RecentActivityInfoProvider

Provides a base implementation of RecentActivityInfoProvider to simplify the implementation of such providers. Default behavior is documented in the javadoc of each method.


Constructor Summary
BaseRecentActivityInfoProvider()
           
 
Method Summary
 boolean eventsHandledExclusivelyByCustomListener()
          In most cases, events are to be handled by the info provider.
 User getAssignedUser(JiveObject object, Activity activity)
          Most activities do not involve assignment to a user, so this returns null.
abstract  ActivityEventHandlingStrategy getEventHandlingStrategy()
          Subclasses must provide their own event handling strategy, which may be null, to use the built-in default ones -- see com.jivesoftware.community.impl.activity.DefaultContainerActivityEventHandlingStrategy and DefaultContentActivityEventHandlingStrategy.
 String getObjectUrl(JiveObject object, boolean constructAbsoluteURL)
          The com.jivesoftware.community.web.JiveResourceResolver in most cases should be able to construct a relative link for the object.
 boolean isHideActivityDetail(Activity activity)
          In most cases, the activity is visible, with no additional perm checks.
 boolean isUserAuthorizedToViewActivity(Activity activity, User user)
          By default, the user is authorized to view the activity if the proxied object can be loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseRecentActivityInfoProvider

public BaseRecentActivityInfoProvider()
Method Detail

isUserAuthorizedToViewActivity

public boolean isUserAuthorizedToViewActivity(Activity activity,
                                              User user)
By default, the user is authorized to view the activity if the proxied object can be loaded.

Specified by:
isUserAuthorizedToViewActivity in interface RecentActivityInfoProvider
Parameters:
activity - the activity
user - the user
Returns:
true if the supplied user is allowed to view the supplied activity

getAssignedUser

public User getAssignedUser(JiveObject object,
                            Activity activity)
Most activities do not involve assignment to a user, so this returns null.

Specified by:
getAssignedUser in interface RecentActivityInfoProvider
Parameters:
object - the jive object
activity - the activity
Returns:
the assigned user in the activity, if any

getObjectUrl

public String getObjectUrl(JiveObject object,
                           boolean constructAbsoluteURL)
The com.jivesoftware.community.web.JiveResourceResolver in most cases should be able to construct a relative link for the object.

Specified by:
getObjectUrl in interface RecentActivityInfoProvider
Parameters:
object - the jive object
constructAbsoluteURL -
Returns:
the relative URL link constructed from the object

isHideActivityDetail

public boolean isHideActivityDetail(Activity activity)
In most cases, the activity is visible, with no additional perm checks.

Specified by:
isHideActivityDetail in interface RecentActivityInfoProvider
Parameters:
activity - the activity
Returns:
whether or not details of the activity are hidden in the UI

eventsHandledExclusivelyByCustomListener

public boolean eventsHandledExclusivelyByCustomListener()
In most cases, events are to be handled by the info provider.

Specified by:
eventsHandledExclusivelyByCustomListener in interface RecentActivityInfoProvider
Returns:
true if a listener has been registered to handle events exclusively

getEventHandlingStrategy

public abstract ActivityEventHandlingStrategy getEventHandlingStrategy()
Subclasses must provide their own event handling strategy, which may be null, to use the built-in default ones -- see com.jivesoftware.community.impl.activity.DefaultContainerActivityEventHandlingStrategy and DefaultContentActivityEventHandlingStrategy.

Specified by:
getEventHandlingStrategy in interface RecentActivityInfoProvider
Returns:
a strategy object for dealing with recent activity events

Jive Product Page

Copyright © 1999-2007 Jive Software.