|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork.ActionSupport
com.jivesoftware.base.action.JiveActionSupport
com.jivesoftware.forum.action.ForumActionSupport
com.jivesoftware.forum.action.ForumAction
public class ForumAction
This class is a WebWork action which encapsulates all the logic of loading and validating a Forum object. You can get a list of threads from this action - the list is generated from the start parameter and the number of threads in the list is based on the user's preference.
Field Summary |
---|
Fields inherited from class com.jivesoftware.forum.action.ForumActionSupport |
---|
CANCEL, DISABLED, FATAL, NOTFOUND, SESSION_REFERRER_KEY, UNAUTHORIZED |
Fields inherited from class com.jivesoftware.base.action.JiveActionSupport |
---|
pageUser, 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 | |
---|---|
ForumAction()
|
Method Summary | |
---|---|
java.lang.String |
execute()
Loads the specified forum. |
java.util.Iterator |
getAnnouncements()
Returns an iterator of all announcements in the system. |
EntityDescriptor |
getEntityDescriptor(java.util.Map parameters)
Returns information (ID, type) about a specific type given a Map of parameters. |
Forum |
getForum()
Returns the forum we've loaded. |
long |
getForumID()
Returns the forum ID. |
ResultFilter |
getMessageResultFilter()
Returns a result filter for viewing lists of messages. |
ResultFilter |
getResultFilter()
Returns the result filter used to create the list of threads in this forum. |
int |
getStart()
Returns the starting index for the list of threads in this forum. |
java.lang.String |
getThreadMode()
|
java.util.Iterator |
getThreads()
Returns a list of threads on the current page in this forum. |
int |
getTotalItemCount()
Returns the total number of threads in the forum. |
protected void |
initFields()
|
protected boolean |
loadJiveObjects()
|
java.lang.String |
loadObjects()
Loads objects in an action. |
protected void |
setForum(Forum forum)
Sets the forum to work with. |
void |
setForumID(long forumID)
Sets the forum ID. |
void |
setMessageResultFilter(ResultFilter filter)
Sets the result filter for viewing lists of messages. |
void |
setStart(int start)
Sets the starting index for the list of threads in this forum. |
Methods inherited from class com.jivesoftware.forum.action.ForumActionSupport |
---|
getCanAttach, getCanCreateMessage, getCanCreatePoll, getCanCreatePoll, getCanCreateThread, getCanCreateThread, getCanEdit, getCanEditAttach, getCanEditPoll, getCanEditPoll, getCanEditProfile, getCanEditTags, getCanPostAnnounce, getCanPostAnnounce, getCanRead, getCanRead, getForumFactory, getPageUser, getReadStatus, getSkinProperty, getThemeName, isAdmin, isAdmin, isAuthor, isAuthor, isMessageModerationOn, isModerator, isModerator, isResourceInTheme, isSystemAdmin, isThreadModerationOn, setForumFactory, setUser |
Methods inherited from class com.jivesoftware.base.action.JiveActionSupport |
---|
getAuthToken, getGuestProperty, getJiveProperty, getLocales, getPageURL, getSession, getText, getText, getTimeZone, getTimeZones, isFailedLookup, isGuest, setAuthToken, setGuestProperty, setLoginAttributes, setPageUser, setServletRequest, setServletResponse |
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, 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 |
---|
public ForumAction()
Method Detail |
---|
public long getForumID()
public void setForumID(long forumID)
forumID
- the forum ID to set.public int getStart()
This method implements part of the Pageable interface - this allows this action to be used for the creation of a Pagniator object.
getStart
in interface Pageable
public void setStart(int start)
start
- the starting index of the list of threads in this forum.public Forum getForum()
protected void setForum(Forum forum)
forum
- the forum to work with.public int getTotalItemCount()
Pageable
interface.
getTotalItemCount
in interface Pageable
public ResultFilter getResultFilter()
Note, this method implements part of the Pageable interface.
getResultFilter
in interface Pageable
public ResultFilter getMessageResultFilter()
public void setMessageResultFilter(ResultFilter filter)
filter
- a result filter for viewing lists of messages.public java.lang.String getThreadMode()
public java.util.Iterator getThreads()
public java.util.Iterator getAnnouncements()
public EntityDescriptor getEntityDescriptor(java.util.Map parameters)
EntityAware
getEntityDescriptor
in interface EntityAware
getEntityDescriptor
in class ForumActionSupport
parameters
- a Map of parameters with String keys and Long values.
public java.lang.String execute() throws java.lang.Exception
Action.SUCCESS
if the forum was loaded successfully.ForumActionSupport.UNAUTHORIZED
if the user doesn't have read access to the forum.Action.ERROR
if the specified forum was not found or if an error occurred while
loading the forum.
execute
in interface com.opensymphony.xwork.Action
execute
in class ForumActionSupport
Action.SUCCESS
if the forum was loaded successfully, ForumActionSupport.UNAUTHORIZED
or
Action.ERROR
otherwise.
java.lang.Exception
public java.lang.String loadObjects() throws java.lang.Exception
JiveObjectLoader
Action.SUCCESS
if
object loading occurred normally. If another type of code is returned then a WebWork interceptor
can pick up on that and return a different view page.
loadObjects
in interface JiveObjectLoader
Action.SUCCESS
if object loading occurred normally,
anything else to indicate that object loading failed.
java.lang.Exception
- if an unexpected error occurs when loading the objects.protected void initFields()
protected boolean loadJiveObjects() throws UnauthorizedException
UnauthorizedException
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |