Package net.shibboleth.shared.spring.config

# Class StringToResourceConverter

java.lang.Object
net.shibboleth.shared.spring.config.StringToResourceConverter

All Implemented Interfaces:
  `Aware`, `ApplicationContextAware`, `Converter<String,Resource>`

public class StringToResourceConverter extends Object implements Converter<String,Resource>, ApplicationContextAware
Allows setting `Resource` properties using a string representing a Spring resource. The Spring resource is retrieved by the application context. If the application context is null, then a `PreferFileSystemResourceLoader` is used instead to get the resource.

## Field Summary

Fields
Modifier and Type
Field
Description
`private ApplicationContext`
`applicationContext`
Application context.
`private final org.slf4j.Logger`
`log`
Log.

## Constructor Summary

Constructors
Constructor
Description
`StringToResourceConverter()`

## Method Summary

Modifier and Type
Method
Description
`Resource`
`convert(String source)`
`void`
`setApplicationContext(ApplicationContext context)`

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

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

### Methods inherited from interface org.springframework.core.convert.converter.Converter

`andThen`

## Field Details

### applicationContext

@Nullable private ApplicationContext applicationContext
Application context.

### log

@Nonnull private final org.slf4j.Logger log
Log.

## Constructor Details

### StringToResourceConverter

public StringToResourceConverter()

## Method Details

### convert

@Nullable public Resource convert(@Nonnull String source)

Specified by:
  `convert` in interface `Converter<String,Resource>`

### setApplicationContext

public void setApplicationContext(@Nonnull ApplicationContext context)

Specified by:
  `setApplicationContext` in interface `ApplicationContextAware`