1 /*** 2 * 3 */ 4 package hu.elte.tribus.util; 5 6 import java.util.Map; 7 import java.util.Properties; 8 9 import org.springframework.beans.factory.FactoryBean; 10 11 /*** 12 * @author kocka 13 * 14 */ 15 public class PropertiesFactory implements FactoryBean { 16 17 private Map<String, String> properties; 18 19 public Object getObject() throws Exception { 20 Properties props = new Properties(); 21 props.putAll(properties); 22 return props; 23 } 24 25 public Class getObjectType() { 26 return Properties.class; 27 } 28 29 public boolean isSingleton() { 30 return true; 31 } 32 33 public Map<String, String> getProperties() { 34 return properties; 35 } 36 37 public void setProperties(Map<String, String> properties) { 38 this.properties = properties; 39 } 40 41 }