public interface VoteCountingStrategy
| Modifier and Type | Method and Description |
|---|---|
String |
getDisplayVoteValue(Integer voteValue)
Get the value to display for a given vote value in the vote page.
|
String |
getI18nHelp()
Obtains the i18n help of this strategy.
|
String |
getI18nName()
Obtains the i18n name of this strategy.
|
int |
getId()
Obtains the unique id of this strategy.
|
String |
getStrategyHelp(Locale locale)
Get the vote counting strategy help to display in UI.
|
String |
getStrategyName(Locale locale)
Get the vote counting strategy name to display in UI.
|
String |
getTotalVoteValueNotValidMessage(Locale locale)
If the total values of a vote is not valid, gets the localized error
message.
|
ChoiceToVoteRenderType |
getVoteValueEditorType()
Gets the type of editor used to render a vote value.
|
String |
getVoteValueNotValidMessage(Locale locale)
If a vote value is not valid, gets the localized message of the error.
|
boolean |
isChoiceInVote(Integer voteValue)
Test if the given value is a vote value (says users has filled it).
|
boolean |
isDisplayResultsByChoice()
Deprecated.
since 1.5 (result will be offered by the strategy it-self).
|
boolean |
isTotalVoteValueValid(int totalValues)
Tests if the total values of a vote is valid.
|
boolean |
isVoteValueNull(Integer value)
Tests if a given vote value is null or not.
|
boolean |
isVoteValueValid(Integer voteValue)
Tests if the given vote value is valid.
|
VoteCountingResult |
votecount(Set<Voter> voter)
Vote count for the given
voter and return the result of it. |
int getId()
String getI18nName()
String getI18nHelp()
VoteCountingResult votecount(Set<Voter> voter)
voter and return the result of it.voter - the voter and their votes.String getDisplayVoteValue(Integer voteValue)
voteValue - the vote value to displayboolean isChoiceInVote(Integer voteValue)
voteValue - the vote value to testtrue if the given value is persisted.String getStrategyName(Locale locale)
locale - the locale used to render the strategy nameString getStrategyHelp(Locale locale)
locale - the locale used to render the strategy nameboolean isVoteValueValid(Integer voteValue)
voteValue - the vote value to testtrue if the given vote value is valid, false
otherwise.String getVoteValueNotValidMessage(Locale locale)
locale - the locale used to render the error messageboolean isTotalVoteValueValid(int totalValues)
totalValues - the given total valuestrue if the total values of a vote is valid,
false otherwhise.String getTotalVoteValueNotValidMessage(Locale locale)
locale - the locale used to render the error messageboolean isVoteValueNull(Integer value)
value - the vote value to testtrue if the given vote value is null (or considered as
null), false otherwise.ChoiceToVoteRenderType getVoteValueEditorType()
ChoiceToVoteRenderType@Deprecated boolean isDisplayResultsByChoice()
true if display results by choice.Copyright © 2009-2012 CodeLutin. All Rights Reserved.