Class NumberQuestionType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.question.types.AbstractStaticFormQuestionType
org.ametys.plugins.forms.question.types.AbstractFormQuestionType
org.ametys.plugins.forms.question.types.NumberQuestionType
- All Implemented Interfaces:
FormQuestionType
,ConfidentialAwareQuestionType
,DescriptibleFormQuestionType
,IllustrableFormQuestionType
,MandatoryAwareFormQuestionType
,LogEnabled
,PluginAware
,Configurable
,Serviceable
Class for creating number question type
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Constant for max attributestatic final String
Constant for max attributestatic final String
Constant for min attributestatic final String
Constant for min attributestatic final String
Constant for number type attributestatic final String
Constant for default titlestatic final String
Name of double numberTypeStaticEnumerator entrystatic final String
Name of integer numberTypeStaticEnumerator entryFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SimpleViewItemGroup
Define the content of the advanced tabprotected ModelItem
_getEntryModelItem
(FormQuestion question) Define the entry model itemsGet the list of ModelItemsGet the default title depending on typegetFieldToDisableIfFormPublished
(FormQuestion question) Get field to disable if form is publishedgetStorageType
(FormQuestion question) Get the storage type of the question typevoid
validateQuestionValues
(Map<String, Object> values, Map<String, I18nizableText> errors) Validate values to create or edit the questionMethods inherited from class org.ametys.plugins.forms.question.types.AbstractFormQuestionType
_getMainTab, _getTabs
Methods 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
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, getJSConverter, getJSRenderer, 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
-
Field Details
-
ATTRIBUTE_MIN_DOUBLE
Constant for min attribute- See Also:
-
ATTRIBUTE_MAX_DOUBLE
Constant for max attribute- See Also:
-
ATTRIBUTE_MIN_INT
Constant for min attribute- See Also:
-
ATTRIBUTE_MAX_INT
Constant for max attribute- See Also:
-
ATTRIBUTE_NUMBER_TYPE
Constant for number type attribute- See Also:
-
DOUBLE_NUMBER_VALUE
Name of double numberTypeStaticEnumerator entry- See Also:
-
INTEGER_NUMBER_VALUE
Name of integer numberTypeStaticEnumerator entry- See Also:
-
DEFAULT_TITLE
Constant for default title- See Also:
-
-
Constructor Details
-
NumberQuestionType
public NumberQuestionType()
-
-
Method Details
-
_getAdvancedTab
Description copied from class:AbstractFormQuestionType
Define the content of the advanced tab- Overrides:
_getAdvancedTab
in classAbstractFormQuestionType
- Returns:
- the advanced tab definition
-
_getModelItems
Description copied from class:AbstractStaticFormQuestionType
Get the list of ModelItems- Overrides:
_getModelItems
in classAbstractFormQuestionType
- Returns:
- a list of ModelItems
-
getStorageType
Description copied from interface:FormQuestionType
Get the storage type of the question type- Parameters:
question
- the question- Returns:
- the storage type
-
_getEntryModelItem
Description copied from class:AbstractStaticFormQuestionType
Define the entry model items- Overrides:
_getEntryModelItem
in classAbstractFormQuestionType
- Parameters:
question
- the question- Returns:
- the entry model item
-
validateQuestionValues
Description copied from interface:FormQuestionType
Validate values to create or edit the question- Specified by:
validateQuestionValues
in interfaceFormQuestionType
- Overrides:
validateQuestionValues
in classAbstractStaticFormQuestionType
- Parameters:
values
- the valueserrors
- the errors
-
getDefaultTitle
Description copied from interface:FormQuestionType
Get the default title depending on type- Returns:
- the default title
-
getFieldToDisableIfFormPublished
Description copied from interface:FormQuestionType
Get field to disable if form is published- Specified by:
getFieldToDisableIfFormPublished
in interfaceFormQuestionType
- Overrides:
getFieldToDisableIfFormPublished
in classAbstractFormQuestionType
- Parameters:
question
- the form question- Returns:
- the list of field name
-