public interface ChainedPropertiesSource extends PropertySource
Properties list based source. It allows to load properties
from resource, path, file or Properties directly
and chain them into one. Properties can be added
at the front or end of already added properties or
can be added before/after properties with given key.| Modifier and Type | Interface and Description |
|---|---|
static class |
ChainedPropertiesSource.PropertiesValue |
| Modifier and Type | Method and Description |
|---|---|
default ChainedPropertiesSource |
addFileProperties(String key,
File file)
Loads properties from file and adds them at the end of actual properties list.
|
default ChainedPropertiesSource |
addFilePropertiesAfter(String afterKey,
String key,
File file)
Loads properties from file and adds them after specific key in actual properties list.
|
default ChainedPropertiesSource |
addFilePropertiesBefore(String beforeKey,
String key,
File file)
Loads properties from file and adds them before specific key in actual properties list.
|
default ChainedPropertiesSource |
addProperties(String key,
Properties properties)
Adds properties at the end of actual properties list.
|
default ChainedPropertiesSource |
addPropertiesAfter(String afterKey,
String key,
Properties properties)
Adds properties after specific key in actual properties list.
|
default ChainedPropertiesSource |
addPropertiesBefore(String beforeKey,
String key,
Properties properties)
Adds properties before specific key in actual properties list.
|
default ChainedPropertiesSource |
addResourceProperties(String key,
String resourceName)
Loads properties from resource by its name and adds them at the end of actual
properties list with specific key.
|
default ChainedPropertiesSource |
addResourcePropertiesAfter(String afterKey,
String key,
String resourceName)
Loads properties from resource by its name and adds them after specific key in actual
properties list with specific key.
|
default ChainedPropertiesSource |
addResourcePropertiesBefore(String beforeKey,
String key,
String resourceName)
Loads properties from resource by its name and adds them before specific key in actual
properties list with specific key.
|
default Properties |
getMergedProperties() |
default List<Properties> |
getProperties() |
default Properties |
getProperties(String key)
Returns properties with given key.
|
List<ChainedPropertiesSource.PropertiesValue> |
getPropertiesHolder() |
default Map<String,Properties> |
getPropertiesWithKeys() |
default String |
getProperty(String key)
Returns property as
String. |
default ChainedPropertiesSource |
pushFileProperties(String key,
File file)
Loads properties from file and pushes them at the start of actual properties list
with specific key.
|
default ChainedPropertiesSource |
pushProperties(String key,
Properties properties)
Pushes properties at the start of actual properties list
with specific key.
|
default ChainedPropertiesSource |
pushResourceProperties(String key,
String resourceName)
Loads properties from resource by its name and pushes them at the start of actual
properties list with specific key.
|
default boolean |
removeProperties(String key)
Removes properties with given key.
|
castString, getProperty, getProperty, getPropertyList<ChainedPropertiesSource.PropertiesValue> getPropertiesHolder()
default List<Properties> getProperties()
default Map<String,Properties> getPropertiesWithKeys()
default Properties getMergedProperties()
default Properties getProperties(String key)
key - The properties keydefault boolean removeProperties(String key)
key - The properties keydefault ChainedPropertiesSource addProperties(String key, Properties properties)
key - The properties keyproperties - The propertiesdefault ChainedPropertiesSource addPropertiesBefore(String beforeKey, String key, Properties properties)
beforeKey - The before properties keykey - The properties keyproperties - The propertiesdefault ChainedPropertiesSource addPropertiesAfter(String afterKey, String key, Properties properties)
afterKey - The after properties keykey - The properties keyproperties - The propertiesdefault ChainedPropertiesSource addFileProperties(String key, File file)
key - The properties keyfile - The properties filedefault ChainedPropertiesSource addFilePropertiesBefore(String beforeKey, String key, File file)
beforeKey - The before properties keykey - The properties keyfile - The properties filedefault ChainedPropertiesSource addFilePropertiesAfter(String afterKey, String key, File file)
afterKey - The after properties keykey - The properties keyfile - The properties filedefault ChainedPropertiesSource addResourceProperties(String key, String resourceName)
key - The properties keyresourceName - The properties resourcedefault ChainedPropertiesSource addResourcePropertiesBefore(String beforeKey, String key, String resourceName)
beforeKey - The before properties keykey - The properties keyresourceName - The properties resourcedefault ChainedPropertiesSource addResourcePropertiesAfter(String afterKey, String key, String resourceName)
afterKey - The after properties keykey - The properties keyresourceName - The properties resourcedefault ChainedPropertiesSource pushProperties(String key, Properties properties)
key - The properties keyproperties - The propertiesdefault ChainedPropertiesSource pushFileProperties(String key, File file)
key - The properties keyfile - The properties filedefault ChainedPropertiesSource pushResourceProperties(String key, String resourceName)
key - The properties keyresourceName - The properties resourcedefault String getProperty(String key)
PropertySourceString.getProperty in interface PropertySourcekey - The property key.Copyright © 2016 Etnetera a.s.. All rights reserved.