Interface RepositoryModelItemGroupType
-
- All Superinterfaces:
ModelItemGroupType
,ModelItemType
,PluginAware
,RepositoryModelItemType
- All Known Implementing Classes:
CompositeRepositoryModelItemType
,RepeaterRepositoryModelItemType
public interface RepositoryModelItemGroupType extends RepositoryModelItemType, ModelItemGroupType
Interface for types of model item groups stored in the repository
-
-
Field Summary
-
Fields inherited from interface org.ametys.plugins.repository.data.type.RepositoryModelItemType
EMPTY_METADATA_SUFFIX
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default ModifiableRepositoryData
add(ModifiableRepositoryData parentData, String name)
Add a group into the given repository datadefault boolean
hasNonEmptyValue(RepositoryData parentData, String name)
Check if there is a non empty value in the given repository datadefault boolean
isMultiple(RepositoryData parentData, String name)
Checks if the value in the given repository data is multipledefault RepositoryData
read(RepositoryData parentData, String name)
Read the group in the given repository data-
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, hasValue, isCompatible, remove
-
-
-
-
Method Detail
-
read
default RepositoryData read(RepositoryData parentData, String name) throws BadItemTypeException
Read the group in the given repository data- Parameters:
parentData
- repository data containing the groupname
- the name of the group to read- Returns:
- the repository data representing the read group
- Throws:
BadItemTypeException
- if the reading value doesn't match this element type
-
hasNonEmptyValue
default boolean hasNonEmptyValue(RepositoryData parentData, String name) throws BadItemTypeException
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
-
add
default ModifiableRepositoryData add(ModifiableRepositoryData parentData, String name)
Add a group into the given repository data- Parameters:
parentData
- repository where to add the groupname
- the name of the group to add- Returns:
- the repository data representing the added group
-
isMultiple
default boolean isMultiple(RepositoryData parentData, String name) throws UnknownDataException
Description copied from interface:RepositoryModelItemType
Checks if the value in the given repository data is multiple- Specified by:
isMultiple
in interfaceRepositoryModelItemType
- Parameters:
parentData
- repository data containing the data to checkname
- the name of the data to check- Returns:
true
if the stored data is multiple,false
otherwise- Throws:
UnknownDataException
- if there is no data in the parent repository data with this name
-
-