public final class ConfigurationFunctions extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.apache.tamaya.ConfigOperator |
addItems(Map<String,Object> items)
Creates an operator that adds items to the instance.
|
static org.apache.tamaya.ConfigOperator |
addItems(Map<String,Object> items,
boolean override)
Creates a ConfigOperator that adds the given items.
|
static org.apache.tamaya.Configuration |
combine(String configName,
org.apache.tamaya.Configuration... configs)
Creates a Configuration that creates a new instance using the configuration instances provided.
|
static org.apache.tamaya.Configuration |
emptyConfiguration()
Accesses an empty
Configuration. |
static org.apache.tamaya.spi.ConfigurationContext |
emptyConfigurationContext()
Accesses an empty
ConfigurationContext. |
static org.apache.tamaya.ConfigOperator |
filter(PropertyMatcher filter)
Creates a ConfigOperator that creates a Configuration containing only keys
that are selected by the given
PropertyMatcher. |
static org.apache.tamaya.ConfigQuery<String> |
htmlInfo()
Creates a ConfigQuery that creates a html formatted ouitput of all properties in the given configuration.
|
static org.apache.tamaya.ConfigQuery<String> |
htmlInfo(Map<String,String> info)
Creates a ConfigQuery that creates a html formatted ouitput of all properties in the given configuration.
|
static boolean |
isKeyInSection(String key,
String sectionKey)
Calculates the current section key and compares it with the given key.
|
static boolean |
isKeyInSections(String key,
String... sectionKeys)
Calculates the current section key and compares it with the given section keys.
|
static org.apache.tamaya.ConfigQuery<String> |
jsonInfo()
Creates a ConfigQuery that creates a JSON formatted ouitput of all properties in the given configuration.
|
static org.apache.tamaya.ConfigQuery<String> |
jsonInfo(Map<String,String> info)
Creates a ConfigQuery that creates a JSON formatted ouitput of all properties in the given configuration.
|
static org.apache.tamaya.ConfigOperator |
map(KeyMapper keyMapper)
Creates a ConfigOperator that creates a Configuration with keys mapped as
defined by the given keyMapper.
|
static org.apache.tamaya.spi.PropertySource |
propertySourceFrom(String name,
int ordinal,
org.apache.tamaya.Configuration config)
Creates a
PropertySource, based on the given Configuration. |
static org.apache.tamaya.ConfigOperator |
replaceItems(Map<String,Object> items)
Creates an operator that replaces the given items.
|
static org.apache.tamaya.ConfigOperator |
section(String areaKey)
Creates a ConfigOperator that creates a Configuration containing only keys
that are contained in the given section (non recursive).
|
static org.apache.tamaya.ConfigOperator |
section(String areaKey,
boolean stripKeys)
Creates a ConfigOperator that creates a Configuration containing only keys
that are contained in the given section (non recursive).
|
static org.apache.tamaya.ConfigOperator |
sectionRecursive(boolean stripKeys,
String... sectionKeys)
Creates a ConfigOperator that creates a Configuration containing only keys
that are contained in the given section (recursive).
|
static org.apache.tamaya.ConfigQuery<Set<String>> |
sections()
Return a query to evaluate the set with all fully qualifies section names.
|
static org.apache.tamaya.ConfigQuery<Set<String>> |
sections(Predicate<String> predicate)
Return a query to evaluate the set with all fully qualified section names, containing only the
sections that match the predicate and have properties attached.
|
static org.apache.tamaya.ConfigOperator |
sectionsRecursive(String... sectionKeys)
Creates a ConfigOperator that creates a Configuration containing only keys
that are contained in the given section (recursive).
|
static org.apache.tamaya.ConfigQuery<String> |
textInfo()
Creates a ConfigQuery that creates a plain text formatted output of all properties in the given configuration.
|
static org.apache.tamaya.ConfigQuery<String> |
textInfo(Map<String,String> info)
Creates a ConfigQuery that creates a plain text formatted output of all properties in the given configuration.
|
static org.apache.tamaya.ConfigQuery<Set<String>> |
transitiveSections()
Return a query to evaluate the set with all fully qualified section names, containing the transitive closure also including all
subarea names, regardless if properties are accessible or not.
|
static org.apache.tamaya.ConfigQuery<Set<String>> |
transitiveSections(Predicate<String> predicate)
Return a query to evaluate the set with all fully qualified section names, containing the transitive closure also including all
subarea names, regardless if properties are accessible or not.
|
static org.apache.tamaya.ConfigQuery<String> |
xmlInfo()
Creates a ConfigQuery that creates a XML formatted ouitput of all properties in the given configuration.
|
static org.apache.tamaya.ConfigQuery<String> |
xmlInfo(Map<String,String> info)
Creates a ConfigQuery that creates a XML formatted ouitput of all properties in the given configuration.
|
public static org.apache.tamaya.ConfigOperator filter(PropertyMatcher filter)
PropertyMatcher.filter - the filter, not nullpublic static org.apache.tamaya.ConfigOperator map(KeyMapper keyMapper)
keyMapper - the keyMapper, not nullpublic static org.apache.tamaya.ConfigOperator section(String areaKey)
areaKey - the section key, not nullpublic static org.apache.tamaya.ConfigOperator section(String areaKey, boolean stripKeys)
areaKey - the section key, not nullstripKeys - if set to true, the section key is stripped away fromMap the resulting key.public static boolean isKeyInSection(String key, String sectionKey)
key - the fully qualified entry key, not nullsectionKey - the section key, not nullpublic static boolean isKeyInSections(String key, String... sectionKeys)
key - the fully qualified entry key, not nullsectionKeys - the section keys, not nullpublic static org.apache.tamaya.ConfigQuery<Set<String>> sections()
null.public static org.apache.tamaya.ConfigQuery<Set<String>> transitiveSections()
null.public static org.apache.tamaya.ConfigQuery<Set<String>> sections(Predicate<String> predicate)
predicate - A predicate to deternine, which sections should be returned, not null.null.public static org.apache.tamaya.ConfigQuery<Set<String>> transitiveSections(Predicate<String> predicate)
predicate - A predicate to deternine, which sections should be returned, not null.null.public static org.apache.tamaya.ConfigOperator sectionsRecursive(String... sectionKeys)
sectionKeys - the section keys, not nullpublic static org.apache.tamaya.Configuration combine(String configName, org.apache.tamaya.Configuration... configs)
configName - the new config nameconfigs - the configs to be combined. The entries of the first config are overwritten
by entries of the later instances.public static org.apache.tamaya.spi.PropertySource propertySourceFrom(String name, int ordinal, org.apache.tamaya.Configuration config)
PropertySource, based on the given Configuration. The keys and propertx map
are dynamically calculated, so the returned PropertySource is a real dynamic wrapper.name - the name of the property source, not null.ordinal - ordinal of the property source.config - the config to be mapped, not null.public static org.apache.tamaya.ConfigOperator sectionRecursive(boolean stripKeys,
String... sectionKeys)
sectionKeys - the section keys, not nullstripKeys - if set to true, the section key is stripped away fromMap the resulting key.public static org.apache.tamaya.ConfigQuery<String> jsonInfo()
public static org.apache.tamaya.ConfigQuery<String> jsonInfo(Map<String,String> info)
info - the additional information attributes to be added to the output, e.g. the original request
parameters.public static org.apache.tamaya.ConfigQuery<String> xmlInfo()
public static org.apache.tamaya.ConfigQuery<String> xmlInfo(Map<String,String> info)
info - the additional information attributes to be added to the output, e.g. the original request
parameters.public static org.apache.tamaya.ConfigQuery<String> textInfo()
public static org.apache.tamaya.ConfigQuery<String> textInfo(Map<String,String> info)
info - configuration values to use for filtering.public static org.apache.tamaya.ConfigOperator addItems(Map<String,Object> items, boolean override)
items - the items to be added/replaced.override - if true, all items existing are overridden by the new ones passed.public static org.apache.tamaya.ConfigOperator addItems(Map<String,Object> items)
items - the items, not null.public static org.apache.tamaya.ConfigOperator replaceItems(Map<String,Object> items)
items - the items.public static org.apache.tamaya.ConfigQuery<String> htmlInfo()
public static org.apache.tamaya.ConfigQuery<String> htmlInfo(Map<String,String> info)
info - configuration values to use for filtering.public static org.apache.tamaya.Configuration emptyConfiguration()
Configuration.Configuration, never null.public static org.apache.tamaya.spi.ConfigurationContext emptyConfigurationContext()
ConfigurationContext.ConfigurationContext, never null.Copyright © 2014–2016 Apache Software Foundation. All rights reserved.