Jive Forums API (5.5.8) Developer Javadocs

com.jivesoftware.forum.action
Class PostQuestionAction

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.jivesoftware.base.action.JiveActionSupport
          extended by com.jivesoftware.forum.action.ForumActionSupport
              extended by com.jivesoftware.forum.action.PostAction
                  extended by com.jivesoftware.forum.action.PostQuestionAction
All Implemented Interfaces:
AuthTokenAware, EntityAware, UserAware, ForumAware, ForumCategoryAware, ForumFactoryAware, ForumMessageAware, ForumThreadAware, com.opensymphony.webwork.interceptor.ServletRequestAware, com.opensymphony.webwork.interceptor.ServletResponseAware, com.opensymphony.webwork.interceptor.SessionAware, 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 PostQuestionAction
extends PostAction

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jivesoftware.forum.action.PostAction
ATTACH, REJECTED, REQUEST_TOO_LARGE, SESSION_MESSAGE_KEY, SUCCESS_MODERATED, SUCCESS_NEW_MESSAGE, SUCCESS_NEW_MESSAGE_STQC, SUCCESS_NEW_TOPIC
 
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
PostQuestionAction()
           
 
Method Summary
 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 execute()
          Loads specified Jive objects (the forum, parent message, etc) and checks that the user has posting permission in this forum.
 java.lang.Boolean getAnsQuestion()
           
 QuestionManager getQuestionManager()
           
 void setAnsQuestion(java.lang.Boolean ansQuestion)
           
 void validate()
          Validates all user input.
 
Methods inherited from class com.jivesoftware.forum.action.PostAction
addAttachments, cleanSession, createMessage, doPost, doReply, getAssignPoints, getAttachFile, getAttachFileContentType, getAttachFileFileName, getAttachmentCount, getAttachmentList, getAttachments, getBody, getDraft, getEmail, getEntityDescriptor, getForum, getFrom, getMessage, getName, getNewMessage, getNewMessageIsModerated, getParentQuotedText, getPartialURL, getPopularTags, getRemoveAttachID, getReplySubject, getResolution, getServletRequest, getSession, getSubject, getTag, getTags, getThread, hasDraft, hasPostPermission, isCancel, isDraftEnabled, isDraftExists, isEdit, isEditStampRequired, isJiveForumUploadSizeLimitExceeded, isMarkAsQuestion, isPostedFromGUIEditor, isReply, isShortTermQueryCacheEnabled, loadJiveObjects, loadToSession, newMessageModerated, removeAttachments, removeFromSession, retrieveFromSession, setAssignPoints, setAttachFile, setAttachFileContentType, setAttachFileFileName, setBody, setCancel, setDraft, setDraftEnabled, setDraftExists, setEmail, setForum, setForumCategory, setFrom, setJiveForumUploadSizeLimitExceeded, setMarkAsQuestion, setMessage, setName, setNewMessage, setPostedFromGUIEditor, setRemoveAttachID, setReply, setResolution, setServletRequest, setSession, setSubject, setTags, setThread, setUseDraft, useDraft
 
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, 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
 

Constructor Detail

PostQuestionAction

public PostQuestionAction()
Method Detail

getAnsQuestion

public java.lang.Boolean getAnsQuestion()

setAnsQuestion

public void setAnsQuestion(java.lang.Boolean ansQuestion)

getQuestionManager

public QuestionManager getQuestionManager()

validate

public void validate()
Description copied from class: PostAction
Validates all user input.

Specified by:
validate in interface com.opensymphony.xwork.Validateable
Overrides:
validate in class PostAction

doDefault

public java.lang.String doDefault()
Description copied from class: PostAction
Loads specified Jive objects (the forum, parent message, etc) and checks that the user has posting permission in this forum. If there are errors loading the objects, Action.ERROR is returned and if the user doesn't have permission to post, Action.LOGIN is returned.

This method will also add info messages - views can display them by getting Iterators from the ActionSupport.getActionMessages() method.

Overrides:
doDefault in class PostAction
Returns:
the view to redirect to.

execute

public java.lang.String execute()
Description copied from class: PostAction
Loads specified Jive objects (the forum, parent message, etc) and checks that the user has posting permission in this forum. If there are errors loading the objects, Action.ERROR is returned and if the user doesn't have permission to post, Action.LOGIN is returned.

This method also validates all message fields and, depending on what the user wants to do (post, 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;

Specified by:
execute in interface com.opensymphony.xwork.Action
Overrides:
execute in class PostAction
Returns:
the view to redirect to.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.