public final class Configuration extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Configuration.Builder |
static interface |
Configuration.Property
Represents a single configuration property.
|
| Constructor and Description |
|---|
Configuration(FeedIdStrategy feedIdStrategy,
ResultFilter resultFilter,
Map<String,String> implementationConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
static Configuration.Builder |
builder() |
FeedIdStrategy |
getFeedIdStrategy() |
Map<String,String> |
getImplementationConfiguration(Collection<? extends Configuration.Property> overridableProperties)
Returns the implementation configuration with the values changed to conform the provided properties.
|
String |
getProperty(Configuration.Property property,
String defaultValue)
Returns the value of the property.
|
ResultFilter |
getResultFilter() |
public Configuration(FeedIdStrategy feedIdStrategy, ResultFilter resultFilter, Map<String,String> implementationConfiguration)
public static Configuration.Builder builder()
public FeedIdStrategy getFeedIdStrategy()
public ResultFilter getResultFilter()
public String getProperty(Configuration.Property property, String defaultValue)
If there is a system property with the name from Configuration.Property.getSystemPropertyNames() ()}, then its value
is returned, otherwise if the property defines an environment variable and that env variable exists, then its
value is returned otherwise the value of a property with a name from Configuration.Property.getPropertyName()
from the values loaded using Configuration.Builder.withConfiguration(Map) or
Configuration.Builder.withConfiguration(Properties) is returned.
property - the property to obtainpublic Map<String,String> getImplementationConfiguration(Collection<? extends Configuration.Property> overridableProperties)
overridableProperties - the properties to override the implementation configuration with.Copyright © 2015 Red Hat, Inc.. All rights reserved.