|
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.PostAnnounceAction
public class PostAnnounceAction
Logic for creating an announcement.
Field Summary | |
---|---|
static java.lang.String |
ACTIVE_LATER
|
static java.lang.String |
ACTIVE_NOW
|
static java.lang.String |
EXPIRES_LATER
|
static java.lang.String |
EXPIRES_NEVER
|
static java.lang.String |
EXPIRES_RELATIVE
|
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 | |
---|---|
PostAnnounceAction()
|
Method Summary | |
---|---|
java.lang.String |
doDefault()
Loads environment to create a announcement. |
java.lang.String |
execute()
Creates a new announcement. |
java.lang.String |
getActiveDate()
|
java.lang.String |
getActiveMode()
|
Announcement |
getAnnouncement()
Returns the newly created announcement. |
AnnouncementManager |
getAnnouncementManager()
Returns access to the announcement manager. |
java.lang.String |
getBody()
|
ForumCategory |
getCategory()
Returns the category we're posting the announcement in or null if this is not a category specific announcement. |
long |
getCategoryID()
|
Draft |
getDraft()
Get the draft associated with this message. |
EntityDescriptor |
getEntityDescriptor(java.util.Map parameters)
Returns information (ID, type) about a specific type given a Map of parameters. |
java.lang.String |
getExpiresDate()
|
int |
getExpiresDays()
|
java.lang.String |
getExpiresMode()
|
Forum |
getForum()
Returns the forum we're posting the announcement in or null if this is not a forum specific announcement. |
long |
getForumID()
|
java.lang.String |
getSubject()
|
protected boolean |
hasDraft()
Returns true if the user has one or more drafts that match this forum / thread / message combination. |
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 Announcement |
loadAnnouncement()
|
java.lang.String |
loadObjects()
Loads objects in an action. |
protected void |
saveAnnouncement()
|
void |
setActiveDate(java.lang.String activeDate)
|
void |
setActiveMode(java.lang.String activeMode)
|
void |
setBody(java.lang.String body)
|
void |
setCancel(java.lang.String cancel)
Sets whether or not the user wants to cancel. |
void |
setCategoryID(long categoryID)
|
void |
setDraft(Draft draft)
Set the draft associated with this object. |
void |
setDraftExists(boolean draftExists)
Sets whether or not the user has a draft for this forum/thread/message combo. |
void |
setExpiresDate(java.lang.String expiresDate)
|
void |
setExpiresDays(int expiresDays)
|
void |
setExpiresMode(java.lang.String expiresMode)
|
void |
setForumID(long forumID)
|
void |
setServletRequest(javax.servlet.http.HttpServletRequest request)
|
void |
setSubject(java.lang.String subject)
|
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 an announcement rather than showing the user a message that says 'would you like to use the existing draft?' |
void |
validate()
|
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 ACTIVE_NOW
public static final java.lang.String ACTIVE_LATER
public static final java.lang.String EXPIRES_NEVER
public static final java.lang.String EXPIRES_RELATIVE
public static final java.lang.String EXPIRES_LATER
Constructor Detail |
---|
public PostAnnounceAction()
Method Detail |
---|
public void setServletRequest(javax.servlet.http.HttpServletRequest request)
setServletRequest
in interface com.opensymphony.webwork.interceptor.ServletRequestAware
setServletRequest
in class JiveActionSupport
public long getCategoryID()
public void setCategoryID(long categoryID)
public long getForumID()
public void setForumID(long forumID)
public java.lang.String getSubject()
public void setSubject(java.lang.String subject)
public java.lang.String getBody()
public void setBody(java.lang.String body)
public java.lang.String getActiveMode()
public void setActiveMode(java.lang.String activeMode)
public java.lang.String getExpiresMode()
public void setExpiresMode(java.lang.String expiresMode)
public int getExpiresDays()
public void setExpiresDays(int expiresDays)
public java.lang.String getActiveDate()
public void setActiveDate(java.lang.String activeDate)
public java.lang.String getExpiresDate()
public void setExpiresDate(java.lang.String expiresDate)
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 Draft getDraft()
public void setDraft(Draft draft)
draft
- public java.lang.String isCancel()
public void setCancel(java.lang.String cancel)
public ForumCategory getCategory()
public Forum getForum()
public Announcement getAnnouncement()
public AnnouncementManager getAnnouncementManager()
public java.lang.String doDefault()
ForumActionSupport.UNAUTHORIZED
if the user has no permission to create a announcement.Action.INPUT
if there were no problems creating the announcement environment and the action
is ready for input.
doDefault
in class com.opensymphony.xwork.ActionSupport
Action.INPUT
if the announcement environment is setup, ForumActionSupport.UNAUTHORIZED
if the user has no
permission to create a announcement.public void validate()
validate
in interface com.opensymphony.xwork.Validateable
validate
in class com.opensymphony.xwork.ActionSupport
public java.lang.String execute()
ForumActionSupport.CANCEL
if the user cancels the announcement creation process.ForumActionSupport.UNAUTHORIZED
if the user has no permission to create the announcement.Action.SUCCESS
if the user cancels the announcement creation process.
execute
in interface com.opensymphony.xwork.Action
execute
in class ForumActionSupport
Action.SUCCESS
if the announcement was created successfully, ForumActionSupport.UNAUTHORIZED
, ForumActionSupport.CANCEL
or
Action.ERROR
otherwise.protected Announcement loadAnnouncement() throws UnauthorizedException
UnauthorizedException
protected void saveAnnouncement() throws UnauthorizedException
UnauthorizedException
protected boolean hasDraft()
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.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 |