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.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

Field Summary
static String PREPARE_VOTE_PAGE
           
 
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()
           
 List<PollResult> getResults()
           
 String getResultUrl()
           
 String getResultValue(Choice choice)
           
 PageSkin getSkin()
           
 String getSummaryUrl()
           
 Vote getVote()
           
 String getVoteMessages()
           
 List<Vote> getVotes()
           
 String getVoteSizeMessage()
           
 boolean isAccountFieldDisplayed()
           
 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 isCreatorOrAdmin()
           
 boolean isDateType()
           
 boolean isDeleteCommentAllowed(Comment comment)
           
 boolean isDeleteVoteAllowed(Vote vote)
           
 boolean isDescNull(Choice choice)
           
 boolean isFeedFileExisting()
           
 boolean isFreePoll()
           
 boolean isGroupPoll()
           
 boolean isImageType()
           
abstract  boolean isModerate()
           
 boolean isModifyVoteAllowed(Vote vote)
           
 boolean isNormalVoteCounting()
           
 boolean isNumberVoteCounting()
           
 boolean isPercentageVoteCounting()
           
 boolean isPollChoiceOrVoteStarted()
           
 boolean isPollChoiceRunning()
           
 boolean isPollFinished()
           
 boolean isPollStarted()
           
 boolean isRestrictedPoll()
           
 boolean isResultAllowed()
           
 boolean isTextType()
           
 boolean isVoteAllowed()
           
protected  void loadPoll()
           
protected  void loadPollAccount()
           
 String prepareVotePage()
           
 void setCommentAuthor(String commentAuthor)
           
 void setParameters(Map<String,String[]> parameters)
           
 void setServletRequest(javax.servlet.http.HttpServletRequest request)
           
 
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, 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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREPARE_VOTE_PAGE

public static final String PREPARE_VOTE_PAGE
See Also:
Constant Field Values
Constructor Detail

AbstractVoteAction

public AbstractVoteAction()
Method Detail

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.