P
- the actual type of parameter.T
- the actual type of parameter type.ElementDefinitionParser
instead@Deprecated public abstract class AbstractParameterParser<P extends Parameter<T>,T extends Enum<T>> extends Object
Parameter
parser from an XML configuration.Modifier and Type | Field and Description |
---|---|
private static Logger |
__LOGGER
Deprecated.
|
protected ThreadSafeComponentManager<Enumerator> |
_enumeratorManager
Deprecated.
The enumerators component manager.
|
private Map<P,String> |
_enumeratorsToLookup
Deprecated.
|
protected ThreadSafeComponentManager<Validator> |
_validatorManager
Deprecated.
The validators component manager.
|
private Map<P,String> |
_validatorsToLookup
Deprecated.
|
Constructor and Description |
---|
AbstractParameterParser(ThreadSafeComponentManager<Enumerator> enumeratorManager,
ThreadSafeComponentManager<Validator> validatorManager)
Deprecated.
Creates an AbstractParameterParser.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_additionalParsing(ServiceManager manager,
String pluginName,
Configuration parameterConfig,
String parameterId,
P parameter)
Deprecated.
Called for additional parsing.
Default implementation does nothing. |
protected abstract P |
_createParameter(Configuration parameterConfig)
Deprecated.
Create the parameter to populate it.
|
protected void |
_parseAndSetEnumerator(String pluginName,
P parameter,
String parameterId,
Configuration parameterConfig)
Deprecated.
Parses the enumerator.
|
protected void |
_parseAndSetValidator(String pluginName,
P parameter,
String parameterId,
Configuration parameterConfig)
Deprecated.
Parses the validator.
|
protected abstract Object |
_parseDefaultValue(Configuration parameterConfig,
P parameter)
Deprecated.
Parses the default value.
|
protected I18nizableText |
_parseI18nizableText(Configuration config,
String pluginName,
String name)
Deprecated.
Parses an i18n text.
|
protected abstract String |
_parseId(Configuration parameterConfig)
Deprecated.
Parses the id.
|
protected abstract T |
_parseType(Configuration parameterConfig)
Deprecated.
Parses the type.
|
protected String |
_parseWidget(Configuration parameterConfig)
Deprecated.
Parses the widget.
|
protected Map<String,I18nizableText> |
_parseWidgetParameters(Configuration parameterConfig,
String pluginName)
Deprecated.
Parses the widget's parameters
|
void |
lookupComponents()
Deprecated.
Retrieves local validators and enumerators components and set them into
previous parameter parsed.
|
P |
parseParameter(ServiceManager manager,
String pluginName,
Configuration parameterConfig)
Deprecated.
Parses a parameter from a XML configuration.
|
protected ThreadSafeComponentManager<Enumerator> _enumeratorManager
protected ThreadSafeComponentManager<Validator> _validatorManager
private final Map<P extends Parameter<T>,String> _validatorsToLookup
public AbstractParameterParser(ThreadSafeComponentManager<Enumerator> enumeratorManager, ThreadSafeComponentManager<Validator> validatorManager)
enumeratorManager
- the enumerator component manager.validatorManager
- the validator component manager.public P parseParameter(ServiceManager manager, String pluginName, Configuration parameterConfig) throws ConfigurationException
manager
- the service manager.pluginName
- the plugin name declaring this parameter.parameterConfig
- the XML configuration.ConfigurationException
- if the configuration is not valid.public void lookupComponents() throws Exception
Exception
- if an error occurs.protected abstract P _createParameter(Configuration parameterConfig) throws ConfigurationException
parameterConfig
- the parameter configuration to use.ConfigurationException
- if the configuration is not valid.protected abstract String _parseId(Configuration parameterConfig) throws ConfigurationException
parameterConfig
- the parameter configuration to use.ConfigurationException
- if the configuration is not valid.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 abstract T _parseType(Configuration parameterConfig) throws ConfigurationException
parameterConfig
- the parameter configuration to use.ConfigurationException
- if the configuration is not valid.protected String _parseWidget(Configuration parameterConfig) throws ConfigurationException
parameterConfig
- the parameter configuration to use.null
if none defined.ConfigurationException
- if the configuration is not valid.protected Map<String,I18nizableText> _parseWidgetParameters(Configuration parameterConfig, String pluginName) throws ConfigurationException
parameterConfig
- the parameter configuration to use.pluginName
- the current plugin name.ConfigurationException
- if the configuration is not valid.protected void _parseAndSetEnumerator(String pluginName, P parameter, String parameterId, Configuration parameterConfig) throws ConfigurationException
pluginName
- the plugin name.parameter
- the parameter.parameterId
- the parameter id.parameterConfig
- the parameter configuration.ConfigurationException
- if the configuration is not valid.protected void _parseAndSetValidator(String pluginName, P parameter, String parameterId, Configuration parameterConfig) throws ConfigurationException
pluginName
- the plugin name.parameter
- the parameter.parameterId
- the parameter id.parameterConfig
- the parameter configuration.ConfigurationException
- if the configuration is not valid.protected abstract Object _parseDefaultValue(Configuration parameterConfig, P parameter) throws ConfigurationException
parameterConfig
- the parameter configuration.parameter
- the parameter.null
if none defined.ConfigurationException
- if the configuration is not valid.protected void _additionalParsing(ServiceManager manager, String pluginName, Configuration parameterConfig, String parameterId, P parameter) throws ConfigurationException
manager
- the sservice manager.pluginName
- the plugin name.parameterConfig
- the parameter configuration.parameterId
- the parameter id.parameter
- the parameter to populate.ConfigurationException
- if the configuration is not valid.