Package org.ametys.runtime.model
Class CategorizedElementDefinitionParser
java.lang.Object
org.ametys.runtime.model.CategorizedElementDefinitionParser
- Direct Known Subclasses:
ConfigParameterDefinitionWrapperParser
,SiteParameterWrapperParser
Parser for categorized
ElementDefinition
-
Constructor Summary
ConstructorDescriptionCreates a categorized element definition parser. -
Method Summary
Modifier and TypeMethodDescriptionprotected CategorizedElementDefinitionWrapper
Create the element definition wrapper to populate it.protected I18nizableText
_parseI18nizableText
(Configuration config, String pluginName, String name) Parses an i18n text.parse
(ServiceManager serviceManager, String pluginName, Configuration definitionConfig, Model model, ModelItemGroup parent) Parses an element definition from a XML configuration.
-
Constructor Details
-
CategorizedElementDefinitionParser
Creates a categorized element definition parser.- Parameters:
parser
- the element definition parser
-
-
Method Details
-
parse
public CategorizedElementDefinitionWrapper parse(ServiceManager serviceManager, String pluginName, Configuration definitionConfig, Model model, ModelItemGroup parent) throws ConfigurationException Parses an element definition from a XML configuration.- Parameters:
serviceManager
- the service managerpluginName
- the plugin name declaring this item.definitionConfig
- 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.
-
_createElementDefinitionWrapper
Create the element definition wrapper to populate it.- Returns:
- the wrapper instantiated.
-
_parseI18nizableText
protected I18nizableText _parseI18nizableText(Configuration config, String pluginName, String name) throws ConfigurationException Parses an i18n text.- Parameters:
config
- the configuration to use.pluginName
- the current plugin name.name
- the child name.- Returns:
- the i18n text.
- Throws:
ConfigurationException
- if the configuration is not valid.
-