public abstract class AbstractPathPropertySourceProvider extends Object implements org.apache.tamaya.spi.PropertySourceProvider
Constructor and Description |
---|
AbstractPathPropertySourceProvider(String... resourcePaths)
Creates a new instance using the given resource paths.
|
Modifier and Type | Method and Description |
---|---|
static org.apache.tamaya.spi.PropertySource |
createPropertiesPropertySource(URL url)
Utility method that reads a .properties file from the given url and creates a corresponding
PropertySource . |
Collection<org.apache.tamaya.spi.PropertySource> |
getPropertySources() |
protected abstract Collection<org.apache.tamaya.spi.PropertySource> |
getPropertySources(URL url)
Factory method that creates a
PropertySource based on the URL found by
the resource locator. |
public AbstractPathPropertySourceProvider(String... resourcePaths)
resourcePaths
- the resource paths, not null, not empty.public Collection<org.apache.tamaya.spi.PropertySource> getPropertySources()
getPropertySources
in interface org.apache.tamaya.spi.PropertySourceProvider
protected abstract Collection<org.apache.tamaya.spi.PropertySource> getPropertySources(URL url)
PropertySource
based on the URL found by
the resource locator.url
- the URL, not null.PropertySource
s to be included into the current provider's sources
list. It is safe to return null
here, in case the content of the URL has shown to be not relevant
as configuration input. In case the input is not valid or accessible an exception can be thrown or logged.public static org.apache.tamaya.spi.PropertySource createPropertiesPropertySource(URL url)
PropertySource
.url
- the url to read, not null.Copyright © 2014–2016 Apache Software Foundation. All rights reserved.