|
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
com.jivesoftware.forum.action.ForumThreadAction
public class ForumThreadAction
This class is a WebWork action which encapsulates all the logic of loading and validating a ForumThread object. You can get a list of messages from this action - the list is generated from the start parameter and the number of messages in the list is based on the user's preference.
Additionally, this action will tell the developer what the next and previous threads are for this thread.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_THREAD_MODE
Default thread mode (flat). |
static java.lang.String |
THREAD_FLAT
Return code which indicates a flat message interface. |
static java.lang.String |
THREAD_THREADED
Return code which indicates a threaded message interface. |
static java.lang.String |
THREAD_TREE
Return code which indicates a tree message interface. |
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 | |
---|---|
ForumThreadAction()
|
Method Summary | |
---|---|
java.lang.String |
execute()
Validates the forum ID and either redirects to the SUCCESS, ERROR page if the id was not found or the login page if the page user is not authorized to view the forum. |
EntityDescriptor |
getEntityDescriptor(java.util.Map parameters)
Returns information (ID, type) about a specific type given a Map of parameters. |
ForumMessage |
getMessage()
Returns the message specified by the messageID parameter. |
long |
getMessageID()
Returns the ID of the message to load. |
java.util.Iterator |
getMessages()
Returns an Iterator of messages in this thread. |
ForumThread |
getNextThread()
Returns the thread next to (after) this one in the list of threads in the forum. |
int |
getNextTstart()
Returns the index hint for the next thread in the list of threads. |
java.util.Iterator |
getPopularTags()
Returns an iterable collection of popular tags based on the current community and tag set. |
ForumThread |
getPreviousThread()
Returns the thread previous to this one in the list of threads in the forum. |
int |
getPrevTstart()
Returns the index hint for th previous thread in the list of threads. |
java.util.Iterator |
getRecommendedTags()
Returns an iterable collection of recommended tags based on the current community and tag set. |
ResultFilter |
getResultFilter()
Returns the result filter used to create the list of messages in this thread. |
int |
getStart()
Returns the starting index of messages in the list of thread. |
ForumThread |
getThread()
Returns the thread specified by the threadID parameter. |
long |
getThreadID()
Returns the ID of the thread to load. |
java.lang.String |
getThreadMode()
Returns the thread mode being used. |
int |
getTotalItemCount()
Returns the total number of messages in the thread. |
int |
getTstart()
Returns the index hint for this thread. |
boolean |
hasNextThread()
Returns true if there is a thread next to (after) this one in the list of threads in the forum. |
boolean |
hasPreviousThread()
Returns true if there is a thread previous to this one in the list of threads in the forum. |
boolean |
isArchived()
Returns true if this thread is archived, false otherwise. |
boolean |
isLocked()
Returns true if this thread is locked, false otherwise. |
boolean |
isRootMessage(ForumMessage msg)
Returns true if the given message is the root message of the thread, false otherwise. |
boolean |
isStqc()
|
java.lang.String |
loadObjects()
Loads Thread and (@link Message} objects. |
void |
setMessage(ForumMessage message)
Sets the message to use in this action. |
void |
setMessageID(long messageID)
Sets the ID of the message to load. |
void |
setResultFilter(ResultFilter filter)
Sets the result filter used to create the list of messages in this thread. |
void |
setStart(int start)
Returns the thread index hint for this thread. |
void |
setStqc(boolean stqc)
|
protected void |
setThread(ForumThread thread)
Sets the thread to use in this action. |
void |
setThreadID(long threadID)
Sets the ID of the thread to load. |
void |
setTstart(int tstart)
Sets the index hint for this thread. |
Methods inherited from class com.jivesoftware.forum.action.ForumAction |
---|
getAnnouncements, getForum, getForumID, getMessageResultFilter, getThreads, initFields, loadJiveObjects, setForum, setForumID, setMessageResultFilter |
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 |
Field Detail |
---|
public static final java.lang.String THREAD_THREADED
public static final java.lang.String THREAD_FLAT
public static final java.lang.String THREAD_TREE
public static final java.lang.String DEFAULT_THREAD_MODE
Constructor Detail |
---|
public ForumThreadAction()
Method Detail |
---|
public long getThreadID()
public void setThreadID(long threadID)
threadID
- the thread ID to load.public long getMessageID()
public void setMessageID(long messageID)
messageID
- the message ID to load.public int getStart()
getStart
in interface Pageable
getStart
in class ForumAction
public void setStart(int start)
setStart
in class ForumAction
start
- the starting index in the list of messages.public int getTstart()
public void setTstart(int tstart)
tstart
- the index hint for this thread.public int getNextTstart()
public int getPrevTstart()
public int getTotalItemCount()
getTotalItemCount
in interface Pageable
getTotalItemCount
in class ForumAction
public ForumThread getThread()
protected void setThread(ForumThread thread)
thread
- the thread to use in this action.public ForumMessage getMessage()
public void setMessage(ForumMessage message)
setMessage
in interface ForumMessageAware
message
- the message to use in this action.public java.util.Iterator getMessages()
Note, this returns an Iterator of messages in "flat" mode - don't call this method if you want the list of messages to display in threaded or tree mode.
public ResultFilter getResultFilter()
This method is only intended for a "flat" list of messages (non-threaded).
getResultFilter
in interface Pageable
getResultFilter
in class ForumAction
public void setResultFilter(ResultFilter filter)
This method is only intended for a "flat" list of messages (non-threaded).
filter
- the ResultFilter used to create the list of messages in this thread.public boolean hasPreviousThread()
public ForumThread getPreviousThread()
public boolean hasNextThread()
public ForumThread getNextThread()
public boolean isArchived()
public boolean isLocked()
public boolean isRootMessage(ForumMessage msg)
msg
- the ForumMessage object to test.
public java.lang.String getThreadMode()
THREAD_FLAT
,
THREAD_THREADED
or THREAD_TREE
. If the mode can't be determined
then DEFAULT_THREAD_MODE
.
getThreadMode
in class ForumAction
public boolean isStqc()
public void setStqc(boolean stqc)
public EntityDescriptor getEntityDescriptor(java.util.Map parameters)
EntityAware
getEntityDescriptor
in interface EntityAware
getEntityDescriptor
in class ForumAction
parameters
- a Map of parameters with String keys and Long values.
public java.lang.String execute() throws java.lang.Exception
execute
in interface com.opensymphony.xwork.Action
execute
in class ForumAction
Action.SUCCESS
if the forum was loaded successfully, ForumActionSupport.UNAUTHORIZED
or
Action.ERROR
otherwise.
java.lang.Exception
public java.util.Iterator getRecommendedTags()
public java.util.Iterator getPopularTags()
public java.lang.String loadObjects() throws java.lang.Exception
Thread
and (@link Message} objects. Either the thread id or the message
id must be set. If thread id is set, but not message id, the message will be set to
the root message of the thread. If message id is set, but not thread id, the thread
will be set to the one containing the message. If neither is set, ForumThreadNotFoundException
is thrown.
loadObjects
in interface JiveObjectLoader
loadObjects
in class ForumAction
java.lang.Exception
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |