Jive API (3.0.13) Core Javadocs

com.jivesoftware.community
Interface RecentContentInfoProvider


public interface RecentContentInfoProvider

Instances of this interface allow the system to provide lists of recent content.


Method Summary
 boolean eventsHandledExclusivelyByCustomListener()
          If events are handled exclusively by some other mechanism, bypasses the generic ContentEventListener for recent content.
 User getAuthor(JiveObject object)
          Returns the user who is the author of this most recent piece of content.
 QueryContainer getContentContainerInfoQuery(List<Long> objectIDs, EntityDescriptor container)
          Given a list of object ids, and the container housing them, this method returns a SQL query exposing the following colums:

objectID, containerType, containerID.

 String getDate(JiveObject object)
          Returns a string representation of the last modified or created date of the object, typically relative to the current timestamp.
 User getEditingUser(JiveObject object)
          If the object is currently being edited, returns the user who is currently editing that object.
 RecentContentEventHandlingStrategy getEventHandlingStrategy()
          Returns a strategy object for dealing with recent-content events.
 String getObjectUrl(JiveObject object, boolean constructAbsoluteURL)
          Returns the URL link constructed from the object.
 JiveContainer getParent(JiveObject object)
          Returns the container housing the object.
 List<EntityDescriptor> getRecentContentContainersForUser(User user)
          Returns the containers most recently chosen by the user for the creation of recent content for the type which owns this provider.
 String getSubject(JiveObject object)
          Returns the subject (aka title) of the object.
 

Method Detail

getContentContainerInfoQuery

QueryContainer getContentContainerInfoQuery(List<Long> objectIDs,
                                            EntityDescriptor container)
Given a list of object ids, and the container housing them, this method returns a SQL query exposing the following colums:

objectID, containerType, containerID.

The query should return the updated containerType and containerID for each provided objectID.

Parameters:
objectIDs - list of Long objectIDs.
container - The container housing the objectIDs.
Returns:
QueryContainer containing the SQL query.

getRecentContentContainersForUser

List<EntityDescriptor> getRecentContentContainersForUser(User user)
Returns the containers most recently chosen by the user for the creation of recent content for the type which owns this provider.

Parameters:
user - The user to return recent content containers for
Returns:
the containers most recently chosen by the user for the creation of recent content for the type which owns this provider

getObjectUrl

String getObjectUrl(JiveObject object,
                    boolean constructAbsoluteURL)
Returns the URL link constructed from the object. Typically used for rendering recent content list items.

Parameters:
object - the jive object to return the url for
constructAbsoluteURL - If true, the URL constructed will be absolute; otherwise it will be relative.
Returns:
the URL link constructed from the object

getSubject

String getSubject(JiveObject object)
Returns the subject (aka title) of the object. Typically used for rendering recent content list items.

Parameters:
object - the jive object to return the subject for
Returns:
the subject for the jive object

getDate

String getDate(JiveObject object)
Returns a string representation of the last modified or created date of the object, typically relative to the current timestamp. Typically used for rendering recent content list items.

Parameters:
object - the jive object to return the date for
Returns:
a string representation of the last modified or created date of the object

getParent

JiveContainer getParent(JiveObject object)
Returns the container housing the object. Typically used for rendering recent content list items.

Parameters:
object - the object to return the parent container for
Returns:
the container housing the object

getAuthor

User getAuthor(JiveObject object)
Returns the user who is the author of this most recent piece of content.

Parameters:
object - the object to return the author of the content for
Returns:
the user who authored the content

getEditingUser

User getEditingUser(JiveObject object)
If the object is currently being edited, returns the user who is currently editing that object. If no user is currently editing the object, the method should return null. Typically used for rendering recent content list items.

Parameters:
object - the object to return the editting user for
Returns:
the user editting the object, or null if noone is editting the object

eventsHandledExclusivelyByCustomListener

boolean eventsHandledExclusivelyByCustomListener()
If events are handled exclusively by some other mechanism, bypasses the generic ContentEventListener for recent content.

Returns:
true if using a custom listener instead of the generic com.jivesoftware.community.impl.recentcontent.ContentEventListener

getEventHandlingStrategy

RecentContentEventHandlingStrategy getEventHandlingStrategy()
Returns a strategy object for dealing with recent-content events. Implement this if you don't want to register a whole other recent-content event listener for your type.

Returns:
a strategy object for dealing with recent-content events

Jive Product Page

Copyright © 1999-2007 Jive Software.