Class RichTextQuestionType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.question.types.AbstractStaticFormQuestionType
org.ametys.plugins.forms.question.types.RichTextQuestionType
- All Implemented Interfaces:
FormQuestionType
,LogEnabled
,PluginAware
,Configurable
,Serviceable
Class for creating rich text to insert in forms
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Constant for rich text attribute.static final String
Constant for default titleFields inherited from class org.ametys.plugins.forms.question.types.AbstractStaticFormQuestionType
_category, _description, _formQuestionModel, _i18nUtils, _iconGlyph, _id, _label, _pluginName, _priority, _scripts, _xslt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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.boolean
canBeAnsweredByUser
(FormQuestion question) Returntrue
if the type of question can be answered by user.Get the default title depending on typegetStorageType
(FormQuestion question) Get the storage type of the question typeboolean
onlyForDisplay
(FormQuestion question) Returntrue
if the type of question is only for display.Methods inherited from class org.ametys.plugins.forms.question.types.AbstractStaticFormQuestionType
_createAdvancedTab, _createMainTab, _getEntryModelItem, _getRulesTab, configure, doAdditionalOperations, getCategory, getDescription, getDisplayOrder, getDisplayXSLT, getEntryModel, getFieldToDisableIfFormPublished, 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.FormQuestionType
getJSConverter, getJSRenderer, valueToJSONForClient
-
Field Details
-
ATTRIBUTE_RICH_TEXT
Constant for rich text attribute.- See Also:
-
DEFAULT_TITLE
Constant for default title- See Also:
-
-
Constructor Details
-
RichTextQuestionType
public RichTextQuestionType()
-
-
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
-
getStorageType
Description copied from interface:FormQuestionType
Get the storage type of the question type- Parameters:
question
- the question- Returns:
- the storage type
-
onlyForDisplay
Description copied from interface:FormQuestionType
Returntrue
if the type of question is only for display.- Parameters:
question
- the question- Returns:
true
if the type of question is only for display.
-
canBeAnsweredByUser
Description copied from interface:FormQuestionType
Returntrue
if the type of question can be answered by user.- Parameters:
question
- the question- Returns:
true
if the type of question can be answered by user.
-
getDefaultTitle
Description copied from interface:FormQuestionType
Get the default title depending on type- Returns:
- the default title
-