Class RepeaterDefinitionParser
- java.lang.Object
-
- org.ametys.runtime.model.AbstractModelItemParser
-
- org.ametys.plugins.repository.model.parsing.RepeaterDefinitionParser
-
- Direct Known Subclasses:
ContentRestrictedRepeaterDefinitionParser
public class RepeaterDefinitionParser extends AbstractModelItemParser
This class parses the repeater definition
-
-
Field Summary
-
Fields inherited from class org.ametys.runtime.model.AbstractModelItemParser
_modelItemTypeExtensionPoint
-
-
Constructor Summary
Constructors Constructor Description RepeaterDefinitionParser(AbstractThreadSafeComponentExtensionPoint<? extends ModelItemType> modelItemTypeExtensionPoint)
Creates a repeater definition parser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RepeaterDefinition
_createModelItem(Configuration itemConfig)
Create the model item to populate it.protected String
_parseName(Configuration itemConfig)
Parses the name of the model item.protected ModelItemType
_parseType(Configuration config)
Parses the type.<T extends ModelItem>
Tparse(ServiceManager serviceManager, String pluginName, String catalog, Configuration definitionConfig, Model model, ModelItemGroup parent)
Parses an element definition from a XML configuration.-
Methods inherited from class org.ametys.runtime.model.AbstractModelItemParser
_getNameConfigurationAttribute, _parseI18nizableText, _parseI18nizableText, parse
-
-
-
-
Constructor Detail
-
RepeaterDefinitionParser
public RepeaterDefinitionParser(AbstractThreadSafeComponentExtensionPoint<? extends ModelItemType> modelItemTypeExtensionPoint)
Creates a repeater definition parser.- Parameters:
modelItemTypeExtensionPoint
- the extension point to use to get available model items types
-
-
Method Detail
-
parse
public <T extends ModelItem> T parse(ServiceManager serviceManager, String pluginName, String catalog, Configuration definitionConfig, Model model, ModelItemGroup parent) throws ConfigurationException
Description copied from class:AbstractModelItemParser
Parses an element definition from a XML configuration.- Overrides:
parse
in classAbstractModelItemParser
- Type Parameters:
T
- type of the parsed item- Parameters:
serviceManager
- the service managerpluginName
- the plugin name declaring this item.catalog
- the catalogdefinitionConfig
- the XML configuration of the model item.model
- the model which defines the model itemparent
- the parent of the model item to create. Can be null if the model item to parse has no parent- Returns:
- the parsed model item.
- Throws:
ConfigurationException
- if the configuration is not valid.
-
_createModelItem
protected RepeaterDefinition _createModelItem(Configuration itemConfig) throws ConfigurationException
Description copied from class:AbstractModelItemParser
Create the model item to populate it.- Specified by:
_createModelItem
in classAbstractModelItemParser
- Parameters:
itemConfig
- the model item configuration to use.- Returns:
- the item instantiated.
- Throws:
ConfigurationException
- if the configuration is not valid.
-
_parseName
protected String _parseName(Configuration itemConfig) throws ConfigurationException
Description copied from class:AbstractModelItemParser
Parses the name of the model item.- Overrides:
_parseName
in classAbstractModelItemParser
- Parameters:
itemConfig
- the model item configuration to use.- Returns:
- the name of the model item.
- Throws:
ConfigurationException
- if the configuration is not valid.
-
_parseType
protected ModelItemType _parseType(Configuration config) throws ConfigurationException
Description copied from class:AbstractModelItemParser
Parses the type.- Overrides:
_parseType
in classAbstractModelItemParser
- Parameters:
config
- the model item configuration to use.- Returns:
- the type.
- Throws:
ConfigurationException
- if the configuration is not valid.
-
-