Class AbstractFormQuestionType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.question.types.AbstractStaticFormQuestionType
org.ametys.plugins.forms.question.types.AbstractFormQuestionType
- All Implemented Interfaces:
FormQuestionType
,ConfidentialAwareQuestionType
,DescriptibleFormQuestionType
,IllustrableFormQuestionType
,MandatoryAwareFormQuestionType
,LogEnabled
,PluginAware
,Configurable
,Serviceable
- Direct Known Subclasses:
CheckBoxQuestionType
,ChoicesListQuestionType
,DateTimeQuestionType
,FileQuestionType
,MatrixQuestionType
,NumberQuestionType
,SimpleTextQuestionType
,TextAreaQuestionType
public abstract class AbstractFormQuestionType
extends AbstractStaticFormQuestionType
implements IllustrableFormQuestionType, DescriptibleFormQuestionType, MandatoryAwareFormQuestionType, ConfidentialAwareQuestionType
Default abstract class to represent a question type.
This default implementation allow to define an illustration, a description and mark the question as mandatory
-
Field Summary
Fields inherited from class org.ametys.plugins.forms.question.types.AbstractStaticFormQuestionType
_category, _description, _formQuestionModel, _i18nUtils, _iconGlyph, _id, _label, _pluginName, _priority, _scripts, _xslt
Fields inherited from interface org.ametys.plugins.forms.question.types.ConfidentialAwareQuestionType
ATTRIBUTE_CONFIDENTIALITY
Fields inherited from interface org.ametys.plugins.forms.question.types.DescriptibleFormQuestionType
ATTRIBUTE_DESCRIPTION
Fields inherited from interface org.ametys.plugins.forms.question.types.IllustrableFormQuestionType
ATTRIBUTE_PICTURE, ATTRIBUTE_PICTURE_ALTERNATIVE
Fields inherited from interface org.ametys.plugins.forms.question.types.MandatoryAwareFormQuestionType
ATTRIBUTE_MANDATORY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected SimpleViewItemGroup
Define the content of the advanced tabprotected ModelItem
_getEntryModelItem
(FormQuestion question) Define the entry model itemsprotected SimpleViewItemGroup
Define the content of the main tabGet the list of ModelItemsprotected List<ViewItemGroup>
_getTabs()
Get the list of tabs that will be added in the question view.getFieldToDisableIfFormPublished
(FormQuestion question) Get field to disable if form is publishedMethods inherited from class org.ametys.plugins.forms.question.types.AbstractStaticFormQuestionType
_createAdvancedTab, _createMainTab, _getRulesTab, configure, doAdditionalOperations, getCategory, getDescription, getDisplayOrder, getDisplayXSLT, getEntryModel, getIconGlyph, getId, getLabel, getModel, getScripts, getView, isQuestionConfigured, saxAdditionalInfos, saxEntryValue, service, setPluginInfo, validateEntryValues, validateQuestionValues
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.plugins.forms.question.types.ConfidentialAwareQuestionType
getConfidentialityModelItem, getConfidentialityViewElement
Methods inherited from interface org.ametys.plugins.forms.question.types.DescriptibleFormQuestionType
getDescription, getDescriptionModelItem, getDescriptionViewElement
Methods inherited from interface org.ametys.plugins.forms.question.FormQuestionType
canBeAnsweredByUser, getDefaultTitle, getJSConverter, getJSRenderer, getStorageType, onlyForDisplay, valueToJSONForClient
Methods inherited from interface org.ametys.plugins.forms.question.types.IllustrableFormQuestionType
getIllustration, getIllustrationAlternative, getIllustrationModelItems, getIllustrationTab
Methods inherited from interface org.ametys.plugins.forms.question.types.MandatoryAwareFormQuestionType
getMandatoryModelItem, getMandatoryValidator, getMandatoryViewElement, isMandatory
-
Constructor Details
-
AbstractFormQuestionType
public AbstractFormQuestionType()
-
-
Method Details
-
_getModelItems
Description copied from class:AbstractStaticFormQuestionType
Get the list of ModelItems- Overrides:
_getModelItems
in classAbstractStaticFormQuestionType
- Returns:
- a list of ModelItems
-
_getTabs
Description copied from class:AbstractStaticFormQuestionType
Get the list of tabs that will be added in the question view. The list returned by this method should include the tab provided by _getTabs- Specified by:
_getTabs
in classAbstractStaticFormQuestionType
- Returns:
- the tabs
-
_getMainTab
Define the content of the main tab- Returns:
- the main tab definition
-
_getAdvancedTab
Define the content of the advanced tab- Returns:
- the advanced tab definition
-
_getEntryModelItem
Description copied from class:AbstractStaticFormQuestionType
Define the entry model items- Overrides:
_getEntryModelItem
in classAbstractStaticFormQuestionType
- Parameters:
question
- the question- Returns:
- the entry model item
-
getFieldToDisableIfFormPublished
Description copied from interface:FormQuestionType
Get field to disable if form is published- Specified by:
getFieldToDisableIfFormPublished
in interfaceFormQuestionType
- Overrides:
getFieldToDisableIfFormPublished
in classAbstractStaticFormQuestionType
- Parameters:
question
- the form question- Returns:
- the list of field name
-