public class ChainedPropertyResolver extends Object implements PropertyResolver
PropertyResolver
s that should be used to get a token replacement property. When
constructing the chain the PropertyResolver
s should be listed in the order they should be checked for a
given property.Constructor and Description |
---|
ChainedPropertyResolver(List<? extends PropertyResolver> resolvers)
Creates a chained property resolver given a list of
PropertyResolver s. |
Modifier and Type | Method and Description |
---|---|
Optional<String> |
getProperty(String key)
Returns the value of the specified property.
|
static ChainedPropertyResolver |
of(PropertyResolver... resolvers)
Constructs a
ChainedPropertyResolver given a a list of PropertyResolver s. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getProperty
public ChainedPropertyResolver(List<? extends PropertyResolver> resolvers)
PropertyResolver
s.resolvers
- the list of @link PropertyResolver}s. This list should be in the order you want the
PropertyResolver
s to be evaluated.public Optional<String> getProperty(String key)
PropertyResolver
Optional
if the property is not
found.getProperty
in interface PropertyResolver
key
- The name of the requested property. The key can't be null.Optional
string that contains the value of the requested property, or empty Optional
if property is undefined.public static ChainedPropertyResolver of(PropertyResolver... resolvers)
ChainedPropertyResolver
given a a list of PropertyResolver
s. A property will
attempt to be resolved in the order that the PropertyResolver
s are defined.resolvers
- The list of the resolvers in the order that a property will be resolved.ChainedPropertyResolver
Copyright © 2010-2018, ForgeRock All Rights Reserved.