Package com.adaptris.interlok.resolver
Class ResolverImp
- java.lang.Object
-
- com.adaptris.interlok.resolver.ResolverImp
-
- All Implemented Interfaces:
Resolver
- Direct Known Subclasses:
FromEnvironment
,FromSystemProperties
public abstract class ResolverImp extends java.lang.Object implements Resolver
Abstract implementation ofResolver
.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description ResolverImp()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static java.util.Map<java.lang.String,java.lang.String>
asMap(java.util.Properties p)
Convenience method to turn a Properties into a Map<String, String>protected static java.lang.String
resolve(java.lang.String key, java.util.Map<java.lang.String,java.lang.String> map)
Resolve a key against a map.
-
-
-
Method Detail
-
resolve
protected static java.lang.String resolve(java.lang.String key, java.util.Map<java.lang.String,java.lang.String> map)
Resolve a key against a map.- Parameters:
key
- the keymap
- the map of properties / environment- Returns:
- the resolved value or the value of
key
if not found in the map.
-
asMap
protected static java.util.Map<java.lang.String,java.lang.String> asMap(java.util.Properties p)
Convenience method to turn a Properties into a Map<String, String>- Parameters:
p
- the properties, if null, will return an empty map- Returns:
- a map
-
-