@NoExtend public class DefaultConfigurationPropertiesProvider extends org.mule.runtime.api.component.AbstractComponent implements ConfigurationPropertiesProvider, org.mule.runtime.api.lifecycle.Initialisable
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,ConfigurationProperty> |
configurationAttributes |
protected String |
encoding |
protected String |
fileLocation |
protected static String |
PROPERTIES_EXTENSION |
protected ResourceProvider |
resourceProvider |
protected static String |
UNKNOWN |
protected static String |
YAML_EXTENSION |
| Constructor and Description |
|---|
DefaultConfigurationPropertiesProvider(String fileLocation,
ResourceProvider resourceProvider) |
DefaultConfigurationPropertiesProvider(String fileLocation,
String encoding,
ResourceProvider resourceProvider) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createAttributesFromYamlObject(String parentPath,
Object parentYamlObject,
Object yamlObject) |
protected String |
createKey(String parentKey,
String key) |
protected String |
createValue(String key,
String value) |
Optional<ConfigurationProperty> |
getConfigurationProperty(String configurationAttributeKey) |
String |
getDescription() |
protected InputStream |
getResourceInputStream(String file) |
protected InputStreamReader |
getResourceInputStreamReader(String file) |
void |
initialise() |
protected void |
readAttributesFromFile(InputStreamReader is) |
protected static final String PROPERTIES_EXTENSION
protected static final String YAML_EXTENSION
protected static final String UNKNOWN
protected final Map<String,ConfigurationProperty> configurationAttributes
protected String fileLocation
protected String encoding
protected ResourceProvider resourceProvider
public DefaultConfigurationPropertiesProvider(String fileLocation, String encoding, ResourceProvider resourceProvider)
public DefaultConfigurationPropertiesProvider(String fileLocation, ResourceProvider resourceProvider)
public Optional<ConfigurationProperty> getConfigurationProperty(String configurationAttributeKey)
getConfigurationProperty in interface ConfigurationPropertiesProviderconfigurationAttributeKey - the key of the configuration attribute.ConfigurationProperty associated with the key. May be empty if that key is not present.public String getDescription()
getDescription in interface ConfigurationPropertiesProviderprotected InputStream getResourceInputStream(String file) throws IOException
IOExceptionprotected InputStreamReader getResourceInputStreamReader(String file) throws IOException
IOExceptionpublic void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionprotected void readAttributesFromFile(InputStreamReader is) throws IOException
IOExceptionprotected void createAttributesFromYamlObject(String parentPath, Object parentYamlObject, Object yamlObject)
Copyright © 2003–2020 MuleSoft, Inc.. All rights reserved.