|
Jive Forums API (5.5.8) 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
com.jivesoftware.forum.action.AttachAction
public class AttachAction
An action that encapsulates all the logic for posting message attachments as well as deleting them.
| Field Summary | |
|---|---|
static java.lang.String |
ATTACHMENT_RENAME_INPUT
|
static java.lang.String |
ATTACHMENT_RENAME_SUCCESS
|
static java.lang.String |
SUCCESS_MESSAGE
|
static java.lang.String |
SUCCESS_TOPIC
|
| Fields inherited from class com.jivesoftware.forum.action.OldPostAction |
|---|
ATTACH, PREVIEW, REJECTED, 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 | |
|---|---|
AttachAction()
|
|
| Method Summary | |
|---|---|
protected void |
addAttachments(ForumMessage 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 |
doDelete()
|
java.lang.String |
doRename()
Webwork command to rename an attachment. |
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()
|
java.io.File[] |
getAttachFile()
|
long |
getAttachID()
|
Attachment |
getAttachment()
|
AttachmentManager |
getAttachmentManager()
|
static java.lang.String |
getContentType(javax.servlet.http.HttpServletRequest request)
A utility method to return the content type of the incoming request. |
int[] |
getDeleteAttachIDs()
|
java.lang.String |
getDoAttachFiles()
|
java.lang.String |
getEncBody()
|
java.lang.String |
getEncSubject()
|
java.lang.String |
getNewName()
|
boolean |
isEdit()
Returns false always. |
static boolean |
isMultiPart(javax.servlet.http.HttpServletRequest request)
A utility method to determine if the given request is of the multipart content-type. |
void |
setAnsQuestion(java.lang.Boolean ansQuestion)
|
void |
setAttachFile(java.io.File[] attachFile)
|
void |
setAttachID(long attachID)
|
void |
setDeleteAttachIDs(int[] deleteAttachIDs)
|
void |
setDoAttachFiles(java.lang.String doAttachFiles)
|
void |
setEncBody(java.lang.String encBody)
|
void |
setEncSubject(java.lang.String encSubject)
|
void |
setNewName(java.lang.String newName)
|
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 SUCCESS_TOPIC
public static final java.lang.String SUCCESS_MESSAGE
public static final java.lang.String ATTACHMENT_RENAME_INPUT
public static final java.lang.String ATTACHMENT_RENAME_SUCCESS
| Constructor Detail |
|---|
public AttachAction()
| Method Detail |
|---|
public java.lang.String getDoAttachFiles()
public void setDoAttachFiles(java.lang.String doAttachFiles)
public java.io.File[] getAttachFile()
public void setAttachFile(java.io.File[] attachFile)
public int[] getDeleteAttachIDs()
public void setDeleteAttachIDs(int[] deleteAttachIDs)
public long getAttachID()
public void setAttachID(long attachID)
public java.lang.String getEncSubject()
public void setEncSubject(java.lang.String encSubject)
public java.lang.String getEncBody()
public void setEncBody(java.lang.String encBody)
public java.lang.String getNewName()
public void setNewName(java.lang.String newName)
public java.lang.Boolean getAnsQuestion()
public void setAnsQuestion(java.lang.Boolean ansQuestion)
public AttachmentManager getAttachmentManager()
public boolean isEdit()
OldPostAction
isEdit in class OldPostActionpublic Attachment getAttachment()
public void validate()
OldPostAction
validate in interface com.opensymphony.xwork.Validateablevalidate in class OldPostActionpublic java.lang.String doDefault()
OldPostActionThis method will also add info messages - views can display them by getting Iterators from the
ActionSupport.getActionMessages() method.
doDefault in class OldPostActionpublic java.lang.String doDelete()
public java.lang.String doRename()
Action.ERROR view if no message and attachment was specified,
the Action.ERROR view if there were errors pertaining to renaming the attachment,
the Action.LOGIN view if the user is not authorized
or the SUCCESS_MESSAGE view if the attachment was successfully removed.public java.lang.String execute()
OldPostActionThis 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.Actionexecute in class OldPostAction
protected void addAttachments(ForumMessage message)
throws UnauthorizedException
UnauthorizedExceptionpublic static boolean isMultiPart(javax.servlet.http.HttpServletRequest request)
TODO: This method should be moved to a utils class.
request - the HttpServletRequest to examine.
public static java.lang.String getContentType(javax.servlet.http.HttpServletRequest request)
TODO: This method should be moved to a utils class.
request - the HttpServletRequest to examine.
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||