Package org.ametys.runtime.model.checker
Class ItemCheckerParser
java.lang.Object
org.ametys.runtime.model.checker.ItemCheckerParser
- Direct Known Subclasses:
ConfigParameterCheckerParser
Parameter checker parser from an XML configuration.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ThreadSafeComponentManager<ItemChecker>The parameter checker component manager.protected StringThe name of the plugin declaring this parameter checker -
Constructor Summary
ConstructorsConstructorDescriptionItemCheckerParser(ThreadSafeComponentManager<ItemChecker> paramCheckerManager) Create a parameter checker parser -
Method Summary
Modifier and TypeMethodDescriptionprotected ItemCheckerDescriptorGet 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.voidRetrieves local parameter checkers components and sets them into the previous parameter checker parsed.parseParameterChecker(String pluginName, Configuration paramCheckerConfig) Parse a parameter checker from a XML configuration.
-
Field Details
-
_parameterCheckerManager
The parameter checker component manager. -
_pluginName
The name of the plugin declaring this parameter checker
-
-
Constructor Details
-
ItemCheckerParser
Create a parameter checker parser- Parameters:
paramCheckerManager- the parameter checker.
-
-
Method Details
-
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
ItemCheckerDescriptorfor 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
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
Get the parameter checker descriptor instance to use- Returns:
- the parameter checker descriptor instance to use
-