Package com.activeviam.properties
Interface IActiveViamPropertyResolver
-
- All Known Implementing Classes:
DefaultPropertyResolver,EnvironmentPropertyResolver,SpringPropertyResolver,SystemPropertyResolver
public interface IActiveViamPropertyResolverInterface for Property Resolvers.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static IActiveViamPropertyResolvercompose(IActiveViamPropertyResolver... resolvers)Creates a singleIActiveViamPropertyResolverfrom a list of resolvers.Objectfetch(IActiveViamProperty prop)Retrieves a property value.default <P extends IActiveViamProperty>
Map<P,Object>fetch(List<P> props)Fetches a list of properties in a Source of properties.
-
-
-
Method Detail
-
fetch
Object fetch(IActiveViamProperty prop)
Retrieves a property value.- Parameters:
prop- the property to retrieve- Returns:
- the value of the property or
null
-
fetch
default <P extends IActiveViamProperty> Map<P,Object> fetch(List<P> props)
Fetches a list of properties in a Source of properties.Usual sources are the System properties, JVM input properties or the Spring Configuration properties.
The Map returned by the resolver should not contain null entries.
- Type Parameters:
P- the type of the property- Parameters:
props- Properties to resolve- Returns:
- Map of the properties with their values in the source
-
compose
static IActiveViamPropertyResolver compose(IActiveViamPropertyResolver... resolvers)
Creates a singleIActiveViamPropertyResolverfrom a list of resolvers.The resolver will iterate over the specified resolvers in the given order until finding a non null value for the property.
- Parameters:
resolvers- the resolvers to combine- Returns:
- a new resolver
-
-