Interface RepositoryElementType<T>
- Type Parameters:
T
- Type of the element value
- All Superinterfaces:
ElementType<T>
,ModelItemType
,PluginAware
,RepositoryModelItemType
- All Known Subinterfaces:
ComplexRepositoryElementType<T>
- All Known Implementing Classes:
BinaryRepositoryElementType
,BooleanRepositoryElementType
,ContentContentElementType
,ContentRepositoryElementType
,DateRepositoryElementType
,DateTimeRepositoryElementType
,DoubleRepositoryElementType
,FileContentElementType
,FileRepositoryElementType
,GeocodeRepositoryElementType
,HTMLRichTextContentElementType
,HTMLRichTextRepositoryElementType
,LongRepositoryElementType
,MultilingualStringRepositoryElementType
,PasswordRepositoryElementType
,ReferenceContentElementType
,ReferenceRepositoryElementType
,RichTextContentElementType
,RichTextRepositoryElementType
,StringRepositoryElementType
,UserRepositoryElementType
Interface for types of elements stored in the repository
-
Field Summary
Fields inherited from interface org.ametys.plugins.repository.data.type.RepositoryModelItemType
EMPTY_METADATA_SUFFIX
-
Method Summary
Modifier and TypeMethodDescriptiondefault Object
externalizableValueToSAX
(Object value, DataContext context) Retrieve the value to SAX for externalizable 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 interface org.ametys.runtime.model.type.ElementType
castValue, compareValues, fromJSONForClient, getManagedClass, getManagedClassArray, isCompatible, isSimple, parseConfiguration, toString, valueFromXML, valueToJSONForClient
Methods inherited from interface org.ametys.runtime.model.type.ModelItemType
getId, valueToSAX, valueToSAX, valueToSAXForEdition
Methods inherited from interface org.ametys.runtime.plugin.component.PluginAware
setPluginInfo
Methods inherited from interface org.ametys.plugins.repository.data.type.RepositoryModelItemType
getRepositoryDataType, hasNonEmptyValue, hasValue, isCompatible, isMultiple, remove
-
Method Details
-
read
Read the value in the given repository data- 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
-
write
void write(ModifiableRepositoryData parentData, String name, Object value) throws BadItemTypeException Write the value into the given repository data- 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
-
externalizableValueToSAX
Retrieve the value to SAX for externalizable data- Parameters:
value
- the value to SAX This view item gives context for the SAX event that will be generated here.context
- The context of the data to SAX- Returns:
- the value to SAX for externalizable data
-