Class PropertiesAdapter

java.lang.Object
org.opensaml.core.config.provider.PropertiesAdapter
All Implemented Interfaces:
ConfigurationProperties

public class PropertiesAdapter extends Object implements ConfigurationProperties
An implementation of ConfigurationProperties which wraps an instance of Java Properties.
  • Field Details

    • properties

      @Nonnull private Properties properties
      The wrapped properties instance.
  • Constructor Details

    • PropertiesAdapter

      public PropertiesAdapter(@Nonnull Properties wrappedProperties)
      Constructor.
      Parameters:
      wrappedProperties - the wrapped properties 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