Class MatrixRepositoryElementType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.model.type.AbstractModelItemType
org.ametys.core.model.type.AbstractElementType<Matrix>
org.ametys.plugins.forms.repository.type.AbstractMatrixElementType
org.ametys.plugins.forms.repository.type.MatrixRepositoryElementType
- All Implemented Interfaces:
RepositoryElementType<Matrix>
,RepositoryModelItemType
,ElementType<Matrix>
,ModelItemType
,LogEnabled
,PluginAware
,Component
,Serviceable
public class MatrixRepositoryElementType
extends AbstractMatrixElementType
implements RepositoryElementType<Matrix>
Class for matrix element types
-
Field Summary
Fields inherited from class org.ametys.plugins.forms.repository.type.AbstractMatrixElementType
MATRIX_REPOSITORY_DATA_TYPE
Fields inherited from class org.ametys.core.model.type.AbstractElementType
_jsonUtils
Fields inherited from interface org.ametys.plugins.repository.data.type.RepositoryModelItemType
EMPTY_METADATA_SUFFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the type of repository data used for this typeboolean
hasNonEmptyValue
(RepositoryData parentData, String name) Check if there is a non empty value in the given repository dataread
(RepositoryData parentData, String name) Read the value in the given repository datavoid
write
(ModifiableRepositoryData parentData, String name, Object value) Write the value into the given repository dataMethods inherited from class org.ametys.plugins.forms.repository.type.AbstractMatrixElementType
_singleValueToSAX, _string2Matrix, convertValue, fromJSONForClient, isCompatible, isSimple, toString
Methods inherited from class org.ametys.core.model.type.AbstractElementType
_compareMultipleValues, _compareSingleValues, _getValueAttributes, _isMultiple, _isSingle, _isValueFromXMLMultiple, _singleValueFromXML, _singleValueToJSON, _singleValueToJSONForEdition, _useJSONForEdition, _valueToJSON, _valueToSAX, _valueToSAX, _valueToSAXForEdition, castValue, compareValues, getManagedClass, getManagedClassArray, parseConfiguration, service, valueFromXML, valueToJSONForClient, valueToJSONForEdition, valueToSAX, valueToSAXForEdition
Methods inherited from class org.ametys.core.model.type.AbstractModelItemType
getId, setPluginInfo
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.runtime.model.type.ElementType
castValue, compareValues, fromJSONForClient, getManagedClass, getManagedClassArray, isCompatible, isSimple, parseConfiguration, toString, valueFromXML
Methods inherited from interface org.ametys.runtime.model.type.ModelItemType
getId, valueToJSONForClient, valueToJSONForClient, valueToJSONForEdition, valueToSAX, valueToSAX, valueToSAXForEdition
Methods inherited from interface org.ametys.runtime.plugin.component.PluginAware
setPluginInfo
Methods inherited from interface org.ametys.plugins.repository.data.type.RepositoryElementType
externalizableValueToJSON
Methods inherited from interface org.ametys.plugins.repository.data.type.RepositoryModelItemType
hasValue, isCompatible, isMultiple, remove
-
Constructor Details
-
MatrixRepositoryElementType
public MatrixRepositoryElementType()
-
-
Method Details
-
getRepositoryDataType
Description copied from interface:RepositoryModelItemType
Retrieves the type of repository data used for this type- Specified by:
getRepositoryDataType
in interfaceRepositoryModelItemType
- Returns:
- the type of repository data used for this type
-
read
Description copied from interface:RepositoryElementType
Read the value in the given repository data- Specified by:
read
in interfaceRepositoryElementType<Matrix>
- Parameters:
parentData
- repository data containing the valuename
- the name of the element to read- Returns:
- the value. Can return a T or a T[]. That's why the return type is Object
- Throws:
BadItemTypeException
- if the reading value doesn't match this element type
-
hasNonEmptyValue
Description copied from interface:RepositoryModelItemType
Check if there is a non empty value in the given repository data- Specified by:
hasNonEmptyValue
in interfaceRepositoryModelItemType
- Parameters:
parentData
- repository data containing the valuename
- the name of the element to check- Returns:
true
if there is a non empty value,false
otherwise- Throws:
BadItemTypeException
- if the reading value doesn't match this element type
-
write
public void write(ModifiableRepositoryData parentData, String name, Object value) throws BadItemTypeException Description copied from interface:RepositoryElementType
Write the value into the given repository data- Specified by:
write
in interfaceRepositoryElementType<Matrix>
- Parameters:
parentData
- repository where to store the value.name
- the name of the element to writevalue
- the value to write. Can be a T or a T[]. That's why it is an Object- Throws:
BadItemTypeException
- If the given value doesn't match this element type
-