Package org.ametys.runtime.parameter
Class AbstractParameterParser<P extends Parameter<T>,T extends Enum<T>>
java.lang.Object
org.ametys.runtime.parameter.AbstractParameterParser<P,T>
- Type Parameters:
P- the actual type of parameter.T- the actual type of parameter type.
@Deprecated
public abstract class AbstractParameterParser<P extends Parameter<T>,T extends Enum<T>>
extends Object
Deprecated.
Parameter parser from an XML configuration.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ThreadSafeComponentManager<Enumerator>Deprecated.The enumerators component manager.protected ThreadSafeComponentManager<Validator>Deprecated.The validators component manager. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractParameterParser(ThreadSafeComponentManager<Enumerator> enumeratorManager, ThreadSafeComponentManager<Validator> validatorManager) Deprecated.Creates an AbstractParameterParser. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 parametersvoidDeprecated.Retrieves local validators and enumerators components and set them into previous parameter parsed.parseParameter(ServiceManager manager, String pluginName, Configuration parameterConfig) Deprecated.Parses a parameter from a XML configuration.
-
Field Details
-
_enumeratorManager
Deprecated.The enumerators component manager. -
_validatorManager
Deprecated.The validators component manager.
-
-
Constructor Details
-
AbstractParameterParser
public AbstractParameterParser(ThreadSafeComponentManager<Enumerator> enumeratorManager, ThreadSafeComponentManager<Validator> validatorManager) Deprecated.Creates an AbstractParameterParser.- Parameters:
enumeratorManager- the enumerator component manager.validatorManager- the validator component manager.
-
-
Method Details
-
parseParameter
public P parseParameter(ServiceManager manager, String pluginName, Configuration parameterConfig) throws ConfigurationException Deprecated.Parses a parameter from a XML configuration.- Parameters:
manager- the service manager.pluginName- the plugin name declaring this parameter.parameterConfig- the XML configuration.- Returns:
- the parsed parameter.
- Throws:
ConfigurationException- if the configuration is not valid.
-
lookupComponents
Deprecated.Retrieves local validators and enumerators components and set them into previous parameter parsed.- Throws:
Exception- if an error occurs.
-
_createParameter
Deprecated.Create the parameter to populate it.- Parameters:
parameterConfig- the parameter configuration to use.- Returns:
- the parameter instantiated.
- Throws:
ConfigurationException- if the configuration is not valid.
-
_parseId
Deprecated.Parses the id.- Parameters:
parameterConfig- the parameter configuration to use.- Returns:
- the id.
- Throws:
ConfigurationException- if the configuration is not valid.
-
_parseI18nizableText
protected I18nizableText _parseI18nizableText(Configuration config, String pluginName, String name) throws ConfigurationException Deprecated.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.
-
_parseType
Deprecated.Parses the type.- Parameters:
parameterConfig- the parameter configuration to use.- Returns:
- the type.
- Throws:
ConfigurationException- if the configuration is not valid.
-
_parseWidget
Deprecated.Parses the widget.- Parameters:
parameterConfig- the parameter configuration to use.- Returns:
- the widget or
nullif none defined. - Throws:
ConfigurationException- if the configuration is not valid.
-
_parseWidgetParameters
protected Map<String,I18nizableText> _parseWidgetParameters(Configuration parameterConfig, String pluginName) throws ConfigurationException Deprecated.Parses the widget's parameters- Parameters:
parameterConfig- the parameter configuration to use.pluginName- the current plugin name.- Returns:
- the widget's parameters in a Map
- Throws:
ConfigurationException- if the configuration is not valid.
-
_parseAndSetEnumerator
protected void _parseAndSetEnumerator(String pluginName, P parameter, String parameterId, Configuration parameterConfig) throws ConfigurationException Deprecated.Parses the enumerator.- Parameters:
pluginName- the plugin name.parameter- the parameter.parameterId- the parameter id.parameterConfig- the parameter configuration.- Throws:
ConfigurationException- if the configuration is not valid.
-
_parseAndSetValidator
protected void _parseAndSetValidator(String pluginName, P parameter, String parameterId, Configuration parameterConfig) throws ConfigurationException Deprecated.Parses the validator.- Parameters:
pluginName- the plugin name.parameter- the parameter.parameterId- the parameter id.parameterConfig- the parameter configuration.- Throws:
ConfigurationException- if the configuration is not valid.
-
_parseDefaultValue
protected abstract Object _parseDefaultValue(Configuration parameterConfig, P parameter) throws ConfigurationException Deprecated.Parses the default value.- Parameters:
parameterConfig- the parameter configuration.parameter- the parameter.- Returns:
- the default value or
nullif none defined. - Throws:
ConfigurationException- if the configuration is not valid.
-
_additionalParsing
protected void _additionalParsing(ServiceManager manager, String pluginName, Configuration parameterConfig, String parameterId, P parameter) throws ConfigurationException Deprecated.Called for additional parsing.
Default implementation does nothing.- Parameters:
manager- the sservice manager.pluginName- the plugin name.parameterConfig- the parameter configuration.parameterId- the parameter id.parameter- the parameter to populate.- Throws:
ConfigurationException- if the configuration is not valid.
-
ElementDefinitionParserinstead