Package org.opensaml.spring.config

# 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 Summary

Fields
Modifier and Type
Field
Description
`private PropertyResolver`
`propertyResolver`
The wrapped properties instance.

## Constructor Summary

Constructors
Constructor
Description
`SpringPropertiesAdapter(PropertyResolver wrappedResolver)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`String`
`getProperty(String key)`
Return the property value with the specified key, or null.
`String`
`getProperty(String key, String defaultValue)`
Return the property value with the specified key, or the specified default value if key does not exist.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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