Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.action.rss
Class RSSCommunityStats

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.jivesoftware.base.action.rss.RSSActionSupport
          extended by com.jivesoftware.forum.action.rss.RSSCommunityStats
All Implemented Interfaces:
AuthTokenAware, com.opensymphony.webwork.interceptor.ServletRequestAware, com.opensymphony.webwork.interceptor.ServletResponseAware, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, com.uwyn.rife.continuations.ContinuableObject, java.io.Serializable, java.lang.Cloneable

public class RSSCommunityStats
extends RSSActionSupport

An RSSAction to return basic forum community statistics (number of threads, messages, etc.)

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jivesoftware.base.action.rss.RSSActionSupport
DATE_FORMAT, DEFAULT_NUM_ITEMS, DISABLED, request, response
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
RSSCommunityStats()
           
 
Method Summary
 java.lang.String executeRSS()
          Builds the number of categories, threads, forums, and messages, which can be filtered by category id, forum id, and user id
 int getCategoryCount()
          Returns the number of categories.
 long getCategoryID()
          Returns the category id to filter by
 boolean getCountUsers()
          Indicates if the user count should be included.
 java.lang.String getFeedTitle()
          Returns a suggested title for the RSS feed -- subclasses should override this method and provide a title that is unique.
 int getForumCount()
          Returns the number of forums.
 long getForumID()
          Returns the forum id to filer by
 java.lang.String getItemTitle()
          Returns the title of the single item in the resultant rss channel
 int getMessageCount()
          Returns number of messages.
 java.lang.String getMessageCountEmail()
          Returns the email address of the user for whom messages are counted.
 java.lang.String getMessageCountUsername()
          Returns the username of the user for whom messages are counted.
 int getThreadCount()
          Returns the number of threads.
 int getUserCount()
          Returns the total number of users as long as the UserManager supports the getUserCount() method.
 long getUserID()
          Returns the user id to filter by
 boolean isCountUsers()
          Indicates if the user count should be included.
 boolean isForumSelected()
          Returns true if a specific forum was selected by passing a forumID in the request
 void setCategoryID(long categoryID)
          Sets the category id to filter by
 void setCountUsers(boolean countUsers)
          Sets whether or not to include the user count.
 void setForumID(long forumID)
          Sets the forum id to filter by
 void setUserID(long userID)
          Sets the user id to filter by
 
Methods inherited from class com.jivesoftware.base.action.rss.RSSActionSupport
execute, getAuthToken, getDateFormat, getDefaultBaseURL, getNumItems, getPageUser, getPassword, getUsername, rssFeedsEnabled, setAuthToken, setNumItems, setPassword, setServletRequest, setServletResponse, setUsername
 
Methods inherited from class com.opensymphony.xwork.ActionSupport
addActionError, addActionMessage, addFieldError, clearErrorsAndMessages, clone, doDefault, doInput, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, pause, setActionErrors, setActionMessages, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RSSCommunityStats

public RSSCommunityStats()
Method Detail

getForumID

public long getForumID()
Returns the forum id to filer by

Returns:
the forum id

setForumID

public void setForumID(long forumID)
Sets the forum id to filter by

Parameters:
forumID -

getUserID

public long getUserID()
Returns the user id to filter by

Returns:
the user id

setUserID

public void setUserID(long userID)
Sets the user id to filter by

Parameters:
userID -

getCategoryID

public long getCategoryID()
Returns the category id to filter by

Returns:
the category id

setCategoryID

public void setCategoryID(long categoryID)
Sets the category id to filter by

Parameters:
categoryID -

isCountUsers

public boolean isCountUsers()
Indicates if the user count should be included.


getCountUsers

public boolean getCountUsers()
Indicates if the user count should be included.


setCountUsers

public void setCountUsers(boolean countUsers)
Sets whether or not to include the user count.


getMessageCountUsername

public java.lang.String getMessageCountUsername()
Returns the username of the user for whom messages are counted.

Returns:
the username of the user for whom messages are counted, or null if no userID was specified.

getMessageCountEmail

public java.lang.String getMessageCountEmail()
Returns the email address of the user for whom messages are counted.

Returns:
the email address of the user for whom messages are counted, or null if no userID was specified, if the user specified no email address in their profile, or if they chose not to show their email address.

getItemTitle

public java.lang.String getItemTitle()
Returns the title of the single item in the resultant rss channel

Returns:
the title element text

isForumSelected

public boolean isForumSelected()
Returns true if a specific forum was selected by passing a forumID in the request

Returns:
true if a forum was selected

getCategoryCount

public int getCategoryCount()
Returns the number of categories. If a categoryID is specified, only the number of subcategories (recursive) is returned. If a forumID is specified, the category count will be zero.

Returns:
the number of categories

getMessageCount

public int getMessageCount()
Returns number of messages. If a categoryID is specified, only messages within that category and its subcategories are counted. If a forumID is specified, only messages in that forum are counted. If a userID is specified, only messages for that user are counted. If a a categoryID or forumID is specified along with a userID, the message count will still be community wide for the specified user.

Returns:
the number of messages

getForumCount

public int getForumCount()
Returns the number of forums. If a forumID is specified, the forum count will be zero, since forums cannot contain other forums. If a categoryID is specified, the forum count will include all forums in the category and its subcategories (recursive).

Returns:
the number of forums

getThreadCount

public int getThreadCount()
Returns the number of threads. If a forumID is specified, the threads in that forum will be counted. If a categoryID is specified, the number of threads in all forums in that category and its subcategories (recursive) will be counted.

Returns:
the number of threads

getUserCount

public int getUserCount()
Returns the total number of users as long as the UserManager supports the getUserCount() method.

Returns:
the number of users.

getFeedTitle

public java.lang.String getFeedTitle()
Description copied from class: RSSActionSupport
Returns a suggested title for the RSS feed -- subclasses should override this method and provide a title that is unique. Most RSS readers need a unique title to properly show the feed to the user.

Overrides:
getFeedTitle in class RSSActionSupport

executeRSS

public java.lang.String executeRSS()
Builds the number of categories, threads, forums, and messages, which can be filtered by category id, forum id, and user id

Overrides:
executeRSS in class RSSActionSupport
Returns:
a return code - either success or error

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.