public abstract class AbstractModelItemParser extends Object
ModelItem
parser from an XML configuration.Modifier and Type | Field and Description |
---|---|
protected AbstractThreadSafeComponentExtensionPoint<? extends ModelItemType> |
_modelItemTypeExtensionPoint
The extension point to use to get available model items types
|
Constructor and Description |
---|
AbstractModelItemParser(AbstractThreadSafeComponentExtensionPoint<? extends ModelItemType> modelItemTypeExtensionPoint)
Creates a model item parser.
|
Modifier and Type | Method and Description |
---|---|
protected abstract ModelItem |
_createModelItem(Configuration itemConfig)
Create the model item to populate it.
|
protected String |
_getNameConfigurationAttribute()
Retrieves the name of the configuration attribute that contains the name of the model item
|
protected I18nizableText |
_parseI18nizableText(Configuration config,
String pluginName,
String name)
Parses an i18n text.
|
protected String |
_parseName(Configuration itemConfig)
Parses the name of the model item.
|
protected ModelItemType |
_parseType(Configuration config)
Parses the type.
|
ModelItem |
parse(ServiceManager serviceManager,
String pluginName,
Configuration itemConfig,
Model model,
ModelItemGroup parent)
Parses an element definition from a XML configuration.
|
protected AbstractThreadSafeComponentExtensionPoint<? extends ModelItemType> _modelItemTypeExtensionPoint
public AbstractModelItemParser(AbstractThreadSafeComponentExtensionPoint<? extends ModelItemType> modelItemTypeExtensionPoint)
modelItemTypeExtensionPoint
- the extension point to use to get available model items typespublic ModelItem parse(ServiceManager serviceManager, String pluginName, Configuration itemConfig, Model model, ModelItemGroup parent) throws ConfigurationException
serviceManager
- the service managerpluginName
- the plugin name declaring this item.itemConfig
- 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 parentConfigurationException
- if the configuration is not valid.protected abstract ModelItem _createModelItem(Configuration itemConfig) throws ConfigurationException
itemConfig
- the model item configuration to use.ConfigurationException
- if the configuration is not valid.protected String _parseName(Configuration itemConfig) throws ConfigurationException
itemConfig
- the model item configuration to use.ConfigurationException
- if the configuration is not valid.protected String _getNameConfigurationAttribute()
protected I18nizableText _parseI18nizableText(Configuration config, String pluginName, String name) throws ConfigurationException
config
- the configuration to use.pluginName
- the current plugin name.name
- the child name.ConfigurationException
- if the configuration is not valid.protected ModelItemType _parseType(Configuration config) throws ConfigurationException
config
- the model item configuration to use.ConfigurationException
- if the configuration is not valid.