Package org.craftercms.commons.config
Interface ConfigurationMapper<T>
-
- All Known Implementing Classes:
AbstractAwsProfileMapper
,AbstractProfileConfigMapper
,BoxProfileMapper
,S3ProfileMapper
,WebDavProfileMapper
public interface ConfigurationMapper<T>
Interface for classes that map configuration data to Java bean classes.- Author:
- avasquez
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
processConfig(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> config)
Reads a single profile from the given configurationT
readConfig(ConfigurationProvider provider, String module, String path, String encoding, String configId)
Reads the configuration from the specified input stream, extracts the specific sub-configuration identified byconfigId
and maps the configuration to a Java bean.
-
-
-
Method Detail
-
readConfig
T readConfig(ConfigurationProvider provider, String module, String path, String encoding, String configId) throws ConfigurationException
Reads the configuration from the specified input stream, extracts the specific sub-configuration identified byconfigId
and maps the configuration to a Java bean.- Parameters:
provider
- the provider to read the configuration fileencoding
- the charset encoding of the configuration fileconfigId
- the ID of the specific sub-configuration to map- Returns:
- the configuration object
- Throws:
ConfigurationException
- if an error occurs
-
processConfig
T processConfig(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> config) throws ConfigurationException
Reads a single profile from the given configuration- Parameters:
config
- the profile configuration- Returns:
- the configuration object
- Throws:
ConfigurationException
- if an error occurs
-
-