Class SpringPropertiesAdapter

java.lang.Object
org.opensaml.spring.config.SpringPropertiesAdapter
All Implemented Interfaces:
ConfigurationProperties

public class SpringPropertiesAdapter extends Object implements ConfigurationProperties
An implementation of ConfigurationProperties which wraps an instance of Spring PropertyResolver.
  • Field Details

    • propertyResolver

      @Nonnull private PropertyResolver propertyResolver
      The wrapped properties instance.
  • Constructor Details

    • SpringPropertiesAdapter

      public SpringPropertiesAdapter(@Nonnull PropertyResolver wrappedResolver)
      Constructor.
      Parameters:
      wrappedResolver - the wrapped properties resolver instance
  • Method Details

    • getProperty

      @Nullable public String getProperty(@Nonnull String key)
      Return the property value with the specified key, or null.
      Specified by:
      getProperty in interface ConfigurationProperties
      Parameters:
      key - the property key
      Returns:
      the property value, or null
    • getProperty

      @Nonnull public String getProperty(@Nonnull String key, @Nonnull String defaultValue)
      Return the property value with the specified key, or the specified default value if key does not exist.
      Specified by:
      getProperty in interface ConfigurationProperties
      Parameters:
      key - the property key
      defaultValue - the default value to return
      Returns:
      the property value, or the specified default value