|
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.PollPostAction
public class PollPostAction
Logic for creating a poll.
Field Summary | |
---|---|
static java.lang.String |
ACTIVE_LATER
|
static java.lang.String |
ACTIVE_NOW
|
static java.lang.String |
ENDS_LATER
|
static java.lang.String |
ENDS_NEVER
|
static java.lang.String |
ENDS_RELATIVE
|
static java.lang.String |
EXPIRES_LATER
|
static java.lang.String |
EXPIRES_NEVER
|
static java.lang.String |
EXPIRES_RELATIVE
|
protected java.util.Date |
validatedActiveDate
|
protected java.util.Date |
validatedEndDate
|
protected java.util.Date |
validatedExpireDate
|
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 | |
---|---|
PollPostAction()
|
Method Summary | |
---|---|
java.lang.String |
doDefault()
Loads environment to create a poll. |
java.lang.String |
execute()
Creates a new poll. |
java.lang.String |
getActiveDate()
Returns the the date as a parseable String format of when the poll should become active. |
java.lang.String |
getActiveMode()
Gets the active mode - will be either ACTIVE_NOW or ACTIVE_LATER . |
ForumCategory |
getCategory()
Returns the category we're posting the poll in or null if this is not a category specific poll. |
long |
getCategoryID()
Returns the ID of the category we're posting the poll in. |
java.lang.String |
getDescription()
Returns the description of the poll. |
Draft |
getDraft()
Get the draft associated with this message. |
java.lang.String |
getEndsDate()
Returns the the date as a parseable String format of when the poll should become inactive (can't be voted in). |
int |
getEndsDays()
Returns the number of days the poll will end after becoming active. |
java.lang.String |
getEndsMode()
Returns the end mode - will be either ENDS_NEVER , ENDS_RELATIVE
or ENDS_LATER . |
EntityDescriptor |
getEntityDescriptor(java.util.Map parameters)
Returns information (ID, type) about a specific type given a Map of parameters. |
java.lang.String |
getExpiresDate()
Returns the the date as a parseable String format of when the poll should die (become invisible). |
int |
getExpiresDays()
Returns the number of days the poll will expire after becoming active. |
java.lang.String |
getExpiresMode()
Returns the expiration mode - will be either EXPIRES_NEVER , EXPIRES_RELATIVE
or EXPIRES_LATER . |
Forum |
getForum()
Returns the forum we're posting the poll in or null if this is not a forum specific poll. |
long |
getForumID()
Returns the ID of the forum we're posting the poll in. |
java.lang.String |
getName()
Returns the name of the poll. |
long |
getObjectID()
The ID of the object to load. |
int |
getObjectType()
The type of object to load. |
java.util.List |
getOptions()
Returns the list of options for this poll - option is a String. |
Poll |
getPoll()
Returns the newly created poll. |
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. |
java.lang.String |
loadObjects()
Optionally loads the category or forum specified. |
void |
setActiveDate(java.lang.String activeDate)
Sets the date as a parseable String format of when the poll should become active. |
void |
setActiveMode(java.lang.String activeMode)
Sets the active mode - can be either ACTIVE_NOW or ACTIVE_LATER . |
void |
setCancel(java.lang.String cancel)
Sets whether or not the user wants to cancel. |
void |
setCategory(ForumCategory category)
Sets the category to work with. |
void |
setCategoryID(long categoryID)
Sets the ID of the category we're posting the poll in. |
void |
setDescription(java.lang.String description)
Sets the description of the poll. |
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 |
setEndsDate(java.lang.String endsDate)
Sets the date as a parseable String format of when the poll should become inactivt (can't be voted in). |
void |
setEndsDays(int endsDays)
Sets the number of days the poll is active. |
void |
setEndsMode(java.lang.String endsMode)
Sets the end mode - can be either ENDS_NEVER , ENDS_RELATIVE
or ENDS_LATER . |
void |
setExpiresDate(java.lang.String expiresDate)
Sets the date as a parseable String format of when the poll should die (become invisible). |
void |
setExpiresDays(int expiresDays)
Sets the number of days the poll is viewable. |
void |
setExpiresMode(java.lang.String expiresMode)
Sets the expiration mode - can be either EXPIRES_NEVER , EXPIRES_RELATIVE
or EXPIRES_LATER . |
protected void |
setForum(Forum forum)
Sets the forum to work with. |
void |
setForumID(long forumID)
Sets the ID of the forum we're posting the poll in. |
void |
setName(java.lang.String name)
Sets the name of the poll. |
void |
setObjectID(long objectID)
Sets the ID of the object to load. |
void |
setObjectType(int objectType)
Sets the type of object to load. |
void |
setOptions(java.util.List options)
Sets the list of options as a list of Strings. |
void |
setServletRequest(javax.servlet.http.HttpServletRequest request)
|
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 ENDS_NEVER
public static final java.lang.String ENDS_RELATIVE
public static final java.lang.String ENDS_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
protected java.util.Date validatedActiveDate
protected java.util.Date validatedEndDate
protected java.util.Date validatedExpireDate
Constructor Detail |
---|
public PollPostAction()
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 int getObjectType()
public void setObjectType(int objectType)
public long getObjectID()
public void setObjectID(long objectID)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public java.lang.String getActiveMode()
ACTIVE_NOW
or ACTIVE_LATER
.
public void setActiveMode(java.lang.String activeMode)
ACTIVE_NOW
or ACTIVE_LATER
.
public java.lang.String getEndsMode()
ENDS_NEVER
, ENDS_RELATIVE
or ENDS_LATER
.
public void setEndsMode(java.lang.String endsMode)
ENDS_NEVER
, ENDS_RELATIVE
or ENDS_LATER
.
public java.lang.String getExpiresMode()
EXPIRES_NEVER
, EXPIRES_RELATIVE
or EXPIRES_LATER
.
public void setExpiresMode(java.lang.String expiresMode)
EXPIRES_NEVER
, EXPIRES_RELATIVE
or EXPIRES_LATER
.
public int getEndsDays()
public void setEndsDays(int endsDays)
public int getExpiresDays()
public void setExpiresDays(int expiresDays)
public java.lang.String getActiveDate()
public void setActiveDate(java.lang.String activeDate)
public java.lang.String getEndsDate()
public void setEndsDate(java.lang.String endsDate)
public java.lang.String getExpiresDate()
public void setExpiresDate(java.lang.String expiresDate)
public java.util.List getOptions()
public void setOptions(java.util.List options)
public java.lang.String isCancel()
public void setCancel(java.lang.String cancel)
public ForumCategory getCategory()
public void setCategory(ForumCategory category)
public Forum getForum()
protected void setForum(Forum forum)
public Poll getPoll()
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 doDefault() throws java.lang.Exception
ForumActionSupport.UNAUTHORIZED
if the user has no permission to create a poll.Action.INPUT
if there were no problems creating the poll environment and the action
is ready for input.
doDefault
in class com.opensymphony.xwork.ActionSupport
Action.INPUT
if the poll environment is setup, ForumActionSupport.UNAUTHORIZED
if the user has no
permission to create a poll.
java.lang.Exception
public void validate()
validate
in interface com.opensymphony.xwork.Validateable
validate
in class com.opensymphony.xwork.ActionSupport
public java.lang.String execute() throws java.lang.Exception
ForumActionSupport.CANCEL
if the user cancels the poll creation process.ForumActionSupport.UNAUTHORIZED
if the user has no permission to create the poll.Action.SUCCESS
if the user cancels the poll creation process.
execute
in interface com.opensymphony.xwork.Action
execute
in class ForumActionSupport
Action.SUCCESS
if the poll was created successfully, ForumActionSupport.UNAUTHORIZED
, ForumActionSupport.CANCEL
or
Action.ERROR
otherwise.
java.lang.Exception
protected boolean hasDraft()
public java.lang.String loadObjects()
ForumActionSupport.NOTFOUND
is returned or
Action.SUCCESS
otherwise. If the user doesn't have read permission to the forum then
ForumActionSupport.UNAUTHORIZED
is returned.
loadObjects
in interface JiveObjectLoader
Action.SUCCESS
if object loading occurred normally,
anything else to indicate that object loading failed.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 |