Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community
Interface ActivityManager

All Superinterfaces:
JiveManager

public interface ActivityManager
extends JiveManager

This manager provides methods to retrieve recent activities and popular threads, documents and blog posts. While this manager is similar in purpose to the RecentContentManager there is one main difference - this manager is activity based which means that it will return items based on their activity such that a single piece of content can be returned multiple times.

Implementation note: The methods in this class will only return up to 500 items (controlled via the activity.activityMapSize jive property).


Method Summary
 void addActivity(JiveObject object, JiveObject parent, User user, Activity.Type activityType)
          Adds a new activity to the ActivityManager
 void deleteUserActivities(User user)
          Deletes all activities for a given user.
 JiveIterator<BlogPost> getPopularBlogPosts()
          Returns a JiveIterator of popular blog posts system wide in popularity order.
 JiveIterator<BlogPost> getPopularBlogPosts(Blog blog)
          Returns a JiveIterator of popular blog posts for the blog in popularity order.
 JiveIterator<Document> getPopularDocuments()
          Returns a system wide JiveIterator of popular documents in popularity order.
 JiveIterator<Document> getPopularDocuments(JiveContainer jiveContainer)
          Returns a JiveIterator of popular documents for the container in popularity order.
 JiveIterator<ForumThread> getPopularThreads()
          Returns a system wide JiveIterator of popular threads in popularity order.
 JiveIterator<ForumThread> getPopularThreads(JiveContainer jiveContainer)
          Returns a JiveIterator of popular threads for the container in popularity order.
 Iterable<Activity> getRecentActivity(Collection<User> users)
          Returns all the recent activities for a collection of users.
 Iterable<Activity> getRecentActivity(JiveContainer jiveContainer)
          Returns all the recent activities that have occurred in the specified container and all subcontainers.
 Iterable<Activity> getRecentActivity(JiveContainer jiveContainer, com.google.common.base.Predicate<com.jivesoftware.community.ActivityBean> predicate)
          Returns all the recent activities matching the provided predicate that have occurred in the specified container and all subcontainers.
 Iterable<Activity> getRecentActivity(User user)
          Returns all the recent activities for a particular user
 Iterable<Activity> getRecentActivity(User user, com.google.common.base.Predicate<com.jivesoftware.community.ActivityBean> predicate)
          Returns all the recent activities for a particular user matching the provided predicate.
 boolean isEnabled()
          Returns true if the activity manager is enabled, false otherwise.
 
Methods inherited from interface com.jivesoftware.community.JiveManager
destroy
 

Method Detail

isEnabled

boolean isEnabled()
Returns true if the activity manager is enabled, false otherwise.

Returns:
true if the activity manager is enabled, false otherwise.

getRecentActivity

Iterable<Activity> getRecentActivity(JiveContainer jiveContainer)
Returns all the recent activities that have occurred in the specified container and all subcontainers.

Parameters:
jiveContainer - The container the activities occurred under.
Returns:
The recent activities

getRecentActivity

Iterable<Activity> getRecentActivity(JiveContainer jiveContainer,
                                     com.google.common.base.Predicate<com.jivesoftware.community.ActivityBean> predicate)
Returns all the recent activities matching the provided predicate that have occurred in the specified container and all subcontainers.

Parameters:
jiveContainer - The container the activities occurred under.
predicate - the Predicate to test content against
Returns:
The recent activities

getRecentActivity

Iterable<Activity> getRecentActivity(User user)
Returns all the recent activities for a particular user

Parameters:
user - The user to return recent activities for
Returns:
The recent activities

getRecentActivity

Iterable<Activity> getRecentActivity(Collection<User> users)
Returns all the recent activities for a collection of users.

Parameters:
users - The users to return recent activities for
Returns:
The recent activities

getRecentActivity

Iterable<Activity> getRecentActivity(User user,
                                     com.google.common.base.Predicate<com.jivesoftware.community.ActivityBean> predicate)
Returns all the recent activities for a particular user matching the provided predicate.

Parameters:
user - The user to return recent activities for
predicate - the Predicate to test content against
Returns:
The recent activities

addActivity

void addActivity(JiveObject object,
                 JiveObject parent,
                 User user,
                 Activity.Type activityType)
Adds a new activity to the ActivityManager

Parameters:
object - The object the activity occurred on.
parent - The parent object.
user - The user who triggered the activity, null is allowed.
activityType - The type of activity that occurred.

getPopularThreads

JiveIterator<ForumThread> getPopularThreads()
Returns a system wide JiveIterator of popular threads in popularity order.

Returns:
a system wide JiveIterator of popular threads in popularity order.

getPopularThreads

JiveIterator<ForumThread> getPopularThreads(JiveContainer jiveContainer)
Returns a JiveIterator of popular threads for the container in popularity order.

Parameters:
jiveContainer - The container the activities occurred under.
Returns:
a JiveIterator of popular threads for the container in popularity order.

getPopularDocuments

JiveIterator<Document> getPopularDocuments()
Returns a system wide JiveIterator of popular documents in popularity order.

Returns:
a system wide JiveIterator of popular documents in popularity order.

getPopularDocuments

JiveIterator<Document> getPopularDocuments(JiveContainer jiveContainer)
Returns a JiveIterator of popular documents for the container in popularity order.

Parameters:
jiveContainer - the container to retrieve popular documents for.
Returns:
a JiveIterator List of popular documents for the container in popularity order.

getPopularBlogPosts

JiveIterator<BlogPost> getPopularBlogPosts(Blog blog)
Returns a JiveIterator of popular blog posts for the blog in popularity order.

Parameters:
blog - the blog to retrieve popular blog posts for.
Returns:
a JiveIterator of popular blog posts for the blog in popularity order.

getPopularBlogPosts

JiveIterator<BlogPost> getPopularBlogPosts()
Returns a JiveIterator of popular blog posts system wide in popularity order.

Returns:
a JiveIterator of popular blog posts for the system in popularity order.

deleteUserActivities

void deleteUserActivities(User user)
                          throws UnauthorizedException
Deletes all activities for a given user.

Parameters:
user - the owner of the activities being deleted.
Throws:
UnauthorizedException - if not allowed to delete the user's activities

Clearspace Project Page

Copyright © 1999-2007 Jive Software.