|
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.OldPostAction
public class OldPostAction
An Action to encapsulate all the logic for posting messages.
Field Summary | |
---|---|
static java.lang.String |
ATTACH
|
static java.lang.String |
PREVIEW
|
static java.lang.String |
REJECTED
|
static java.lang.String |
SPELLCHECK
|
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, 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 | |
---|---|
OldPostAction()
|
Method Summary | |
---|---|
protected void |
cleanSession()
|
protected void |
createMessage()
Convenience method for creating a new message. |
java.lang.String |
doDefault()
Loads specified Jive objects (the forum, parent message, etc) and checks that the user has posting permission in this forum. |
java.lang.String |
doPost()
This command allows users to post directly from another page. |
java.lang.String |
doRemoveAttach()
|
java.lang.String |
doReply()
This command is for designating that this message should be treated as reply. |
java.lang.String |
execute()
Loads specified Jive objects (the forum, parent message, etc) and checks that the user has posting permission in this forum. |
java.lang.String |
getAssignPoints()
|
int |
getAttachmentCount()
Returns an Iterator of temporary attachments associated with this message. |
java.util.Iterator |
getAttachments()
Returns an Iterator of temporary attachments associated with this message. |
java.lang.String |
getBody()
Returns the message body. |
protected java.lang.String |
getDoAttach()
Returns true if the user wants to add attachments to the message, false otherwise. |
java.lang.String |
getDoGoBack()
Returns true if the user wants to go back to the main post form (from a secondary page like preview or spelling). |
protected java.lang.String |
getDoPost()
Returns true if the user wants to post their message, false otherwise. |
protected java.lang.String |
getDoPreview()
Returns true if the user wants to preview their message, false otherwise. |
java.lang.String |
getDoQuoteOriq()
|
protected java.lang.String |
getDoSpellCheck()
Returns true if the user wants to spell check the message, false otherwise. |
Draft |
getDraft()
Get the draft associated with this message. |
java.lang.String |
getEmail()
Returns the email address of the guest posting the message. |
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're posting in. |
long |
getForumID()
Returns the forum ID. |
java.lang.String |
getFrom()
Returns the name of the action we're redirecting from. |
ForumMessage |
getMessage()
Returns the message we're replying to. |
long |
getMessageID()
Returns the message ID or -1 if no message was specified. |
java.lang.String |
getName()
Returns the name of the guest posting the message. |
ForumMessage |
getNewMessage()
Returns the new posted message. |
boolean |
getNewMessageIsModerated()
|
protected java.lang.String |
getPartialURL()
|
ForumMessage |
getPreviewedMessage()
Returns a ForumMessage object the preview page can use. |
java.lang.String |
getReplySubject()
A convenience method to return the reply message subject. |
java.lang.String |
getResolution()
Returns the resolution being set for the question. |
protected java.lang.String |
getSessionSuffix()
|
java.lang.String |
getSubject()
Returns the message subject. |
long |
getTempAttachmentID()
|
ForumThread |
getThread()
Returns the thread we're replying in (or making a reply to). |
long |
getThreadID()
Returns the thread ID or -1 if no thread was specified. |
java.lang.String |
getTid()
|
java.lang.String |
getToHex(java.lang.String input,
java.lang.String encoding)
|
java.lang.String |
isCancel()
Indicates the user wants to cancel. |
boolean |
isDraftEnabled()
Indicates whether or not drafts are enabled. |
boolean |
isDraftExists()
Indicates whether or not the user has a draft. |
protected boolean |
isEdit()
Returns false always. |
boolean |
isMarkAsQuestion()
Indicates whether or not the user wants to mark this posting as a question. |
boolean |
isQuote()
|
boolean |
isReply()
Returns true if this message is a reply to another message. |
boolean |
isShortTermQueryCacheEnabled()
Returns true if short term query cache is enabled, false otherwise. |
protected boolean |
loadJiveObjects()
Loads Jive objects used in this actions (ie, forum, thread, message objects). |
protected void |
loadToSession(ForumMessage message)
Puts relevant message data in the session. |
protected void |
removeFromSession()
Retrieves relevant message data from the session. |
protected ForumMessage |
retrieveFromSession()
Retrieves relevant message data from the session. |
void |
setAssignPoints(java.lang.String assignPoints)
|
void |
setBody(java.lang.String body)
Sets the message body. |
void |
setCancel(java.lang.String cancel)
Sets whether or not the user wants to cancel. |
void |
setDoAttach(java.lang.String doAttach)
Sets whether or not the user wants to add attachments to the message. |
void |
setDoGoBack(java.lang.String doGoBack)
Sets whether or not the user wants to go back to the main post form. |
void |
setDoPost(java.lang.String doPost)
Sets whether or not the user wants to post their message. |
void |
setDoPreview(java.lang.String doPreview)
Sets whether or not the user wants to preview their message. |
void |
setDoQuoteOriq(java.lang.String doQuoteOriq)
|
void |
setDoSpellCheck(java.lang.String doSpellCheck)
Sets whether or not the user wants to spell check the message. |
void |
setDraft(Draft draft)
Set the draft associated with this object. |
void |
setDraftEnabled(boolean draftEnabled)
Sets whether or not drafts are enabled |
void |
setDraftExists(boolean draftExists)
Sets whether or not the user has a draft for this forum/thread/message combo. |
void |
setEmail(java.lang.String email)
Sets the email address of the guest posting the message. |
void |
setForum(Forum forum)
|
void |
setForumID(long forumID)
Sets the ID of the forum to use. |
void |
setFrom(java.lang.String from)
Sets the name of the action we're redirecting from. |
void |
setMarkAsQuestion(boolean markAsQuestion)
Sets whether or not the user wants to mark this post as a question. |
void |
setMessage(ForumMessage message)
Sets the message. |
void |
setMessageID(long messageID)
Sets the ID of the message to use. |
void |
setName(java.lang.String name)
Sets the name of the guest posting the message. |
protected void |
setNewMessage(ForumMessage newMessage)
|
void |
setQuote(boolean quote)
|
void |
setReply(boolean reply)
Sets reply to true if this is a reply to a message or thread, false otherwise. |
void |
setResolution(java.lang.String resolution)
Sets the resolution for this question. |
void |
setServletRequest(javax.servlet.http.HttpServletRequest request)
|
void |
setSession(java.util.Map session)
|
void |
setSubject(java.lang.String subject)
Sets the message subject. |
void |
setTempAttachmentID(long tempAttachmentID)
|
protected void |
setThread(ForumThread thread)
|
void |
setThreadID(long threadID)
Sets the ID of the thread to use. |
void |
setTid(java.lang.String tid)
|
void |
setUseDraft(boolean useDraft)
Sets whether or not the user wants to use an existing draft. |
boolean |
useDraft()
Returns true if the user wants to use an existing draft, used by the 'Your Drafts' area of the site to autopopulate a forum post rather than showing the user a message that says 'would you like to use the existing draft?' |
void |
validate()
Validates all user input. |
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, setServletResponse |
Methods inherited from class com.opensymphony.xwork.ActionSupport |
---|
addActionError, addActionMessage, addFieldError, clearErrorsAndMessages, clone, 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 |
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 PREVIEW
public static final java.lang.String ATTACH
public static final java.lang.String SPELLCHECK
public static final java.lang.String REJECTED
Constructor Detail |
---|
public OldPostAction()
Method Detail |
---|
public void setServletRequest(javax.servlet.http.HttpServletRequest request)
setServletRequest
in interface com.opensymphony.webwork.interceptor.ServletRequestAware
setServletRequest
in class JiveActionSupport
public long getForumID()
public void setForumID(long forumID)
forumID
- the ID of the forum we want to use.public long getThreadID()
public void setThreadID(long threadID)
threadID
- the ID of the thread we want to use.public long getMessageID()
public void setMessageID(long messageID)
messageID
- the ID of the message we want to use.public long getTempAttachmentID()
public void setTempAttachmentID(long tempAttachmentID)
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name of the guest posting the message.public java.lang.String getEmail()
public void setEmail(java.lang.String email)
email
- the email address of the guest posting the message.public java.lang.String getSubject()
public void setSubject(java.lang.String subject)
subject
- sets the message subject.public java.lang.String getBody()
public void setBody(java.lang.String body)
body
- the body of a message.public java.lang.String getFrom()
public void setFrom(java.lang.String from)
from
- the name of the action we're redirecting from.public boolean isMarkAsQuestion()
public void setMarkAsQuestion(boolean markAsQuestion)
markAsQuestion
- "true" if the user wants to mark this post as a question.public boolean useDraft()
public void setUseDraft(boolean useDraft)
useDraft
- public boolean isDraftExists()
public void setDraftExists(boolean draftExists)
draftExists
- "true" if the user has a draftpublic boolean isDraftEnabled()
public void setDraftEnabled(boolean draftEnabled)
draftEnabled
- "true" if drafts are enabledpublic Draft getDraft()
public void setDraft(Draft draft)
draft
- public java.lang.String getResolution()
public void setResolution(java.lang.String resolution)
resolution
- the resolution to set.public java.lang.String getAssignPoints()
public void setAssignPoints(java.lang.String assignPoints)
public java.lang.String getTid()
public void setTid(java.lang.String tid)
public boolean isReply()
public void setReply(boolean reply)
reply
- true if this is a reply to a message or thread, false otherwise.public boolean isQuote()
public void setQuote(boolean quote)
protected boolean isEdit()
public Forum getForum()
public void setForum(Forum forum)
public ForumThread getThread()
protected void setThread(ForumThread thread)
public ForumMessage getMessage()
public void setMessage(ForumMessage message)
message
- the message to use.public ForumMessage getNewMessage()
protected void setNewMessage(ForumMessage newMessage)
public java.util.Iterator getAttachments()
public int getAttachmentCount()
public ForumMessage getPreviewedMessage()
This method assumes you've gone through all the necessary field validation steps.
public java.lang.String getReplySubject()
public java.lang.String isCancel()
public void setCancel(java.lang.String cancel)
protected java.lang.String getDoAttach()
public void setDoAttach(java.lang.String doAttach)
doAttach
- sets whether or not the user wants to add attachments to the message.protected java.lang.String getDoSpellCheck()
public void setDoSpellCheck(java.lang.String doSpellCheck)
doSpellCheck
- sets whether or not the user wants to spell check the message.public java.lang.String getDoQuoteOriq()
public void setDoQuoteOriq(java.lang.String doQuoteOriq)
doQuoteOriq
- protected java.lang.String getDoPreview()
public void setDoPreview(java.lang.String doPreview)
doPreview
- sets whether or not the user wants to preview their message.protected java.lang.String getDoPost()
public void setDoPost(java.lang.String doPost)
doPost
- sets whether or not the user wants to post their message.public java.lang.String getDoGoBack()
public void setDoGoBack(java.lang.String doGoBack)
doGoBack
- sets whether or not the user wants to post their message.public java.lang.String doPost()
execute()
public java.lang.String doReply()
doDefault()
public java.lang.String doRemoveAttach()
public boolean isShortTermQueryCacheEnabled()
public void validate()
validate
in interface com.opensymphony.xwork.Validateable
validate
in class com.opensymphony.xwork.ActionSupport
public java.lang.String doDefault()
This method will also add info messages - views can display them by getting Iterators from the
ActionSupport.getActionMessages()
method.
doDefault
in class com.opensymphony.xwork.ActionSupport
public java.lang.String execute()
This method also validates all message fields and, depending on what the user wants to do (post, preview, etc), executes the appropriate course of action.
If the user wants to post the message and all fields validate, this method will post the message and return Action.SUCCESS;
execute
in interface com.opensymphony.xwork.Action
execute
in class ForumActionSupport
public boolean getNewMessageIsModerated()
protected void createMessage() throws UnauthorizedException, MessageRejectedException
UnauthorizedException
- if the user does not have permission to create the message.
MessageRejectedException
- if the user is prevented from posting this message.protected boolean loadJiveObjects() throws UnauthorizedException
UnauthorizedException
protected void loadToSession(ForumMessage message)
protected ForumMessage retrieveFromSession()
protected void removeFromSession()
protected void cleanSession()
protected java.lang.String getSessionSuffix()
public java.lang.String getToHex(java.lang.String input, java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
protected java.lang.String getPartialURL()
public void setSession(java.util.Map session)
setSession
in interface com.opensymphony.webwork.interceptor.SessionAware
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.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |