Package org.ametys.plugins.forms.actions
Class AbstractProcessFormAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.plugins.forms.actions.AbstractProcessFormAction
- All Implemented Interfaces:
Component,LogEnabled,Serviceable,Action
- Direct Known Subclasses:
EditFormEntryAction,ProcessFormAction
Abstract action to process form entry inputs
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FormEntryDAOThe form entry DAOprotected FOAmetysObjectCreationHelperThe FO ametys object creation helperprotected FormDAOThe form DAOprotected FormQuestionDAOThe form question DAOprotected AmetysObjectResolverThe ametys object resolverprotected RightManagerThe right managerFields inherited from class org.apache.cocoon.acting.ServiceableAction
managerFields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_adaptFormValuesForChoiceList(Form form, Map<String, Object> formInputValues) Remove empty value for choice list because empty value is an other valueprotected View_getRuleFilteredEntryView(Request request, Form form, View entryView, FormQuestionDAO.FormEntryValues entryValues, Optional<Long> currentStepId) Get a view without elements hidden by a ruleprotected abstract List<FormQuestion>_getRuleFilteredQuestions(Request request, Form form, FormQuestionDAO.FormEntryValues entryValues, Optional<Long> currentStepId) Get the list of active question depending of the form rulesprotected void_handleComputedValues(List<FormQuestion> questions, FormEntry entry, boolean forEdition) Handle computed valuesvoidservice(ServiceManager smanager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_resolver
The ametys object resolver -
_foAmetysObjectCreationHelper
The FO ametys object creation helper -
_formDAO
The form DAO -
_entryDAO
The form entry DAO -
_formQuestionDAO
The form question DAO -
_rightManager
The right manager
-
-
Constructor Details
-
AbstractProcessFormAction
public AbstractProcessFormAction()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableAction- Throws:
ServiceException
-
_adaptFormValuesForChoiceList
Remove empty value for choice list because empty value is an other value- Parameters:
form- the formformInputValues- the form inputs to change
-
_getRuleFilteredEntryView
protected View _getRuleFilteredEntryView(Request request, Form form, View entryView, FormQuestionDAO.FormEntryValues entryValues, Optional<Long> currentStepId) Get a view without elements hidden by a rule- Parameters:
request- the requestform- The current formentryView- The entry view with possibly unwanted viewItemsentryValues- The entry valuescurrentStepId- current step of the entry. Can be empty if the form has no workflow- Returns:
- a view with filtered items
-
_getRuleFilteredQuestions
protected abstract List<FormQuestion> _getRuleFilteredQuestions(Request request, Form form, FormQuestionDAO.FormEntryValues entryValues, Optional<Long> currentStepId) Get the list of active question depending of the form rules- Parameters:
request- the requestform- the formentryValues- the entry values to compute rulescurrentStepId- the current step id. Can be empty if the form has no workflow- Returns:
- the list of active question depending of the form rules
-
_handleComputedValues
protected void _handleComputedValues(List<FormQuestion> questions, FormEntry entry, boolean forEdition) Handle computed values- Parameters:
questions- the form questionsentry- the entryforEdition-trueto handle edition
-