Class MatrixQuestionType
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.MatrixQuestionType
- All Implemented Interfaces:
FormQuestionType
,ConfidentialAwareQuestionType
,DescriptibleFormQuestionType
,IllustrableFormQuestionType
,MandatoryAwareFormQuestionType
,LogEnabled
,PluginAware
,Configurable
,Serviceable
Class for creating matrix form question
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JSONUtils
JSON helperstatic final String
Constant for element definition name of the matrix gridstatic final String
Constant for the multiple attributestatic 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SimpleViewItemGroup
Define the content of the advanced tabprotected SimpleViewItemGroup
Define the content of the main tabGet the list of ModelItemsgetColumns
(FormQuestion question) Get the matrix columnsGet the default title depending on typegetFieldToDisableIfFormPublished
(FormQuestion question) Get field to disable if form is publishedgetJSRenderer
(FormQuestion question) Get the js renderer for the choice listgetRows
(FormQuestion question) Get the matrix rowsgetStorageType
(FormQuestion question) Get the storage type of the question typeboolean
isQuestionConfigured
(FormQuestion question) Say if question needs more configuration to be usedvoid
saxAdditionalInfos
(ContentHandler contentHandler, FormQuestion question) Sax additional informations for the question typevoid
saxEntryValue
(ContentHandler contentHandler, FormQuestion question, FormEntry entry) Sax the entry value depending on the question typevoid
service
(ServiceManager manager) Methods inherited from class org.ametys.plugins.forms.question.types.AbstractFormQuestionType
_getEntryModelItem, _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, 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, getJSConverter, 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_MULTIPLE
Constant for the multiple attribute- See Also:
-
ATTRIBUTE_GRID
Constant for element definition name of the matrix grid- See Also:
-
DEFAULT_TITLE
Constant for default title- See Also:
-
_jsonUtils
JSON helper
-
-
Constructor Details
-
MatrixQuestionType
public MatrixQuestionType()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractStaticFormQuestionType
- Throws:
ServiceException
-
_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
-
saxAdditionalInfos
public void saxAdditionalInfos(ContentHandler contentHandler, FormQuestion question) throws SAXException Description copied from interface:FormQuestionType
Sax additional informations for the question type- Specified by:
saxAdditionalInfos
in interfaceFormQuestionType
- Overrides:
saxAdditionalInfos
in classAbstractStaticFormQuestionType
- Parameters:
contentHandler
- the content handlerquestion
- the question- Throws:
SAXException
- if a saxing error occurred
-
getColumns
Get the matrix columns- Parameters:
question
- the question- Returns:
- the columns of the matrix, null if empty
-
getRows
Get the matrix rows- Parameters:
question
- the question- Returns:
- the rows of the matrix, null if empty
-
getStorageType
Description copied from interface:FormQuestionType
Get the storage type of the question type- Parameters:
question
- the question- Returns:
- the storage type
-
getDefaultTitle
Description copied from interface:FormQuestionType
Get the default title depending on type- Returns:
- the default title
-
isQuestionConfigured
Description copied from interface:FormQuestionType
Say if question needs more configuration to be used- Specified by:
isQuestionConfigured
in interfaceFormQuestionType
- Overrides:
isQuestionConfigured
in classAbstractStaticFormQuestionType
- Parameters:
question
- the current question- Returns:
- false if question needs more configuration, true by default
-
saxEntryValue
public void saxEntryValue(ContentHandler contentHandler, FormQuestion question, FormEntry entry) throws SAXException Description copied from interface:FormQuestionType
Sax the entry value depending on the question type- Specified by:
saxEntryValue
in interfaceFormQuestionType
- Overrides:
saxEntryValue
in classAbstractStaticFormQuestionType
- Parameters:
contentHandler
- the content handlerquestion
- the question getting saxedentry
- the entry- Throws:
SAXException
- exception while saxing entry
-
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
-
getJSRenderer
Description copied from interface:FormQuestionType
Get the js renderer for the choice list- Parameters:
question
- the question- Returns:
- the js renderer
-