Package org.ametys.runtime.model.checker
Class ItemCheckerParser
- java.lang.Object
-
- org.ametys.runtime.model.checker.ItemCheckerParser
-
- Direct Known Subclasses:
ConfigParameterCheckerParser
public class ItemCheckerParser extends Object
Parameter checker parser from an XML configuration.
-
-
Field Summary
Fields Modifier and Type Field Description protected ThreadSafeComponentManager<ItemChecker>
_parameterCheckerManager
The parameter checker component manager.protected String
_pluginName
The name of the plugin declaring this parameter checker
-
Constructor Summary
Constructors Constructor Description ItemCheckerParser(ThreadSafeComponentManager<ItemChecker> paramCheckerManager)
Create a parameter checker parser
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ItemCheckerDescriptor
_getParameterCheckerDescriptorInstance()
Get the parameter checker descriptor instance to useprotected I18nizableText
_parseI18nizableText(Configuration config, String pluginName, String name)
Parses an i18n text.protected void
_setParameterChecker(String pluginName, ItemCheckerDescriptor 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.ItemCheckerDescriptor
parseParameterChecker(String pluginName, Configuration paramCheckerConfig)
Parse a parameter checker from a XML configuration.
-
-
-
Field Detail
-
_parameterCheckerManager
protected ThreadSafeComponentManager<ItemChecker> _parameterCheckerManager
The parameter checker component manager.
-
_pluginName
protected String _pluginName
The name of the plugin declaring this parameter checker
-
-
Constructor Detail
-
ItemCheckerParser
public ItemCheckerParser(ThreadSafeComponentManager<ItemChecker> paramCheckerManager)
Create a parameter checker parser- Parameters:
paramCheckerManager
- the parameter checker.
-
-
Method Detail
-
parseParameterChecker
public ItemCheckerDescriptor parseParameterChecker(String pluginName, Configuration paramCheckerConfig) throws ConfigurationException
Parse a parameter checker from a XML configuration.- Parameters:
pluginName
- the plugin's name declaring this parameter.paramCheckerConfig
- the XML configuration.- Returns:
- the
ItemCheckerDescriptor
for the parsed parameter checker - Throws:
ConfigurationException
- if the configuration is not valid.
-
_setParameterChecker
protected void _setParameterChecker(String pluginName, ItemCheckerDescriptor parameterChecker, String parameterCheckerId, Configuration parameterCheckerConfig) throws ConfigurationException
Sets the parameter checker.- Parameters:
pluginName
- the plugin's name.parameterChecker
- the parameter checker.parameterCheckerId
- the parameter chekcer's id.parameterCheckerConfig
- the parameter checker's configuration.- Throws:
ConfigurationException
- if the configuration is not valid.
-
lookupComponents
public void lookupComponents() throws Exception
Retrieves local parameter checkers components and sets them into the previous parameter checker parsed.- Throws:
Exception
- if an error occurs.
-
_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.
-
_getParameterCheckerDescriptorInstance
protected ItemCheckerDescriptor _getParameterCheckerDescriptorInstance()
Get the parameter checker descriptor instance to use- Returns:
- the parameter checker descriptor instance to use
-
-