Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.featured
Interface FeaturedContentManager


public interface FeaturedContentManager

Allows featuring content in containers. Featured content is anything that a container admin/manager/moderator may want to highlight as important.

Currently only featured videos are the only object types exposed through the UI, though content of any type in any container can be featured.

There is no assumed restriction on the types of containers in which content can be featured, the amount of featured items, or the types of content that can be featured in a container. Implementations may choose to restrict these characteristics.


Method Summary
 void appendFeaturedItems(JiveContainer container, JiveObject... toFeature)
          Appends items to the currently featured items in the given container
 void clearFeaturedItem(JiveContainer container, JiveObject toClear)
          Remove the specific featured item from the given container IMPLEMENTATION NOTE: Any new object types that are added as featured content should have their delete event add to the list of enums represented by the field itemDeleteEvents in FeaturedContentManagerImpl.
 void clearFeaturedItems(JiveContainer container)
          Removes all featured item entries in the given container.
 void clearFeaturedItems(JiveContainer container, Integer... objectTypeFilter)
          Removes all featured item entries in the given container that match the given object types IMPLEMENTATION NOTE: Any new object types that are added as featured content should have their delete event add to the list of enums represented by the field itemDeleteEvents in FeaturedContentManagerImpl.
 JiveObject getFeaturedItem(JiveContainer container)
          Returns a featured item of an undetermined object type from the given container.
 JiveObject getFeaturedItem(JiveContainer container, Integer... objectTypeFilter)
          Returns the first featured item matching the given object types from the given container.
 int getFeaturedItemCount(JiveContainer container)
          Returns the total number of featured items in the container
 int getFeaturedItemCount(JiveContainer container, Integer... objectTypeFilter)
          Returns the total number of featured items in the container matching any of the given objec types
 JiveIterator<JiveObject> getFeaturedItems(JiveContainer container)
          Returns all featured items of all object types in the given container
 JiveIterator<JiveObject> getFeaturedItems(JiveContainer container, Integer... objectTypeFilter)
          Returns all featured items of the given object types in the given container
 boolean isFeatured(JiveContainer container, JiveObject object)
          Returns true if the given item is featured in the given container, false otherwise.
 void setFeaturedItems(JiveContainer container, JiveObject... toFeature)
          Replaces all featured items in the given container with the given items
 

Method Detail

setFeaturedItems

void setFeaturedItems(JiveContainer container,
                      JiveObject... toFeature)
                      throws UnauthorizedException
Replaces all featured items in the given container with the given items

Parameters:
container - to feature items in
toFeature - items to feature
Throws:
UnauthorizedException - if the currently authenticated user doesn't have rights to feature items in the container

appendFeaturedItems

void appendFeaturedItems(JiveContainer container,
                         JiveObject... toFeature)
                         throws UnauthorizedException
Appends items to the currently featured items in the given container

Parameters:
container - to feature items in
toFeature - items to feature
Throws:
UnauthorizedException - if the currently authenticated user doesn't have rights to feature items in the container

clearFeaturedItems

void clearFeaturedItems(JiveContainer container)
                        throws UnauthorizedException
Removes all featured item entries in the given container. IMPLEMENTATION NOTE: Any new object types that are added as featured content should have their delete event add to the list of enums represented by the field itemDeleteEvents in FeaturedContentManagerImpl. The default values for this list are set in the spring configuration for the bean. If you are featuring an object type, make sure you add the delete event dispatched when instances of that object type are deleted so that deleted items are removed as featured items. If orphaned data is found, the problem will be logged and featured item removed during any attempts to retrieve featured content for the container where the deleted item exists.

Registered delete events will be processed by com.jivesoftware.community.featured.FeaturedContentManagerImpl.FeaturedItemDeleteListener

Parameters:
container - with featured items to be removed
Throws:
UnauthorizedException - if the currently authenticated user doesn't have rights to feature items in the container

clearFeaturedItems

void clearFeaturedItems(JiveContainer container,
                        Integer... objectTypeFilter)
                        throws UnauthorizedException
Removes all featured item entries in the given container that match the given object types IMPLEMENTATION NOTE: Any new object types that are added as featured content should have their delete event add to the list of enums represented by the field itemDeleteEvents in FeaturedContentManagerImpl. The default values for this list are set in the spring configuration for the bean. If you are featuring an object type, make sure you add the delete event dispatched when instances of that object type are deleted so that deleted items are removed as featured items. If orphaned data is found, the problem will be logged and featured item removed during any attempts to retrieve featured content for the container where the deleted item exists.

Registered delete events will be processed by com.jivesoftware.community.featured.FeaturedContentManagerImpl.FeaturedItemDeleteListener

Parameters:
container - with featured items to be removed
objectTypeFilter - constant id values corresponding to the set of object types to include
Throws:
UnauthorizedException - if the currently authenticated user doesn't have rights to feature items in the container

clearFeaturedItem

void clearFeaturedItem(JiveContainer container,
                       JiveObject toClear)
                       throws UnauthorizedException
Remove the specific featured item from the given container IMPLEMENTATION NOTE: Any new object types that are added as featured content should have their delete event add to the list of enums represented by the field itemDeleteEvents in FeaturedContentManagerImpl. The default values for this list are set in the spring configuration for the bean. If you are featuring an object type, make sure you add the delete event dispatched when instances of that object type are deleted so that deleted items are removed as featured items. If orphaned data is found, the problem will be logged and featured item removed during any attempts to retrieve featured content for the container where the deleted item exists.

Registered delete events will be processed by com.jivesoftware.community.featured.FeaturedContentManagerImpl.FeaturedItemDeleteListener

Parameters:
container - with featured items to be removed
toClear - JiveObject to
Throws:
UnauthorizedException - if the currently authenticated user doesn't have rights to feature items in the container

getFeaturedItems

JiveIterator<JiveObject> getFeaturedItems(JiveContainer container)
                                          throws UnauthorizedException
Returns all featured items of all object types in the given container

Parameters:
container - with featured items
Returns:
a JiveIterator of JiveObjects that have been featured in the container *
Throws:
UnauthorizedException - if the currently authenticated user doesn't have rights to view content in the container

getFeaturedItems

JiveIterator<JiveObject> getFeaturedItems(JiveContainer container,
                                          Integer... objectTypeFilter)
                                          throws UnauthorizedException
Returns all featured items of the given object types in the given container

Parameters:
container - with featured items
objectTypeFilter - constant id values corresponding to the set of object types to include
Returns:
a JiveIterator of JiveObject values that have been featured in the container matching any of the given objectTypeFilter values
Throws:
UnauthorizedException - if the currently authenticated user doesn't have rights to view content in the container

getFeaturedItem

JiveObject getFeaturedItem(JiveContainer container)
                           throws UnauthorizedException
Returns a featured item of an undetermined object type from the given container. Returns null if there are no featured items, the featured item if there is one featured item, or one of the featured items if there are multiple featured items.

Parameters:
container - with featured items
Returns:
The featured item if there is only one, a featured item if there are more than one, or null if there are no featured items
Throws:
UnauthorizedException - if the currently authenticated user doesn't have rights to view content in the container

getFeaturedItem

JiveObject getFeaturedItem(JiveContainer container,
                           Integer... objectTypeFilter)
                           throws UnauthorizedException
Returns the first featured item matching the given object types from the given container. Returns null if there are no featured items of any of those types, the featured item if there is one featured item matching a given type, or one of the featured items matching one of the given types if there are multiple featured items matching the filter.

Parameters:
container - with featured items
objectTypeFilter - the object types of featured items that will be returned
Returns:
The featured item if there is only one, a featured item if there are more than one, or null if there are no featured items matching the specific
Throws:
UnauthorizedException - if the currently authenticated user doesn't have rights to view content in the container

getFeaturedItemCount

int getFeaturedItemCount(JiveContainer container)
                         throws UnauthorizedException
Returns the total number of featured items in the container

Parameters:
container - with featured items
Returns:
The total number of items featured in the container
Throws:
UnauthorizedException - if the currently authenticated user doesn't have rights to view the container

getFeaturedItemCount

int getFeaturedItemCount(JiveContainer container,
                         Integer... objectTypeFilter)
                         throws UnauthorizedException
Returns the total number of featured items in the container matching any of the given objec types

Parameters:
container - with featured items
objectTypeFilter - - object types to be included if there is a featured item of that content type
Returns:
The total number of items featured in the container matching the filter
Throws:
UnauthorizedException - if the currently authenticated user doesn't have rights to view the container

isFeatured

boolean isFeatured(JiveContainer container,
                   JiveObject object)
                   throws UnauthorizedException
Returns true if the given item is featured in the given container, false otherwise.

Parameters:
container - with featured items
object - - the item being checked to see if it is featured
Returns:
true iff the item has been featured in the container
Throws:
UnauthorizedException - if the currently authenticated user doesn't have rights to view content in the container

Jive Product Page

Copyright © 1999-2007 Jive Software.