Class DateTimeQuestionType
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.DateTimeQuestionType
- All Implemented Interfaces:
FormQuestionType
,ConfidentialAwareQuestionType
,DescriptibleFormQuestionType
,IllustrableFormQuestionType
,MandatoryAwareFormQuestionType
,LogEnabled
,PluginAware
,Configurable
,Serviceable
Class for creating date time questions
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Constant for date format attribute.static final String
Constant for maximum Date attribute.static final String
Constant for maximum Date attribute.static final String
Constant for minimum Date attribute.static final String
Constant for minimum Date attribute.static final String
Name of datetimeStaticEnumerator entry that enable min and max date fieldsstatic final String
Name of datetimeStaticEnumerator entry that enable min and max datetime fieldsstatic 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
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 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
_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_DATE
Constant for minimum Date attribute.- See Also:
-
ATTRIBUTE_MAX_DATE
Constant for maximum Date attribute.- See Also:
-
ATTRIBUTE_MIN_DATETIME
Constant for minimum Date attribute.- See Also:
-
ATTRIBUTE_MAX_DATETIME
Constant for maximum Date attribute.- See Also:
-
ATTRIBUTE_DATE_FORMAT
Constant for date format attribute.- See Also:
-
DATE_TIME_FORMAT_VALUE
Name of datetimeStaticEnumerator entry that enable min and max datetime fields- See Also:
-
DATE_FORMAT_VALUE
Name of datetimeStaticEnumerator entry that enable min and max date fields- See Also:
-
DEFAULT_TITLE
Constant for default title- See Also:
-
-
Constructor Details
-
DateTimeQuestionType
public DateTimeQuestionType()
-
-
Method Details
-
_getModelItems
Description copied from class:AbstractStaticFormQuestionType
Get the list of ModelItems- Overrides:
_getModelItems
in classAbstractFormQuestionType
- Returns:
- a list of ModelItems
-
_getMainTab
Description copied from class:AbstractFormQuestionType
Define the content of the main tab- Overrides:
_getMainTab
in classAbstractFormQuestionType
- Returns:
- the main tab definition
-
_getAdvancedTab
Description copied from class:AbstractFormQuestionType
Define the content of the advanced tab- Overrides:
_getAdvancedTab
in classAbstractFormQuestionType
- Returns:
- the advanced tab definition
-
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
-