Package org.ametys.core.util
Class ReadXMLDataHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.util.ReadXMLDataHelper
- All Implemented Interfaces:
LogEnabled
,Component
Helper to read XML data
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionreadAndValidateXMLData
(Configuration configuration, String prefix, Map<String, ? extends ElementDefinition> definitions, Map<String, List<I18nizableText>> allErrors) Read data from the givenConfiguration
and validate the valuesMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The avalon role
-
-
Constructor Details
-
ReadXMLDataHelper
public ReadXMLDataHelper()
-
-
Method Details
-
readAndValidateXMLData
public Map<String,Object> readAndValidateXMLData(Configuration configuration, String prefix, Map<String, ? extends ElementDefinition> definitions, Map<String, throws ConfigurationExceptionList<I18nizableText>> allErrors) Read data from the givenConfiguration
and validate the values- Parameters:
configuration
- the configurationprefix
- the defintion's prefix to usedefinitions
- the definitions of the data to retrieveallErrors
- a map to store all validation errors on read data- Returns:
- the values, indexed by name
- Throws:
ConfigurationException
- if an error occurs while reading a value or if the value is not valid
-