Class AbstractRepeaterDefinitionParser<D extends DisableConditions>
java.lang.Object
org.ametys.runtime.model.AbstractModelItemParser<D>
org.ametys.plugins.repository.model.parsing.AbstractRepeaterDefinitionParser<D>
- Type Parameters:
D- The type of disable conditions managed by the parsed repeater
- Direct Known Subclasses:
ContentRestrictedRepeaterDefinitionParser,DataHolderRepeaterDefinitionParser
public abstract class AbstractRepeaterDefinitionParser<D extends DisableConditions>
extends AbstractModelItemParser<D>
This class parses the repeater definition
-
Field Summary
Fields inherited from class org.ametys.runtime.model.AbstractModelItemParser
_disableConditionsManager, _disableConditionsToLookup, _modelItemTypeExtensionPoint -
Constructor Summary
ConstructorsConstructorDescriptionAbstractRepeaterDefinitionParser(ModelItemTypeExtensionPoint modelItemTypeExtensionPoint, ThreadSafeComponentManager<DisableConditions> disableConditionsManager) Creates a repeater definition parser. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, _parseDisableConditions, _parseI18nizableText, _parseI18nizableText, _parseWidget, _parseWidgetParameters, lookupComponents, parse
-
Constructor Details
-
AbstractRepeaterDefinitionParser
public AbstractRepeaterDefinitionParser(ModelItemTypeExtensionPoint modelItemTypeExtensionPoint, ThreadSafeComponentManager<DisableConditions> disableConditionsManager) Creates a repeater definition parser.- Parameters:
modelItemTypeExtensionPoint- the extension point to use to get available model items typesdisableConditionsManager- the disable conditions component manager
-
-
Method Details
-
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:AbstractModelItemParserParses an element definition from a XML configuration.- Overrides:
parsein classAbstractModelItemParser<D extends DisableConditions>- 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:AbstractModelItemParserCreate the model item to populate it.- Specified by:
_createModelItemin classAbstractModelItemParser<D extends DisableConditions>- Parameters:
itemConfig- the model item configuration to use.- Returns:
- the item instantiated.
- Throws:
ConfigurationException- if the configuration is not valid.
-
_parseName
Description copied from class:AbstractModelItemParserParses the name of the model item.- Overrides:
_parseNamein classAbstractModelItemParser<D extends DisableConditions>- Parameters:
itemConfig- the model item configuration to use.- Returns:
- the name of the model item.
- Throws:
ConfigurationException- if the configuration is not valid.
-
_parseType
Description copied from class:AbstractModelItemParserParses the type.- Overrides:
_parseTypein classAbstractModelItemParser<D extends DisableConditions>- Parameters:
config- the model item configuration to use.- Returns:
- the type.
- Throws:
ConfigurationException- if the configuration is not valid.
-