public abstract class AbstractPollForm extends PollenActionSupportForEdition implements com.opensymphony.xwork2.Preparable, org.apache.struts2.interceptor.ParameterAware, FileUploadAware
| Modifier and Type | Field and Description |
|---|---|
static String |
IMAGECHOICES_THUMB_PREFIX |
protected boolean |
informationsError
Flag when there is some errors on the information panel.
|
protected Poll |
poll |
SAFE_LANGUAGES, serviceContext, serviceFactory, transaction| Constructor and Description |
|---|
AbstractPollForm() |
addFlashError, addFlashMessage, addFlashWarning, clearFlashErrors, clearFlashMessages, getApplicationUrl, getApplicationVersion, getConfiguration, getCurrentUrl, getFavoriteService, getFlashErrors, getFlashMessages, getFlashWarnings, getJqueryTheme, getPageLogo, getParameters, getPollCommentService, getPollenApplicationContext, getPollenSession, getPollenUserAccount, getPollExportService, getPollFeedService, getPollService, getPollUrlService, getPollVoteCountingService, getPreventRuleService, getSafeLanguage, getSecurityService, getService, getServiceContext, getSkin, getTransaction, getUserSecurityContext, getUserService, getVoteCounting, getVoteCountingFactory, getVoteService, hasAnyErrors, hasFlashErrors, hasFlashMessages, hasFlashWarnings, isGetMethod, isUserAdmin, isUserLoggued, setParameters, setPollenUserSecurityContext, setServletRequestaddActionError, addActionMessage, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getFormatted, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, pause, setActionErrors, setActionMessages, setContainer, setFieldErrorspublic static final String IMAGECHOICES_THUMB_PREFIX
protected Poll poll
protected boolean informationsError
public abstract boolean isClone()
protected abstract Poll savePoll(Poll poll) throws PollNotFoundException
PollNotFoundExceptionpublic abstract boolean isEdit()
public void prepare()
throws Exception
prepare in interface com.opensymphony.xwork2.PreparableExceptionpublic String input() throws Exception
input in class com.opensymphony.xwork2.ActionSupportExceptionpublic String inputAfterValidationError() throws Exception
Exceptionpublic String execute() throws Exception
execute in interface com.opensymphony.xwork2.Actionexecute in class com.opensymphony.xwork2.ActionSupportExceptionpublic void validate()
validate in interface com.opensymphony.xwork2.Validateablevalidate in class com.opensymphony.xwork2.ActionSupportpublic void addFile(int index,
File file)
addFile in interface FileUploadAwarepublic void addFileContentType(int index,
String contentType)
addFileContentType in interface FileUploadAwarepublic void addFileName(int index,
String fileName)
addFileName in interface FileUploadAwarepublic boolean isInformationsError()
public boolean isOptionsError()
public int getSelectedTab()
public PollUri getPollUri()
PollenActionSupportPollUri from the incoming request.
If the action is PollenUserSecurityAware, then will take it
from PollenUserSecurityContext.getPollUri(), otherwise will
return null (this means you must override this method in your action.getPollUri in class PollenActionSupportpublic void setPollUri(PollUri pollUri)
public Poll getPoll()
public List<VotingList> getRestrictedVotingList()
public List<VotingList> getGroupVotingList()
public boolean isNotification()
public void setNotification(boolean notification)
public Integer getMaxChoices()
public void setMaxChoices(Integer maxChoices)
public boolean isReminder()
public void setReminder(boolean reminder)
public boolean isLimitChoice()
public void setLimitChoice(boolean limitChoice)
public Integer getReminderHourCountdown()
public void setReminderHourCountdown(Integer reminderHourCountdown)
public boolean isPollCommentVisible()
public void setPollCommentVisible(boolean newValue)
public String getActionLabel()
public String getPageTitle()
public boolean isVoteStarted()
public boolean isCreatorUserAccountDefined()
public com.google.common.base.Function<PersonToList,PersonToList> getPersontoListCreator()
public com.google.common.base.Function<VotingList,VotingList> getVotingListCreator()
protected void validateInformations()
protected void validateTextChoices()
protected void validateDateChoices()
protected void validateImageChoices()
protected void validateOptions()
protected void validateVotingList(int votingListNumber,
VotingList votingList,
Set<String> groups,
Set<String> voters,
Set<String> emails)
protected void validatePersonList(int personToListNumber,
String votingListFieldNamePrefix,
PersonToList personToList,
Set<String> voters,
Set<String> emails)
public Object getDateChoiceValue(PollDateChoice choice)
public void addFieldError(String fieldName, String errorMessage)
addFieldError in interface com.opensymphony.xwork2.ValidationAwareaddFieldError in class com.opensymphony.xwork2.ActionSupportprotected void loadChoicesAndvotingLists(Poll poll, Collection<Choice> pollChoices, Collection<VotingList> pollVotinLists, boolean fillLists) throws IOException
IOExceptionprotected void fillLists(int defaultMaxChoices,
int defaultMaxVoting)
protected boolean isTextChoiceEmpty(Choice textChoice)
protected boolean isDateChoiceEmpty(PollDateChoice dateChoice)
protected boolean isImageChoiceEmpty(PollImageChoice imageChoice)
protected boolean isImageUploadEmpty(PollImageChoice imageChoice)
protected boolean isPersonToListEmpty(PersonToList personToList)
protected Map<Integer,VotingList> buildVotingLists(PollType pollType)
protected <T> Map<Integer,T> reindexChoiceMap(Map<Integer,T> result, int maxNumber)
Copyright © 2009-2012 CodeLutin. All Rights Reserved.