public class ParameterCheckerParser extends Object
Modifier and Type | Field and Description |
---|---|
protected ThreadSafeComponentManager<ParameterChecker> |
_parameterCheckerManager
The parameter checker component manager.
|
private Map<ParameterCheckerDescriptor,String> |
_parameterCheckersToLookup |
protected String |
_pluginName
The name of the plugin declaring this parameter checker
|
Constructor and Description |
---|
ParameterCheckerParser(ThreadSafeComponentManager<ParameterChecker> paramCheckerManager)
Create a parameter checker parser
|
Modifier and Type | Method and Description |
---|---|
protected ParameterCheckerDescriptor |
_getParameterCheckerDescriptorInstance()
Get the parameter checker descriptor instance to use
|
protected I18nizableText |
_parseI18nizableText(Configuration config,
String pluginName,
String name)
Parses an i18n text.
|
protected void |
_setParameterChecker(String pluginName,
ParameterCheckerDescriptor parameterChecker,
String parameterCheckerId,
Configuration parameterCheckerConfig)
Sets the parameter checker.
|
void |
lookupComponents()
Retrieves local parameter checkers components and sets them into
the previous parameter checker parsed.
|
ParameterCheckerDescriptor |
parseParameterChecker(String pluginName,
Configuration paramCheckerConfig)
Parse a parameter checker from a XML configuration.
|
protected ThreadSafeComponentManager<ParameterChecker> _parameterCheckerManager
protected String _pluginName
private final Map<ParameterCheckerDescriptor,String> _parameterCheckersToLookup
public ParameterCheckerParser(ThreadSafeComponentManager<ParameterChecker> paramCheckerManager)
paramCheckerManager
- the parameter checker.public ParameterCheckerDescriptor parseParameterChecker(String pluginName, Configuration paramCheckerConfig) throws ConfigurationException
pluginName
- the plugin's name declaring this parameter.paramCheckerConfig
- the XML configuration.ParameterCheckerDescriptor
for the parsed parameter checkerConfigurationException
- if the configuration is not valid.protected void _setParameterChecker(String pluginName, ParameterCheckerDescriptor parameterChecker, String parameterCheckerId, Configuration parameterCheckerConfig) throws ConfigurationException
pluginName
- the plugin's name.parameterChecker
- the parameter checker.parameterCheckerId
- the parameter chekcer's id.parameterCheckerConfig
- the parameter checker's configuration.ConfigurationException
- if the configuration is not valid.public void lookupComponents() throws Exception
Exception
- if an error occurs.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 ParameterCheckerDescriptor _getParameterCheckerDescriptorInstance()