de.smartics.properties.spi.config.resolve
Class SimplePropertyValueResolver

Package class diagram package SimplePropertyValueResolver
java.lang.Object
  extended by de.smartics.properties.spi.config.resolve.SimplePropertyValueResolver
All Implemented Interfaces:
PropertyValueResolver

@ThreadSafe
public final class SimplePropertyValueResolver
     
     
extends Object
implements PropertyValueResolver

Property value resolver implementation using commons-jexl.

Implementation Notes:
the implementation is thread safe since it only provides read access to the wrapped configuration. If the configuration is accessed by other threads, it is not.

Constructor Summary
SimplePropertyValueResolver(PropertyDescriptorRegistry registry, ConfigurationProperties config)
          Default constructor.
 
Method Summary
 String resolve(String expression)
          Resolves the expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePropertyValueResolver

public SimplePropertyValueResolver(PropertyDescriptorRegistry registry,
                                   ConfigurationProperties config)
Default constructor.

Parameters:
registry - the registry to resolve property descriptors.
config - the configuration to resolve place holders in property values.
Method Detail

resolve

public String resolve(String expression)
               throws ResolveConfigurationException
Resolves the expression.

Specified by:
resolve in interface PropertyValueResolver
Parameters:
expression - the expression to resolve from place holders.
Returns:
the resolved expression.
Throws:
ResolveConfigurationException - on any problem resolving the expression.
See Also:
PropertyValueResolver.resolve(java.lang.String)


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.