| 1 | |
package org.kuali.spring.util; |
| 2 | |
|
| 3 | |
import java.util.Properties; |
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
public class PropertiesRetriever implements ValueRetriever { |
| 9 | |
|
| 10 | |
Properties properties; |
| 11 | |
|
| 12 | |
public PropertiesRetriever() { |
| 13 | 1 | this(null); |
| 14 | 1 | } |
| 15 | |
|
| 16 | |
public PropertiesRetriever(Properties properties) { |
| 17 | 18 | super(); |
| 18 | 18 | setProperties(properties); |
| 19 | 18 | } |
| 20 | |
|
| 21 | |
@Override |
| 22 | |
public String retrieveValue(String key) { |
| 23 | 26 | return properties.getProperty(key); |
| 24 | |
} |
| 25 | |
|
| 26 | |
public Properties getProperties() { |
| 27 | 1 | return properties; |
| 28 | |
} |
| 29 | |
|
| 30 | |
public void setProperties(Properties properties) { |
| 31 | 19 | this.properties = properties; |
| 32 | 19 | } |
| 33 | |
|
| 34 | |
} |