org.chorem.pollen.ui.actions.poll
Class AbstractVoteAction

java.lang.Object
  extended by com.opensymphony.xwork2.ActionSupport
      extended by org.nuiton.web.struts2.BaseAction
          extended by org.chorem.pollen.ui.actions.PollenActionSupport
              extended by org.chorem.pollen.ui.actions.poll.AbstractPollUriIdAction
                  extended by 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

Field Summary
 
Fields inherited from class org.chorem.pollen.ui.actions.poll.AbstractPollUriIdAction
PARAM_POLL_PAGE, PARAM_POLL_URI
 
Fields inherited from class org.chorem.pollen.ui.actions.PollenActionSupport
SAFE_LANGUAGES, serviceContext, serviceFactory, transaction
 
Fields inherited from class com.opensymphony.xwork2.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
AbstractVoteAction()
           
 
Method Summary
 String escapeLineBreak(String text)
           
 Date getChoiceAsDate(Choice choice)
           
 String getCommentAuthor()
           
 List<Comment> getComments()
           
 String getCreatorName()
           
 Poll getPoll()
           
 PollAccount getPollAccount()
           
protected  PollCommentService getPollCommentService()
           
protected  PollResultsService getPollResultsService()
           
protected  PollService getPollService()
           
 List<PollResult> getResults()
           
 String getResultValue(Choice choice)
           
 PageSkin getSkin()
           
 Vote getVote()
           
 List<Vote> getVotes()
           
protected  VoteService getVoteService()
           
 String getVoteSizeMessage()
           
 boolean isAccountFieldDisplayed()
           
 boolean isAlreadyVoted()
           
 boolean isAnonymousVote()
           
 boolean isChoiceInVote(VoteToChoice choice)
          Retourne si le choix fait partie du vote (s'il a été renseigné par le votant).
 boolean isCondorcetVoteCounting()
           
 boolean isCreatorUser()
           
 boolean isDateType()
           
 boolean isDeleteCommentAllowed(Comment comment)
           
 boolean isDeleteVoteAllowed(Vote vote)
           
 boolean isDescNull(Choice choice)
           
 boolean isFeedFileExisting()
           
 boolean isFreePoll()
           
 boolean isGroupPoll()
           
 boolean isImageType()
           
 boolean isModifAllowed(Vote vote)
           
 boolean isNormalVoteCounting()
           
 boolean isNumberVoteCounting()
           
 boolean isPercentageVoteCounting()
           
 boolean isPollChoiceOrVoteStarted()
           
 boolean isPollChoiceRunning()
           
 boolean isPollFinished()
           
 boolean isPollStarted()
           
 boolean isRestrictedPoll()
           
 boolean isTextType()
           
 boolean isVoteAllowed()
           
protected  void loadPoll()
           
protected  void loadPollAccount()
           
protected  void loadPollComments()
           
protected  void loadPollResults()
           
 String prepareVotePage()
           
 void setCommentAuthor(String commentAuthor)
           
 void setParameters(Map<String,String[]> parameters)
           
 
Methods inherited from class org.chorem.pollen.ui.actions.poll.AbstractPollUriIdAction
getAccountId, getPage, getPollId, getUriId, preparePollUri, preparePollUri, setPage, setUriId
 
Methods inherited from class org.chorem.pollen.ui.actions.PollenActionSupport
addFlashError, addFlashMessage, addFlashWarning, clearFlashErrors, clearFlashMessages, getActionContext, getApplicationUrl, getApplicationVersion, getConfiguration, getCurrentDateTime, getCurrentUrl, getFlashErrors, getFlashMessages, getFlashWarnings, getJqueryTheme, getPageLogo, getPollenApplicationContext, getPollenSession, getPollenUserAccount, getSafeLanguage, getServiceContext, getServiceFactory, getTransaction, getVoteCountingTypeHelp, 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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractVoteAction

public AbstractVoteAction()
Method Detail

getSkin

public PageSkin getSkin()
Overrides:
getSkin in class PollenActionSupport

getPollResultsService

protected PollResultsService getPollResultsService()

getPollService

protected PollService getPollService()

getVoteService

protected VoteService getVoteService()

getPollCommentService

protected PollCommentService getPollCommentService()

setParameters

public void setParameters(Map<String,String[]> parameters)
Specified by:
setParameters in interface org.apache.struts2.interceptor.ParameterAware

getPoll

public Poll getPoll()

isFeedFileExisting

public boolean isFeedFileExisting()

getPollAccount

public PollAccount getPollAccount()

getVotes

public List<Vote> getVotes()

getVote

public Vote getVote()

isPollChoiceOrVoteStarted

public boolean isPollChoiceOrVoteStarted()

isAlreadyVoted

public boolean isAlreadyVoted()

isAnonymousVote

public boolean isAnonymousVote()

getResults

public List<PollResult> getResults()

getComments

public List<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(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(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

isModifAllowed

public boolean isModifAllowed(Vote vote)

isVoteAllowed

public boolean isVoteAllowed()

isDeleteCommentAllowed

public boolean isDeleteCommentAllowed(Comment comment)

isDeleteVoteAllowed

public boolean isDeleteVoteAllowed(Vote vote)

escapeLineBreak

public String escapeLineBreak(String text)

getChoiceAsDate

public Date getChoiceAsDate(Choice choice)

loadPollAccount

protected void loadPollAccount()
                        throws PollAccountNotFound
Throws:
PollAccountNotFound

loadPoll

protected void loadPoll()
                 throws PollNotFoundException
Throws:
PollNotFoundException

loadPollComments

protected void loadPollComments()

loadPollResults

protected void loadPollResults()
                        throws PollNotFoundException
Throws:
PollNotFoundException


Copyright © 2009-2012 CodeLutin. All Rights Reserved.