org.chorem.pollen.ui.actions.poll
Class AbstractVoteAction
java.lang.Object
com.opensymphony.xwork2.ActionSupport
org.nuiton.web.struts2.BaseAction
org.chorem.pollen.ui.actions.PollenActionSupport
org.chorem.pollen.ui.actions.poll.AbstractPollUriIdAction
org.chorem.pollen.ui.actions.poll.AbstractVoteAction
- All Implemented Interfaces:
- com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, Serializable, org.apache.struts2.interceptor.ParameterAware, org.apache.struts2.interceptor.ServletRequestAware, org.nuiton.topia.framework.TopiaTransactionAware
- Direct Known Subclasses:
- AddChoice, AddComment, DeleteComment, ModeratePoll, VoteForPoll
public abstract class AbstractVoteAction
- extends AbstractPollUriIdAction
- implements org.apache.struts2.interceptor.ParameterAware, org.apache.struts2.interceptor.ServletRequestAware
Abstract action for actions on the vote poll page.
- Since:
- 1.3
- Author:
- tchemit , fdesbois
- See Also:
- Serialized Form
| Fields inherited from class com.opensymphony.xwork2.ActionSupport |
LOG |
| Fields inherited from interface com.opensymphony.xwork2.Action |
ERROR, INPUT, LOGIN, NONE, SUCCESS |
| Methods inherited from class org.chorem.pollen.ui.actions.PollenActionSupport |
addFlashError, addFlashMessage, addFlashWarning, clearFlashErrors, clearFlashMessages, getActionContext, getApplicationUrl, getApplicationVersion, getConfiguration, getCurrentDateTime, getCurrentUrl, getFavoriteService, getFlashErrors, getFlashMessages, getFlashWarnings, getJqueryTheme, getPageLogo, getPollCommentService, getPollenApplicationContext, getPollenSession, getPollenUserAccount, getPollFeedService, getPollResultsService, getPollService, getPollUrlService, getPreventRuleService, getSafeLanguage, getSecurityService, getServiceContext, getServiceFactory, getTransaction, getUserService, getVoteCountingTypeHelp, getVoteService, hasAnyErrors, hasFlashErrors, hasFlashMessages, hasFlashWarnings, isUserAdmin, isUserLoggued, newService, setTransaction |
| Methods inherited from class org.nuiton.web.struts2.BaseAction |
_ |
| Methods inherited from class com.opensymphony.xwork2.ActionSupport |
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validate |
PREPARE_VOTE_PAGE
public static final String PREPARE_VOTE_PAGE
- See Also:
- Constant Field Values
AbstractVoteAction
public AbstractVoteAction()
isModerate
public abstract boolean isModerate()
- Returns:
true if moderation is possible, false otherwise- Since:
- 1.4
getSkin
public PageSkin getSkin()
- Overrides:
getSkin in class PollenActionSupport
setParameters
public void setParameters(Map<String,String[]> parameters)
- Specified by:
setParameters in interface org.apache.struts2.interceptor.ParameterAware
setServletRequest
public void setServletRequest(javax.servlet.http.HttpServletRequest request)
- Specified by:
setServletRequest in interface org.apache.struts2.interceptor.ServletRequestAware
getPoll
public Poll getPoll()
getPollAccount
public PollAccount getPollAccount()
getVotes
public List<Vote> getVotes()
getVote
public Vote getVote()
getResults
public List<PollResult> getResults()
getComments
public List<Comment> getComments()
getCreatorName
public String getCreatorName()
getVoteSizeMessage
public String getVoteSizeMessage()
getCommentAuthor
public String getCommentAuthor()
getSummaryUrl
public String getSummaryUrl()
getResultUrl
public String getResultUrl()
getVoteMessages
public String getVoteMessages()
isFeedFileExisting
public boolean isFeedFileExisting()
isCreatorOrAdmin
public boolean isCreatorOrAdmin()
isAccountFieldDisplayed
public boolean isAccountFieldDisplayed()
isPollChoiceOrVoteStarted
public boolean isPollChoiceOrVoteStarted()
isAnonymousVote
public boolean isAnonymousVote()
isPollChoiceRunning
public boolean isPollChoiceRunning()
isPollStarted
public boolean isPollStarted()
isPollFinished
public boolean isPollFinished()
isDescNull
public boolean isDescNull(Choice choice)
isFreePoll
public boolean isFreePoll()
isRestrictedPoll
public boolean isRestrictedPoll()
isGroupPoll
public boolean isGroupPoll()
isTextType
public boolean isTextType()
isDateType
public boolean isDateType()
isImageType
public boolean isImageType()
isNormalVoteCounting
public boolean isNormalVoteCounting()
isPercentageVoteCounting
public boolean isPercentageVoteCounting()
isCondorcetVoteCounting
public boolean isCondorcetVoteCounting()
isNumberVoteCounting
public boolean isNumberVoteCounting()
isVoteAllowed
public boolean isVoteAllowed()
isResultAllowed
public boolean isResultAllowed()
isModifyVoteAllowed
public boolean isModifyVoteAllowed(Vote vote)
isDeleteCommentAllowed
public boolean isDeleteCommentAllowed(Comment comment)
isDeleteVoteAllowed
public boolean isDeleteVoteAllowed(Vote vote)
getResultValue
public String getResultValue(Choice choice)
isChoiceInVote
public boolean isChoiceInVote(VoteToChoice choice)
- Retourne si le choix fait partie du vote (s'il a été renseigné par le
votant).
- Parameters:
choice - le choix concerné
- Returns:
- true si le choix est dans le vote
getChoiceAsDate
public Date getChoiceAsDate(Choice choice)
setCommentAuthor
public void setCommentAuthor(String commentAuthor)
prepareVotePage
public String prepareVotePage()
throws Exception
- Throws:
Exception
escapeLineBreak
public String escapeLineBreak(String text)
loadPollAccount
protected void loadPollAccount()
throws PollAccountNotFound
- Throws:
PollAccountNotFound
loadPoll
protected void loadPoll()
throws PollNotFoundException
- Throws:
PollNotFoundException
Copyright © 2009-2012 CodeLutin. All Rights Reserved.