org.chorem.pollen.ui.actions.poll
Class ResultForPoll
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.ResultForPoll
- 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.nuiton.topia.framework.TopiaTransactionAware
public class ResultForPoll
- extends AbstractPollUriIdAction
Display results of a poll.
- Since:
- 1.3
- Author:
- tchemit
- 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, 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 |
userAllowed
protected boolean userAllowed
ResultForPoll
public ResultForPoll()
getSkin
public PageSkin getSkin()
- Overrides:
getSkin in class PollenActionSupport
getPoll
public org.chorem.pollen.business.persistence.Poll getPoll()
isUserAllowed
public boolean isUserAllowed()
getResults
public List<org.chorem.pollen.bean.PollResult> getResults()
getResultAsDate
public Date getResultAsDate(org.chorem.pollen.bean.PollResult result)
getChoicesResults
public com.google.common.collect.Multimap<String,String> getChoicesResults()
getSubtitles
public com.google.common.collect.Multimap<String,String> getSubtitles()
getVictoryMessage
public String getVictoryMessage()
getTrimValue
public String getTrimValue(org.chorem.pollen.bean.PollResult result)
- Parameters:
result - la résultat à utiliser.
- Returns:
- la valeur du résultat courant sans le .0 final
execute
public String execute()
throws Exception
- Specified by:
execute in interface com.opensymphony.xwork2.Action- Overrides:
execute in class com.opensymphony.xwork2.ActionSupport
- Throws:
Exception
getTopRanking
public List<org.chorem.pollen.bean.PollResult> getTopRanking()
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()
isByGroup
public boolean isByGroup()
setByGroup
public void setByGroup(boolean byGroup)
loadResults
protected void loadResults()
throws org.chorem.pollen.services.exceptions.PollNotFoundException
- Throws:
org.chorem.pollen.services.exceptions.PollNotFoundException
getChoices
public List<String> getChoices()
- Returns:
- Récupération de la liste des résultats pour le diagramme.
getNormalPollResultChartUrl
public String getNormalPollResultChartUrl(int width,
int height)
getChoicesResultNames
public Set<String> getChoicesResultNames()
getChoicesResultCharUrl
public String getChoicesResultCharUrl(int width,
int height,
String choiceName)
getChoicesAsString
public String getChoicesAsString()
Copyright © 2009-2012 CodeLutin. All Rights Reserved.