org.chorem.pollen.ui.actions.poll
Class SavePoll
java.lang.Object
com.opensymphony.xwork2.ActionSupport
org.nuiton.web.struts2.BaseAction
org.chorem.pollen.ui.actions.PollenActionSupport
org.chorem.pollen.ui.actions.poll.AbstractPollForm
org.chorem.pollen.ui.actions.poll.SavePoll
- All Implemented Interfaces:
- com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.Preparable, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, Serializable, org.apache.struts2.interceptor.ParameterAware, FileUploadAware, org.nuiton.topia.framework.TopiaTransactionAware
public class SavePoll
- extends AbstractPollForm
- implements com.opensymphony.xwork2.Preparable, org.apache.struts2.interceptor.ParameterAware, FileUploadAware
Creates a new poll.
- Since:
- 1.3
- Author:
- tchemit
- See Also:
- Serialized Form
|
Field Summary |
protected boolean |
informationsError
Flag when there is some errors on the information panel. |
protected Map<String,String[]> |
parameters
All the parameters send by request used to build back choices of the
poll. |
| Fields inherited from class com.opensymphony.xwork2.ActionSupport |
LOG |
| Fields inherited from interface com.opensymphony.xwork2.Action |
ERROR, INPUT, LOGIN, NONE, SUCCESS |
|
Method Summary |
void |
addFieldError(String fieldName,
String errorMessage)
|
void |
addFile(int index,
File file)
|
void |
addFileContentType(int index,
String contentType)
|
void |
addFileName(int index,
String fileName)
|
protected void |
addInformationsError(String fieldName,
String errorMessage)
|
protected void |
addOptionsError(String fieldName,
String errorMessage)
|
protected Map<Integer,Choice> |
buildDateChoices()
|
protected Map<Integer,Choice> |
buildImageChoices()
|
protected Map<Integer,Choice> |
buildTextChoices()
|
protected Map<Integer,VotingList> |
buildVotingLists(org.chorem.pollen.common.PollType pollType)
|
String |
execute()
|
protected String |
getNonEmptyParameterValue(String paramName)
|
int |
getSelectedTab()
|
String |
input()
|
boolean |
isInformationsError()
|
boolean |
isOptionsError()
|
void |
prepare()
|
protected
|
reindexMap(Map<Integer,T> result,
int maxNumber)
|
void |
setParameters(Map<String,String[]> parameters)
|
void |
validate()
|
protected boolean |
validateEndDate(Date begin,
Date end)
|
protected void |
validateInformations()
|
protected void |
validateOptions()
|
protected void |
validatePersonList(int personToListNumber,
String votingListFieldNamePrefix,
PersonToList personToList,
Set<String> voters,
Set<String> emails)
|
protected void |
validateVotingList(int votingListNumber,
VotingList votingList,
Set<String> groups,
Set<String> voters,
Set<String> emails)
|
| Methods inherited from class org.chorem.pollen.ui.actions.poll.AbstractPollForm |
fillLists, getActionLabel, getChoiceTypes, getDateChoiceCreator, getDateChoices, getGroupVotingList, getImageChoiceCreator, getImageChoices, getPageTitle, getPersontoListCreator, getPoll, getPollEditUrl, getPollModerateUrl, getPollService, getPollTypes, getPollVoteUrl, getReminderHourCountdown, getRestrictedVotingList, getSkin, getTextChoiceCreator, getTextChoices, getVoteCountingTypes, getVotingListCreator, isCreatorUserAccountDefined, isEdit, isFreePoll, isGroupPoll, isLimitChoice, isNotification, isReminder, isVoteStarted, loadChoicesAndvotingLists, prepareFormPage, setLimitChoice, setNotification, setReminder, setReminderHourCountdown |
| 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, 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, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors |
informationsError
protected boolean informationsError
- Flag when there is some errors on the information panel.
parameters
protected final Map<String,String[]> parameters
- All the parameters send by request used to build back choices of the
poll.
SavePoll
public SavePoll()
prepare
public void prepare()
throws Exception
- Specified by:
prepare in interface com.opensymphony.xwork2.Preparable
- Throws:
Exception
input
public String input()
- Overrides:
input in class com.opensymphony.xwork2.ActionSupport
validate
public void validate()
- Specified by:
validate in interface com.opensymphony.xwork2.Validateable- Overrides:
validate in class com.opensymphony.xwork2.ActionSupport
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
addFile
public void addFile(int index,
File file)
- Specified by:
addFile in interface FileUploadAware
addFileContentType
public void addFileContentType(int index,
String contentType)
- Specified by:
addFileContentType in interface FileUploadAware
addFileName
public void addFileName(int index,
String fileName)
- Specified by:
addFileName in interface FileUploadAware
setParameters
public void setParameters(Map<String,String[]> parameters)
- Specified by:
setParameters in interface org.apache.struts2.interceptor.ParameterAware
isInformationsError
public boolean isInformationsError()
- Overrides:
isInformationsError in class AbstractPollForm
isOptionsError
public boolean isOptionsError()
- Overrides:
isOptionsError in class AbstractPollForm
getSelectedTab
public int getSelectedTab()
- Overrides:
getSelectedTab in class AbstractPollForm
validateInformations
protected void validateInformations()
validateOptions
protected void validateOptions()
validateVotingList
protected void validateVotingList(int votingListNumber,
VotingList votingList,
Set<String> groups,
Set<String> voters,
Set<String> emails)
validatePersonList
protected void validatePersonList(int personToListNumber,
String votingListFieldNamePrefix,
PersonToList personToList,
Set<String> voters,
Set<String> emails)
validateEndDate
protected boolean validateEndDate(Date begin,
Date end)
addFieldError
public void addFieldError(String fieldName,
String errorMessage)
- Specified by:
addFieldError in interface com.opensymphony.xwork2.ValidationAware- Overrides:
addFieldError in class com.opensymphony.xwork2.ActionSupport
addInformationsError
protected void addInformationsError(String fieldName,
String errorMessage)
addOptionsError
protected void addOptionsError(String fieldName,
String errorMessage)
buildTextChoices
protected Map<Integer,Choice> buildTextChoices()
buildDateChoices
protected Map<Integer,Choice> buildDateChoices()
buildImageChoices
protected Map<Integer,Choice> buildImageChoices()
buildVotingLists
protected Map<Integer,VotingList> buildVotingLists(org.chorem.pollen.common.PollType pollType)
reindexMap
protected <T> Map<Integer,T> reindexMap(Map<Integer,T> result,
int maxNumber)
getNonEmptyParameterValue
protected String getNonEmptyParameterValue(String paramName)
Copyright © 2009-2012 CodeLutin. All Rights Reserved.