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.nuiton.topia.framework.TopiaTransactionAware
- Direct Known Subclasses:
- AddChoice, AddComment, DeleteComment, VoteForPoll
public abstract class AbstractVoteAction
- extends AbstractPollUriIdAction
- implements org.apache.struts2.interceptor.ParameterAware
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, clearFlashErrors, clearFlashMessages, getActionContext, getApplicationUrl, getApplicationVersion, getConfiguration, getCurrentDateTime, getCurrentUrl, getFlashErrors, getFlashMessages, getJqueryTheme, getPageLogo, getPollenApplicationContext, getPollenSession, getPollenUserAccount, getSafeLanguage, getServiceContext, getServiceFactory, getTransaction, getVoteCountingTypeHelp, hasAnyErrors, hasFlashErrors, hasFlashMessages, 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 |
AbstractVoteAction
public AbstractVoteAction()
getSkin
public PageSkin getSkin()
- Overrides:
getSkin in class PollenActionSupport
getPollResultsService
protected org.chorem.pollen.services.impl.PollResultsService getPollResultsService()
getPollService
protected org.chorem.pollen.services.impl.PollService getPollService()
getVoteService
protected org.chorem.pollen.services.impl.VoteService getVoteService()
getPollCommentService
protected org.chorem.pollen.services.impl.PollCommentService getPollCommentService()
setParameters
public void setParameters(Map<String,String[]> parameters)
- Specified by:
setParameters in interface org.apache.struts2.interceptor.ParameterAware
getPoll
public org.chorem.pollen.business.persistence.Poll getPoll()
isFeedFileExisting
public boolean isFeedFileExisting()
getPollAccount
public org.chorem.pollen.business.persistence.PollAccount getPollAccount()
getVotes
public List<org.chorem.pollen.business.persistence.Vote> getVotes()
getVote
public org.chorem.pollen.business.persistence.Vote getVote()
isPollChoiceOrVoteStarted
public boolean isPollChoiceOrVoteStarted()
isAlreadyVoted
public boolean isAlreadyVoted()
isAnonymousVote
public boolean isAnonymousVote()
getResults
public List<org.chorem.pollen.bean.PollResult> getResults()
getComments
public List<org.chorem.pollen.business.persistence.Comment> getComments()
isCreatorUser
public boolean isCreatorUser()
isAccountFieldDisplayed
public boolean isAccountFieldDisplayed()
isPollChoiceRunning
public boolean isPollChoiceRunning()
getCreatorName
public String getCreatorName()
getVoteSizeMessage
public String getVoteSizeMessage()
isDescNull
public boolean isDescNull(org.chorem.pollen.business.persistence.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()
isPollStarted
public boolean isPollStarted()
isPollFinished
public boolean isPollFinished()
getCommentAuthor
public String getCommentAuthor()
setCommentAuthor
public void setCommentAuthor(String commentAuthor)
prepareVotePage
public String prepareVotePage()
throws Exception
- Throws:
Exception
getResultValue
public String getResultValue(org.chorem.pollen.business.persistence.Choice choice)
isChoiceInVote
public boolean isChoiceInVote(org.chorem.pollen.business.persistence.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
isModifAllowed
public boolean isModifAllowed(org.chorem.pollen.business.persistence.Vote vote)
isVoteAllowed
public boolean isVoteAllowed()
isDeleteCommentAllowed
public boolean isDeleteCommentAllowed(org.chorem.pollen.business.persistence.Comment comment)
isDeleteVoteAllowed
public boolean isDeleteVoteAllowed(org.chorem.pollen.business.persistence.Vote vote)
escapeLineBreak
public String escapeLineBreak(String text)
getChoiceAsDate
public Date getChoiceAsDate(org.chorem.pollen.business.persistence.Choice choice)
loadPollAccount
protected void loadPollAccount()
throws org.chorem.pollen.services.exceptions.PollAccountNotFound
- Throws:
org.chorem.pollen.services.exceptions.PollAccountNotFound
loadPoll
protected void loadPoll()
throws org.chorem.pollen.services.exceptions.PollNotFoundException
- Throws:
org.chorem.pollen.services.exceptions.PollNotFoundException
loadPollComments
protected void loadPollComments()
loadPollResults
protected void loadPollResults()
throws org.chorem.pollen.services.exceptions.PollNotFoundException
- Throws:
org.chorem.pollen.services.exceptions.PollNotFoundException
Copyright © 2009-2012 CodeLutin. All Rights Reserved.