Package com.activeviam.properties
Interface IActiveViamPropertyResolver
- All Known Implementing Classes:
DefaultPropertyResolver,EnvironmentPropertyResolver,SpringPropertyResolver,SystemPropertyResolver
public interface IActiveViamPropertyResolver
Interface for Property Resolvers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IActiveViamPropertyResolvercompose(IActiveViamPropertyResolver... resolvers) Creates a singleIActiveViamPropertyResolverfrom a list of resolvers.fetch(IActiveViamProperty prop) Retrieves a property value.default <P extends IActiveViamProperty>
Map<P,Object> Fetches a list of properties in a Source of properties.
-
Method Details
-
fetch
Retrieves a property value.- Parameters:
prop- the property to retrieve- Returns:
- the value of the property or
null
-
fetch
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
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
-