Jive API (3.0.13) Core Javadocs

com.jivesoftware.community
Interface RecentContentManager

All Superinterfaces:
JiveManager

public interface RecentContentManager
extends JiveManager

This manager provides methods to retrieve recent content. While this manager is similar in purpose to the ActivityManager there is one main difference - the activity 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. This manager will return content based on it's modification date and is guaranteed to include a piece of content only once.

The functionality of this manager is easily duplicated by using other methods such as CommunityManager.getCombinedContent(JiveContainer, ResultFilter, com.jivesoftware.community.objecttype.ContainableType[]). Using this manager though to retrieve recent content has the benefit of not requiring database access for the typical usage pattern (except for the initial request of course) whereas the other methods will require database access whenever the cache is invalidated when content is added or updated.

Implementation note: The methods in this class will only return up to 500 items (controlled via the RecentContentManager.recentContentMapSize jive property). To return or page through more then 500 items use the methods available on other managers such as CommunityManager or ForumManager.


Method Summary
 JiveIterator<JiveContentObject> getRecentContent(Collection<User> users)
          Returns all the recent content for a set of users.
 JiveIterator<JiveContentObject> getRecentContent(JiveContainer jiveContainer)
          Returns all the recent content for the specified container.
 JiveIterator<JiveContentObject> getRecentContent(JiveContainer jiveContainer, com.google.common.base.Predicate<RecentContentBean> predicate)
          Returns all the recent content that pass the provided predicate for the specified container.
 JiveIterator<JiveContentObject> getRecentContent(JiveContainer jiveContainer, RecentContentEnabledType[] contentTypes)
          Returns the recent content matching the provided content types for the specified container.
 JiveIterator<JiveContentObject> getRecentContent(JiveContainer jiveContainer, RecentContentEnabledType[] contentTypes, com.google.common.base.Predicate<RecentContentBean> predicate)
          Returns the recent content matching the provided content types and predicate for the specified container.
 JiveIterator<JiveContentObject> getRecentContent(Map<JiveContainer,RecentContentEnabledType[]> containerMap, com.google.common.base.Predicate<RecentContentBean> predicate)
          Returns the recent content matching the provided map of container -> content types and predicate.
 JiveIterator<JiveContentObject> getRecentContent(User user)
          Returns all the recent content for the specified user.
 JiveIterator<JiveContentObject> getRecentContent(User user, com.google.common.base.Predicate<RecentContentBean> predicate)
          Returns all the recent content that pass the provided predicate for the specified user.
 JiveIterator<JiveContentObject> getRecentContent(User user, RecentContentEnabledType[] contentTypes)
          Returns the recent content matching the provided content types for the specified user.
 JiveIterator<JiveContentObject> getRecentContent(User user, RecentContentEnabledType[] contentTypes, com.google.common.base.Predicate<RecentContentBean> predicate)
          Returns the recent content matching the provided content types and predicate for the specified user.
 JiveIterator<JiveContentObject> getRecursiveRecentContent(JiveContainer jiveContainer)
          Returns all the recent content for the specified container and all subcontainers.
 JiveIterator<JiveContentObject> getRecursiveRecentContent(JiveContainer jiveContainer, com.google.common.base.Predicate<RecentContentBean> predicate)
          Returns all the recent content that pass the provided predicate for the specified container and all subcontainers.
 JiveIterator<JiveContentObject> getRecursiveRecentContent(JiveContainer jiveContainer, RecentContentEnabledType[] contentTypes)
          Returns the recent content matching the provided content types for the specified container and all subcontainers.
 JiveIterator<JiveContentObject> getRecursiveRecentContent(JiveContainer jiveContainer, RecentContentEnabledType[] contentTypes, com.google.common.base.Predicate<RecentContentBean> predicate)
          Returns the recent content matching the provided content types and predicate for the specified container and all subcontainers.
 boolean isEnabled()
          Returns true if the recent content manager is enabled, false otherwise.
 
Methods inherited from interface com.jivesoftware.community.JiveManager
destroy
 

Method Detail

isEnabled

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

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

getRecentContent

JiveIterator<JiveContentObject> getRecentContent(JiveContainer jiveContainer)
Returns all the recent content for the specified container. This method will only return a maximum of 500 items by default. It is possible that this method could return less then 500 items even if there is more content available if the user does not have permissions to view some or all of the recent content that is being tracked.

Note that passing in the root community will be the same as calling getRecursiveRecentContent(JiveContainer) with the root community.

Parameters:
jiveContainer - The container to retrieve recent content for.
Returns:
an Iterable for the recent content in the container.

getRecentContent

JiveIterator<JiveContentObject> getRecentContent(User user)
Returns all the recent content for the specified user. This method will only return a maximum of 500 items by default.

Parameters:
user - The user to retrieve recent content for.
Returns:
an Iterable for the recent content for the user

getRecentContent

JiveIterator<JiveContentObject> getRecentContent(Collection<User> users)
Returns all the recent content for a set of users. This method will only return a maximum of 500 items by default.

Parameters:
users - The users to retrieve recent content for.
Returns:
an Iterable for the recent content for the users

getRecentContent

JiveIterator<JiveContentObject> getRecentContent(JiveContainer jiveContainer,
                                                 com.google.common.base.Predicate<RecentContentBean> predicate)
Returns all the recent content that pass the provided predicate for the specified container. This method will only return a maximum of 500 items by default. It is likely that this method could return less then 500 items even if there is more content available if the user does not have permissions to view some or all of the recent content that is being tracked.

Note that passing in the root community will be the same as calling getRecursiveRecentContent(JiveContainer, Predicate) with the root community.

Parameters:
jiveContainer - The container to retrieve recent content for.
predicate - the Predicate to test content against
Returns:
an Iterable for the recent content in the container.

getRecentContent

JiveIterator<JiveContentObject> getRecentContent(User user,
                                                 com.google.common.base.Predicate<RecentContentBean> predicate)
Returns all the recent content that pass the provided predicate for the specified user. This method will only return a maximum of 500 items by default.

Parameters:
user - The user to retrieve recent content for.
predicate - the Predicate to test content against
Returns:
an Iterable for the recent content for the user.

getRecentContent

JiveIterator<JiveContentObject> getRecentContent(JiveContainer jiveContainer,
                                                 RecentContentEnabledType[] contentTypes)
Returns the recent content matching the provided content types for the specified container. This method will only return a maximum of 500 items by default. It is possible that this method could return less then 500 items even if there is more content available if the user does not have permissions to view some or all of the recent content that is being tracked.

Note that passing in the root community will be the same as calling getRecursiveRecentContent(JiveContainer,com.jivesoftware.community.objecttype.RecentContentEnabledType[]) with the root community.

Parameters:
jiveContainer - The container to retrieve recent content for.
contentTypes - an array of content types to return
Returns:
an Iterable for the recent content in the container.

getRecentContent

JiveIterator<JiveContentObject> getRecentContent(User user,
                                                 RecentContentEnabledType[] contentTypes)
Returns the recent content matching the provided content types for the specified user. This method will only return a maximum of 500 items by default.

Parameters:
user - The user to retrieve recent content for.
contentTypes - an array of content types to return
Returns:
an Iterable for the recent content for the user

getRecentContent

JiveIterator<JiveContentObject> getRecentContent(JiveContainer jiveContainer,
                                                 RecentContentEnabledType[] contentTypes,
                                                 com.google.common.base.Predicate<RecentContentBean> predicate)
Returns the recent content matching the provided content types and predicate for the specified container. This method will only return a maximum of 500 items by default. It is likely that this method could return less then 500 items even if there is more content available if the user does not have permissions to view some or all of the recent content that is being tracked.

Note that passing in the root community will be the same as calling getRecursiveRecentContent(JiveContainer,RecentContentEnabledType[],com.google.common.base.Predicate) with the root community.

Parameters:
jiveContainer - The container to retrieve recent content for.
contentTypes - an array of content types to return
predicate - the Predicate to test content against
Returns:
an Iterable for the recent content in the container.

getRecentContent

JiveIterator<JiveContentObject> getRecentContent(Map<JiveContainer,RecentContentEnabledType[]> containerMap,
                                                 com.google.common.base.Predicate<RecentContentBean> predicate)
Returns the recent content matching the provided map of container -> content types and predicate. This method will only return a maximum of 500 items by default. It is likely that this method could return less then 500 items even if there is more content available if the user does not have permissions to view some or all of the recent content that is being tracked.

Parameters:
containerMap - A map of container -> recent content enabled types to retrieve recent content for.
predicate - the Predicate to test content against
Returns:
an Iterable for the recent content in the container.

getRecentContent

JiveIterator<JiveContentObject> getRecentContent(User user,
                                                 RecentContentEnabledType[] contentTypes,
                                                 com.google.common.base.Predicate<RecentContentBean> predicate)
Returns the recent content matching the provided content types and predicate for the specified user. This method will only return a maximum of 500 items by default.

Parameters:
user - The user to retrieve recent content for.
contentTypes - an array of content types to return
predicate - the Predicate to test content against
Returns:
an Iterable for the recent content for the user

getRecursiveRecentContent

JiveIterator<JiveContentObject> getRecursiveRecentContent(JiveContainer jiveContainer)
Returns all the recent content for the specified container and all subcontainers. This method will only return a maximum of 500 items by default. It is possible that this method could return less then 500 items even if there is more content available if the user does not have permissions to view some or all of the recent content that is being tracked.

Parameters:
jiveContainer - The parent container to retrieve recent content for.
Returns:
an Iterable for the recent content in the container and all subcontainers

getRecursiveRecentContent

JiveIterator<JiveContentObject> getRecursiveRecentContent(JiveContainer jiveContainer,
                                                          com.google.common.base.Predicate<RecentContentBean> predicate)
Returns all the recent content that pass the provided predicate for the specified container and all subcontainers. This method will only return a maximum of 500 items by default. It is possible that this method could return less then 500 items even if there is more content available if the user does not have permissions to view some or all of the recent content that is being tracked.

Parameters:
jiveContainer - The parent container to retrieve recent content for.
predicate - the Predicate to test content against
Returns:
an Iterable for the recent content in the container and all subcontainers

getRecursiveRecentContent

JiveIterator<JiveContentObject> getRecursiveRecentContent(JiveContainer jiveContainer,
                                                          RecentContentEnabledType[] contentTypes)
Returns the recent content matching the provided content types for the specified container and all subcontainers. This method will only return a maximum of 500 items by default. It is possible that this method could return less then 500 items even if there is more content available if the user does not have permissions to view some or all of the recent content that is being tracked.

Parameters:
jiveContainer - The parent container to retrieve recent content for.
contentTypes - an array of content types to return
Returns:
an Iterable for the recent content in the container and all subcontainers

getRecursiveRecentContent

JiveIterator<JiveContentObject> getRecursiveRecentContent(JiveContainer jiveContainer,
                                                          RecentContentEnabledType[] contentTypes,
                                                          com.google.common.base.Predicate<RecentContentBean> predicate)
Returns the recent content matching the provided content types and predicate for the specified container and all subcontainers. This method will only return a maximum of 500 items by default. It is likely that this method will return less then 500 items even if there is more content available if the user does not have permissions to view some or all of the recent content that is being tracked.

Parameters:
jiveContainer - The parent container to retrieve recent content for.
contentTypes - an array of content types to return
predicate - the Predicate to test content against
Returns:
an Iterable for the recent content in the container and all subcontainers

Jive Product Page

Copyright © 1999-2007 Jive Software.