@NoExtend public class DefaultConfigurationPropertiesProvider extends AbstractComponent implements ConfigurationPropertiesProvider, Initialisable
Modifier and Type | Field and Description |
---|---|
protected Map<String,ConfigurationProperty> |
configurationAttributes |
protected String |
fileLocation |
protected static String |
PROPERTIES_EXTENSION |
protected ResourceProvider |
resourceProvider |
protected static String |
UNKNOWN |
protected static String |
YAML_EXTENSION |
LOCATION_KEY, ROOT_CONTAINER_NAME_KEY
PHASE_NAME
ANNOTATIONS_PROPERTY_NAME
Constructor and Description |
---|
DefaultConfigurationPropertiesProvider(String fileLocation,
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() |
void |
initialise()
Method used to perform any initialisation work.
|
protected void |
readAttributesFromFile(InputStream is) |
getAnnotation, getAnnotations, getLocation, getRootContainerLocation, setAnnotations
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 ResourceProvider resourceProvider
public DefaultConfigurationPropertiesProvider(String fileLocation, ResourceProvider resourceProvider)
public Optional<ConfigurationProperty> getConfigurationProperty(String configurationAttributeKey)
getConfigurationProperty
in interface ConfigurationPropertiesProvider
configurationAttributeKey
- 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 ConfigurationPropertiesProvider
public void initialise() throws InitialisationException
Initialisable
InitialisationException
should be thrown.
In case that the Initialisable.initialise()
method execution fails then mule will call the Disposable.dispose()
method if
the class also implements Disposable
allowing the object to dispose any allocated resource during
Initialisable.initialise()
initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownDisposable
protected void readAttributesFromFile(InputStream is) throws IOException
IOException
protected void createAttributesFromYamlObject(String parentPath, Object parentYamlObject, Object yamlObject)
Copyright © 2018. All rights reserved.